-
Notifications
You must be signed in to change notification settings - Fork 2k
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
unexpected behavior with docker -> volume_options and hcl2 #9604
Comments
Thanks @MorphBonehunter for reaching out. This is indeed a bug and isn't an intended change. We'll investigate and follow up with a fix soon. |
Introduce a new more-block friendly syntax for specifying mounts with a new `mount` block type with the target as label: ```hcl config { image = "..." mount { type = "..." target = "target-path" volume_options { ... } } } ``` The main benefit here is that by `mount` being a block, it can nest blocks and avoids the compatibility problems noted in https://github.com/hashicorp/nomad/pull/9634/files#diff-2161d829655a3a36ba2d916023e4eec125b9bd22873493c1c2e5e3f7ba92c691R128-R155 . The intention is for us to promote this `mount` blocks and quietly deprecate the `mounts` type, while still honoring to preserve compatibility as much as we could. This addresses the issue in #9604 .
Introduce a new more-block friendly syntax for specifying mounts with a new `mount` block type with the target as label: ```hcl config { image = "..." mount { type = "..." target = "target-path" volume_options { ... } } } ``` The main benefit here is that by `mount` being a block, it can nest blocks and avoids the compatibility problems noted in https://github.com/hashicorp/nomad/pull/9634/files#diff-2161d829655a3a36ba2d916023e4eec125b9bd22873493c1c2e5e3f7ba92c691R128-R155 . The intention is for us to promote this `mount` blocks and quietly deprecate the `mounts` type, while still honoring to preserve compatibility as much as we could. This addresses the issue in #9604 .
I've migrate to the new "mount" syntax and it worked like expected (and is much nicer than before i think 😄). |
Introduce a new more-block friendly syntax for specifying mounts with a new `mount` block type with the target as label: ```hcl config { image = "..." mount { type = "..." target = "target-path" volume_options { ... } } } ``` The main benefit here is that by `mount` being a block, it can nest blocks and avoids the compatibility problems noted in https://github.com/hashicorp/nomad/pull/9634/files#diff-2161d829655a3a36ba2d916023e4eec125b9bd22873493c1c2e5e3f7ba92c691R128-R155 . The intention is for us to promote this `mount` blocks and quietly deprecate the `mounts` type, while still honoring to preserve compatibility as much as we could. This addresses the issue in #9604 .
I think we can close this as the problem was solved long ago 👍 |
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. |
Nomad version
Nomad v1.0.0 (cfca640)
Operating system and Environment details
ArchLinux
Issue
The docker "volume_options" parameter and sub-parameter which are mentioned in the Docs doesn't work with the hcl2 parser in the form mentioned there.
This happens to me after upgrading to 1.0 of nomad and try to resubmit an existing job with this option.
I can use the
-hcl1
option and it works but the mentioned fix for not using this option isn't appropriate.Reproduction steps
Job file (if appropriate)
original job file sniped:
error message while submitting:
I can fix this with the
-hcl1
option while submitting.If i add the mentioned equals signs and resulting in the following job snipped:
i can submitt this job without the
-hcl1
option, but the job doesn't run with an error:So after some try and error i ended with the following job snipped which worked (submitting and running):
resulting diff:
Is this the intended behavior or is it an bug?
The Doku doesn't mentioned the new behavior with hcl2 or the changed syntax.
The text was updated successfully, but these errors were encountered: