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

Migrated ephemeral_disk data does not retain ownership/permissions #2053

Closed
blalor opened this issue Dec 1, 2016 · 1 comment
Closed

Migrated ephemeral_disk data does not retain ownership/permissions #2053

blalor opened this issue Dec 1, 2016 · 1 comment

Comments

@blalor
Copy link
Contributor

blalor commented Dec 1, 2016

Nomad version

Nomad v0.5.0

Operating system and Environment details

CentOS 7.2

Issue

When the allocation directory is migrated from one nomad client to another, permissions on the files are not retained. Files are unarchived as root (as that's what Nomad's running as in my environment).

Reproduction steps

Use jobspec below; set the constraint so that the job runs to completion on one host, then run it again with the constraint updated so that it runs on another node. The 2nd placement will fail because the permissions are wrong on the files that were transferred from the other node.

Job file

job "migration-test" {
    region = "ci_aws_gen_us-east-1"
    
    datacenters = [
        "us-east-1d",
    ]
    
    type = "batch"
    
    constraint {
        attribute = "${attr.unique.hostname}"
        value     = "nomad-client-01425692"
    }

    group "grp" {
        ephemeral_disk {
            sticky = true
            migrate = true
            size = 101
        }

        task "test" {
            driver = "exec"

            config {
                command = "/bin/bash"
                
                args = [
                    "-c", "ls -al ${NOMAD_ALLOC_DIR}/data; (echo \"==> ${NOMAD_ALLOC_ID}\"; env) >> ${NOMAD_ALLOC_DIR}/data/test.out"
                ]
            }
        }
    }
}
@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 17, 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