Commit graph

16049 commits

Author SHA1 Message Date
Lang Martin 6e0ec6302b script e2e/upgrades: cluster upgrade scripts 2019-09-24 14:35:45 -04:00
rpramodd 0d09b564fa utils: add missing error info in case of cmd failure (#6355) 2019-09-24 09:33:27 -04:00
ebarriosjr 4dadfc6d29 Added documentation for nomad pot driver. (#6369)
Added new external driver for Pot to nomad documentation
2019-09-24 09:22:04 -04:00
Tim Gross cd9c23617f
client/connect: ConsulProxy LocalServicePort/Address (#6358)
Without a `LocalServicePort`, Connect services will try to use the
mapped port even when delivering traffic locally. A user can override
this behavior by pinning the port value in the `service` stanza but
this prevents us from using the Consul service name to reach the
service.

This commits configures the Consul proxy with its `LocalServicePort`
and `LocalServiceAddress` fields.
2019-09-23 14:30:48 -04:00
kaxap 60f0eb7d6d Fix broken links in README Guide section
Fix two broken links in the Documentation & Guides section, namely Advanced Job Scheduling on Nomad with Affinities and Increasing Nomad Fault Tolerance with Spread
2019-09-23 08:21:19 -04:00
Buck Doyle f55d95694c
UI: Remove proxy tag tests again (#6359)
I thought #6343 would fix the flapping but it didn’t 😞
2019-09-20 15:27:33 -05:00
Chris Baker 5f6fd13064
Merge pull request #6356 from hashicorp/b-cli-job-deployments-all
fixed incorrect CLI `-help` in `job deployments`
2019-09-20 15:06:53 -05:00
Chris Baker 6f38cca15a
fixed incorrect CLI documentation in job deployments
listed `-all-allocs` instead of `-all`
2019-09-20 12:24:53 -05:00
Buck Doyle d707038429
UI: Fix Connect proxy tag (#6343)
This fixes a race condition in the pseudo-relationship between a
TaskState and a Task that was causing the Consul Connect proxy tag
to sometimes show on the wrong task. There’s no direct Ember Data-style
relationship between a TaskState and its Task; instead, it’s determined
by searching for a Task with the matching name. The related Task was
sometimes stored before everything was ready and not recalculated when
the name became known. This ensures the relationship is accurate if the
TaskState’s name property changes.
2019-09-19 08:09:49 -05:00
Mahmood Ali 128b74ba12
Merge pull request #6346 from hashicorp/b-docker-resilient-start
docker: remove containers on creation failures
2019-09-18 16:29:07 -04:00
Danielle 82d04522a9
Merge pull request #6347 from jpellman/patch-1
Corrected minor typo ("Eslevier" --> "Elsevier")
2019-09-18 13:21:33 -07:00
Danielle 940bbcc639
Merge pull request #6342 from hashicorp/f-host-volume-e2e
Add Host Volumes E2E test
2019-09-18 12:59:32 -07:00
John Pellman fce0a2565d
Corrected minor typo ("Eslevier" --> "Elsevier") 2019-09-18 11:14:57 -04:00
Tim Gross adde9acf57
e2e: test infra for client node restarts (#6313)
Add a test helper that restarts a specific client node running under
systemd using a `raw_exec` job.
2019-09-18 10:10:14 -04:00
Mahmood Ali 6198badb4a fix comment typo 2019-09-18 09:11:08 -04:00
Mahmood Ali 1d945994d0 docker: remove containers on creation failures
The docker creation API calls may fail with http errors (e.g. timeout)
even if container was successfully created.

Here, we force remove container if we got unexpected failure.  We
already do this in some error handlers, and this commit updates all
paths.

I stopped short from a more aggressive refactoring, as the code is ripe
for refactoring and would rather do that in another PR.
2019-09-18 08:45:59 -04:00
Mahmood Ali db682f6f73
Merge pull request #6326 from hashicorp/b-docker-start-failure-handling
Fix bugs around docker start retries
2019-09-18 08:27:19 -04:00
Tim Gross 7061dcef4b
e2e: move consul status check helpers to e2eutil (#6314) 2019-09-18 08:18:19 -04:00
Mahmood Ali 75ede5a685 add exponential backoff for docker api calls 2019-09-18 08:12:54 -04:00
Nick Ethier 4418ae3699
reduce memory required for logmon, docker_logger and executor p… (#6341)
* reduce memory required for logmon, docker_logger and executor processes

* comment early importing
2019-09-17 23:55:07 -04:00
Mahmood Ali b4a7585e5e
Merge pull request #6328 from hashicorp/b-gh-6269
cli: emit job version number proper
2019-09-17 19:06:44 -04:00
Danielle Lancashire 05d172ef2b
e2e: init host volumes test 2019-09-18 00:34:48 +02:00
Michael Schurter 149f71c6f2
Merge pull request #6345 from Veraghin/patch-1
Update GNUmakefile
2019-09-17 14:08:04 -07:00
Veraghin 169b170835
Update GNUmakefile
Cert auth generation echo fixed
2019-09-17 22:05:53 +01:00
Danielle Lancashire c50d7f2727
e2e: Add Host Volume Configuration 2019-09-17 20:06:50 +02:00
Danielle f8b64ee1ab
Merge pull request #6330 from hashicorp/f-host-vols-fail-startup
client: Fail startup if host volumes do not exist
2019-09-17 10:55:30 -07:00
Mahmood Ali 4b7dde5aff
Merge pull request #6338 from hashicorp/d-ui-readme-20190917
Tweaks for UI README
2019-09-17 12:28:25 -04:00
Mahmood Ali f82f45c026 add some ui development tips 2019-09-17 08:51:24 -04:00
Mahmood Ali e33437635d
Merge pull request #6327 from hashicorp/b-ui-alloc-no-services
ui: protect against no services
2019-09-17 06:33:52 -04:00
Michael Lange 96b91ff6ec
Merge pull request #6274 from hashicorp/f-ui/restore-headless-testing
UI: Restore local headless testing
2019-09-17 00:15:41 -07:00
Mahmood Ali 16f7a3f31b ui: protect against nil services
Protect against case where an alloc has no services and avoid
dereferencing null.

Here, we ensure that the model and test serializers mimic the API by
having nil TaskGroup.Services instead of an empty array.
2019-09-16 16:50:30 -04:00
Tim Gross e3e30c15a9
remove resolved TODO from UpdateTTL docstring (#6336) 2019-09-16 16:26:06 -04:00
Danielle ec3ecdecfc
Merge pull request #6321 from hashicorp/dani/remove-config
Hoist Volume.Config.Source into Volume.Source
2019-09-16 10:12:58 -07:00
Danielle acf6580bb4
docs: Mark volume source as required
Co-Authored-By: Michael Schurter <mschurter@hashicorp.com>
2019-09-16 10:05:50 -07:00
Charlie Voiselle 05f326cd57
Merge pull request #6234 from hashicorp/docs-template-split-cert-parts
Added vault PKI example with separate cert files
2019-09-16 10:19:19 -04:00
Mahmood Ali df8a168d06 cli: emit job version number proper
We must emit alloc job number rather than its the field address.
2019-09-13 19:04:32 -04:00
Danielle Lancashire e3796e9d60
client: Fail startup if host volumes do not exist
Some drivers will automatically create directories when trying to mount
a path into a container, but some will not.

To unify this behaviour, this commit requires that host volumes already exist,
and can be stat'd by the Nomad Agent during client startup.
2019-09-13 23:28:10 +02:00
Mahmood Ali ac329a5e07 retry transient docker errors within function 2019-09-13 15:25:31 -04:00
Mahmood Ali e8d73e3d72 docker: defensive against failed starts
This handles a bug where we may start a container successfully, yet we
fail due to retries and startContainer not being idempotent call.

Here, we ensure that when starting a container fails with 500 error,
the retry succeeds if container was started successfully.
2019-09-13 13:02:35 -04:00
Ruslan Usifov b3c72d1729 close file handle when FileRotator object will closed. Fixes https://github.com/hashicorp/nomad/issues/6309 (#6323) 2019-09-13 10:31:13 -04:00
Tim Gross a6ef8c5d42
client/networking: wrap error message from CNI plugin (#6316) 2019-09-13 08:20:05 -04:00
Danielle Lancashire e76e3ba3a0
docs: Remove config from volumes 2019-09-13 04:37:59 +02:00
Danielle Lancashire 78b61de45f
config: Hoist volume.config.source into volume
Currently, using a Volume in a job uses the following configuration:

```
volume "alias-name" {
  type = "volume-type"
  read_only = true

  config {
    source = "host_volume_name"
  }
}
```

This commit migrates to the following:

```
volume "alias-name" {
  type = "volume-type"
  source = "host_volume_name"
  read_only = true
}
```

The original design was based due to being uncertain about the future of storage
plugins, and to allow maxium flexibility.

However, this causes a few issues, namely:
- We frequently need to parse this configuration during submission,
scheduling, and mounting
- It complicates the configuration from and end users perspective
- It complicates the ability to do validation

As we understand the problem space of CSI a little more, it has become
clear that we won't need the `source` to be in config, as it will be
used in the majority of cases:

- Host Volumes: Always need a source
- Preallocated CSI Volumes: Always needs a source from a volume or claim name
- Dynamic Persistent CSI Volumes*: Always needs a source to attach the volumes
                                   to for managing upgrades and to avoid dangling.
- Dynamic Ephemeral CSI Volumes*: Less thought out, but `source` will probably point
                                  to the plugin name, and a `config` block will
                                  allow you to pass meta to the plugin. Or will
                                  point to a pre-configured ephemeral config.
*If implemented

The new design simplifies this by merging the source into the volume
stanza to solve the above issues with usability, performance, and error
handling.
2019-09-13 04:37:59 +02:00
Kris Hicks e4e50abb02
Merge pull request #6318 from hashicorp/hicks/fix-upstreams-link
Fix upstreams docs link
2019-09-12 15:36:52 -07:00
Kris Hicks a211da731d Fix upstreams docs link 2019-09-12 15:12:26 -07:00
Luiz Aoqui c1b04b91cb
Merge pull request #6317 from hashicorp/docs-fix-volume-docs
Fix `volume_mount` attribute in the docs and formatting
2019-09-12 16:53:30 -04:00
Luiz Aoqui 8dd39333c9 docs: fix formatting for volume and volume_mount doc pages 2019-09-12 16:13:04 -04:00
Luiz Aoqui 16d494344f docs: replace source with volume attribute in volume_mount docs 2019-09-12 16:08:18 -04:00
Tim Gross c6c294aa47
dev: expose Consul port 8500 in linux-ui Vagrantfile (#6292) 2019-09-11 14:53:30 -04:00
Tim Gross 971c287ed2
doc: ulimit recommendations for local development (#6311)
The default ulimit for open files on macOS is really small (256),
which leads to "too many open files" errors during plugin launches if
you're running unit tests in `drivers/docker`. Recommend setting
`ulimit -n 1024`.
2019-09-11 14:53:03 -04:00