Commit Graph

15247 Commits

Author SHA1 Message Date
Danielle Lancashire 634ada671e
fifo: Require that fifos do not exist for create
Although this operation is safe on linux, it is not safe on Windows when
using the named pipe interface. To provide a ~reasonable common api
abstraction, here we switch to returning File exists errors on the unix
api.
2019-06-28 13:47:18 +02:00
Danielle Lancashire 0ff27cfc0f
vendor: Use dani fork of go-winio 2019-06-28 13:47:18 +02:00
Danielle Lancashire 514a2a6017
logmon: Refactor fifo access for windows safety
On unix platforms, it is safe to re-open fifo's for reading after the
first creation if the file is already a fifo, however this is not
possible on windows where this triggers a permissions error on the
socket path, as you cannot recreate it.

We can't transparently handle this in the CreateAndRead handle, because
the Access Is Denied error is too generic to reliably be an IO error.
Instead, we add an explict API for opening a reader to an existing FIFO,
and check to see if the fifo already exists inside the calling package
(e.g logmon)
2019-06-28 13:41:54 +02: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
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
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 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
Mahmood Ali 21aa1cdc0e
Release v0.9.3 2019-06-12 18:44:47 +00:00
Nomad Release bot 4803215109 Generate files for 0.9.3 release 2019-06-12 16:11:16 +00:00
Preetha 71ba7eb9cb
Merge pull request #5815 from hashicorp/f-downgrade-docs
Add warning docs around downgrades
2019-06-12 10:39:43 -05:00
Danielle Lancashire 54d544e874
update changelog 2019-06-12 17:35:57 +02:00
Preetha 8a98817fe4
Merge pull request #5820 from hashicorp/r-assorted-changes-20190612_1
Assorted minor changes
2019-06-12 10:33:16 -05:00
Danielle f923b568e0
Merge pull request #5821 from hashicorp/dani/b-5770
trhooks: Add TaskStopHook interface to services
2019-06-12 17:30:49 +02:00
Chris Baker 6d4e840453
Merge pull request #5825 from hashicorp/docs-updated-alloc-examples
documentation: fixed incorrect URLs in allocation signal/restart documentation
2019-06-12 11:28:05 -04:00
Chris Baker ccb9992930 documentation: fixed incorrect URLs in allocation signal/restart documentation 2019-06-12 15:14:34 +00:00
Danielle cc82195d05
Merge pull request #5823 from hashicorp/dani/fix-restart-api
alloc-lifecycle: Fix restart with empty body
2019-06-12 17:07:46 +02:00
Danielle Lancashire c326344b57
trt: Fix test 2019-06-12 17:06:11 +02:00
Danielle 559ccfe797
Merge pull request #5822 from hashicorp/dani/allocrestartapidocs
docs: Add missing docs for alloc restart api
2019-06-12 16:58:59 +02:00
Danielle Lancashire 7fa6d6aad5
update changelog 2019-06-12 16:06:18 +02:00
Danielle Lancashire 13d76e35fd
trhooks: Add TaskStopHook interface to services
We currently only run cleanup Service Hooks when a task is either
Killed, or Exited. However, due to the implementation of a task runner,
tasks are only Exited if they every correctly started running, which is
not true when you recieve an error early in the task start flow, such as
not being able to pull secrets from Vault.

This updates the service hook to also call consul deregistration
routines during a task Stop lifecycle event, to ensure that any
registered checks and services are cleared in such cases.

fixes #5770
2019-06-12 16:00:21 +02:00
Danielle Lancashire ae8bb7365a
alloc-lifecycle: Fix restart with empty body
Currently when you submit a manual request to the alloc lifecycle API
with a version of Curl that will submit empty bodies, the alloc restart
api will fail with an EOF error.

This behaviour is undesired, as it is reasonable to not submit a body at
all when restarting an entire allocation rather than an individual task.

This fixes it by ignoring EOF (not unexpected EOF) errors and treating
them as entire task restarts.
2019-06-12 15:35:00 +02:00
Danielle Lancashire bea23e1eb1
docs: Add missing docs for alloc restart api 2019-06-12 15:09:52 +02:00
Mahmood Ali 07f2c77c44 comment DenormalizeAllocationDiffSlice applies to terminal allocs only 2019-06-12 08:28:43 -04:00
Mahmood Ali b00d1f1e10 tests: parsing dir should be equivalent to parsing individual files 2019-06-12 08:19:09 -04:00
Mahmood Ali 3d8f2622e9 tests: avoid manipulating package variables 2019-06-12 08:16:32 -04:00
Mahmood Ali 2fb8cdd484
Merge pull request #5818 from hashicorp/b-consul-stanza
fix consul stanza parsing when multiple -config arguments are used
2019-06-12 06:29:24 -04:00
Lang Martin 3837c9b021 command add comments re: defaults to LoadConfig 2019-06-11 22:35:43 -04:00
Lang Martin 02aae678be config_parse_test update comment for accuracy 2019-06-11 22:30:20 -04:00
Lang Martin 7aa95ebd6f config_parse get rid of ParseConfigDefault 2019-06-11 22:00:23 -04:00