You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Levant does not use the region specified inside a job spec to deploy the given job to the correct region (cf. docs for region key)
Instead, the job is submitted to the default region, or the region specified by the NOMAD_REGION environment variable if that is set.
This behaviour is confusing and differs from the native nomad CLI. The native CLI will use the region specified in a job spec to choose the region to which a job will be submitted.
See the docs for how region is meant to be interpreted.
Attempt to deploy to us-central1 when default is another region - deployment stalls as no nodes in the other region have the correct region and datacenter set.
levant deploy -log-level=DEBUG -ignore-no-changes redis.nomad
2019-05-30T11:01:35+08:00 |DEBU| template/render: no variable file passed, trying defaults
2019-05-30T11:01:35+08:00 |DEBU| helper/files: no default var-file found
2019-05-30T11:01:35+08:00 |DEBU| template/render: no command line variables passed
2019-05-30T11:01:35+08:00 |DEBU| levant/plan: triggering Nomad plan
2019-05-30T11:01:35+08:00 |INFO| levant/deploy: triggering a deployment job_id=redis
2019-05-30T11:01:35+08:00 |INFO| levant/deploy: beginning deployment watcher for job job_id=redis
2019-05-30T11:01:35+08:00 |DEBU| levant/deploy: deployment b3bf1e04-4bcc-6a9d-f08d-90ff78cf1449 running for 0.14s job_id=redis
(cancelled)
The text was updated successfully, but these errors were encountered:
Description
Levant does not use the
region
specified inside a job spec to deploy the given job to the correct region (cf. docs for region key)Instead, the job is submitted to the default region, or the region specified by the
NOMAD_REGION
environment variable if that is set.This behaviour is confusing and differs from the native nomad CLI. The native CLI will use the
region
specified in a job spec to choose the region to which a job will be submitted.See the docs for how
region
is meant to be interpreted.Bug Analysis
The native CLI explicitly configures the nomad client to use the region specified in the job file - e.g. see the code for
job run
: https://github.com/hashicorp/nomad/blob/master/command/job_run.go#L165In contrast,
levant
does not do this as far as I can see from the code. This results in the client not being configured with the correct region.Running tcpdump demonstrates this difference - note the difference in query parameters:
Relevant Nomad job specification file
Exact same as https://github.com/hashicorp/nomad-guides/blob/master/application-deployment/redis/redis.nomad but with
region
anddatacenter
set tous-central1
.Output of
levant version
:Output of
nomad version
:CLI executable:
Servers:
Debug log outputs from Levant:
Attempt to deploy to
us-central1
when default is another region - deployment stalls as no nodes in the other region have the correct region and datacenter set.The text was updated successfully, but these errors were encountered: