Commit Graph

23041 Commits

Author SHA1 Message Date
Seth Hoenig
0a5992bd20 cli: correctly use and validate job with vault token set
This PR fixes `job validate` to respect '-vault-token', '$VAULT_TOKEN',
'-vault-namespace' if set.
2022-05-19 12:13:34 -05:00
Tim Gross
3e8f52b7f0 api: include Consul token in job revert API (#13065) 2022-05-19 11:30:29 -04:00
Seth Hoenig
768ffc2f8a Merge pull request #13044 from hashicorp/b-fixup-init-redis
cli: update default redis and use nomad service discovery
2022-05-17 11:19:27 -05:00
Seth Hoenig
089e2a067b cl: update changelog 2022-05-17 10:35:08 -05:00
Seth Hoenig
d91e4160da cli: update default redis and use nomad service discovery
Closes #12927
Closes #12958

This PR updates the version of redis used in our examples from 3.2 to 7.
The old version is very not supported anymore, and we should be setting
a good example by using a supported version.

The long-form example job is now fixed so that the service stanza uses
nomad as the service discovery provider, and so now the job runs without
a requirement of having Consul running and configured.
2022-05-17 10:24:19 -05:00
Seth Hoenig
88e8c22b95 Merge pull request #12817 from twunderlich-grapl/fix-network-interpolation
Fix network.dns interpolation
2022-05-17 09:31:32 -05:00
Seth Hoenig
924deb7a5d cl: add changelog note for network interpolation 2022-05-17 09:14:55 -05:00
Luiz Aoqui
c6e177683f Merge pull request #13033 from hashicorp/docs-consul-upgrade-banner
docs: add Consul 1.12.0 upgrade notice
2022-05-16 19:23:08 -04:00
Luiz Aoqui
59ce4f8caf docs: add Consul 1.12.0 upgrade notice 2022-05-16 18:44:26 -04:00
Luiz Aoqui
df06094172 Merge pull request #13013 from hashicorp/post-1.3.0-release
Post 1.3.0 release
2022-05-16 15:32:42 -04:00
Phil Renaud
46da03d36a Add a forgotten comma to snapshot-specific CSS (#13030) 2022-05-16 14:13:51 -04:00
Tim Gross
db73bc8481 docs: API package tests need a binary with your changes (#13029)
Add a note to the contributing guide pointing out that if you're
writing `api` package tests, you need to build a binary with any of
your changes.
2022-05-16 11:12:54 -04:00
Ivo
607ce11582 [terraform/aws] Fix NVidia GPG key error (#12985)
* Fix NVidia GPG key error - NVidia rotated their repo keys, see https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
2022-05-16 06:49:01 -04:00
Karan Sharma
d9c41f3bd1 docs: Fix typo in sidecar_service (#13021) 2022-05-16 09:35:42 +02:00
Luiz Aoqui
d27d6d2092 add missing changelog entry for 1.2.7 2022-05-13 17:42:14 -04:00
Luiz Aoqui
d47c1ab9d1 Merge release 1.3.0 files 2022-05-13 17:33:09 -04:00
hc-github-team-nomad-core
bc8abc5b1c Prepare for next release 2022-05-13 17:32:36 -04:00
hc-github-team-nomad-core
ddd77b4287 Generate files for 1.3.0 release 2022-05-13 17:32:20 -04:00
hc-github-team-nomad-core
04c791ff34 Prepare for next release 2022-05-13 17:32:11 -04:00
hc-github-team-nomad-core
5498afd86c Generate files for 1.3.0-rc.1 release 2022-05-13 17:31:57 -04:00
Phil Renaud
19e2e5ce17 12986 UI fails to load job when there is an "@" in job name in nomad 130 (#13012)
* LastIndexOf and always append a namespace on job links

* Confirmed the volume equivalent and simplified idWIthNamespace logic

* Changelog added

* PR comments addressed

* Drop the redirect for the time being

* Tests updated to reflect namespace on links

* Task detail test default namespace link for test
2022-05-13 17:01:27 -04:00
Tim Gross
7c1c117e14 scheduler: volume updates should always be destructive (#13008) 2022-05-13 11:34:04 -04:00
dependabot[bot]
9ec4f671c1 build(deps): bump cross-fetch from 3.1.4 to 3.1.5 in /website (#12818)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-13 09:31:49 -05:00
James Rasell
bab219a8ba agent: fix panic when logging about protocol version config use. (#12962)
The log line comes before the agent logger has been setup,
therefore we need to use the UI logging to avoid panic.
2022-05-13 09:28:43 +02:00
Michael Schurter
e611b099d3 docs: link s/port-plan-failure to more helpful doc (#12968)
The shortlink /s/port-plan-failure is logged when a plan for a node is
rejected to help users debug and mitigate repeated `plan for node
rejected` failures.

The current link to #9506 is... less than useful. It is not clear to
users what steps they should take to either fix their cluster or
contribute to the issue.

While .../monitoring-nomad#progess isn't as comprehensive as it could
be, it's a much more gentle introduction to the class of bug than the
original issue.
2022-05-12 13:59:17 -07:00
Tim Gross
1231d8140b docs: note that already-dispatched jobs cannot be updated (#12973) 2022-05-12 16:18:42 -04:00
Phil Renaud
11472408e1 Visual diff tests seed-stabilized by default (#12965)
* Seed-stabilization by default

* Hide right-column of topology viz route

* Remove seedless run from thee test:* suite

* Related evals paths render too late

* Vis:Hidden another topo viz unstable item
2022-05-12 16:09:19 -04:00
Tim Gross
f0031cf163 docs: remove beta tag for CSI from sidebar (#12970) 2022-05-12 14:12:40 -04:00
Eng Zer Jun
fca4ee8e05 test: use T.TempDir to create temporary test directory (#12853)
* test: use `T.TempDir` to create temporary test directory

This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix TestLogmon_Start_restart on Windows

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* test: fix failing TestConsul_Integration

t.TempDir fails to perform the cleanup properly because the folder is
still in use

testing.go:967: TempDir RemoveAll cleanup: unlinkat /tmp/TestConsul_Integration2837567823/002/191a6f1a-5371-cf7c-da38-220fe85d10e5/web/secrets: device or resource busy

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-05-12 11:42:40 -04:00
Michael Schurter
9347613d9a docs: add sysbatch to scheduling internals (#12954) 2022-05-11 17:06:17 -07:00
Luiz Aoqui
3bb3b1b161 prepare for next release (#12956) 2022-05-11 17:42:53 -04:00
Seth Hoenig
894c2e61dd build: use new version of hc-install (#12937)
https://github.com/shoenig/hc-install/pull/2

Uses new version of hc-install which supports the new
json content type reported by api.releases.hashicorp.com
2022-05-10 15:28:29 -04:00
Georges-Etienne Legendre
992c2f6c62 Fix Exec not working with reverse proxy X-Nomad-Token (#12925)
* Capture token secret on fetch

* Fix tests

* Fix lint errors
2022-05-10 13:42:12 -04:00
modrake
b5665129cd Merge pull request #12913 from hashicorp/mdrake/svc-acct-codeowner
add service acct to codeowners for backport merging
2022-05-06 10:44:31 -07:00
Morgan Drake
a0ecdac67a add service acct to codeowners for backport merging 2022-05-06 10:06:20 -07:00
Chetan Sarva
76e6b5d27e docs: add version note to nomad services template (#12910) 2022-05-06 17:39:27 +02:00
Phil Renaud
592222bbca Changelog for visual diff tests (#12909) 2022-05-06 11:29:10 -04:00
Luiz Aoqui
4df648593f ci: update backport assitant workflow (#12899)
Remove the step to automatically backport `backport/website` PRs to the
latest release. This will be done manually by adding the proper tags.

Also use squash backports to match the pattern we use for `main`.
2022-05-06 10:15:59 -04:00
James Rasell
3956854cc4 fsm: add service registration snapshot persistence. (#12896) 2022-05-06 15:53:27 +02:00
Luiz Aoqui
d7d578b3f4 ci: revert file changes and add some checks (#12873)
During the release there are several files that need to be modified:

  - .release/ci.hcl: the notification channel needs to be updated to a
    channel with greater team visibility during the release.
  - version/version.go: the Version and VersionPrerelease variables
    need to be set so they match the release version.

After the release these files need to be reverted.

For GA releases the following additional changes also need to happen:

  - version/version.go: the Version variable needs to be bumped to the
    next version number.
  - GNUMakefile: the LAST_RELEASE variable needs to be set to the
    version that was just released.

Since the release process will commit file changes to the branch being
used for the release, it should _never_ run on main, so the first step
is now to protect against that.

It also adds a validation to make the user input version is correct.

After looking at the different release options and steps I noticed that
automatic CHANGELOG generation is actually the exception, so it would be
better to have the default to be false.
2022-05-05 18:07:51 -04:00
Phil Renaud
f1fdca55f4 Chronological most-recent evals by default (#12847)
* Chronological most-recent evals by default

* Adding reverse: true to the list of expected queryparams in test

* changelog
2022-05-05 16:11:27 -04:00
Phil Renaud
f34938d9f0 Percy snapshot tests (#12872)
* Sample percy test added

* Node engine up to 14.x for UI prep

* Force ui test rerun

* Updated config.yml

* Node v upgraded to 14 for docker image

* Expect length in test

* Running ember tests under percy exec

* Percy exec format

* Percy cli added

* Noop to rerun tests with updated percy_token

* Evals full list and details open snapshots

* Pretty legit use of assert so disable the warning

* Jobs list tests

* Snapshots for top-level clients, servers, ACL, topology, and storage lists

* Expect caveat for Topology test

* Stabilizing tests with faker seeded to 1

* Seed-stabilizing any tests with percySnapshots

* Faker import

* Drop unused param

* Assets and test audit using an older node version

* New strategy: avoid seeding, just use percyCSS to hide certain things
2022-05-05 16:05:13 -04:00
Seth Hoenig
7c91ac0712 Merge pull request #12875 from hashicorp/b-cgroupsv2-task-restarts
cgroups: make sure cgroup still exists after task restart
2022-05-05 10:54:29 -05:00
Tim Gross
29c014fbb8 docs: add missing set_contains_any constraint docs (#12886)
This constraint and affinity was added in 0.9.x but was only
documented for affinities. Close that documentation gap.
2022-05-05 11:11:05 -04:00
Bryce Kalow
9412a8409b website: remove source code and related CI jobs (#12596)
* remove website source code and related circle jobs

* remove data files

* updates platform-cli

* update local instructions

* updates package-lock
2022-05-05 09:53:22 -05:00
Seth Hoenig
37ffd2ffa2 cgroups: make sure cgroup still exists after task restart
This PR modifies raw_exec and exec to ensure the cgroup for a task
they are driving still exists during a task restart. These drivers
have the same bug but with different root cause.

For raw_exec, we were removing the cgroup in 2 places - the cpuset
manager, and in the unix containment implementation (the thing that
uses freezer cgroup to clean house). During a task restart, the
containment would remove the cgroup, and when the task runner hooks
went to start again would block on waiting for the cgroup to exist,
which will never happen, because it gets created by the cpuset manager
which only runs as an alloc pre-start hook. The fix here is to simply
not delete the cgroup in the containment implementation; killing the
PIDs is enough. The removal happens in the cpuset manager later anyway.

For exec, it's the same idea, except DestroyTask is called on task
failure, which in turn calls into libcontainer, which in turn deletes
the cgroup. In this case we do not have control over the deletion of
the cgroup, so instead we hack the cgroup back into life after the
call to DestroyTask.

All of this only applies to cgroups v2.
2022-05-05 09:51:03 -05:00
James Rasell
0310a963b1 core: add namespace to plan for node rejected log line. (#12868) 2022-05-05 10:56:40 +02:00
James Rasell
52faa167dd release: fix hcl linting error within CI file. (#12867) 2022-05-04 10:48:42 +02:00
Michele Degges
ed0d375ef4 Add config key to the promote-staging event (#12857) 2022-05-03 20:33:14 -07:00
Michele Degges
d551cda6f5 Add config key to the promote-staging event 2022-05-03 08:51:19 -07:00