Commit Graph

19925 Commits

Author SHA1 Message Date
Michael Lange 2a1c820c1c Make alloc association lines conditional on alloc count relative to node count 2020-10-23 15:16:31 -07:00
Michael Lange e0157759a8 Redo column widths on the topology page.
Now the info panel has a fixed width and the TopoViz will display as a
single column if the TopoViz column is too narrow for two columns.
2020-10-23 14:17:03 -07:00
Michael Lange 7f2fba9b23 Reset inline styles on flex-masonry elements when columns is set to 1 2020-10-23 14:17:03 -07:00
Michael Lange 38a4a027aa Truncate text in the topo viz info panel 2020-10-23 14:17:03 -07:00
Michael Lange 17403815ab Highlight starting allocations with a blue tint 2020-10-23 14:17:03 -07:00
Michael Lange 8947fd547b Limit the topo viz to only pending and running allocs
Failed allocs immediately vacate their allocated resources which results
in inaccurate distributions of allocations on a client.
2020-10-23 14:17:03 -07:00
Tim Gross 8b93397e5d
changelog entry for #8967 (#9164) 2020-10-23 14:27:32 -04:00
Drew Bailey 1ae39a9ed9
event sink crud operation api (#9155)
* network sink rpc/api plumbing

state store methods and restore

upsert sink test

get sink

delete sink

event sink list and tests

go generate new msg types

validate sink on upsert

* go generate
2020-10-23 14:23:00 -04:00
Michael Schurter dc5d16bd9e
Merge pull request #9135 from hashicorp/f-namespaces
core: open source namespaces
2020-10-23 10:23:55 -07:00
Kevin Pruett 521409b9c8
Merge pull request #9156 from hashicorp/pruett.alertbanner-exp
Document new `expirationDate` prop for AlertBanner
2020-10-23 10:52:35 -04:00
Kevin Pruett 4439d8fa0b
Document new `expirationDate` prop for AlertBanner 2020-10-23 10:52:11 -04:00
Stefan Richter 484ef8a1e8
Add NOMAD_JOB_ID and NOMAD_JOB_PAERENT_ID env variables (#8967)
Beforehand tasks and field replacements did not have access to the
unique ID of their job or its parent. This adds this information as
new environment variables.
2020-10-23 10:49:58 -04:00
Tim Gross 10b6551065
docs: add regression warning for GH-9148 to upgrade guide (#9157)
* docs: add regression warning for GH-9148 to upgrade guide
* changelog entry
2020-10-23 10:05:56 -04:00
Tim Gross 4fe1edfd63
Revert "e2e: fix destination of templates in VaultSecrets test (#9146)" (#9163)
This reverts commit 8aed53c177aea024d4f24d1fbb4d6e0881f04eab.
2020-10-23 09:01:25 -04:00
James Rasell b9a0d49cb2
docs: add new job scale and scaling-events CLI website docs. 2020-10-23 09:30:04 +02:00
Michael Schurter 2c78d6cb5d docs: namespaces are oss in Nomad 1.0 2020-10-22 15:26:32 -07:00
Michael Schurter 6eb8520367 Update generate_msgtypes.sh now that iota is gone 2020-10-22 15:26:32 -07:00
Michael Schurter c2dd9bc996 core: open source namespaces 2020-10-22 15:26:32 -07:00
Tim Gross 1fb1c9c5d4
artifact/template: make destination path absolute inside taskdir (#9149)
Prior to Nomad 0.12.5, you could use `${NOMAD_SECRETS_DIR}/mysecret.txt` as
the `artifact.destination` and `template.destination` because we would always
append the destination to the task working directory. In the recent security
patch we treated the `destination` absolute path as valid if it didn't escape
the working directory, but this breaks backwards compatibility and
interpolation of `destination` fields.

This changeset partially reverts the behavior so that we always append the
destination, but we also perform the escape check on that new destination
after interpolation so the security hole is closed.

Also, ConsulTemplate test should exercise interpolation
2020-10-22 15:47:49 -04:00
Buck Doyle 8aacab513b
Add logged Faker seed when none is set in tests (#9140)
This will hopefully make it easier to reproduce test failures
that happen intermittently, especially in CI.
2020-10-22 13:45:51 -05:00
Mahmood Ali 059e87c862
Merge pull request #9142 from hashicorp/f-hclv2-2.3
Support HCLv2 for Nomad jobs
2020-10-22 12:26:28 -05:00
Tim Gross 344e821ace
e2e: fix destination of templates in VaultSecrets test (#9146)
The `$NOMAD_SECRETS_DIR` environment variable is rendered as `/secrets`, which
prior to the recent security patch would unintentionally escape the file
sandbox and get dropped in a directory named `/secrets` where the Nomad client
binary was running. The `VaultSecrets` test was accidentally relying on this
behavior and that causes the test to fail.
2020-10-22 13:00:08 -04:00
Drew Bailey f3dcefe5a9
remove event durability (#9147)
* remove event durability

temporarily removing go-memdb event durability until a new strategy is developed on how to best handled increased durability needs

* drop events table schema and state store methods

* fix neweventbuffer invocations
2020-10-22 12:21:03 -04:00
Mahmood Ali d3a17b5c82 address review feedback 2020-10-22 11:49:37 -04:00
davidr912 3319269964
Update job/plan documentation (#9145)
Updated to reflect plan expects the job definition as JSON object and not as the string form of the JSON
2020-10-22 10:17:47 -04:00
Mahmood Ali 9c0a93a604 Don't parse the server-set fields of the job struct 2020-10-22 08:18:57 -04:00
Tim Gross 8459f1ead5
csi: prevent in-use plugin GC from blocking volume GC (#9141)
During CSI plugin GC, we don't return an error if the volume is in use,
because this is not an error condition. If we were to return an error during a
`nomad system gc`, we would not continue on to GC volumes.

But check for the specific error message fails if the GC is performed on a
worker rather than on the leader, due to RPC forwarding wrapping the error
message. Use a less specific test so that we don't return an error.
2020-10-21 16:54:28 -04:00
Mahmood Ali f52bda4c30 api: update /render api to parse hclv2 2020-10-21 15:46:57 -04:00
Mahmood Ali 84ec0b38e8 cli: use HCLv2 parser
Also, fallback to using HCLv1.
2020-10-21 15:46:57 -04:00
Mahmood Ali f9290090e0 Update vendored libraries 2020-10-21 15:46:56 -04:00
Mahmood Ali b3c118ae22 Add hclv2 parser 2020-10-21 15:46:56 -04:00
Tim Gross 7eeb46fb5d bump website version to 0.12.6 2020-10-21 14:34:12 -04:00
Tim Gross 70c9faabd2 upgrade guide documentation 2020-10-21 14:34:12 -04:00
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