Commit Graph

2751 Commits

Author SHA1 Message Date
James Rasell
f5567b3261 cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
Kent 'picat' Gruber
ea397cb042 Merge pull request #8998 from hashicorp/keygen-32-bytes
Use 32-byte key for gossip encryption to enable AES-256
2020-10-02 17:17:55 -04:00
Kent 'picat' Gruber
a38e33a9c8 Fix panic in test due to the agent's logger not being initialized yet
So a null logger is used to avoid the problem.
2020-10-02 11:10:27 -04:00
Fredrik Hoem Grelland
8238b9f864 update consul-template to v0.25.1 (#8988) 2020-10-01 14:08:49 -04:00
Kent 'picat' Gruber
614729bd4c Fix other usages of initKeyring func to use logger as third argument 2020-10-01 11:13:06 -04:00
Kent 'picat' Gruber
2ae72441b5 Log AES-128 and AES-192 key sizes during keyring initialization 2020-10-01 11:12:14 -04:00
Kent 'picat' Gruber
435802e3db Fix operator keygen test to check for 32 bytes 2020-09-30 17:04:33 -04:00
Kent 'picat' Gruber
3dd425c884 Generate 32-byte gossip key for nomad operator keygen command
The key generated from this command is used for gossip encrpytion, which utilizes AES GCM encryption. Using a key size of 16-bytes enables AES-128 while a key size of 32 bytes enables AES-256.

The underlying memberlist library supports the larger key size, and is ultimatley preferable from a security standpoint. Consul also uses 32 bytes by default: 1a14b94441
2020-09-30 17:02:37 -04:00
Michael Schurter
902b0b5673 jobspec: lower min cpu resources from 10->1
Since CPU resources are usually a soft limit it is desirable to allow
setting it as low as possible to allow tasks to run only in "idle" time.

Setting it to 0 is still not allowed to avoid potential unintentional
side effects with allowing a zero value. While there may not be any side
effects this commit attempts to minimize risk by avoiding the issue.

This does *not* change the defaults.
2020-09-30 12:15:13 -07:00
Dave May
29db7be1df Merge pull request #8922 from hashicorp/dmay-raftutil-path
Raftutil cleanup, plus helper function to find raft.db
2020-09-29 15:12:32 -04:00
Tim Gross
67061b8cd9 command: fix a typo in the help text for namespaces (#8975) 2020-09-28 12:23:25 -04:00
davemay99
32c24afcba refactor functions to find raft.db 2020-09-24 19:00:53 -04:00
Nick Ethier
261adf0b4d command: remove mbits from quota hcl (#8740) 2020-09-24 11:44:59 -04:00
davemay99
0295b541ce remove extra debug output 2020-09-17 21:42:53 -04:00
davemay99
0bfbba4d98 Raftutil cleanup, plus helper function to find raft.db 2020-09-17 21:35:17 -04:00
Mahmood Ali
1b8ce46c34 Merge pull request #8911 from hashicorp/f-task_network_warning-smaller
Smaller 0.12 mbit deprecation PR
2020-09-17 08:11:13 -05:00
Tim Gross
d60071c20d filter volumes by type in 'nomad node status' output (#8902)
Volume requests can be either CSI or host volumes, so when displaying the CSI
volume info for `nomad node status -verbose` we need to filter out the host
volumes.
2020-09-16 15:00:12 -04:00
Mahmood Ali
658b19b09a Update job examples with MBit deprecation 2020-09-16 11:06:19 -04:00
Charlie Voiselle
b35ee8070e Change tabs to spaces in nomad monitor help text 2020-09-14 15:08:30 -04:00
Michael Schurter
97d516701c Merge pull request #8862 from hashicorp/release-0.12.4
Prepare for 0.13 development cycle
2020-09-10 09:14:44 -07:00
Mahmood Ali
d7f14d12c1 Upgrade to golang 1.15 (#8858)
Upgrade to golang 1.15

Starting with golang 1.5, setting Ctty value result in `Setctty set but Ctty not valid in child` error, as part of https://github.com/golang/go/issues/29458 .
This commit lifts the fix in https://github.com/creack/pty/pull/97 .
2020-09-09 15:59:29 -04:00
Nomad Release bot
77f3b0cd74 Generate files for 0.12.4-rc1 release 2020-09-03 02:59:23 +00:00
Drew Bailey
2740b48503 Merge pull request #8793 from hashicorp/debug-cli/run-intervals
run commands for duration and interval without needing to specify server or node
2020-08-31 16:07:26 -04:00
Drew Bailey
0a94c62ca4 run commands for duration and interval without needing to specify servers or nodes 2020-08-31 14:13:03 -04:00
Lang Martin
cce82a2e17 command/plugin_status_csi: plugin status :id keeps expected count 2020-08-31 13:56:54 -04:00
Drew Bailey
41fa0daae2 add license info to operator debug command 2020-08-31 13:22:23 -04:00
Mahmood Ali
89a2f4371c raft debug commands are low-level internal commands 2020-08-31 08:45:59 -04:00
Mahmood Ali
cd7ac5c1ee Apply suggestions from code review
Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2020-08-31 08:45:59 -04:00
Mahmood Ali
1896b8f7dd add helper commands for debugging state 2020-08-31 08:45:59 -04:00
Jeffrey 'jf' Lim
4f0cfbd752 Fix cmd.Name() for NodeEligibilityCommand 2020-08-29 22:45:42 +08:00
Tim Gross
5a01ab312d MRD: move 'job stop -global' handling into RPC (#8776)
The initial implementation of global job stop for MRD looped over all the
regions in the CLI for expedience. This changeset includes the OSS parts of
moving this into the RPC layer so that API consumers don't have to implement
this logic themselves.
2020-08-28 14:28:13 -04:00
Lang Martin
ec3b2bf4a5 command/operator_debug: mkdir before storing agent-host (#8707)
The api calls were reordered, the new order omits the
`agent-host.json` result by fetching it before the directory is
created.
2020-08-28 11:58:06 -04:00
Lang Martin
dd7016b847 csi: plugins track jobs in addition to allocations, and use job information to set expected counts (#8699)
* nomad/structs/csi: add explicit job support
* nomad/state/state_store: capture job updates directly
* api/nodes: CSIInfo needs the AllocID
* command/agent/csi_endpoint: AllocID was missing
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2020-08-27 17:20:00 -04:00
Seth Hoenig
a46ba7f4ac Merge branch 'master' into f-cc-ingress 2020-08-26 15:31:05 -05:00
Seth Hoenig
abd38b3a86 consul/connect: fixup some comments and context timeout 2020-08-26 13:17:16 -05:00
Tim Gross
d6ad3be8bd csi: fix panic in serializing nil allocs in volume API (#8735)
- fix panic in serializing nil allocs in volume API
- prevent potential panic in serializing plugin allocs
2020-08-25 10:13:05 -04:00
Seth Hoenig
db8020f4eb consul/connect: fixup tests to use new consul sdk 2020-08-24 12:02:41 -05:00
Seth Hoenig
36a743f19d consul/connect: remove envoy dns option from gateway proxy config 2020-08-24 09:11:55 -05:00
Yoan Blanc
e1ee6a45b1 fixup! vendor: consul/api, consul/sdk v1.6.0
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-24 08:59:03 +02:00
Seth Hoenig
9ffdeed904 consul/connect: add initial support for ingress gateways
This PR adds initial support for running Consul Connect Ingress Gateways (CIGs) in Nomad. These gateways are declared as part of a task group level service definition within the connect stanza.

```hcl
service {
  connect {
    gateway {
      proxy {
        // envoy proxy configuration
      }
      ingress {
        // ingress-gateway configuration entry
      }
    }
  }
}
```

A gateway can be run in `bridge` or `host` networking mode, with the caveat that host networking necessitates manually specifying the Envoy admin listener (which cannot be disabled) via the service port value.

Currently Envoy is the only supported gateway implementation in Consul, and Nomad only supports running Envoy as a gateway using the docker driver.

Aims to address #8294 and tangentially #8647
2020-08-21 16:21:54 -05:00
Nick Ethier
2be03bc0d9 Update UI to use new allocated ports fields (#8631)
* nomad: canonicalize alloc shared resources to populate ports

* ui: network ports

* ui: remove unused task network references and update tests with new shared ports model

* ui: lint

* ui: revert auto formatting

* ui: remove unused page objects

* structs: remove unrelated test from bad conflict resolution

* ui: formatting
2020-08-20 11:07:13 -04:00
Tim Gross
a8b144cb91 mrd: remove redundant validation in HTTP endpoint (#8685)
The `regionForJob` function in the HTTP job endpoint overrides the region for
multiregion jobs to `global`, which is used as a sentinel value in the
server's job endpoint to avoid re-registration loops. This changeset removes
an extraneous check that results in errors in the web UI and makes
round-tripping through the HTTP API cumbersome for all consumers.
2020-08-18 16:48:09 -04:00
Tim Gross
e85c318ac9 multiregion: validation should always return error for OSS (#8687) 2020-08-18 15:35:38 -04:00
Lang Martin
9ef347280c command/agent/csi_endpoint: explicit allocations (#8669) 2020-08-13 15:48:08 -04:00
Tim Gross
88fa668786 csi: fix panic from assignment to nil map in plugin API (#8666) 2020-08-13 11:36:41 -04:00
Tim Gross
307b7b7449 fix panic converting structs to API in CSI endpoint (#8659) 2020-08-12 15:59:10 -04:00
Nomad Release bot
ee69b3379a Generate files for 0.12.2 release 2020-08-12 00:50:49 +00:00
Lang Martin
b5ef217c90 nomad debug renamed to nomad operator debug (#8602)
* renamed: command/debug.go -> command/operator_debug.go
* website: rename debug -> operator debug
* website/pages/api-docs/agent: name in api docs
2020-08-11 15:39:44 -04:00
Lang Martin
9e7d044fcf debug command archive content changes (#8462)
* command/debug: print interval data so the operator knows its waiting

* command/debug: use the Consul/Vault env for queries

* command/debug: capture the operator endpoints

* command/debug: capture API errors in the archive bundle
2020-08-11 13:14:28 -04:00
Lang Martin
8a095fca90 CSI: volume and plugin allocations in the API (#8590)
* command/agent/csi_endpoint: explicitly convert to API structs, and convert allocs for single object get endpoints
2020-08-11 12:24:41 -04:00