Commit Graph

19942 Commits

Author SHA1 Message Date
Tim Gross 07fba1c92c changelog entry 2020-10-21 14:34:12 -04:00
Tim Gross 6df36e4cdb artifact/template: prevent file sandbox escapes
Ensure that the client honors the client configuration for the
`template.disable_file_sandbox` field when validating the jobspec's
`template.source` parameter, and not just with consul-template's own `file`
function.

Prevent interpolated `template.source`, `template.destination`, and
`artifact.destination` fields from escaping file sandbox.
2020-10-21 14:34:12 -04:00
Mahmood Ali 1ae924973e hclv1: tweak HCLv1 tests
This ensures that gatway ReadOnly key is tested.  Also, update the hclv1
test-fixtures to be hclv1 compliant.
2020-10-21 14:05:46 -04:00
Mahmood Ali 618388d1c3 api: parse service gateway name
Adding gateway name eases HCLv2 parsing. This field is only used for parsing the
job and is ignored for any other pruposes
2020-10-21 14:05:46 -04:00
Mahmood Ali 58df967c3a Tag Job spec with HCLv2 tags 2020-10-21 14:05:46 -04:00
Tim Gross 9fa38bac98
e2e: path fixes for local_binary uploads (#9137)
When uploading a local binary for provisioning, the location that we pass into
the provisioning script needs to be where we uploaded it to, not the source on
our laptop. Also, the null_resource for uploading needs to read in the private
key, not its path.
2020-10-21 10:20:22 -04:00
Tim Gross 9b8d10875b
changelog entry for #9093 (#9132) 2020-10-20 16:20:23 -04:00
Alexander Shtuchkin 90fd8bb85f
Implement 'batch mode' for persisting allocations on the client. (#9093)
Fixes #9047, see problem details there.

As a solution, we use BoltDB's 'Batch' mode that combines multiple
parallel writes into small number of transactions. See
https://github.com/boltdb/bolt#batch-read-write-transactions for
more information.
2020-10-20 16:15:37 -04:00
Seth Hoenig 3da633bd41
Merge pull request #9130 from hashicorp/b-canarymeta-interpolation-tests
consul: add tests for meta/canarymeta interpolation
2020-10-20 14:45:06 -05:00
Seth Hoenig 59acc1ca1d docs: update changelog for canary meta 2020-10-20 12:54:30 -05:00
Seth Hoenig 9cdb98f0e4 client: add tests around meta and canarymeta interpolation
Expanding on #9096, add tests for making sure service.Meta and
service.CanaryMeta are interpolated from environment variables.
2020-10-20 12:50:29 -05:00
Jorge Marey 8a0ef606a3 Add interpolation on service canarymeta 2020-10-20 12:45:36 -05:00
Seth Hoenig 9ac5592b13
Merge pull request #9127 from josemaia/patch-2
Remove limitation that has been fixed
2020-10-20 12:17:29 -05:00
Buck Doyle c8caa810e9
Remove logo spin for prefers-reduced-motion (#9128)
Spinning is one of the triggers mentioned on this page:
https://webkit.org/blog/7551/responsive-design-for-motion/

Thanks to @fivetanley for mentioning that this exists.
2020-10-20 11:52:15 -05:00
Seth Hoenig 0478a50881
Merge pull request #9118 from hashicorp/f-use-upstream-gopsutil-again
deps: use upstream gopsutil once more
2020-10-20 10:30:44 -05:00
José Maia 186d85fd34
Remove limitation that has been fixed
Issue #6459 has been fixed for a while, but the docs still point to it as a limitation
2020-10-20 15:32:41 +01:00
Drew Bailey 8451de99b2
adds two base event stream e2e tests (#9126)
* adds two base event stream e2e tests

test evaluation filter keys are included

* Apply suggestions from code review

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

* gc aftereach

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2020-10-20 08:26:21 -04:00
Seth Hoenig 37273def9c
Merge pull request #9119 from hashicorp/f-update-gomod-1.15
build: update gomod go version
2020-10-19 14:36:19 -05:00
Tim Gross 3682851caa
update tree tool to pass lint-go (#9125)
* update `tree` tool to pass lint-go
* bump `tools/go.mod` to go1.15
2020-10-19 15:33:56 -04:00
Drew Bailey 6c788fdccd
Events/msgtype cleanup (#9117)
* use msgtype in upsert node

adds message type to signature for upsert node, update tests, remove placeholder method

* UpsertAllocs msg type test setup

* use upsertallocs with msg type in signature

update test usage of delete node

delete placeholder msgtype method

* add msgtype to upsert evals signature, update test call sites with test setup msg type

handle snapshot upsert eval outside of FSM and ignore eval event

remove placeholder upsertevalsmsgtype

handle job plan rpc and prevent event creation for plan

msgtype cleanup upsertnodeevents

updatenodedrain msgtype

msg type 0 is a node registration event, so set the default  to the ignore type

* fix named import

* fix signature ordering on upsertnode to match
2020-10-19 09:30:15 -04:00
Mahmood Ali 1f215e47d4
Merge pull request #9109 from benbuzbee/gopath-proto
Use GOPATH/src explicitly in proto build target
2020-10-18 18:21:31 -05:00
Seth Hoenig 5fc9e74ba7 build: update gomod go version
Keep go.mod go version up to date with the version of Go used
to build Nomad.
2020-10-17 09:04:33 -05:00
Seth Hoenig 8e4df4ca51 deps: use upstream gopsutil once more
The PR we needed https://github.com/shirou/gopsutil/pull/889 has been merged
upstream, which means we can use upstream rather than our fork of psutil.
2020-10-17 08:54:50 -05:00
Tim Gross 17e14b79ac
docs: clarify task working directories (#9098)
The terms task directory and allocation directory are used throughout the
documentation but these directories are not the same as the `NOMAD_TASK_DIR`
and `NOMAD_ALLOC_DIR` locations. This is confusing when trying to use the
`template` and `artifact` stanzas, especially when trying to use a destination
outside the Nomad-mounted directories for Docker and similar drivers.

This changeset introduces "allocation working directory" to mean the location
on disk where the various directories and artifacts are staged, and "task
working directory" for the task. Clarify how specific task drivers interact
with the task working directory.

Co-authored-by: Charlie Voiselle <464492+angrycub@users.noreply.github.com>
2020-10-16 12:56:09 -04:00
Tim Gross da75edc42f
Update website/pages/docs/drivers/external/lxc.mdx
Co-authored-by: Charlie Voiselle <464492+angrycub@users.noreply.github.com>
2020-10-16 12:55:45 -04:00
Michael Lange ef5eabc79a
Merge pull request #9105 from hashicorp/d/topo-changelog
Changelog entry for topo viz
2020-10-16 09:29:34 -07:00
Tim Gross ced132199d improve language for LXC volumes 2020-10-16 11:40:06 -04:00
Tim Gross fbf98543f2 clarify raw_exec doesn't have filesystem isolation 2020-10-16 11:38:23 -04:00
Drew Bailey ea6fcf5f4e
Events/docs (#9100)
* /v1/event/stream docs

* events sidebar

* wip server config

* make ids match

* fix typo

* add server config opts

* Update website/pages/api-docs/events.mdx

Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>

* Update website/pages/api-docs/events.mdx

Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>

* address feedback

Co-authored-by: Seth Hoenig <shoenig@hashicorp.com>
2020-10-16 11:23:47 -04:00
Tim Gross 8fb55a2148 Apply suggestions from code review
Co-authored-by: Charlie Voiselle <464492+angrycub@users.noreply.github.com>
2020-10-16 11:02:49 -04:00
Tim Gross a3561a3d96 fix anchor links 2020-10-16 11:02:49 -04:00
Tim Gross 5c4fdd006c docs: clarify task working directories
The terms task directory and allocation directory are used throughout the
documentation but these directories are not the same as the `NOMAD_TASK_DIR`
and `NOMAD_ALLOC_DIR` locations. This is confusing when trying to use the
`template` and `artifact` stanzas, especially when trying to use a destination
outside the Nomad-mounted directories for Docker and similar drivers.

This changeset introduces "allocation working directory" to mean the location
on disk where the various directories and artifacts are staged, and "task
working directory" for the task. Clarify how specific task drivers interact
with the task working directory.
2020-10-16 11:02:49 -04:00
Tim Gross 8fcdbe0592
e2e: add reporting to flaky spread test (#9115)
The spread test is infrequently flaky and it's hard to extract what's actually
happening. If the test fails, dump all the allocation metrics so that we can
debug the behavior.
2020-10-16 11:01:07 -04:00
Tim Gross 54d7f57662
e2e: fix flaky TaskEventsTest (#9114)
Assert that we get at least N task events, rather than exactly N. When a
task within an allocation dies, a sibling task can get an Allocation Unhealthy
event after it's also killed, even though it's not the origin of the event.
2020-10-16 10:22:40 -04:00
Tim Gross e0ff06be2f
e2e: networking test job needs to outlast assert (#9113)
The `e2ejob` utility asserts that a job is running for 5s, but with a sleep
time of 5s, the networking job can race with that check. Sleeping for a longer
period should guarantee that we're running long enough to pass the assert.

Also constrains the job to Linux because our Windows test targets don't yet
support Docker (LCOW), and expand the set of DCs we can safely land on.
2020-10-16 10:13:16 -04:00
Mahmood Ali f05d4cc93a
Merge pull request #9112 from sahiljambhekar/patch-1
Remove Nomad-spark reference from use-cases.mdx
2020-10-16 06:47:43 -05:00
Sahil e83b4d470e
Remove Nomad-spark reference from use-cases.mdx
Removed ref to [Spark](https://github.com/hashicorp/nomad-spark) based on 
2c6092a2a6
2020-10-16 05:41:49 -04:00
Drew Bailey 4c04b40c62
Merge pull request #9108 from hashicorp/rm-special-node-drain-event
remove special node drain event type
2020-10-15 17:30:53 -04:00
Buck Doyle 70a0253f0d
Update loading spinner to be logo-based (#9106)
Thanks to @mikehobi, whose work here this is adapted from:
https://icons8.com/cssload/en/3d-loaders
2020-10-15 16:05:58 -05:00
Ben Buzbee a5b5681248 Use GOPATH/src explicitly in proto build target
-I ../../.. is meant to navigate from `GOPATH/src/github.com/hashicorp/nomad` to `GOPATH/src`

This is fine but it assumes a few things about how the dev has setup nomad, which is also fine if that is the expected dev environment, however the `../../..` is not as explicit as "GOPATH/src" and it would also enable a few more scenarios so it seems strictly better to me.

Random example: nomad is a subrepo of ours, but with this change we can symlink from GOPATH/src/github.com/hashicorp/nomad and `make proto` will work.
2020-10-15 21:05:27 +00:00
Drew Bailey ae75f192a8
Merge pull request #9107 from hashicorp/event-cfg-positive
event buffer size and durable count must be non negative
2020-10-15 16:50:54 -04:00
Drew Bailey c57e760933
remove special node drain event type
rely on standardized events instead of special node drain event
2020-10-15 16:44:36 -04:00
Drew Bailey fba0d6dc6a
event buffer size and durable count must be non negative 2020-10-15 16:34:33 -04:00
Mike Wickett 175dbaf380
Set env var (#9103) 2020-10-15 16:13:49 -04:00
Nick Ethier 4903e5b114
Consul with CNI and host_network addresses (#9095)
* consul: advertise cni and multi host interface addresses

* structs: add service/check address_mode validation

* ar/groupservices: fetch networkstatus at hook runtime

* ar/groupservice: nil check network status getter before calling

* consul: comment network status can be nil
2020-10-15 15:32:21 -04:00
Michael Lange 3917695602 Changelog entry for topo viz 2020-10-15 12:11:16 -07:00
Tim Gross eff5f6949c
changelog entry for Docker config image_delay fix (#9104) 2020-10-15 15:09:34 -04:00
Michael Lange 12cae40388
Merge pull request #9077 from hashicorp/f-ui/topo-viz
UI: Topology Visualization
2020-10-15 11:58:10 -07:00
Michael Lange 5c34e94529 Typo 2020-10-15 11:45:59 -07:00
Michael Lange 329fecac6d Work around Safari's lack of text transform support 2020-10-15 11:45:59 -07:00