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

fix: Add the missing option propagation_mode #15626

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

shumin1027
Copy link
Contributor

Fix:#15524
Add the missing option propagation_mode

@hashicorp-cla
Copy link

hashicorp-cla commented Dec 26, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shumin1027! I've tested this out with a host volume and the following jobspec:

jobspec
job "httpd" {
  datacenters = ["dc1"]

  group "web" {

    volume "host_data" {
      type      = "host"
      read_only = false
      source    = "shared_data"
    }

    task "http" {

      driver = "docker"

      config {
        image   = "busybox:1"
        command = "httpd"
        args    = ["-v", "-f", "-p", "8001", "-h", "/var/www"]
      }

      volume_mount {
        volume      = "host_data"
        destination = "/var/www"
        read_only   = false
        propagation_mode = "bidirectional"
      }

      resources {
        cpu    = 128
        memory = 128
      }

    }
  }
}

I changed the mode to private and host-to-task and got the expected mappings for the resulting Docker container.

So that looks good. This PR needs a couple more things before we can merge it:

  • Run make cl which will create a changelog file for this PR.
  • We need to add the propagation_mode field to the volume_mount docs, which you can edit in volume_mount.mdx

Thanks for the PR!

@tgross tgross added backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line theme/storage type/bug stage/waiting-reply labels Jan 3, 2023
@tgross tgross self-assigned this Jan 3, 2023
@shumin1027 shumin1027 force-pushed the volume-mount-propagation-mode branch from c7ffd0c to 88a944b Compare January 6, 2023 01:52
@shumin1027
Copy link
Contributor Author

@tgross Thanks for your guidance, I've updated the docs and the changelog

@tgross tgross added this to the 1.5.0 milestone Jan 27, 2023
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tgross tgross merged commit 69b08bb into hashicorp:main Jan 30, 2023
@twix14
Copy link

twix14 commented Feb 17, 2023

wasn't this supposed to be backported into 1.4.x, 1.3.x and 1.2.x? Latest release of all those doesn't contain this fix

@jrasell
Copy link
Member

jrasell commented Feb 17, 2023

wasn't this supposed to be backported into 1.4.x, 1.3.x and 1.2.x? Latest release of all those doesn't contain this fix

Hi @twix14; the last release was a security release and therefore the only changes included were those specific to the required security patches. This changes will therefore go out in the next release train, which will coincide with the 1.5.0 GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.2.x backport to 1.1.x release line backport/1.3.x backport to 1.3.x release line backport/1.4.x backport to 1.4.x release line stage/waiting-reply theme/storage type/bug
Projects
Development

Successfully merging this pull request may close these issues.

6 participants