1687 Commits

Author SHA1 Message Date
Tim Gross
28c315afe3 docs: changelog entry for 10539 2021-05-25 09:57:22 -04:00
Luiz Aoqui
3c2f1d1e5d Display confirmation message on 'nomad volume delete' and 'nomad volume deregister' 2021-05-24 12:02:55 -04:00
Tim Gross
e2108678b5 changelog: add missing GH link 2021-05-24 11:52:18 -04:00
Tim Gross
479b4f634d cli: improve wildcard namespace prefix matches (#10648)
When a wildcard namespace is used for `nomad job` commands that support prefix
matching, avoid asking the user for input if a prefix is an unambiguous exact
match so that the behavior is similar to the commands using a specific or
unset namespace.
2021-05-24 11:38:05 -04:00
Tim Gross
9135b42903 docs: improve documentation for CSI create/register mount_options
Adds clarification to `nomad volume create` commands around how the `volume`
block in the jobspec overrides this behavior. Adds missing section to `nomad
volume register` and to example volume spec for both commands.
2021-05-24 11:13:58 -04:00
Szabolcs Gelencsér
6b083c20c8 events: fix slow client connection to empty event stream (#10637)
* events: fix slow client connection to empty event stream

* doc: fix changelog of event stream connection init
2021-05-21 13:17:07 -04:00
Mahmood Ali
97a0256680 cli: Handle nil MemoryMaxMB (#10620)
Handle when MemoryMaxMB is nil, as expected when a new 1.1.0 is hitting
a pre-1.1.0 Server.
2021-05-19 16:56:06 -04:00
Tim Gross
7deebd00c7 release 1.1.0: bump version and changelog info 2021-05-18 11:56:19 -04:00
Seth Hoenig
8a0f54dc46 docs: run changelogfmt 2021-05-18 09:15:55 -06:00
Seth Hoenig
845a3d3cdc docs: minor wording tweaks + cl 2021-05-17 12:52:52 -06:00
Tim Gross
78c3a4722e fix missing changelog entries from backports 2021-05-17 10:04:22 -04:00
Seth Hoenig
003d68fe6d drivers/docker+exec+java: disable net_raw capability by default
The default Linux Capabilities set enabled by the docker, exec, and
java task drivers includes CAP_NET_RAW (for making ping just work),
which has the side affect of opening an ARP DoS/MiTM attack between
tasks using bridge networking on the same host network.

https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities

This PR disables CAP_NET_RAW for the docker, exec, and java task
drivers. The previous behavior can be restored for docker using the
allow_caps docker plugin configuration option.

A future version of nomad will enable similar configurability for the
exec and java task drivers.
2021-05-12 13:22:09 -07:00
Drew Bailey
4be7897de8 check and return error from parsing var-files (#10569)
* check and return error from parsing var-files

* changelog entry for 1.1.0 and 1.0.5
2021-05-12 09:08:59 -04:00
Chris Baker
140e7b3aaa Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
Tim Gross
826ecd94e4 documentation for disable_default_tcp_check 2021-05-07 13:16:39 -04:00
Seth Hoenig
8fc3411051 Merge pull request #10492 from hashicorp/b-expose-diff
connect: use deterministic injected dynamic exposed port label
2021-05-03 09:00:34 -06:00
Seth Hoenig
08a766a905 connect: use deterministic injected dynamic exposed port
This PR uses the checksum of the check for which a dynamic exposed
port is being generated (instead of a UUID prefix) so that the
generated port label is deterministic.

This fixes 2 bugs:
 - 'job plan' output is now idempotent for jobs making use of injected ports
 - tasks will no longer be destructively updated when jobs making use of
   injected ports are re-run without changing any user specified part of
   job config.

Closes: https://github.com/hashicorp/nomad/issues/10099
2021-04-30 15:18:22 -06:00
Michael Schurter
cc59db4d5a docs: add #9895 to the changelog 2021-04-30 12:47:40 -07:00
Tim Gross
0abf39b839 changelog: ensure all backports shown 2021-04-30 14:53:37 -04:00
Mahmood Ali
3dfb6641ff batch update changelog 2021-04-30 13:18:00 -04:00
Michael Schurter
2e6eb84a57 Merge pull request #10248 from hashicorp/f-remotetask-2021
core: propagate remote task handles
2021-04-30 08:57:26 -07:00
Luiz Aoqui
3aff3ffab5 changelog: add entry for blocked eval metrics (#10475) 2021-04-29 15:32:30 -04:00
Michael Schurter
15dfb85efa docs: mention remote task drivers 2021-04-29 09:22:33 -07:00
Buck Doyle
fc5056b83c changelog: Add missed UI entries for 1.1 (#10467) 2021-04-29 09:11:06 -05:00
Buck Doyle
f16cdea4a2 ui: Add optional memory max to task details ribbon (#10459)
This is the first step in #10268. If a maximum is not specified, the
task group sum uses the memory number instead. The maximum is only
shown when it’s higher than the memory sum.
2021-04-28 15:38:14 -05:00
Tim Gross
638a0daa1b docs: Enterprise licensing updates 2021-04-28 14:46:06 -04:00
Buck Doyle
911b613693 ui: Change global search to use fuzzy search API (#10412)
This updates the UI to use the new fuzzy search API. It’s a drop-in
replacement so the / shortcut to jump to search is preserved, and
results can be cycled through and chosen via arrow keys and the
enter key.

It doesn’t use everything returned by the API:
* deployments and evaluations: these match by id, doesn’t seem like
  people would know those or benefit from quick navigation to them
* namespaces: doesn’t seem useful as they currently function
* scaling policies
* tasks: the response doesn’t include an allocation id, which means they
  can’t be navigated to in the UI without an additional query
* CSI volumes: aren’t actually returned by the API

Since there’s no API to check the server configuration and know whether
the feature has been disabled, this adds another query in
route:application#beforeModel that acts as feature detection: if the
attempt to query fails (500), the global search field is hidden.

Upon having added another query on load, I realised that beforeModel was
being triggered any time service:router#transitionTo was being called,
which happens upon navigating to a search result, for instance, because
of refreshModel being present on the region query parameter. This PR
adds a check for transition.queryParamsOnly and skips rerunning the
onload queries (token permissions check, license check, fuzzy search
feature detection).

Implementation notes:

* there are changes to unrelated tests to ignore the on-load feature
  detection query
* some lifecycle-related guards against undefined were required to
  address failures when navigating to an allocation
* the minimum search length of 2 characters is hard-coded as there’s
  currently no way to determine min_term_length in the UI
2021-04-28 13:31:05 -05:00
Seth Hoenig
c519c9054d Merge pull request #10457 from hashicorp/b-igce-wildcard
consul/connect: fix bug where ingress gateways could not use wildcard services
2021-04-27 14:41:47 -06:00
Seth Hoenig
18d3a62314 Merge pull request #10455 from hashicorp/b-cc-uppercase
consul/connect: check connect group and service names for uppercase characters
2021-04-27 14:40:31 -06:00
Seth Hoenig
3f317e2172 consul/connect: fix bug where ingress gateways could not use wildcard services
This PR fixes a bug where Nomad was more restrictive on Ingress Gateway Configuration
Entry definitions than Consul. Before, Nomad would not allow for declaring IGCEs with
http listeners with service name "*", which is a special feature allowable by Consul.

Note: to make http protocol work, a service-default must be defined setting the
protocol to http for each service.

Fixes: #9729
2021-04-27 13:42:26 -06:00
Seth Hoenig
ce0da241be consul/connect: check connect group and service names for uppercase characters
This PR adds job-submission validation that checks for the use of uppercase characters
in group and service names for services that make use of Consul Connect. This prevents
attempting to launch services that Consul will not validate correctly, which in turn
causes tasks to fail to launch in Nomad.

Underlying Consul issue: https://github.com/hashicorp/consul/issues/6765

Closes #7581 #10450
2021-04-27 11:26:37 -06:00
Seth Hoenig
6884455750 connect: use exp backoff when waiting on consul envoy bootstrap
This PR wraps the use of the consul envoy bootstrap command in
an expoenential backoff closure, configured to timeout after 60
seconds. This is an increase over the current behavior of making
3 attempts over 6 seconds.

Should help with #10451
2021-04-27 09:21:50 -06:00
Luiz Aoqui
6f17ad6caf changelog: add entry for #10348 (#10349) 2021-04-23 11:25:31 -04:00
Charlie Voiselle
0af476263b Add PR 10404 to CHANGELOG (#10415) 2021-04-20 14:01:22 -04:00
Seth Hoenig
ec73d7eb26 Merge pull request #10184 from hashicorp/f-fuzzy-search
api: implement fuzzy search API
2021-04-20 09:06:40 -06:00
Buck Doyle
d0f4750f51 Add job version revert buttons (#10336)
This adds a Revert two-step button to the JobVersions component for
not-current versions, which redirects to the overview on success. It
checks the job version before and after reversion to mitigate the edge
case where reverting to an otherwise-identical version has no effect, as
discussed in #10337.

It uses existing facilities for handling other errors and disabling the
button when permissions are lacking.
2021-04-20 08:33:16 -05:00
Seth Hoenig
350d9ebc40 api: implement fuzzy search API
This PR introduces the /v1/search/fuzzy API endpoint, used for fuzzy
searching objects in Nomad. The fuzzy search endpoint routes requests
to the Nomad Server leader, which implements the Search.FuzzySearch RPC
method.

Requests to the fuzzy search API are based on the api.FuzzySearchRequest
object, e.g.

{
  "Text": "ed",
  "Context": "all"
}

Responses from the fuzzy search API are based on the api.FuzzySearchResponse
object, e.g.

{
  "Index": 27,
  "KnownLeader": true,
  "LastContact": 0,
  "Matches": {
    "tasks": [
      {
        "ID": "redis",
        "Scope": [
          "default",
          "example",
          "cache"
        ]
      }
    ],
    "evals": [],
    "deployment": [],
    "volumes": [],
    "scaling_policy": [],
    "images": [
      {
        "ID": "redis:3.2",
        "Scope": [
          "default",
          "example",
          "cache",
          "redis"
        ]
      }
    ]
  },
  "Truncations": {
    "volumes": false,
    "scaling_policy": false,
    "evals": false,
    "deployment": false
  }
}

The API is tunable using the new server.search stanza, e.g.

server {
  search {
    fuzzy_enabled   = true
    limit_query     = 200
    limit_results   = 1000
    min_term_length = 5
  }
}

These values can be increased or decreased, so as to provide more
search results or to reduce load on the Nomad Server. The fuzzy search
API can be disabled entirely by setting `fuzzy_enabled` to `false`.
2021-04-16 16:36:07 -06:00
Tim Gross
ee9bb3cc4f docs: changelog and upgrade note for iptables improvement 2021-04-15 10:19:37 -04:00
Tim Gross
a0f603b1fe changelog entries for networking improvements 2021-04-13 10:07:02 -04:00
Tim Gross
4a1a14248a fixup changelog 2021-04-13 09:15:35 -04:00
Nick Spain
7fefc3a08c Update changelog to mention adding the 'body' field 2021-04-13 09:15:35 -04:00
Tim Gross
7ba93c2b77 changelog entry for 'nomad ui -authenticate' 2021-04-12 11:01:20 -04:00
James Rasell
ee8b8fa8a9 changelog: add entry for #10253 2021-04-12 10:35:33 -04:00
Tim Gross
45f0a3a532 CSI: capability block is required for volume registration 2021-04-08 13:02:24 -04:00
Chris Baker
c249b8d444 updated changelog 2021-04-06 20:27:12 +00:00
Chris Baker
6064867251 sdk: header map copy to avoid race condition in #10301 2021-04-06 18:06:27 +00:00
Seth Hoenig
28038bdf47 consul: minor CR cleanup 2021-04-05 10:10:16 -06:00
Seth Hoenig
a97254fa20 consul: plubming for specifying consul namespace in job/group
This PR adds the common OSS changes for adding support for Consul Namespaces,
which is going to be a Nomad Enterprise feature. There is no new functionality
provided by this changeset and hopefully no new bugs.
2021-04-05 10:03:19 -06:00
Drew Bailey
5c3399853d changelog entry for on_update configuration settings (#10299)
* changelog entry for on_update configuration settings

* Update CHANGELOG.md

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2021-04-05 11:04:03 -04:00
Drew Bailey
efaa22b397 license changelog (#10298) 2021-04-05 10:57:20 -04:00