Commit Graph

18892 Commits

Author SHA1 Message Date
Mahmood Ali
68bd10c22d minor tweaks from Ent 2020-07-20 09:25:09 -04:00
Mahmood Ali
040cc8f5af enterprise specific state store objects 2020-07-20 09:22:26 -04:00
Mahmood Ali
32910ae0ba Refactor setupLoggers 2020-07-17 11:05:57 -04:00
Mahmood Ali
c7828c1f7c Set AgentShutdown 2020-07-17 11:04:57 -04:00
Mahmood Ali
c5b2895b0b Fix pro tags 2020-07-17 11:02:00 -04:00
Tim Gross
3b52b39c50 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
238f7dcb57 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
24a7506a36 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
7346774771 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
bee8efd771 Merge pull request #8383 from hashicorp/docs-security-model-followup
Revise security model feedback
2020-07-15 13:11:39 -04:00
Michael Schurter
b7e677d315 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
71d433dfa2 Merge pull request #8436 from kneufeld/master
fixed typo in output
2020-07-15 12:18:48 -04:00
Mahmood Ali
37ad947607 comment compat concern in fsm.go 2020-07-15 11:23:49 -04:00
Mahmood Ali
921a42b487 no need to handle duplicate evals anymore 2020-07-15 11:14:49 -04:00
Mahmood Ali
a6a96c47e4 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
Mahmood Ali
6a082ade33 time.Now().UTC().UnixNano() -> time.Now().UnixNano() 2020-07-15 08:49:17 -04:00
Charlie Voiselle
2611a98f74 [docs] Reschedule does happen during deployments 2020-07-14 16:29:30 -04:00
Kurt Neufeld
789e3091a1 fixed typo in output (#1) 2020-07-14 10:33:17 -06:00
Mahmood Ali
97c69ee9a7 Atomic eval insertion with job (de-)registration
This fixes a bug where jobs may get "stuck" unprocessed that
dispropotionately affect periodic jobs around leadership transitions.
When registering a job, the job registration and the eval to process it
get applied to raft as two separate transactions; if the job
registration succeeds but eval application fails, the job may remain
unprocessed. Operators may detect such failure, when submitting a job
update and get a 500 error code, and they could retry; periodic jobs
failures are more likely to go unnoticed, and no further periodic
invocations will be processed until an operator force evaluation.

This fixes the issue by ensuring that the job registration and eval
application get persisted and processed atomically in the same raft log
entry.

Also, applies the same change to ensure atomicity in job deregistration.

Backward Compatibility

We must maintain compatibility in two scenarios: mixed clusters where a
leader can handle atomic updates but followers cannot, and a recent
cluster processes old log entries from legacy or mixed cluster mode.

To handle this constraints: ensure that the leader continue to emit the
Evaluation log entry until all servers have upgraded; also, when
processing raft logs, the servers honor evaluations found in both spots,
the Eval in job (de-)registration and the eval update entries.

When an updated server sees mix-mode behavior where an eval is inserted
into the raft log twice, it ignores the second instance.

I made one compromise in consistency in the mixed-mode scenario: servers
may disagree on the eval.CreateIndex value: the leader and updated
servers will report the job registration index while old servers will
report the index of the eval update log entry. This discripency doesn't
seem to be material - it's the eval.JobModifyIndex that matters.
2020-07-14 11:59:29 -04:00
Tim Gross
3703489702 MRD: all regions should start pending (#8433)
Deployments should wait until kicked off by `Job.Register` so that we can
assert that all regions have a scheduled deployment before starting any
region. This changeset includes the OSS fixes to support the ENT work.

`IsMultiregionStarter` has no more callers in OSS, so remove it here.
2020-07-14 10:57:37 -04:00
Tim Gross
5cfd314660 changelog for MRD datacenters validation (#8429) 2020-07-13 14:03:40 -04:00
Tim Gross
3dd29953f7 multiregion: allow empty region DCs (#8426)
It's supposed to be possible for a region not to have `datacenters` set so
that it can use the job's `datacenters` field. This requires that operators
use the same DC name across multiple regions, but that's the default client
configuration.
2020-07-13 13:34:19 -04:00
Michael Schurter
f6f697a3fb Merge pull request #7042 from hashicorp/docs-healthy-deadline
docs: clarify healthy/progress_deadline relationship
2020-07-13 08:40:11 -07:00
Buck Doyle
fc1fce6934 Change edition to Octane (#8418)
This updates the Ember edition setting to Octane, which I removed from #8319
because it required the template-only Glimmer components setting to be turned
on, which this does. These changes to templates accommodate that setting.
2020-07-13 09:26:12 -05:00
Michael Lange
dc6aa33916 Merge pull request #8412 from hashicorp/b-ui/prefix-run-button
UI: Filter out new records from the job list page
2020-07-10 15:41:43 -07:00
Michael Lange
8c3d514d0c Changelog addition 2020-07-10 15:31:25 -07:00
Michael Lange
0d433b1c89 Filter out new records from the job list page
When a prefix is set and the run job button is clicked,
the new job causes an error because it has no name yet.
2020-07-10 15:29:52 -07:00
Michael Lange
99fce00e21 Merge pull request #8413 from hashicorp/b-ui/namespaces-after-token
UI: Reset the system and refetch namespaces with every token change
2020-07-10 15:29:35 -07:00
Michael Lange
da024109ee Changelog additions 2020-07-10 15:20:25 -07:00
Michael Lange
970ed734df Reset the system and refetch namespaces with every token change 2020-07-10 15:18:36 -07:00
Seth Hoenig
1307395298 Merge pull request #8419 from hashicorp/docs-cl-vault-id-checks
docs: update changelog for vault policies lookup fix
2020-07-10 13:18:11 -05:00
Seth Hoenig
0c54ecffd0 docs: update changelog for vault policies lookup fix 2020-07-10 13:14:12 -05:00
Seth Hoenig
d484eda7ec Merge pull request #8417 from hashicorp/docs-docker-kill-signal
docs: clarify kill_signal default for docker
2020-07-10 11:50:21 -05:00
Seth Hoenig
4aee85660e Merge pull request #8335 from hashicorp/f-cnative-host-e2e
e2e: add tests for connect native
2020-07-10 10:24:43 -05:00
Seth Hoenig
bc00864755 e2e: connect jobID code golf 2020-07-10 10:24:13 -05:00
Mahmood Ali
467bd62f26 Merge pull request #8333 from hashicorp/b-test-tweak-20200701
tests: avoid os.Exit in a test
2020-07-10 11:18:28 -04:00
Nick Ethier
3962eecc25 nomad: recanonicalize network after connect hook (#8407)
* nomad: recanonicalize network after connect hook
2020-07-10 10:59:51 -04:00
Seth Hoenig
1def2ee2a9 docs: clarify kill_signal default for docker
Before docker, the only default was `SIGINT` for `kill_signal`. The
docker driver however defaults to `SIGTERM`, and we should document
as such.

Fixes #7140
2020-07-10 09:57:49 -05:00
James Rasell
1f09855cd4 Merge pull request #8416 from hashicorp/jrasell-minor-scaling-docs-fixes
docs: fix minor incorrect syntax in autoscaling plugin docs.
2020-07-10 16:31:19 +02:00
James Rasell
7d8a4333b2 docs: fix minor incorrect syntax in autoscaling plugin docs.
This changes fixes a syntax error in the autoscaling apm plugin
docs as well as updates the scaling stanza doc. The stazna wording
implied its use was only for external autoscalers, whereas it also
is used by the UI.
2020-07-10 16:07:29 +02:00
Buck Doyle
7a5c7529d5 Add #8409 to changelog (#8414) 2020-07-10 07:53:46 -05:00
Buck Doyle
121cd1321b Fix client allocations table heading order (#8409)
This closes #8408. Thanks to @gmichalec-pandora for letting us
know about this.
2020-07-10 07:27:20 -05:00
Michael Lange
e8a8d089ee Merge pull request #8405 from kaybr01/patch-1
Update preemption.mdx
2020-07-09 16:22:30 -07:00
Buck Doyle
8b83cac9bd Add explicit this to templates (#8388)
This is the result of running the no-implicit-this-codemod, some manual fixes,
and the addition of a linting rule to prevent future ambiguity.
2020-07-09 15:19:07 -05:00
Buck Doyle
0db4324275 Update template linting and fix missed curly invocations (#8382)
This includes fixes for newer template lint rules that came along with
updating that dependency, which was necessary to be able to use
the no-curly-component-invocation rule. It also updates some curly
invocations that I missed in #8075.
2020-07-09 12:30:11 -05:00
Chris Baker
1f6e76ba7d Merge pull request #8406 from hashicorp/post-release
Post release: return to dev
2020-07-09 11:54:15 -05:00
Chris Baker
9e397f281b updated changelog for 0.12.1 2020-07-09 16:53:18 +00:00
Chris Baker
b233956c2b version to 0.12.1-dev 2020-07-09 16:48:54 +00:00
Chris Baker
5ef77f54fa Merge branch 'release-0.12.0' into post-release 2020-07-09 16:48:04 +00:00
Chris Baker
af70225439 version to 1.0.0-dev (!!!!) 2020-07-09 16:44:04 +00:00