Commit Graph

15420 Commits

Author SHA1 Message Date
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
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
Danielle c798d21f23
Merge pull request #5801 from jrasell/patch-5
Fix incorrect link to the sample Grafana dashboard
2019-06-13 16:39:23 +02:00
Danielle b7fc81031b
Merge pull request #5829 from hashicorp/dani/b-5819
consul: Include port-label in service registration
2019-06-13 16:20:45 +02:00
Mahmood Ali 6aaec8b861 Update golang to 1.11.11
It's the latest 1.11 point release as of now
2019-06-13 09:49:21 -04:00
Mahmood Ali 2d0025fba4
Merge pull request #5830 from hashicorp/docs-go-version-update
Updated minimum development go version
2019-06-13 09:48:34 -04:00
Mahmood Ali faf643a375 Don't stop rescheduleLater allocations
When an alloc is due to be rescheduleLater, it goes through the
reconciler twice: once to be ignored with a follow up evals, and once
again when processing the follow up eval where they appear as
rescheduleNow.

Here, we ignore them in the first run and mark them as stopped in second
iteration; rather than stop them twice.
2019-06-13 09:44:41 -04:00
Charlie Voiselle 9f0473d32f
Updated minimum development go version 2019-06-13 09:36:09 -04:00
Danielle Lancashire 8112177503
consul: Include port-label in service registration
It is possible to provide multiple identically named services with
different port assignments in a Nomad configuration.

We introduced a regression when migrating to stable service identifiers where
multiple services with the same name would conflict, and the last definition
would take precedence.

This commit includes the port label in the stable service identifier to
allow the previous behaviour where this was supported, for example
providing:

```hcl
service {
  name = "redis-cache"
  tags = ["global", "cache"]
  port = "db"
  check {
    name     = "alive"
    type     = "tcp"
    interval = "10s"
    timeout  = "2s"
  }
}

service {
  name = "redis-cache"
  tags = ["global", "foo"]
  port = "foo"

  check {
    name     = "alive"
    type     = "tcp"
    port     = "db"
    interval = "10s"
    timeout  = "2s"
  }
}

service {
  name = "redis-cache"
  tags = ["global", "bar"]
  port = "bar"

  check {
    name     = "alive"
    type     = "tcp"
    port     = "db"
    interval = "10s"
    timeout  = "2s"
  }
}
```

in a nomad task definition is now completely valid. Each service
definition with the same name must still have a unique port label however.
2019-06-13 15:24:54 +02:00
Nick Ethier 1b7fa4fe29
Optional Consul service tags for nomad server and agent services (#5706)
Optional Consul service tags for nomad server and agent services
2019-06-13 09:00:35 -04:00
Michael Schurter b2d62096d0 docs: checklists don't support numbered lists
The order didn't really make sense anyway.
2019-06-12 15:35:48 -07:00
Mahmood Ali 1ead8b60d2 update website to link to Nomad 0.9.3 2019-06-12 14:56:18 -04:00
Mahmood Ali e31159bf1f Prepare for 0.9.4 dev cycle 2019-06-12 18:47:50 +00:00