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

Switch to pre-0.9 behaviour for handling volumes #5572

Merged
merged 1 commit into from
Apr 18, 2019

Conversation

endocrimes
Copy link
Contributor

@endocrimes endocrimes commented Apr 17, 2019

In Nomad 0.9, we made volume driver handling the same for "", and
"local" volumes. Prior to Nomad 0.9 however these had slightly different
behaviour for relative paths and named volumes.

Prior to 0.9 the empty string would expand relative paths within the task
dir, and "local" volumes that are not absolute paths would be treated
as docker named volumes.

This commit reverts to the previous behaviour as follows:

Nomad Version Driver Volume Spec Behavior
all "" testing:/testing allocdir/testing
0.8.7 "local" testing:/testing "testing" as named volume
0.9.0 "local" testing:/testing allocdir/testing
0.9.1 "local" testing:/testing "testing" as named volume

This fixes #5562

@endocrimes endocrimes requested a review from notnoop April 17, 2019 09:25
Copy link
Contributor

@notnoop notnoop left a comment

Choose a reason for hiding this comment

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

lgtm but with some small test change requested

drivers/docker/driver.go Show resolved Hide resolved
drivers/docker/driver_unix_test.go Outdated Show resolved Hide resolved
In Nomad 0.9, we made volume driver handling the same for `""`, and
`"local"` volumes. Prior to Nomad 0.9 however these had slightly different
behaviour for relative paths and named volumes.

Prior to 0.9 the empty string would expand relative paths within the task
dir, and `"local"` volumes that are not absolute paths would be treated
as docker named volumes.

This commit reverts to the previous behaviour as follows:

| Nomad Version | Driver  |   Volume Spec    | Behaviour                 |
|-------------------------------------------------------------------------
| all           | ""      | testing:/testing | allocdir/testing          |
| 0.8.7         | "local" | testing:/testing | "testing" as named volume |
| 0.9.0         | "local" | testing:/testing | allocdir/testing          |
| 0.9.1         | "local" | testing:/testing | "testing" as named volume |
@endocrimes endocrimes merged commit 11388ab into master Apr 18, 2019
@endocrimes endocrimes deleted the dani/b-docker-volumes branch April 18, 2019 13:48
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Feb 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

named docker volume doesn't work anymore with 0.9.0
2 participants