Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interpolation does not work for destination in artifact stanza #2752

Closed
svd23 opened this issue Jun 28, 2017 · 4 comments
Closed

interpolation does not work for destination in artifact stanza #2752

svd23 opened this issue Jun 28, 2017 · 4 comments

Comments

@svd23
Copy link

svd23 commented Jun 28, 2017

Nomad version

Nomad v0.5.6

Operating system and Environment details

CentOS Linux release 7.3.1611 (Core)

Issue

interpolation does not work in artifact { destination = "destination" } stanza

Reproduction steps

create job with example from "Job file section"

nomad validate and nomad run executes with no errors.

nomad status -verbose example shows that download has been completed and task started
but as you can see from logs, task is terminated because, in my case, start script expected to be in /tmp/example-job/start.sh

Checking content of allocation on node that was assigned to run a task:

ls your_nomad_allocation_dir

...
...
drwxr-xr-x   3 root   root      17 Jun 28 13:08 ${NOMAD_META_DESTINATION_DIR}
...

Nomad Server logs

$ nomad validate example.nomad
Job validation successful

Nomad Client logs

06/28/17 13:08:44 PDT  Restarting             Task restarting in 27.305774574s
06/28/17 13:08:44 PDT  Terminated             Exit Code: 1
06/28/17 13:08:44 PDT  Started                Task started by client
06/28/17 13:08:26 PDT  Downloading Artifacts  Client is downloading artifacts

Job file

job "example" {
.....
  meta {
     DESTINATION_DIR = "/tmp/example-job"
     SOURCE_URL = "https://example_url/example.tar.gz"
  }
....
  task "task" {
....
     artifact {
        source = "${NOMAD_META_SOURCE_URL}"
        destination = "${NOMAD_META_DESTINATION_DIR}"
     }
.....
}
@stale
Copy link

stale bot commented May 10, 2019

Hey there

Since this issue hasn't had any activity in a while - we're going to automatically close it in 30 days. If you're still seeing this issue with the latest version of Nomad, please respond here and we'll keep this open and take another look at this.

Thanks!

@stale
Copy link

stale bot commented Jun 9, 2019

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@stale stale bot closed this as completed Jun 9, 2019
@Fuco1
Copy link
Contributor

Fuco1 commented Jan 11, 2020

Please reopen this issue, I see no reason why this shouldn't work.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants