Commit Graph

18927 Commits

Author SHA1 Message Date
James Rasell b391ec2a06
Merge pull request #8494 from hashicorp/b-fix-snapshot-agent-example-config-file
docs: fix snapshot agent example config file syntax and values.
2020-07-22 14:09:11 +02:00
Mahmood Ali 1233a346bc
Merge pull request #8493 from lhaig/master
Update snapshot-save.mdx
2020-07-22 07:41:05 -04:00
James Rasell ba25492fc4
docs: fix snapshot agent example config file syntax and values. 2020-07-22 13:30:18 +02:00
Lance Haig 014175de45
Update snapshot-save.mdx
Fix the nomad operator snapshot command examples.
They were missing the "operator" option
2020-07-22 13:04:47 +02:00
kobayashi e095a70bd6
Add capabilities to task drivers' pages (#8476) 2020-07-21 14:54:31 -04:00
Michael Lange ec4b96b5e6
Merge pull request #8477 from hashicorp/b-ui/cross-region-alloc-lifecycle-buttons
UI: Always add the active region as a query param to API requests
2020-07-21 09:21:54 -07:00
Michael Lange 588c1217cf Changelog entry for the region qp bug fix 2020-07-21 09:02:39 -07:00
Michael Lange 6b984548ab Test coverage for the deployment adapter action 2020-07-21 09:02:39 -07:00
Michael Lange 9fda4412fa Add region coverage to node adapter action tests 2020-07-21 09:02:39 -07:00
Michael Lange 3d1c9283a1 Test all allocation adapter actions with and without a region
This involves a refactor to prevent immense verbosity.
2020-07-21 09:00:21 -07:00
Michael Lange 00b805b500 Test region query param for job adapter actions 2020-07-21 09:00:20 -07:00
Michael Lange 1cb0de64e0 Always send region as a query param 2020-07-21 09:00:20 -07:00
Michael Lange 5e01266940 Refactor job adapter test to simplify setting up region and namespace state 2020-07-21 09:00:20 -07:00
Mahmood Ali c29dec2ebd
format job init hcl (#8483) 2020-07-21 11:49:02 -04:00
Drew Bailey 59d8f7acce
changelog for license apply bug (#8482) 2020-07-21 11:32:19 -04:00
Mahmood Ali b614d0a67b
docs: enabled option for nvidia device plugin (#8480) 2020-07-21 10:14:32 -04:00
Mahmood Ali c2d3c3e431
nvidia: support disabling the nvidia plugin (#8353) 2020-07-21 10:11:16 -04:00
Mahmood Ali 9c4bde5d9f
Changelog updates and tweaks (#8479) 2020-07-21 08:05:20 -04:00
Buck Doyle abbdf00988
Update CHANGELOG with 8460 and 8463 (#8474) 2020-07-20 16:21:35 -05:00
Buck Doyle 7f0177548d
Add specificity to exec allocation URL generation (#8463)
Thanks to @notnoop for this UX improvement suggestion.
The allocation’s task group is always known, so it
might as well be preselected in the sidebar when the
exec window opens. Also, if the task group only has
one task, might as well preselect it too.
2020-07-20 16:07:39 -05:00
Buck Doyle 8a4dc0726d
Fix typo in exec button URL-generation (#8460)
This closes #8422, another bug facilitated by the difficulty
of automated testing when opening another window. Thanks to
@notnoop for narrowing this down.
2020-07-20 16:06:55 -05:00
Tim Gross b56b0a1c8e
remove stalebot (#8466)
Bring Nomad in line with other HashiCorp projects and remove stalebot. We get
little value in cleaning up issues automatically this way, it adds extra work
for maintainers when we have issues waiting on the backlog that we intend to
do, and it presents an unkind experience to issue contributors who get their
issues closed by an impersonal bot.
2020-07-20 14:50:32 -04:00
Tim Gross 1df0f1a73f
changelog for host_network bug (#8469) 2020-07-20 13:33:49 -04:00
Mahmood Ali 226f25fdba
Merge pull request #8467 from hashicorp/c-golang-1.14.6
Use golang 1.14.6
2020-07-20 12:37:12 -04:00
Mahmood Ali 4f2e09807f update changelog 2020-07-20 12:14:25 -04:00
dependabot[bot] a5064a55f9
Bump lodash from 4.17.14 to 4.17.19 in /ui (#8449)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.14...4.17.19)
2020-07-20 11:08:06 -05:00
Mahmood Ali 522560add2 Use golang 1.14.6
Pick up fixes [golang 1.14.6 bug fixes](https://github.com/golang/go/issues?q=milestone%3AGo1.14.6+label%3ACherryPickApproved), specially the one where reflect.DeepEqual returns true even if values don't match, affecting our tests integrity.
2020-07-20 12:04:38 -04:00
Tim Gross 280c2de3e2
changelog item for MRD canary bugfix (#8465) 2020-07-20 11:36:24 -04:00
Tim Gross 1ca2c4ec2c scheduler: DesiredCanaries can be set on every pass safely
The reconcile loop sets `DeploymentState.DesiredCanaries` only on the first
pass through the loop and if the job is not paused/pending. In MRD,
deployments will make one pass though the loop while "pending", and were not
ever getting `DesiredCanaries` set. We can't set it in the initial
`DeploymentState` constructor because the first pass through setting up
canaries expects it's not there yet. However, this value is static for a given
version of a job because it's coming from the update stanza, so it's safe to
re-assign the value on subsequent passes.
2020-07-20 11:25:53 -04:00
Tim Gross d3341a2019 refactor: make it clear where we're accessing dstate
The field name `Deployment.TaskGroups` contains a map of `DeploymentState`,
which makes it a little harder to follow state updates when combined with
inconsistent naming conventions, particularly when we also have the state
store or actual `TaskGroup`s in scope. This changeset changes all uses to
`dstate` so as not to be confused with actual TaskGroups.
2020-07-20 11:25:53 -04:00
Lang Martin a3bfd8c209
structs: Job.Validate only allows stop_after_client_disconnected on batch and service jobs (#8444)
* nomad/structs/structs: add to Job.Validate

* Update nomad/structs/structs.go

Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>

* nomad/structs/structs: match error strings to the config file

* nomad/structs/structs_test: clarify the test a bit

* nomad/structs/structs_test: typo in the test error comparison

Co-authored-by: Mahmood Ali <mahmood@hashicorp.com>
2020-07-20 10:27:25 -04:00
Mahmood Ali f94438213e
Merge pull request #8461 from hashicorp/backport-ent-changes-20200720
Back-port Some Enterprise changes
2020-07-20 10:25:34 -04:00
Mahmood Ali 78568b8e63 Remove unused state.TestInitState 2020-07-20 09:55:55 -04:00
Mahmood Ali a483dde8b9 minor tweaks from Ent 2020-07-20 09:25:09 -04:00
Mahmood Ali 5adbd9f666 enterprise specific state store objects 2020-07-20 09:22:26 -04:00
Michael Schurter cc8140f5a6
Merge pull request #8458 from hashicorp/docs-8457
docs: document enterprise upgrade bug #8457
2020-07-17 13:14:18 -07:00
Michael Schurter 30fbec3557 docs: document enterprise upgrade bug #8457 2020-07-17 11:57:29 -07:00
Mahmood Ali 72ac33e4e7 Refactor setupLoggers 2020-07-17 11:05:57 -04:00
Mahmood Ali ad2d484974 Set AgentShutdown 2020-07-17 11:04:57 -04:00
Mahmood Ali ec9a12e54e Fix pro tags 2020-07-17 11:02:00 -04:00
Tim Gross fe5f5e35aa
mrd: reconcile should treat pending deployments as paused (#8446)
If a job update includes a task group that has no changes, those allocations
have their version bumped in-place. The ends up triggering an eval from
`deploymentwatcher` when it verifies their health. Although this eval is a
no-op, we were only treating pending deployments the same as paused when
the deployment was a new MRD. This means that any eval after the initial one
will kick off the deployment, and that caused pending deployments to "jump
the queue" and run ahead of schedule, breaking MRD invariants and resulting in
a state with all regions blocked.

This behavior can be replicated even in the case of job updates with no
in-place updates by patching `deploymentwatcher` to inject a spurious no-op
eval. This changeset fixes the behavior by treating pending deployments the
same as paused in all cases in the reconciler.
2020-07-16 13:00:08 -04:00
Charlie Voiselle 551ac184ee
Merge pull request #8437 from angrycub/d-reschedule-in-deploys
[docs] Rescheduling does happen during deployments
2020-07-15 15:24:21 -04:00
Mahmood Ali 647c5e4c03
Merge pull request #8435 from hashicorp/b-atomic-job-register
Atomic eval insertion with job (de-)registration
2020-07-15 13:48:07 -04:00
Michael Schurter 456e0c2e3f
Merge pull request #8441 from hashicorp/build-go1.14.5
build: update from Go 1.14.4 to Go 1.14.5
2020-07-15 10:34:15 -07:00
Mahmood Ali b6e9265d0f
Merge pull request #8383 from hashicorp/docs-security-model-followup
Revise security model feedback
2020-07-15 13:11:39 -04:00
Michael Schurter db14a4d19c build: update from Go 1.14.4 to Go 1.14.5
Go 1.14.4 contains two CVEs which are fixed in 1.14.5:

 - [CVE-2020-15586](https://golang.org/issue/34902)
 - [CVE-2020-14039](https://golang.org/issue/39360)

Upon consideration with HashiCorp security these CVEs are considered low
severity for Nomad and no new security fix binary will be released.
2020-07-15 09:49:06 -07:00
Mahmood Ali 420f244df4
Merge pull request #8436 from kneufeld/master
fixed typo in output
2020-07-15 12:18:48 -04:00
Mahmood Ali aa500f7ba3 comment compat concern in fsm.go 2020-07-15 11:23:49 -04:00
Mahmood Ali f4a921f2be no need to handle duplicate evals anymore 2020-07-15 11:14:49 -04:00
Mahmood Ali a314744210 only set args.Eval after all servers upgrade
We set the Eval field on job (de-)registration only after all servers
get upgraded, to avoid dealing with duplicate evals.
2020-07-15 11:10:57 -04:00