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

symlink prevents ephemeral disk migration #2685

Closed
mmickan opened this issue Jun 3, 2017 · 1 comment
Closed

symlink prevents ephemeral disk migration #2685

mmickan opened this issue Jun 3, 2017 · 1 comment

Comments

@mmickan
Copy link

mmickan commented Jun 3, 2017

Nomad version

Nomad v0.5.6

Operating system and Environment details

Linux docker-3 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Issue

Ephemeral disks cannot be migrated successfully if they contain a symlink.

Reproduction steps

  1. Start a job with an ephemeral disk, with migration, and create a symlink under /local:
job "test" {
  region = "vagrant"
  datacenters = ["vagrant"]
  type = "service"
  group "test" {
    ephemeral_disk {
      migrate = true
      sticky = true
    }
    task "test" {
      driver = "exec"
      config {
        command = "/local/test.sh"
      }
      template {
        data = <<EOH
#!/bin/bash
ls -l /local

touch /local/alpha
ln -s /local/alpha /local/beta
touch /local/gamma

tail -f /dev/null
EOH
        destination = "local/test.sh"
        perms = "555"
      }
    }
  }
}
  1. Force the job to be moved to another host (e.g. using node-drain)

  2. Review logs of new allocation, note that /local disk snapshot partially failed (should contain symlink beta and files alpha and gamma, but only contains file alpha):

total 4
-rw-r--r-- 1 nobody nogroup   0 Jun  3 20:11 alpha
-r-xr-xr-x 1 root   root    201 Jun  3 20:11 test.sh

Nomad Client logs (if appropriate)

[ERR] http: Request /v1/client/allocation/73c41715-7c0d-e28c-509e-84265bd0ff22/snapshot, error: error making snapshot: open /var/lib/nomad/alloc/73c41715-7c0d-e28c-509e-84265bd0ff22/test/local/beta: no such file or directory
@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 Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant