Commit Graph

2651 Commits

Author SHA1 Message Date
Mahmood Ali
5333d019b4 accomodate enterprise specific commands
`nomad operator snapshot agent` is an Enterprise specific command
2020-06-22 10:27:25 -04:00
Michael Schurter
6886edd1fc Merge pull request #8208 from hashicorp/f-multi-network
multi-interface network support
2020-06-19 15:46:48 -07:00
Mahmood Ali
a1a140ca5d Merge pull request #8214 from hashicorp/docs-snapshot-update
Update changelog and snapshot docs
2020-06-19 14:27:12 -04:00
Mahmood Ali
6f20d336ce Apply suggestions from code review
Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-06-19 13:36:22 -04:00
Mahmood Ali
08746faad1 cli: use <file> for consistency 2020-06-19 12:19:38 -04:00
Mahmood Ali
5b77a03c37 complete missed message 2020-06-19 11:02:36 -04:00
Mahmood Ali
0821c0a7e3 Merge pull request #8082 from hashicorp/f-raft-multipler
Implement raft multipler flag
2020-06-19 10:04:59 -04:00
Nick Ethier
ad8ced3873 multi-interface network support 2020-06-19 09:42:10 -04:00
Mahmood Ali
9c2c03724b Merge pull request #8192 from hashicorp/f-status-allnamespaces-2
CLI Allow querying all namespaces for jobs and allocations - Try 2
2020-06-18 20:16:52 -04:00
Nick Ethier
e9ff8a8daa Task DNS Options (#7661)
Co-Authored-By: Tim Gross <tgross@hashicorp.com>
Co-Authored-By: Seth Hoenig <shoenig@hashicorp.com>
2020-06-18 11:01:31 -07:00
Mahmood Ali
7e51f80d1d cli: warn on multiple prefix matches when querying all namespaces 2020-06-17 16:32:51 -04:00
Mahmood Ali
f376f7338c cli: query all namespaces for alloc subcommands 2020-06-17 16:31:06 -04:00
Mahmood Ali
85db7187fb cli: jobs allow querying jobs in all namespaces 2020-06-17 16:31:01 -04:00
Mahmood Ali
2f9fc04e05 use '*' to indicate all namespaces
This reverts the introduction of AllNamespaces parameter that was merged
earlier but never got released.
2020-06-17 16:27:43 -04:00
Tim Gross
45c2e875f8 multiregion: change AutoRevert to OnFailure 2020-06-17 11:05:45 -04:00
Tim Gross
02209b1371 Multiregion job registration
Integration points for multiregion jobs to be registered in the enterprise
version of Nomad:
* hook in `Job.Register` for enterprise to send job to peer regions
* remove monitoring from `nomad job run` and `nomad job stop` for multiregion jobs
2020-06-17 11:04:58 -04:00
Tim Gross
e620ff7f0f use constants from http package 2020-06-17 11:04:02 -04:00
Tim Gross
c0974fe9af multiregion CLI: nomad deployment unblock 2020-06-17 11:03:44 -04:00
Drew Bailey
ce8f230cab Multiregion deploy status and job status CLI 2020-06-17 11:03:34 -04:00
Tim Gross
f64f5a645c Multiregion structs
Initial struct definitions, jobspec parsing, validation, and conversion
between Nomad structs and API structs for multi-region deployments.
2020-06-17 11:00:14 -04:00
Chris Baker
4a6ec2c13e added -preserve-counts to job run CLI, updated website 2020-06-16 18:45:28 +00:00
Chris Baker
65bdd84822 removed api.RegisterJobRequest in favor of api.JobRegisterRequest
modified `job inspect` and `job run -output` to use anonymous struct to keep previous behavior
2020-06-16 18:45:17 +00:00
Chris Baker
8590ae3d60 wip: added PreserveCounts to struct.JobRegisterRequest, development test for Job.Register 2020-06-16 18:45:17 +00:00
James Rasell
cc83d19eed Merge pull request #8162 from hashicorp/b-gh-8161
cli: fix malformed alloc status address list when more than 1 addr
2020-06-16 16:35:53 +02:00
James Rasell
c74c84f2c5 cli: fix malformed alloc status address list when more than 1 addr 2020-06-15 14:35:47 +02:00
Mahmood Ali
14cd3da252 Apply suggestions from code review
Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2020-06-15 08:32:16 -04:00
Mahmood Ali
bd48db20e2 clarify error message
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2020-06-09 11:26:52 -04:00
Mahmood Ali
fad0fafa9f tests: client already disabled 2020-06-07 16:38:11 -04:00
Mahmood Ali
519447d1c0 tests: prefix agent logs to identify agent sources 2020-06-07 16:38:11 -04:00
Mahmood Ali
669b75d621 implement snapshot restore CLI 2020-06-07 15:47:07 -04:00
Mahmood Ali
97fb054c9d basic snapshot restore 2020-06-07 15:46:23 -04:00
Seth Hoenig
15fb4c990a deps: Switch to Go modules for dependency management
This PR switches the Nomad repository from using govendor to Go modules
for managing dependencies. Aspects of the Nomad workflow remain pretty
much the same. The usual Makefile targets should continue to work as
they always did. The API submodule simply defers to the parent Nomad
version on the repository, keeping the semantics of API versioning that
currently exists.
2020-06-02 14:30:36 -05:00
Mahmood Ali
3b04afee2e Merge pull request #8047 from hashicorp/f-snapshot-save
API for atomic snapshot backups
2020-06-01 07:55:16 -04:00
Mahmood Ali
781f110489 Apply suggestions from code review
Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
2020-05-31 21:29:17 -04:00
Mahmood Ali
65937ffd21 Merge pull request #8001 from hashicorp/f-jobs-list-across-nses
endpoint to expose all jobs across all namespaces
2020-05-31 21:28:03 -04:00
Mahmood Ali
a9cf263888 implement raft multiplier 2020-05-31 12:24:27 -04:00
Drew Bailey
967facc55e removes pro tags (#8014) 2020-05-28 15:40:17 -04:00
Drew Bailey
7fc495e30e Oss license support for ent builds (#8054)
* changes necessary to support oss licesning shims

revert nomad fmt changes

update test to work with enterprise changes

update tests to work with new ent enforcements

make check

update cas test to use scheduler algorithm

back out preemption changes

add comments

* remove unused method
2020-05-27 13:46:52 -04:00
Drew Bailey
43ab5cd7ed Revert "disable license cli commands" 2020-05-26 12:39:39 -04:00
Seth Hoenig
051e387d0c build: use hashicorp hclfmt
We have been using fatih/hclfmt which is long abandoned. Instead, switch
to HashiCorp's own hclfmt implementation. There are some trivial changes in
behavior around whitespace.
2020-05-24 18:31:57 -05:00
Mahmood Ali
73e4bf63ac implement snapshot inspect CLI 2020-05-21 20:04:38 -04:00
Mahmood Ali
845788437b Implement snapshot save CLI 2020-05-21 20:04:38 -04:00
Mahmood Ali
f4fcc1c02c Endpoint for snapshotting server state 2020-05-21 20:04:38 -04:00
James Rasell
87d51e6898 api: return custom error if API attempts to decode empty body. 2020-05-19 15:46:31 +02:00
Mahmood Ali
9813a55d44 endpoint to expose all jobs across all namespaces
Allow a `/v1/jobs?all_namespaces=true` to list all jobs across all
namespaces.  The returned list is to contain a `Namespace` field
indicating the job namespace.

If ACL is enabled, the request token needs to be a management token or
have `namespace:list-jobs` capability on all existing namespaces.
2020-05-18 13:50:46 -04:00
Nomad Release bot
807cfebe90 Generate files for 0.11.2 release 2020-05-14 20:49:42 +00:00
Mahmood Ali
1d43126e00 always check default_scheduler_config config
Also, avoid early return on validation to avoid masking some validation
bugs in dev setup.
2020-05-14 14:16:12 -04:00
Lang Martin
cd6d34425f server: stop after client disconnect (#7939)
* jobspec, api: add stop_after_client_disconnect

* nomad/state/state_store: error message typo

* structs: alloc methods to support stop_after_client_disconnect

1. a global AllocStates to track status changes with timestamps. We
   need this to track the time at which the alloc became lost
   originally.

2. ShouldClientStop() and WaitClientStop() to actually do the math

* scheduler/reconcile_util: delayByStopAfterClientDisconnect

* scheduler/reconcile: use delayByStopAfterClientDisconnect

* scheduler/util: updateNonTerminalAllocsToLost comments

This was setup to only update allocs to lost if the DesiredStatus had
already been set by the scheduler. It seems like the intention was to
update the status from any non-terminal state, and not all lost allocs
have been marked stop or evict by now

* scheduler/testing: AssertEvalStatus just use require

* scheduler/generic_sched: don't create a blocked eval if delayed

* scheduler/generic_sched_test: several scheduling cases
2020-05-13 16:39:04 -04:00
Tim Gross
a28f18ea1d csi: support Secrets parameter in CSI RPCs (#7923)
CSI plugins can require credentials for some publishing and
unpublishing workflow RPCs. Secrets are configured at the time of
volume registration, stored in the volume struct, and then passed
around as an opaque map by Nomad to the plugins.
2020-05-11 17:12:51 -04:00
Drew Bailey
92e8e1ace2 disable license cli commands 2020-05-11 13:49:29 -04:00