Commit Graph

16850 Commits

Author SHA1 Message Date
Michael Schurter 3aa85a770d docs: mention #6787 in upgrade guide 2019-12-03 08:46:23 -08:00
Tim Gross 938b69504d changelog: node-reschedule-penalty 2019-12-03 08:40:02 -08:00
Tim Gross c50057bf1f
scheduler: fix job update placement on prev node penalized (#6781)
Fixes #5856

When the scheduler looks for a placement for an allocation that's
replacing another allocation, it's supposed to penalize the previous
node if the allocation had been rescheduled or failed. But we're
currently always penalizing the node, which leads to unnecessary
migrations on job update.

This commit leaves in place the existing behavior where if the
previous alloc was itself rescheduled, its previous nodes are also
penalized. This is conservative but the right behavior especially on
larger clusters where a group of hosts might be having correlated
trouble (like an AZ failure).

Co-Authored-By: Michael Schurter <mschurter@hashicorp.com>
2019-12-03 06:14:49 -08:00
Michael Schurter 603bbd7f8d docs: add #6792 to changelog 2019-12-02 20:30:18 -08:00
Michael Schurter 0374069f82 scheduler: update tests with modern error helper 2019-12-02 20:25:52 -08:00
Michael Schurter 19a2ee71d3 scheduler: fix panic when preempting and evicting
Fixes #6787

In ProposedAllocs the proposed alloc slice was being copied while its
contents were not. Since RemoveAllocs nils elements of the proposed
alloc slice and is called twice, it could panic on the second call when
erroneously accessing a nil'd alloc.

The fix is to not copy the proposed alloc slice and pass the slice
returned by the 1st RemoveAllocs call to the 2nd call, thus maintaining
the trimmed length.
2019-12-02 20:22:22 -08:00
Charlie Voiselle 3f794f2df1 Stateful Workload guides to learn.hashicorp.com 2019-12-02 16:37:06 -05:00
Seth Hoenig d81a091ccd
Merge pull request #6752 from hashicorp/docs-vault-token_period
docs: vault integration docs should reference new token_period field
2019-12-02 16:21:17 -05:00
Michael Lange 295713b1d7
Merge pull request #6591 from hashicorp/d-remove-old-ui-guide
Docs: Remove the old UI guide
2019-12-02 12:26:38 -08:00
Seth Hoenig 953e40c8ed docs: vault integration docs should reference new token_explicit_max_ttl field 2019-12-02 14:22:47 -06:00
Michael Lange 83b990d333 Fix incorrect page title on the operating a job UI guide 2019-12-02 11:27:56 -08:00
Michael Lange 8f08df0e0d Remove old UI guide 2019-12-02 11:27:55 -08:00
Michael Lange 71dbdac912 Add a redirect rule from the old ui guide to the new ones 2019-12-02 11:27:54 -08:00
Mahmood Ali b2ae27863e
Merge pull request #6779 from hashicorp/r-aws-fingerprint-via-library
Use AWS SDK to access EC2 Metadata
2019-12-02 13:30:51 -05:00
Mahmood Ali 83089feff5 logmon: add timeout to RPC operations
Add an RPC timeout for logmon.  In
https://github.com/hashicorp/nomad/issues/6461#issuecomment-559747758 ,
`logmonClient.Stop` locked up and indefinitely blocked the task runner
destroy operation.

This is an incremental improvement.  We still need to follow up to
understand how we got to that state, and the full impact of locked-up
Stop and its link to pending allocations on restart.
2019-12-02 10:33:05 -05:00
Kyle MacDonald 93e2b7cdf3 website: add ‘intro to nomad’ video to /intro
- additionally add some css to allow the embedded iframe to respond at lower browser sizes
2019-11-26 14:41:17 -05:00
Michael Schurter b7fefc3abe
Merge pull request #6774 from alrs/fix-client-test-goroutine
client: fix use of T.Fatalf() in test goroutine
2019-11-26 07:53:49 -08:00
Mahmood Ali 293276a457 fingerprint code refactor
Some code cleanup:

* Use a field for setting EC2 metadata instead of env-vars in testing;
but keep environment variables for backward compatibility reasons

* Update tests to use testify
2019-11-26 10:51:28 -05:00
Mahmood Ali 1e48f8e20d fingerprint: avoid api query if config overrides it 2019-11-26 10:51:28 -05:00
Mahmood Ali 5bb9089431 fingerprint: use ec2metadata package 2019-11-26 10:51:27 -05:00
Tim Gross 24be1b2b6f
fix plugin launcher SetConfig msgpack params (#6776)
* fix plugin launcher SetConfig msgpack params

The plugin launcher tool was passing the wrong byte array into
`SetConfig`, resulting in msgpack decoding errors. This was fixed in
a949050 (#6725) but accidentally reverted in 6aff18d (#6590).

Co-Authored-By: Chris Baker <1675087+cgbaker@users.noreply.github.com>
2019-11-26 10:49:22 -05:00
Mahmood Ali 4b401c4fea
Merge pull request #6773 from xak2000/patch-2
Fix demo vagrant provision hung when libssl asks for confirmation
2019-11-26 09:31:03 -05:00
Mahmood Ali cb33e4144e
Merge pull request #6761 from hashicorp/b-acl-anonymous-request-errors
acl_endpoint: permission denied for unauthenticated requests
2019-11-26 08:52:50 -05:00
Mahmood Ali b3e557cae3 address feedback review
apply `s/requestAuthToken/requestACLToken/g`
2019-11-26 08:39:04 -05:00
Tim Gross 88cb95261b
e2e: add allocstats test for Windows (#6775)
Extends the BasicAllocStats test to include a test for Windows
clients, exercising stats via a powershell `raw_exec` job.

Adds `ListLinuxClientNodes` and `ListWindowsClientNodes` utils so that
we can scope tests to run only when Linux or Windows clients are
available. This prevents waiting on timeouts when running a subset of
the tests against a development cluster (vs our nightly test
cluster).
2019-11-26 08:05:42 -05:00
Lars Lehtonen 0d344e8578
client: fix use of T.Fatal inside TestFS_logsImpl_NoFollow() goroutine. 2019-11-25 23:51:28 -08:00
Lang Martin 2d5737419c plugins device: remove trace level containing config contents 2019-11-25 14:49:40 -05:00
Charlie Voiselle 1f26f27fd9
Merge pull request #6768 from hashicorp/docs/cv/lb_to_learn
Migrating the Load-balancing guides to Nomad
2019-11-25 14:41:08 -05:00
Mahmood Ali e626a145c6
Merge pull request #6713 from alrs/fix-e2e-cli-close-before-error
e2e/cli/command: close after error handling
2019-11-25 14:03:25 -05:00
Lars Lehtonen c9383ca17d
e2e/cli/command: Wait() after execution 2019-11-25 10:56:40 -08:00
Tim Gross 781c20ea90
docs: show /etc/passwd in minimal chroot (#6769) 2019-11-25 13:47:18 -05:00
Tim Gross c9d92f845f
e2e: add a Windows client to test runner (#6735)
* Adds a constraint to prevent tests from landing on Windows
* Improve Terraform output for mixed windows/linux clients
* Makes some Windows client config fixes from 0.10.2 testing
2019-11-25 13:31:00 -05:00
Mahmood Ali f0378a2050
Merge pull request #6771 from hashicorp/b-deflake-TestHTTP_FreshClientAllocMetrics-test
tests: deflake TestHTTP_FreshClientAllocMetrics
2019-11-25 08:33:03 -05:00
Ruslan Stelmachenko 62fe9df044
Fix demo vagrant provision hung when libssl asks for confirmation
The provision shell script tries to install libssl1.1 package as dependency of ca-certificates package.

The installing of libssl requires to restart some services, and it asks for confirmation of this.
But there are no interactive session at this stage, so Vagrant provisioning just hungs.

This commit add a `libraries/restart-without-asking boolean true` setting before installing libssl,
so it doesn't ask confirmation anymore and the provisioning works again.
2019-11-24 02:35:09 +02:00
Mahmood Ali 7b8cfee162 tests: deflake TestHTTP_FreshClientAllocMetrics
The test asserts that alloc counts get reported accurately in metrics by
inspecting the metrics endpoint directly.  Sadly, the metrics as
collected by `armon/go-metrics` seem to be stateful and may contain info
from other tests.

This means that the test can fail depending on the order of returned
metrics.

Inspecting the metrics output of one failing run, you can see the
duplicate guage entries but for different node_ids:

```
    {
      "Name": "service-name.default-0a3ba4b6-2109-485e-be74-6864228aed3d.client.allocations.terminal",
      "Value": 10,
      "Labels": {
        "datacenter": "dc1",
        "node_class": "none",
        "node_id": "67402bf4-00f3-bd8d-9fa8-f4d1924a892a"
      }
    },
    {
      "Name": "service-name.default-0a3ba4b6-2109-485e-be74-6864228aed3d.client.allocations.terminal",
      "Value": 0,
      "Labels": {
        "datacenter": "dc1",
        "node_class": "none",
        "node_id": "a2945b48-7e66-68e2-c922-49b20dd4e20c"
      }
    },
```
2019-11-22 18:41:21 -05:00
Mahmood Ali f819d406ff
Merge pull request #6767 from hashicorp/c-ci-tweaks-20191122
Further tweaks to CircleCI build scripts
2019-11-22 15:52:43 -05:00
Mahmood Ali e8dc686019 ci: avoid building binaries in stable-website
This speeds up building and pushing releases
2019-11-22 15:40:22 -05:00
Charlie Voiselle 5e4dcfb8cc Removed 404 links; pointed to learn.hashicorp.com 2019-11-22 15:30:32 -05:00
Michael Schurter e7587aa458 Remove generated 0.10.2-rc1 files 2019-11-22 11:51:11 -08:00
Mahmood Ali 500fb6f8ce ci: verify .circleci/config.yml is up to date 2019-11-22 14:50:49 -05:00
Charlie Voiselle 395ebf3dcc Removed sidenav links for LB guides 2019-11-22 14:46:45 -05:00
Charlie Voiselle ca0ebc8f5b Migrating the Load-balancing guides to Nomad
Added redirects and stub-ified the index page
2019-11-22 14:29:12 -05:00
Michael Schurter 5be6b1eddf
Release v0.10.2-rc1 2019-11-22 11:19:57 -08:00
Michael Schurter 603773b22f
Merge pull request #6765 from hashicorp/docs-connect-bugs
docs: update connect limitations
2019-11-22 11:18:31 -08:00
Nomad Release bot db6420367d Generate files for 0.10.2-rc1 release 2019-11-22 18:42:49 +00:00
Michael Schurter e83634490c release: bump version to 0.10.2-rc1 2019-11-22 10:31:34 -08:00
Mahmood Ali a8d706db46
Merge pull request #6766 from hashicorp/docs-docker-dangling-containers-followup
docs: address more GH-6762 review comments
2019-11-22 13:24:59 -05:00
Mahmood Ali d9e7599ced docs: address more GH-6762 review comments
Incorporate suggestions in https://github.com/hashicorp/nomad/pull/6762#pullrequestreview-321716747

[ci skip]
2019-11-22 13:22:14 -05:00
Michael Schurter 18534b12a2 docs: update connect limitations 2019-11-22 10:18:10 -08:00
Mahmood Ali cfd78c266d
Merge pull request #6762 from hashicorp/d-docker-dangling-containers
document docker dangling container reaper
2019-11-22 13:10:59 -05:00