Commit Graph

15531 Commits

Author SHA1 Message Date
Preetha Appan 539d12e583
Add links to godoc for raft related metrics 2019-06-19 11:59:05 -05:00
Preetha Appan dc0ac81609
Change interval of raft stats collection to 10s 2019-06-19 11:58:46 -05:00
Chris Baker d8da6870fb
Merge pull request #5850 from hashicorp/b-5345-prometheus-metric-label-conflict
metrics: upgraded prometheus http client
2019-06-19 12:50:24 -04:00
Chris Baker 0436f70975
Merge branch 'master' into b-5345-prometheus-metric-label-conflict 2019-06-19 12:50:03 -04:00
Chris Baker 8dadc50f4a
Update CHANGELOG.md 2019-06-19 12:49:12 -04:00
Mahmood Ali 4c3798c82a
Merge pull request #5844 from hashicorp/b-hcl-parse-unknown-vars
Upgrade hcl2 to validate arrays for unknown values
2019-06-19 10:44:21 -04:00
Omar Khawaja da4c801eb2
fixing typos in operator endpoint api docs (#5854) 2019-06-19 10:35:47 -04:00
Mahmood Ali 31d1e4a66c update changelog for GH-5726, GH-5811, and GH-5851 2019-06-18 21:59:49 -04:00
Mahmood Ali 6c245c9b6a
Merge pull request #5811 from cloudbuy/b-win32-volume-split
lift code from docker/volume/mounts for splitting windows volumes
2019-06-18 21:19:15 -04:00
Mahmood Ali b209584dce
Merge pull request #5726 from hashicorp/b-plugins-via-init
Use init() to handle plugin invocation
2019-06-18 21:09:03 -04:00
Mahmood Ali ac64509c59 comment on use of init() for plugin handlers 2019-06-18 20:54:55 -04:00
Mahmood Ali 9a39ec2307
Merge pull request #5851 from hashicorp/b-libcontainer-6cc5158
Update libcontainer to 6cc5158
2019-06-18 19:03:11 -04:00
Mahmood Ali 0c8a1623f3 update logrus and go-windows-terminal-sequences 2019-06-18 14:55:19 -04:00
Mahmood Ali 3dd3195d45 Update github.com/opencontainers/selinux
Or github.com/opencontainers/selinux/go-selinux, a dependency of
libcontainer.
2019-06-18 14:49:11 -04:00
Mahmood Ali 0848f577bb Update libcontainer to 6cc5158
To pick up the fix in https://github.com/opencontainers/runc/pull/2023

Fixes https://github.com/hashicorp/nomad/issues/5836
2019-06-18 14:48:13 -04:00
Chris Baker 355082c0ac update changelog for GH-5850 2019-06-18 18:38:41 +00:00
Chris Baker 50b491564d metrics: upgraded prometheus http client to 0.9.4 to address label conflict in Nomad 0.9.x reported in #5345 2019-06-18 18:34:22 +00:00
Chris Baker 3b8315f381
Merge pull request #5847 from hashicorp/f-5554-metrics-namespace-label
metrics: add namespace label to allocation metrics
2019-06-18 10:57:07 -04:00
Charlie Voiselle 971e8a94c9
Merge pull request #5849 from hashicorp/roll-back-ami
roll back to previous ami
2019-06-18 10:23:11 -04:00
Omar Khawaja 81f0764697 roll back to previous ami 2019-06-18 10:20:13 -04:00
Chris Baker a2b3e83499 update changelog 2019-06-18 14:16:49 +00:00
Chris Baker f71114f5b8 cleanup test 2019-06-18 14:15:25 +00:00
Chris Baker a2dc351fd0 formatting and clarity 2019-06-18 14:00:57 +00:00
Damien Churchill 9ee17f32c0 run new file through goimports 2019-06-18 08:35:25 +01:00
Damien Churchill dba5bd96cd run gofmt over the new file 2019-06-18 08:35:25 +01:00
Damien Churchill 4d7d352d7e drivers/docker: move lifted code out to separate file and link the source & license 2019-06-18 08:35:25 +01:00
Damien Churchill 70daca3395 lift code from docker/volume/mounts for splitting windows volumes
Using the API as provided from the `mounts` package imposes validation
on the `src:dest` which shouldn't be performed at this time. To workaround
that lift the internal code from that library required to only perform
the split.
2019-06-18 08:35:25 +01:00
Buck Doyle 456c4c8bd2
Add exclusion of UI branches for AppVeyor (#5842)
As with #5839 on Travis CI, this skips AppVeyor for UI branches.
2019-06-17 16:31:11 -07:00
Preetha Appan 599eba3be1
docs for new metrics 2019-06-17 15:51:49 -05:00
Preetha Appan 104d66f10c
Changed name of metric 2019-06-17 15:51:31 -05:00
Chris Baker e0170e1c67 metrics: add namespace label to allocation metrics 2019-06-17 20:50:26 +00:00
Mahmood Ali c1f6c7b457 Upgrade hcl2 to validate arrays for unknown values
This upgrades hcl2 library dependency to pick up
https://github.com/hashicorp/hcl2/pull/113 .

Prior to this change, parsing and decoding array attributes containing
invalid errors (e.g. references to unknown variables) are silently
dropped, with `cty.Unknown` being assigned to the bad element.  Rather
than showing a type/meaningful error from hcl2, we get a very decrypted
error message from msgpack layer trying to handle `cty.unknown`.

This ensures that we propagate diagnostics correctly and report
meaningful errors to users.

Fixes https://github.com/hashicorp/nomad/issues/5694
Fixes https://github.com/hashicorp/nomad/issues/5680
2019-06-17 12:28:14 -04:00
Mahmood Ali cb92b5d162 Add a test for unknown variables 2019-06-17 12:25:43 -04:00
Buck Doyle bbf8307ce6
Remove non-UI jobs for branches starting with .-ui (#5839)
Branches that follow the UI naming convention will no longer produce
non-UI jobs on Travis CI.
2019-06-14 15:41:34 -07:00
Preetha Appan c54b4a5b17
Emit metrics with raft commit and apply index and statestore latest index 2019-06-14 16:30:27 -05:00
Yishan Lin 550af0827a Added revised copy from rcgenova to feature paragraphs. 2019-06-14 11:25:30 -07:00
Buck Doyle 5390d71648 Update changelog properly
I failed to amend my commit! 😭
2019-06-14 08:55:13 -07:00
Mahmood Ali e07413c420 Avoid de-registering slowly restored services
When a nomad client restarts/upgraded, nomad restores state from running
task and starts the sync loop.  If sync loop runs early, it may
deregister services from Consul prematurely even when Consul has the
running service as healthy.

This is not ideal, as re-registering the service means potentially
waiting a whole service health check interval before declaring the
service healthy.

We attempt to mitigate this by introducing an initialization probation
period.  During this time, we only deregister services and checks that
were explicitly deregistered, and leave unrecognized ones alone.  This
serves as a grace period for restoring to complete, or for operators to
restore should they recognize they restored with the wrong nomad data
directory.
2019-06-14 11:15:21 -04:00
Buck Doyle 5282765284 Update changelog 2019-06-13 16:55:00 -07:00
Jasmine Dahilig 43382ab52b update changelog 2019-06-13 14:41:56 -07:00
Mahmood Ali 8d4f914be9
Merge pull request #5790 from hashicorp/b-reschedule-desired-state
Mark rescheduled allocs as stopped.
2019-06-13 17:28:59 -04:00
Michael Schurter f48289ebbd
Merge pull request #5786 from hashicorp/docs-docs
docs: initial attempt at developer docs
2019-06-13 14:19:41 -07:00
Buck Doyle 2d96e37390
Change sort arrow to pass through pointer events (#5833)
Without this, clicking on the sort arrow didn’t change the
sort direction.
2019-06-13 16:14:35 -05:00
Michael Schurter 32138e2977
Merge branch 'master' into docs-docs 2019-06-13 14:13:41 -07:00
Mahmood Ali 962921f86c Use init to handle plugin invocation
Currently, nomad "plugin" processes (e.g. executor, logmon, docker_logger) are started as CLI
commands to be handled by command CLI framework.  Plugin launchers use
`discover.NomadBinary()` to identify the binary and start it.

This has few downsides: The trivial one is that when running tests, one
must re-compile the nomad binary as the tests need to invoke the nomad
executable to start plugin.  This is frequently overlooked, resulting in
puzzlement.

The more significant issue with `executor` in particular is in relation
to external driver:

* Plugin must identify the path of invoking nomad binary, which is not
trivial; `discvoer.NomadBinary()` now returns the path to the plugin
rather than to nomad, preventing external drivers from launching
executors.

* The external driver may get a different version of executor than it
expects (specially if we make a binary incompatible change in future).

This commit addresses both downside by having the plugin invocation
handling through an `init()` call, similar to how libcontainer init
handler is done in [1] and recommened by libcontainer [2].  `init()`
will be invoked and handled properly in tests and external drivers.

For external drivers, this change will cause external drivers to launch
the executor that's compiled against.

There a are a couple of downsides to this approach:
* These specific packages (i.e executor, logmon, and dockerlog) need to
be careful in use of `init()`, package initializers.  Must avoid having
command execution rely on any other init in the package.  I prefixed
files with `z_` (golang processes files in lexical order), but ensured
we don't depend on order.
* The command handling is spread in multiple packages making it a bit
less obvious how plugin starts are handled.

[1] drivers/shared/executor/libcontainer_nsenter_linux.go
[2] eb4aeed24f/libcontainer (using-libcontainer)
2019-06-13 16:48:01 -04:00
Mahmood Ali 5ec68c31e7
Merge pull request #5831 from hashicorp/golang-1.11.11
Update golang to 1.11.11
2019-06-13 16:44:32 -04:00
Mahmood Ali 5e6327b6a1 Test behavior no reschedule for service/batch jobs 2019-06-13 16:41:19 -04:00
Jasmine Dahilig 8d479523d9 update changelog 2019-06-13 12:28:54 -07:00
Jasmine Dahilig ed9740db10
Merge pull request #5664 from hashicorp/f-http-hcl-region
backfill region from hcl for jobUpdate and jobPlan
2019-06-13 12:25:01 -07:00
Jasmine Dahilig 51e141be7a backfill region from job hcl in jobUpdate and jobPlan endpoints
- updated region in job metadata that gets persisted to nomad datastore
- fixed many unrelated unit tests that used an invalid region value
(they previously passed because hcl wasn't getting picked up and
the job would default to global region)
2019-06-13 08:03:16 -07:00