Commit Graph

14644 Commits

Author SHA1 Message Date
Mahmood Ali
9dcebcd8a3 client: avoid registering node twice right away
I noticed that `watchNodeUpdates()` almost immediately after
`registerAndHeartbeat()` calls `retryRegisterNode()`, well after 5
seconds.

This call is unnecessary and made debugging a bit harder.  So here, we
ensure that we only re-register node for new node events, not for
initial registration.
2019-04-19 09:12:50 -04:00
Mahmood Ali
7a68d76160 client: wait for batched driver updated
Here we retain 0.8.7 behavior of waiting for driver fingerprints before
registering a node, with some timeout.  This is needed for system jobs,
as system job scheduling for node occur at node registration, and the
race might mean that a system job may not get placed on the node because
of missing drivers.

The timeout isn't strictly necessary, but raising it to 1 minute as it's
closer to indefinitely blocked than 1 second.  We need to keep the value
high enough to capture as much drivers/devices, but low enough that
doesn't risk blocking too long due to misbehaving plugin.

Fixes https://github.com/hashicorp/nomad/issues/5579
2019-04-19 09:00:24 -04:00
Preetha
83a2e693b7 Merge pull request #5580 from hashicorp/f-api-preemption-info
Add preemption related fields to AllocationListStub
2019-04-18 18:38:25 -07:00
Preetha Appan
ad77c18c87 Add preemption related fields to AllocationListStub 2019-04-18 10:36:44 -05:00
Danielle
11388ab992 Merge pull request #5572 from hashicorp/dani/b-docker-volumes
Switch to pre-0.9 behaviour for handling volumes
2019-04-18 15:48:23 +02:00
Danielle
4789948ba8 Merge pull request #5573 from hashicorp/dani/update-vol-docs
docs: Clarify docker volume behaviour
2019-04-18 14:30:16 +02:00
Danielle Lancashire
ccce364cbd Switch to pre-0.9 behaviour for handling volumes
In Nomad 0.9, we made volume driver handling the same for `""`, and
`"local"` volumes. Prior to Nomad 0.9 however these had slightly different
behaviour for relative paths and named volumes.

Prior to 0.9 the empty string would expand relative paths within the task
dir, and `"local"` volumes that are not absolute paths would be treated
as docker named volumes.

This commit reverts to the previous behaviour as follows:

| Nomad Version | Driver  |   Volume Spec    | Behaviour                 |
|-------------------------------------------------------------------------
| all           | ""      | testing:/testing | allocdir/testing          |
| 0.8.7         | "local" | testing:/testing | "testing" as named volume |
| 0.9.0         | "local" | testing:/testing | allocdir/testing          |
| 0.9.1         | "local" | testing:/testing | "testing" as named volume |
2019-04-18 14:28:45 +02:00
Chris Baker
15c64875d1 Merge pull request #5559 from ArangoGutierrez/website_docs_singularity
list singularity as a community driver
2019-04-17 12:42:29 -04:00
Charlie Voiselle
4a0da839a9 fixed header level 2019-04-17 10:12:43 -04:00
Danielle Lancashire
acf8ab8665 docs: Clairfy docker volume behaviour 2019-04-17 11:31:55 +02:00
Mahmood Ali
c07b72959d Merge pull request #5568 from hashicorp/b-nomad-logger-restart
Fixes #5566 .

Fix a case where docker logging process may lock up nomad agent restart.

Looks like we have a case where docker logger is started even through logmon isn't. In such case, the fifo writer blocks indefinitely and because the open operation happens in the main goroutine, nomad agent blocks indefinitely.

This fixes the issue where the fifo open operation happens in goroutine instead of main goroutine.

We should follow up independently to ensure logmon <-> dockerlogger ordering and consider having task recovery happen in non-main goroutine with some sensible timeouts.
2019-04-16 19:34:37 -04:00
Eduardo Arango
9f97da0956 resolve merge conflicts
Signed-off-by: Eduardo Arango <eduardo@sylabs.io>
2019-04-16 17:01:22 -05:00
Eduardo Arango
bd0d641a5e address @cgbaker comments
Signed-off-by: Eduardo Arango <eduardo@sylabs.io>
2019-04-16 16:59:59 -05:00
Michael Schurter
009b750e21 Merge pull request #5479 from hashicorp/b-vault-renewal
vault: fix renewal time
2019-04-16 12:20:26 -07:00
Michael Schurter
888304b074 changelog: add #5479 2019-04-16 11:23:28 -07:00
Michael Schurter
b135d28450 vault: fix data races 2019-04-16 11:22:44 -07:00
Michael Schurter
0e6da17a8f vault: fix renewal time
Renewal time was being calculated as 10s+Intn(lease-10s), so the renewal
time could be very rapid or within 1s of the deadline: [10s, lease)

This commit fixes the renewal time by calculating it as:

	(lease/2) +/- 10s

For a lease of 60s this means the renewal will occur in [20s, 40s).
2019-04-16 11:22:44 -07:00
Mahmood Ali
96a54cbbd3 locking and opening streams in goroutine comment 2019-04-16 11:02:19 -04:00
Mahmood Ali
316a161ce8 open fifo on background goroutine 2019-04-15 21:20:09 -04:00
Michael Schurter
eeb282ca2f Merge pull request #5518 from hashicorp/f-simplify-kill
client: simplify kill logic
2019-04-15 14:11:58 -07:00
Michael Schurter
6943943a92 Merge pull request #5486 from hashicorp/b-validate-migrate
api: fix migrate stanza initialization
2019-04-15 09:44:59 -07:00
Danielle
8982fb3c43 Merge pull request #5565 from hashicorp/dani/alloc-restart-docs
docs: Add docs for nomad-alloc-restart
2019-04-15 17:26:28 +02:00
Danielle Lancashire
4dab9ed348 docs: Add docs for nomad-alloc-restart 2019-04-15 17:21:06 +02:00
Chris Baker
8b980f98d2 Update singularity.html.md 2019-04-15 09:49:30 -04:00
Chris Baker
dbdc057cce Merge pull request #5560 from hashicorp/f-3251-cli-force-periodic
cli: add support for periodic force evaluation
2019-04-15 09:40:35 -04:00
Danielle Lancashire
66b6583ae5 Update CHANGELOG
Add `nomad alloc restart` and `nomad status -verbose`
2019-04-15 11:14:51 +02:00
Eduardo Arango
e7ee1f65fc Merge branch 'website_docs_singularity' of github.com:ArangoGutierrez/nomad into website_docs_singularity 2019-04-12 16:27:33 -05:00
Eduardo Arango
62094263be address requestec changes, iteration 1
Signed-off-by: Eduardo Arango <eduardo@sylabs.io>
2019-04-12 16:26:52 -05:00
Chris Baker
570efaa05b gofmt/goimport and test formatting 2019-04-12 20:55:55 +00:00
Chris Baker
165244a9b7 changes to appease gofmt 2019-04-12 19:12:42 +00:00
Chris Baker
e6da05276c minor typographical changes 2019-04-12 15:05:56 -04:00
Chris Baker
f011f61645 cli: add support for periodic force evaluation
resolves #3251
2019-04-12 18:56:35 +00:00
Michael Lange
1c38ced33a Merge pull request #5558 from hashicorp/b-ui-make-tests-faster
UI: Make tests faster
2019-04-12 11:41:03 -07:00
Chris Baker
7a6a2d3274 Merge pull request #5556 from hashicorp/nmd-1403-vault-namespace-task-env
vault namespaces: inject VAULT_NAMESPACE alongside VAULT_TOKEN
2019-04-12 14:21:47 -04:00
Eduardo Arango
42f867aa54 list singularity as a community driver
Signed-off-by: Eduardo Arango <eduardo@sylabs.io>
2019-04-12 12:59:31 -05:00
Preetha
176b48c272 Merge pull request #5545 from hashicorp/f-preemption-scheduler-refactor
Refactor scheduler package to enable preemption for batch/service jobs
2019-04-12 12:37:59 -05:00
Chris Baker
68470e9fef Merge pull request #5557 from hashicorp/nmd-1409-cli-acl-token-list
cli: add `acl token list` command, documentation
2019-04-12 12:56:55 -04:00
Chris Baker
c38a98e5bb cli: add acl token list command, documentation
docs: fix some incorrect acl policy docs (typos, copy-paste errors)
2019-04-12 15:48:36 +00:00
Preetha Appan
a134c16c22 remove stray new line 2019-04-12 10:32:48 -05:00
Chris Baker
377c1d694b vault namespaces: inject VAULT_NAMESPACE alongside VAULT_TOKEN + documentation 2019-04-12 15:06:34 +00:00
Michael Lange
daa9f7d520 Speed up slow acceptance tests with shallow jobs and generally less models 2019-04-11 20:08:43 -07:00
Michael Lange
aba4882dcb Introduce the concept of 'shallow' job models in Mirage 2019-04-11 20:08:09 -07:00
Michael Lange
768bfdf87d Reduce the number of task groups and task events that are made 2019-04-11 18:15:35 -07:00
Nick Fagerlund
ec3b8cd9ec Merge pull request #5505 from nfagerlund/mar19_middleman_update
website: Update hashicorp-middleman container to v0.3.39
2019-04-11 16:36:49 -07:00
Michael Schurter
5ea4382af7 api: fix migrate stanza initialization
Fixes Migrate to be initialized like RescheduleStrategy.

Fixes #5477
2019-04-11 15:29:19 -07:00
Lang Martin
cfb1aa2010 Merge pull request #5551 from hashicorp/b-revert-fingerprinter-manual-config
Revert accidental merge of pr #5482
2019-04-11 11:55:21 -04:00
Lang Martin
c45652ab8c Revert accidental merge of pr #5482
Revert "fingerprint Constraints and Affinities have Equals, as set"
This reverts commit 596f16fb5f.

Revert "client tests assert the independent handling of interface and speed"
This reverts commit 7857ac5993.

Revert "structs missed applying a style change from the review"
This reverts commit 658916e327.

Revert "client, structs comments"
This reverts commit be2838d6ba.

Revert "client fingerprint updateNetworks preserves the network configuration"
This reverts commit fc309cb430.

Revert "client_test cleanup comments from review"
This reverts commit bc0bf4efb9.

Revert "client Networks Equals is set equality"
This reverts commit f8d432345b.

Revert "struct cleanup indentation in RequestedDevice Equals"
This reverts commit f4746411ca.

Revert "struct Equals checks for identity before value checking"
This reverts commit 0767a4665e.

Revert "fix client-test, avoid hardwired platform dependecy on lo0"
This reverts commit e89dbb2ab1.

Revert "refactor error in client fingerprint to include the offending data"
This reverts commit a7fed726c6.

Revert "add client updateNodeResources to merge but preserve manual config"
This reverts commit 84bd433c7e.

Revert "refactor struts.RequestedDevice to have its own Equals"
This reverts commit 6897825240.

Revert "refactor structs.Resource.Networks to have its own Equals"
This reverts commit 49e2e6c77b.

Revert "refactor structs.Resource.Devices to have its own Equals"
This reverts commit 4ede9226bb.

Revert "add COMPAT(0.10): Remove in 0.10 notes to impl for structs.Resources"
This reverts commit 49fbaace52.

Revert "add structs.Resources Equals"
This reverts commit 8528a2a2a6.

Revert "test that fingerprint resources are updated, net not clobbered"
This reverts commit 8ee02ddd23.
2019-04-11 10:29:40 -04:00
Chris Baker
3171529c73 Merge pull request #5550 from hashicorp/cgbaker/update-terraform
More terraform updates
2019-04-11 10:18:28 -04:00
Chris Baker
6328294c74 terraform: modified default client instance type to a more reasonable t2.medium, left commented GPU instance type 2019-04-11 14:13:30 +00:00
Chris Baker
f1d7464818 terraform/packer: revert name of AMI to generic "hashistack" instead of my name 2019-04-11 14:11:32 +00:00