Skip to content

fix: do not try to create file shares for non-directories#11738

Merged
ndeloof merged 1 commit intodocker:mainfrom
milas:fix-sfs-nondir
Apr 17, 2024
Merged

fix: do not try to create file shares for non-directories#11738
ndeloof merged 1 commit intodocker:mainfrom
milas:fix-sfs-nondir

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 requested a review from a team April 17, 2024 13:16
@milas milas self-assigned this Apr 17, 2024
@milas milas requested review from glours, jhrotko and ndeloof 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 <milas.bowman@docker.com>
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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants