-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CI:DOCS] Document volume mounts of source directories do NOT get created #8519
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@TomSweeneyRedHat PTAL |
Volumes may specify a source as well, as either a directory on the host or the | ||
name of a named volume. If no source is given, the volume will be created as an | ||
Volumes may specify a source as well, as either a directory on the host | ||
or the name of a named volume. If no source is given, the volume will be created as an | ||
anonymous named volume with a randomly generated name, and will be removed when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old, but could you change "anonymous" to "anonymously"
with names are not anonymous. They are not removed by the `--rm` option and the | ||
`podman rm --volumes` command. | ||
are resolved relative to the directory Podman is run in. If the source does not | ||
exists, Podman will return and error. Users must pre-create the source files or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exists, Podman will return and error. Users must pre-create the source files or | |
exist, Podman will return an error. Users must pre-create the source files or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
Any source that does not begin with a `.` or `/` will be treated as the name of | ||
a named volume. If a volume with that name does not exist, it will be created. | ||
Volumes created with names are not anonymous. They are not removed by the `--rm` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest just to be clear that you're talking about named and not anonymous volumes
Volumes created with names are not anonymous. They are not removed by the `--rm` | |
Volumes created with names are not anonymous, and they are not removed by the `--rm` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/source/markdown/podman-run.1.md
Outdated
Volumes may specify a source as well, as either a directory on the host or the | ||
name of a named volume. If no source is given, the volume will be created as an | ||
Volumes may specify a source as well, as either a directory on the host | ||
or the name of a named volume. If no source is given, the volume will be created as an | ||
anonymous named volume with a randomly generated name, and will be removed when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you go with anonymously above, do here too please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/source/markdown/podman-run.1.md
Outdated
with names are not anonymous and are not removed by **--rm** and | ||
**podman rm --volumes**. | ||
are resolved relative to the directory Podman is run in. If the source does not | ||
exists, Podman will return and error. Users must pre-create the source files or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exists, Podman will return and error. Users must pre-create the source files or | |
exists, Podman will return an error. Users must pre-create the source files or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/source/markdown/podman-run.1.md
Outdated
|
||
Any source that does not begin with a `.` or `/` will be treated as the name of | ||
a named volume. If a volume with that name does not exist, it will be created. | ||
Volumes created with names are not anonymous. They are not removed by the `--rm` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Volumes created with names are not anonymous. They are not removed by the `--rm` | |
Volumes created with names are not anonymous, and they are not removed by the `--rm` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@TomSweeneyRedHat PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the exist/exists mess that I contributed to, LGTM. I've hit all of them with a grammar checker to make sure my tired noodle wasn't still messing up and I believe they are right with my current suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Totally agree with the decision. I made the very same choice in the WIP work for podman-cp
. It currently would create a path on the container if doesn't exist and I find this kind of magic dangerous - as you said, a typo would be masked and deployments can break in hard to debug ways.
We differ from Docker, in that we do not create the source directory in a --volume mount if it does not exists. We return an error. We do not believe that a `typo` from the user should cause a directory to be created and silently ignored by Podman. Fixes: containers#8513 Signed-off-by: Daniel J Walsh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
/lgtm |
This one is a nightmare, because --volume has been edited in four different files throughout the years (five if you count podman-build, which I am not including in this PR). Those edits have not always been done in sync. The list of options was reordered 2022-06-28 by Giuseppe in containers#14734, but only in podman-create and -run (not in podman-pod-*). No explanation of why, but I'll assume he knew what he was doing, and have accepted that for the reference copy. There was also a big edit in containers#8519. The "Propagation property...bind mounted" sentence first appeared in pod-clone, in containers#14299 by cdoern, with no obvious source of where it came from. I choose to include it in the reference copy. The "**copy**" option seems to work in pod-create, so I'm including it in the reference copy. Someone please yell loudly if this is not the case. The "disables SELinux separation for containers used in the build", no idea, changed that to just "for the container/pod" The "advanced users / overlay / upperdir / workdir" paragraph makes zero sense to me, but hey, I assume it applies to all the commands, so I put it in the reference copy. Finally, there's still a mishmash of backticks, asterisks, underscores, and even quotation marks. Someone is gonna have to perform major cleanup on this one day, but at least it'll be in only one place. Signed-off-by: Ed Santiago <[email protected]>
We differ from Docker, in that we do not create the source directory
in a --volume mount if it does not exists. We return an error.
We do not believe that a
typo
from the user should cause a directoryto be created and silently ignored by Podman.
Fixes: #8513
Signed-off-by: Daniel J Walsh [email protected]