Commit Graph

22240 Commits

Author SHA1 Message Date
Jai Bhagat
1eebec0a03 styling: update styling to match new figma mocks 2022-01-14 10:14:44 -05:00
Jai Bhagat
205a07c237 feat: add clicking functionality to alloc status legend 2022-01-14 10:14:44 -05:00
James Rasell
8f01d74f70 Merge pull request #11842 from hashicorp/b-name-oss-files-consistently
chore: ensure consistent file naming for non-enterprise files.
2022-01-14 08:13:49 +01:00
James Rasell
c08a036655 Merge pull request #11403 from hashicorp/f-gh-11059
agent/docs: add better clarification when top-level data dir needs setting
2022-01-13 16:41:35 +01:00
James Rasell
eee5d90e8b Merge pull request #11402 from hashicorp/document-client-initial-vault-renew
taskrunner: add clarifying initial vault token renew comment.
2022-01-13 16:21:58 +01:00
Luiz Aoqui
3bf78fde47 Fix log level parsing from lines that include a timestamp (#11838) 2022-01-13 09:56:35 -05:00
Seth Hoenig
d87c41d2b7 Merge pull request #11831 from hashicorp/mods-explain-pinned
mods: explain replace statements
2022-01-13 08:53:17 -06:00
James Rasell
e961751d94 chore: ensure consistent file naming for non-enterprise files. 2022-01-13 11:32:16 +01:00
Luiz Aoqui
6b488bdad3 Fix ACL requirements for job details UI (#11672) 2022-01-12 21:26:02 -05:00
Luiz Aoqui
1344906f10 docs: fix autoscaling Datadog site configuration (#11824) 2022-01-12 21:06:30 -05:00
Michael Schurter
07fd6d9a66 Merge pull request #11830 from hashicorp/b-validate-reserved-ports
agent: validate reserved_ports are valid
2022-01-12 17:12:30 -08:00
Michael Schurter
a490e4d423 Merge pull request #11833 from hashicorp/deps-go-getter-v1.5.11
deps: update go-getter to v1.5.11
2022-01-12 16:42:55 -08:00
Michael Schurter
12d21aa0fe doc: add changelog for #11830 2022-01-12 14:21:47 -08:00
Michael Schurter
b4d3a610db agent: validate reserved_ports are valid
Goal is to fix at least one of the causes that can cause a node to be
ineligible to receive work:
https://github.com/hashicorp/nomad/issues/9506#issuecomment-1002880600
2022-01-12 14:21:47 -08:00
Michael Schurter
d65c6fcad8 deps: update go-getter to v1.5.11
Pulls in https://github.com/hashicorp/go-getter/pull/348

Fixes the possibility to log an sshkey if a specific error condition is
hit.
2022-01-12 14:11:16 -08:00
Seth Hoenig
742ac92886 mods: explain replace statements 2022-01-12 15:14:46 -06:00
Seth Hoenig
b446352f15 Merge pull request #11827 from hashicorp/cleanup-response-recorder
cleanup: stop referencing depreceted HeaderMap field
2022-01-12 11:10:51 -06:00
Seth Hoenig
4b20581dc5 cleanup: stop referencing depreceted HeaderMap field
Remove reference to the deprecated ResponseRecorder.HeaderMap field,
instead calling .Response.Header() to get the same data.

closes #10520
2022-01-12 10:32:54 -06:00
sara-gawlinski
e644aa7c0a Update alert-banner (#11817)
Updating banner for edge survey
2022-01-12 11:28:17 -05:00
Tim Gross
1b719eef68 docs: improve changelog for PR #11783 (#11818) 2022-01-11 11:54:12 -05:00
Tim Gross
ef93ab2d56 docs: changelog for PR #11783 (#11812) 2022-01-10 16:39:21 -05:00
Alessandro De Blasis
759397533a metrics: added mapped_file metric (#11500)
Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
Co-authored-by: Nate <37554478+servusdei2018@users.noreply.github.com>
2022-01-10 15:35:19 -05:00
grembo
e9032c10d3 Un-break templates when using vault stanza change_mode noop (#11783)
Templates in nomad jobs make use of the vault token defined in
the vault stanza when issuing credentials like client certificates.

When using change_mode "noop" in the vault stanza, consul-template
is not informed in case a vault token is re-issued (which can
happen from time to time for various reasons, as described
in https://www.nomadproject.io/docs/job-specification/vault).

As a result, consul-template will keep using the old vault token
to renew credentials and - once the token expired - stop renewing
credentials. The symptom of this problem is a vault_token
file that is newer than the issued credential (e.g., TLS certificate)
in a job's /secrets directory.

This change corrects this, so that h.updater.updatedVaultToken(token)
is called, which will inform stakeholders about the new
token and make sure, the new token is used by consul-template.

Example job template fragment:

    vault {
        policies = ["nomad-job-policy"]
        change_mode = "noop"
    }

    template {
      data = <<-EOH
        {{ with secret "pki_int/issue/nomad-job"
        "common_name=myjob.service.consul" "ttl=90m"
        "alt_names=localhost" "ip_sans=127.0.0.1"}}
        {{ .Data.certificate }}
        {{ .Data.private_key }}
        {{ .Data.issuing_ca }}
        {{ end }}
      EOH
      destination = "${NOMAD_SECRETS_DIR}/myjob.crt"
      change_mode = "noop"
    }

This fix does not alter the meaning of the three change modes of vault

- "noop" - Take no action
- "restart" - Restart the job
- "signal" - send a signal to the task

as the switch statement following line 232 contains the necessary
logic.

It is assumed that "take no action" was never meant to mean "don't tell
consul-template about the new vault token".

Successfully tested in a staging cluster consisting of multiple
nomad client nodes.
2022-01-10 14:41:38 -05:00
Conor Evans
31978a0366 replace 'a alloc' with 'an alloc' where appropriate (#11792) 2022-01-10 11:59:46 -05:00
Derek Strickland
43edd0e709 Expose Consul template configuration parameters (#11606)
This PR exposes the following existing`consul-template` configuration options to Nomad jobspec authors in the `{job.group.task.template}` stanza.

- `wait`

It also exposes the following`consul-template` configuration to Nomad operators in the `{client.template}` stanza.

- `max_stale`
- `block_query_wait`
- `consul_retry`
- `vault_retry` 
- `wait` 

Finally, it adds the following new Nomad-specific configuration to the `{client.template}` stanza that allows Operators to set bounds on what `jobspec` authors configure.

- `wait_bounds`

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2022-01-10 10:19:07 -05:00
Tim Gross
04095bdea9 docs: note that clients need to have ACLs enabled (#11799)
Client endpoints such as `alloc exec` are enforced on the client if
the API client or CLI has "line of sight" to the client. This is
already in the Learn guide but having it in the ACL configuration docs
would be helpful.
2022-01-07 16:18:41 -05:00
Tim Gross
d27b1370ae CSI: tests to exercise csi_hook (#11788)
Small refactoring of the allocrunner hook for CSI to make it more
testable, and a unit test that covers most of its logic.
2022-01-07 15:23:47 -05:00
Tim Gross
7fad4b9169 docs: new scheduler metrics (#11790)
* Fixed name of `nomad.scheduler.allocs.reschedule` metric
* Added new metrics to metrics reference documentation
* Expanded definitions of "waiting" metrics
* Changelog entry for #10236 and #10237
2022-01-07 09:51:15 -05:00
Luiz Aoqui
f34e76a68f ui: fix CI (#11785) 2022-01-06 16:01:55 -05:00
Joel May
eacdc63473 Emit metrics for eval waitUntil as nomad.nomad.broker.eval_waiting (#10236) 2022-01-06 15:57:40 -05:00
Joel May
af08736d27 Emit metrics on reschedule later decisions as nomad.client.allocs.reschedule (#10237) 2022-01-06 15:56:43 -05:00
Charlie Voiselle
6e61606eba Make number of scheduler workers reloadable (#11593)
## Development Environment Changes
* Added stringer to build deps

## New HTTP APIs
* Added scheduler worker config API
* Added scheduler worker info API

## New Internals
* (Scheduler)Worker API refactor—Start(), Stop(), Pause(), Resume()
* Update shutdown to use context
* Add mutex for contended server data
    - `workerLock` for the `workers` slice
    - `workerConfigLock` for the `Server.Config.NumSchedulers` and
      `Server.Config.EnabledSchedulers` values

## Other
* Adding docs for scheduler worker api
* Add changelog message

Co-authored-by: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com>
2022-01-06 11:56:13 -05:00
Michael Schurter
d5e8081006 Merge pull request #11744 from hashicorp/b-node-copy
Fix Node.Copy()
2022-01-05 17:01:53 -08:00
Jai
38a375996d Merge pull request #11590 from hashicorp/e-ui/breadcrumbs-service
Refactor:  Breadcrumbs Service
2022-01-05 17:46:48 -05:00
Tim Gross
0ff0fa1ff2 csi: reap unused volume claims at leadership transitions (#11776)
When `volumewatcher.Watcher` starts on the leader, it starts a watch
on every volume and triggers a reap of unused claims on any change to
that volume. But if a reaping is in-flight during leadership
transitions, it will fail and the event that triggered the reap will
be dropped. Perform one reap of unused claims at the start of the
watcher so that leadership transitions don't drop this event.
2022-01-05 11:40:20 -05:00
Arkadiusz
aa21628488 Fix log streaming missing frames (#11721)
Perform one more read after receiving cancel when streaming file from the allocation API
2022-01-04 14:07:16 -05:00
James Rasell
500cef53cb Merge pull request #11762 from hashicorp/b-gh-11681
docs: add 1.2.0 HCLv2 strict parsing upgrade note.
2022-01-04 09:30:09 +01:00
Tim Gross
3320a297df docs: fix attribute name for java version detection (#11764) 2022-01-03 16:50:25 -05:00
James Rasell
b34e652b7d docs: add 1.2.0 HCLv2 strict parsing upgrade note. 2022-01-03 15:41:18 +00:00
Tim Gross
fe7a43e448 docs/tests for multiple HTTP address config (#11760) 2022-01-03 10:17:13 -05:00
Kevin Schoonover
0873e08af1 agent: support multiple http address in addresses.http (#11582) 2022-01-03 09:33:53 -05:00
Tim Gross
78d3f70908 api: paginate deployment list and accept wildcard namespace (#11743)
Add `per_page` and `next_token` handling to `Deployment.List` RPC, and
allow the use of a wildcard namespace for namespace filtering.
2022-01-03 08:36:02 -05:00
Jeff Escalante
578a9a6166 add enterprise downloads page (#11750) 2021-12-25 14:42:12 -05:00
Michael Schurter
e1c8d58cea do not initialize copy's slice if nil in original 2021-12-23 16:40:35 -08:00
Noel Quiles
6ca15bea1e website: Upgrade deps (#11709)
* Update @hashicorp/react-subnav

* Update <Subnav /> & <ProductDownloadsPage />
2021-12-23 16:18:57 -05:00
Michael Schurter
0fdf624eda add changelog for Node.Copy fix 2021-12-23 12:34:05 -08:00
Michael Schurter
ea39088f0a core: fix DNS and CPU Core copying 2021-12-23 12:28:19 -08:00
Michael Schurter
fd1c71dc8d core: match struct field order in Copy() 2021-12-23 12:27:39 -08:00
Jai Bhagat
3bdf6613ef refact: clean-up breadcrumb invocations 2021-12-23 12:41:52 -05:00
Jai Bhagat
b25f5ff89e fix: remove unecessary breadcrumb 2021-12-23 12:33:15 -05:00