Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consul: add support for service weight #24186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mvegter
Copy link
Contributor

@mvegter mvegter commented Oct 13, 2024

Manual verification

No `weights`
$ curl -s http://127.0.0.1:8500/v1/agent/services  | jq '.[] | select(.Service=="global-redis-check") | .Weights'
{
  "Passing": 1,
  "Warning": 1
}

weights {}
$ ./bin/nomad job plan ./job.hcl
+/- Job: "redis"
+/- Task Group: "cache" (1 in-place update)
  +/- Task: "redis" (forces in-place update)
    +/- Service {
        Address:           ""
        ...
      + Weights {
        + Passing: "1"
        + Warning: "1"
        }
        }
$ curl -s http://127.0.0.1:8500/v1/agent/services  | jq '.[] | select(.Service=="global-redis-check") | .Weights'
{
  "Passing": 1,
  "Warning": 1
}	

weights {
  passing = 5
}
$ ./bin/nomad job plan ./job.hcl
+/- Job: "redis"
+/- Task Group: "cache" (1 in-place update)
  +/- Task: "redis" (forces in-place update)
    +/- Service {
          Address:           ""
          ...
      +/- Weights {
        +/- Passing: "1" => "5"
            Warning: "1"
          }
        }
$ curl -s http://127.0.0.1:8500/v1/agent/services  | jq '.[] | select(.Service=="global-redis-check") | .Weights'
{
  "Passing": 5,
  "Warning": 1
}

@mvegter
Copy link
Contributor Author

mvegter commented Oct 14, 2024

=== NAME  TestVaultCompat/testVaultVersions
    vaultcompat_test.go:326: download: installing vault at /tmp/vault-bins/1.18.0
    vaultcompat_test.go:332: 
        vaultcompat_test.go:332: expected nil error
        ↪ error: exit status 1
        ↪ PostScript | annotation ↷
        	failed to download vault 1.18.0: hc-install: will install vault@1.18.0
        failed to install vault@1.18.0: unexpected Content-Type: "application/vnd+hashicorp.releases-api.v1+json"

Seems like CI is flaky here, unrelated to the changeset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant