Commit Graph

19566 Commits

Author SHA1 Message Date
Tim Gross
38d2a80e2f docs: add Consul policy for Consul Namespace support (#9014)
Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>
2020-10-02 15:13:33 -04:00
Charlie Voiselle
4a7502847d Update docker.mdx (#8913) 2020-10-02 14:54:14 -04:00
Fredrik Hoem Grelland
eb7cc6425d configure nomad cluster to use a Consul Namespace [Consul Enterprise] (#8849) 2020-10-02 14:46:36 -04:00
Seth Hoenig
7be0e61068 Merge pull request #9009 from hashicorp/d-docker-signal-docs
docs: document docker signal fix, add tests
2020-10-02 13:22:15 -05:00
Seth Hoenig
a299b76c5a docs: document docker signal fix, add tests
This PR adds a version specific upgrade note about the docker stop
signal behavior. Also adds test for the signal logic in docker driver.

Closes #8932 which was fixed in #8933
2020-10-02 10:06:43 -05:00
Tim Gross
966d47da46 e2e: tfvars.dev file must override default tfvars file (#9005)
The `-var-file` flag for loading variables into Terraform overlays the default
variables file if present. This means that variables that are set in the
default variables file will take precedence if the overlay file does not have
them set.

Set `nomad_acls` and `nomad_enteprise` to `false` in the dev cluster.
2020-10-02 08:02:37 -04:00
Fredrik Hoem Grelland
8238b9f864 update consul-template to v0.25.1 (#8988) 2020-10-01 14:08:49 -04:00
Mahmood Ali
318f7b065d Merge pull request #9003 from hashicorp/b-tests-vagrant-20200930
Tests: fix some tests for Ubuntu 18.04
2020-10-01 10:45:04 -05:00
José Maia
c8bc8517e8 Fix docs on API for volume detaching (#9002)
`nomad volume detach volume-id 00000000-0000-0000-0000-000000000000` produces an API call containing the UUID as part of the query string. This is the only way the API accepts the request correctly - if you pass it in the payload you get `detach requires node ID`
2020-10-01 11:01:13 -04:00
Mahmood Ali
fe501c94eb tests: use system path
On host with systemd-resolved, we copy /run/systemd/resolve/resolv.conf
actually.
2020-10-01 10:23:19 -04:00
Mahmood Ali
a181ff3f79 Compare to the correct host network setting
In systemd-resolved hosts with no DNS customizations, the docker driver
DNS setting should be compared to /run/systemd/resolve/resolv.conf while
exec/java drivers should be compared to /etc/resolv.conf.

When system-resolved is enabled, /etc/resolv.conf is a stub that points
to 127.0.0.53. Docker avoids this stub because this address isn't
accessible from the container.  The exec/java drivers that don't create
network isolations use the stub though in the default configuration.
2020-10-01 10:23:14 -04:00
Mahmood Ali
0f2af169ad tests: copy permissions when copying files
On the failover path, copy the permission bits (a.k.a. file mode),
specially the execution bit.
2020-10-01 10:23:14 -04:00
Mahmood Ali
7b9d6a3552 tests: ignore empty cgroup
My latest Vagrant box contains an empty cgroup name that isn't used for
isolation:

```
$ cat /proc/self/cgroup  | grep ::
0::/user.slice/user-1000.slice/session-17.scope
```
2020-10-01 10:23:13 -04:00
Tim Gross
d5a630cf5a changelog: azure fingerprint (#9000) 2020-10-01 09:23:52 -04:00
Landan Cheruka
89558ead34 client: added azure fingerprinting support (#8979) 2020-10-01 09:10:27 -04:00
Michael Schurter
dd5f4fd962 Merge pull request #8996 from hashicorp/f-lower-mem-min
jobspec: lower min cpu resources from 10->1
2020-09-30 12:35:54 -07: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
Mahmood Ali
235f938e87 Merge pull request #8992 from hashicorp/b-tests-failover-copy
tests: failover to copying when symlinking fails
2020-09-30 09:22:24 -05:00
Mahmood Ali
6e9edd53b3 tests: failover to copying when symlinking fails
Symlinking busybox may fail when the test code and the test temporary
directory live on different volumes/partitions; so we should copy
instead.  This situation arises in the Vagrant setup, where the code
repository live on special file sharing volume.

Somewhat unrelated, remove `f.Sync()` invocation from a test copyFile
helper function.  Sync is useful only for crash recovery, and isn't
necessary in our test setup.  The sync invocation is a significant
overhead as it requires the OS to flush any cached writes to disk.
2020-09-30 09:58:22 -04:00
Tim Gross
5621407cef e2e: ensure tests are constrained to Linux (#8990)
Until we have LCOW support in the E2E environment (which requires a Windows
2019 test target), we need to constrain E2E tests to the appropriate kernel
2020-09-30 09:43:30 -04:00
Tim Gross
8cf583fe48 e2e: cleanup errors should use assert, not require (#8989)
The E2E framework wraps testify's `require` so that by default we can stop
tests on errors, but the cleanup functions should use `assert` so that we
continue to try to cleanup the test environment even if there's a failure.
2020-09-30 09:00:37 -04:00
Lars Lehtonen
ce1c15a177 client: fix test umask (#8987) 2020-09-30 08:09:41 -04:00
Luiz Aoqui
9a36ebe228 Merge pull request #8985 from hashicorp/f-scaling-policy-type
Add scaling policy type
2020-09-29 18:18:24 -04:00
Luiz Aoqui
5a48a8d725 add scaling policy type 2020-09-29 17:57:46 -04: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
davemay99
5ab5c25fb5 return explicit error if not found/empty path falls through 2020-09-29 14:55:28 -04:00
Tim Gross
cf8dbb4ca3 docs: quota apply does not have a 'name' param (#8983) 2020-09-29 13:58:30 -04:00
Charlie Voiselle
fee792d2ad [docs] Update redirects and links for learn.hashicorp.com (#8598)
* Fix links to ACL guides
* Managing Nomad guide links; links in jsx pages
* job updates guide URLS
* node-drain guide URLS
* outage recovery guide links
* fix guide links - sentinel
* fix guide links - namespaces
* fix guide links - quotas
* fix guide links - autopilot
* more guide links.
* more guide links - continued.
* Updating redirects for learn
* Getting Started
* Load Balancing Guides
* update redirects for ui guide
* Consolidate spark redirects to point to GH repo
* operating job update part 1
* finish operating job links; operations guides links.
* finish guide redirects
* coalesce EOL redirects for spark guides.
* one last link
* Checked links and found a few more stray links
* Found more .htmls
* Fixup links for new HC websites
* Post-merge fixups
* linkcheck caught missing ids
2020-09-29 12:48:32 -04:00
Mahmood Ali
2f3f3136e9 Merge pull request #8981 from hashicorp/b-vagrant-vault-setup
Update Vagrant consul/vault deps
2020-09-29 11:40:02 -05:00
Mahmood Ali
3d0222b596 Merge pull request #8982 from hashicorp/b-exec-dns-resolv
drivers/exec: fix DNS resolution in systemd hosts
2020-09-29 11:39:43 -05:00
Seth Hoenig
d71478304f Merge pull request #8933 from jf/fix_docker_stopsignal
drivers/docker/driver.go: change default signal for docker driver to SIGTERM?
2020-09-29 10:51:04 -05:00
Mahmood Ali
51ba244805 drivers/exec: fix DNS resolution in systemd hosts
Host with systemd-resolved have `/etc/resolv.conf` is a symlink
to `/run/systemd/resolve/stub-resolv.conf`. By bind-mounting
/etc/resolv.conf only, the exec container DNS resolution fail very badly.

This change fixes DNS resolution by binding /run/systemd/resolve as
well.

Note that this assumes that the systemd resolver (default to 127.0.0.53) is
accessible within the container. This is the case here because exec
containers share the same network namespace by default.

Jobs with custom network dns configurations are not affected, and Nomad
will continue to use the job dns settings rather than host one.
2020-09-29 11:33:51 -04:00
Mahmood Ali
377368e5fb Update Vagrant consul/vault deps
Update Vagrant setup to use the consul/vault versions used in CI.
2020-09-29 11:06:53 -04:00
Tim Gross
dd0333c759 e2e: rework rescheduling progress deadline test (#8958)
Eliminate sources of randomness in the progress deadline test and clarify the
purpose of the test to check for progress deadline updates.
2020-09-29 11:02:16 -04:00
Seth Hoenig
095d409a32 Merge pull request #8977 from hashicorp/b-script-check-task
consul: fix validation of task in group-level script-checks
2020-09-29 09:29:02 -05:00
davemay99
3aaf32d1a3 satisfy the linter 2020-09-29 01:37:15 -04:00
davemay99
a90f66eab9 reverting export of fixTime 2020-09-29 01:21:03 -04:00
davemay99
77c780598d finish refactoring walk to search for any file 2020-09-29 01:17:10 -04:00
Tim Gross
c9d5048e2f e2e: namespace support for CLI helpers (#8978)
Required to support tests for namespaces and other ENT features.
2020-09-28 16:37:34 -04:00
Seth Hoenig
23604e0d3d consul: fix validation of task in group-level script-checks
When defining a script-check in a group-level service, Nomad needs to
know which task is associated with the check so that it can use the
correct task driver to execute the check.

This PR fixes two bugs:
1) validate service.task or service.check.task is configured
2) make service.check.task inherit service.task if it is itself unset

Fixes #8952
2020-09-28 15:02:59 -05:00
Tim Gross
67061b8cd9 command: fix a typo in the help text for namespaces (#8975) 2020-09-28 12:23:25 -04:00
Tim Gross
181f30d33e e2e: ENT placeholder for namespace/quotas tests (#8973) 2020-09-28 11:23:37 -04:00
Tim Gross
83a569dfc0 e2e: test for host volumes and Docker volumes (#8972)
Exercises host volume and Docker volume functionality for the `exec` and `docker`
task driver, particularly around mounting locations within the container and
how this can be used with `template`.
2020-09-28 11:14:13 -04:00
Tim Gross
7b00a118f5 e2e: add flag to bootstrap Nomad ACLs (#8961)
Adds a `nomad_acls` flag to our Terraform stack that bootstraps Nomad ACLs via
a `local-exec` provider. There's no way to set the `NOMAD_TOKEN` in the Nomad
TF provider if we're bootstrapping in the same Terraform stack, so instead of
using `resource.nomad_acl_token`, we also bootstrap a wide-open anonymous
policy. The resulting management token is exported as an environment var with
`$(terraform output environment)` and tests that want stricter ACLs will be
able to write them using that token.

This should also provide a basis to do similar work with Consul ACLs in the
future.
2020-09-28 09:22:36 -04:00
davemay99
32c24afcba refactor functions to find raft.db 2020-09-24 19:00:53 -04:00
davemay99
36c88b536a logging tweaks 2020-09-24 17:30:50 -04:00
davemay99
c5cd1990f6 export FixTime to allow external use 2020-09-24 16:47:58 -04:00
Nick Ethier
261adf0b4d command: remove mbits from quota hcl (#8740) 2020-09-24 11:44:59 -04:00
Tim Gross
9ec63e08a4 ci: don't run UI tests for e2e branches (#8956) 2020-09-24 08:59:56 -04:00
Seth Hoenig
65792ebd68 Merge pull request #8957 from hashicorp/f-pause-container-arch
drivers/docker: detect arch for default docker plugin infra_image
2020-09-23 15:21:06 -05:00