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: do not try to create file shares for non-directories #11738

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

milas
Copy link
Contributor

@milas milas commented Apr 17, 2024

What I did
When creating automatic file shares, ignore any non-directory bind mounts, e.g. for an individual (normal) file or a special type like a Unix socket (/var/run/docker.sock).

Additionally, there's no need to create a directory if one does not exist, the API will handle that. However, the check for existence remains so that create_host_path: false mounts can be ignored.

Related issue
https://docker.atlassian.net/browse/COMP-515

(not mandatory) A picture of a cute animal, if possible in relation to what you did
black squirrel

@milas milas added kind/bug area/desktop Features that are integrated with Docker Desktop labels Apr 17, 2024
@milas milas requested a review from a team April 17, 2024 13:16
@milas milas self-assigned this Apr 17, 2024
@milas milas requested review from ndeloof, glours and jhrotko and removed request for a team April 17, 2024 13:16
When creating automatic file shares, ignore any non-directory
bind mounts, e.g. for an individual (normal) file or a special
type like a Unix socket (`/var/run/docker.sock`).

Additionally, there's no need to create a directory if one
does not exist, the API will handle that. However, the check
for existence remains so that `create_host_path: false`
mounts can be ignored.

Signed-off-by: Milas Bowman <[email protected]>
Copy link
Contributor

@jhrotko jhrotko left a comment

Choose a reason for hiding this comment

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

LGTM

@milas
Copy link
Contributor Author

milas commented Apr 17, 2024

CI failures are because TestCascadeFail is flaky right now, fix:

@ndeloof ndeloof merged commit 922422a into docker:main Apr 17, 2024
28 checks passed
@milas milas deleted the fix-sfs-nondir branch April 17, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/desktop Features that are integrated with Docker Desktop kind/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants