Commit Graph

15163 Commits

Author SHA1 Message Date
Michael Schurter 228314ebd3
Fix links. 2019-05-20 11:44:47 -07:00
Michael Schurter 637ac1a0fb Add PR link to changelog for #5702 2019-05-20 11:33:23 -07:00
Michael Schurter d94c99df86
Fix typo. 2019-05-20 11:27:16 -07:00
Michael Lange 084c4cc95f Standardize on Abort over Cancel 2019-05-20 11:08:16 -07:00
Michael Lange c9220cb929 Replace the adapter cancellation methods with a cancellation token system 2019-05-20 10:29:22 -07:00
Mahmood Ali 807e7b90e0 drivers/exec: Restore 0.8 capabilities
Nomad 0.9 incidentally set effective capabilities that is higher than
what's expected of a `nobody` process, and what's set in 0.8.

This change restores the capabilities to ones used in Nomad 0.9.
2019-05-20 13:11:29 -04:00
Mahmood Ali f25a2fbd27
Merge pull request #5275 from hashicorp/f-api-config-httpclient
api: allow configuring http client
2019-05-20 12:36:00 -04:00
Mahmood Ali 0622019267 remove "incidentally" exported internal function
`*Config.ConfigureTLS()` is invoked internally by `NewClient` and API
consumers should not invoke directly.

Now that http client is created in `api.NewClient`,
`*Config.ConfigureTLS` makes no sense.  API consumers that call it
explicitly can remove the invocation and preserve the behavior.
2019-05-20 11:58:43 -04:00
Mahmood Ali 35c59fbd1f elaborate on shell interpolation and examples 2019-05-20 10:06:15 -04:00
Mahmood Ali cd64ada95d Run TestClientAllocations_Restart_ACL test 2019-05-17 20:30:23 -04:00
Michael Schurter 0e39927782 nomad: emit more detailed error
Avoid returning context.DeadlineExceeded as it lacks helpful information
and is often ignored or handled specially by callers.
2019-05-17 14:37:42 -07:00
Michael Schurter b80a7e0feb nomad: wait for state store to sync in plan apply
Wait for state store to catch up with raft when applying plans.
2019-05-17 14:37:12 -07:00
Omar Khawaja 8039426701
Vagrant optional (#5724)
* specify Vagrant as optional in getting started and installation

* edit next steps
2019-05-17 16:50:16 -04:00
Michael Schurter 1bc731da47 nomad: remove unused NotifyGroup struct
I don't think it's been used for a long time.
2019-05-17 13:30:23 -07:00
Michael Schurter 9732bc37ff nomad: refactor waitForIndex into SnapshotAfter
Generalize wait for index logic in the state store for reuse elsewhere.
Also begin plumbing in a context to combine handling of timeouts and
shutdown.
2019-05-17 13:30:23 -07:00
Mahmood Ali 0aaefe8cca api: allow configuring http client
Allow clients to configure httpClient, e.g. set a pooled/keep-alive
client.

When caller configures HttpClient explicitly, we aim to use as-is; e.g.
we assume it's configured with TLS already.  Expose `ConfigureTLS` to
aid api consumers with configuring their http client.

Also, removes `SetTimeout` call that I believe is internal only and has
odd side-effects when called on already created config.  Also deprecates
`config.ConfigureTLS` in preference to the new `ConfigureTLS`.
2019-05-17 16:26:58 -04:00
Lang Martin 0256cf700d
Merge pull request #5649 from hashicorp/b-lookup-exe-chroot
lookup executables inside chroot
2019-05-17 15:07:41 -04:00
Mahmood Ali ccac5ad3e4
Merge pull request #5722 from hashicorp/f-nomad-exec-escape-try2
escapingio: handle stalled readers
2019-05-17 14:52:54 -04:00
Mahmood Ali b77d46a50c address review feedback 2019-05-17 13:49:08 -04:00
Mahmood Ali f5a4fcac3f Restore tty start before emitting errors
Otherwise, the error message appears indented unexpectedly.
2019-05-17 11:58:31 -04:00
Mahmood Ali 4013847ada escapingio: handle stalled readers
Handle stalled readers (e.g. network write got stalled), by having
escaping io have a buffer so it looks for escaped characters in the
stream.

This simplifies the implementation considerably, as we can look
for new lines followed by escaped characters directly.

Also, we add a test to ensure that any partial results are flushed to
readers.
2019-05-17 11:58:31 -04:00
Mahmood Ali 5bd946d790 escapingio: thread-safe struct for escaped chars
Use a helper struct for capturing escaped characters that's thread safe.
2019-05-17 10:22:24 -04:00
Mahmood Ali 6356d9da6a
Merge pull request #5720 from hashicorp/f-nomad-exec-escape
Support escaping sequence for terminating alloc exec
2019-05-16 17:34:54 -04:00
Preetha Appan 6388f668ef
Add preemption to changelog 2019-05-16 16:21:15 -05:00
Mahmood Ali b6d68e19fa avoid printing counts in tests 2019-05-16 17:07:32 -04:00
Mahmood Ali 1293a8511c
Fix typos and comments
Co-Authored-By: Michael Schurter <michael.schurter@gmail.com>
2019-05-16 17:06:03 -04:00
Mahmood Ali 689453bd3a Implement escaping chrarcter for alloc exec 2019-05-16 16:22:52 -04:00
Mahmood Ali b02852ef62 Add a escaping reader that mimics ssh behavior
Adds an escaping reading that mimics ssh handling of input escape
sequences.

The reader parses chunks to look for \n~
2019-05-16 16:22:52 -04:00
Preetha 19cfab11d1
Merge pull request #5709 from jweissig/patch-10
docs: fixed wording
2019-05-16 11:06:43 -05:00
Preetha c8fdf20c66
Merge pull request #5717 from hashicorp/b-plan-apply-preemptions
Fix bug in plan applier introduced in PR-5602
2019-05-16 11:01:05 -05:00
Danielle Lancashire ddf7b19288 changelog: Update for eval-broker fix 2019-05-16 16:03:04 +01:00
Preetha Appan 84cc5ddd57
update changelog 2019-05-15 22:00:48 -05:00
Preetha 2dcd4291f8
Merge pull request #5702 from hashicorp/f-filter-by-create-index
Filter deployments by create index
2019-05-15 21:50:41 -05:00
Preetha Appan 1188797507
Merge branch 'f-filter-by-create-index' of github.com:hashicorp/nomad into f-filter-by-create-index 2019-05-15 21:17:34 -05:00
Preetha Appan 2c5c16111e
Add -all to help text and flags 2019-05-15 21:16:57 -05:00
Preetha 555dd23c2c
remove stray newline
Co-Authored-By: Danielle <dani@builds.terrible.systems>
2019-05-15 21:11:52 -05:00
Preetha Appan 2b787aad7e
Fix bug in plan applier introduced in PR-5602
This fixes a bug in the state store during plan apply. When
denormalizing preempted allocations it incorrectly set the preemptor's
job during the update. This eventually causes a panic downstream in the
client. Added a test assertion that failed before and passes after this fix
2019-05-15 20:34:06 -05:00
Danielle d202582502
Merge pull request #5699 from hashicorp/dani/b-eval-broker-lifetime
Eval Broker: Prevent redundant enqueue's when a node is not a leader
2019-05-15 23:30:52 +01:00
Buck Doyle e40197a7a5
Merge pull request #5715 from hashicorp/b-precommit-linting
Restore precommit linting
2019-05-15 16:44:19 -05:00
Buck Doyle 4f372ac6b2
Merge pull request #5714 from hashicorp/b-empty-clients-jobs-facets-alignment
Change clients/jobs facets to always right-align
2019-05-15 15:25:05 -05:00
Buck Doyle 16ba41101b Restore precommit linting
The two pairs of quotes were causing no files to match.
2019-05-15 14:48:16 -05:00
Omar Khawaja c7c9f156ea
change GRPC to gRPC (#5712) 2019-05-15 15:02:16 -04:00
Buck Doyle da65595db0 Change clients/jobs facets to always right-align
This changes the templates so the element that contains
the search box is always present, instead hiding only
the box itself when there’s nothing to search. Keeping
the empty element lets it take up its flexbox space so
the facets will no longer be in the centre.
2019-05-15 13:25:30 -05:00
Preetha Appan 843e7cc6af
update changelog 2019-05-15 12:59:07 -05:00
Preetha 5e5c1a50ae
Merge pull request #5713 from hashicorp/b-5698-inf-allocation-spread
Fix edge case with spread scoring
2019-05-15 12:54:24 -05:00
Preetha Appan 374eee421f
Fix comment and assert score in test case 2019-05-15 12:35:57 -05:00
Nick Ethier f0b9f8e37a
fix missing brace 2019-05-15 13:02:04 -04:00
Mahmood Ali bfd229918a fix typo 2019-05-15 13:01:05 -04:00
Nick Ethier 0d851b5d11
scheduler: add check to prohibit returning inf during spread boost calculation 2019-05-15 13:00:24 -04:00
Mahmood Ali c057c6dc44
Merge pull request #5633 from hashicorp/f-nomad-exec-parts-02-cli
nomad exec part 2: CLI
2019-05-15 12:50:42 -04:00