-
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
Allow users to override default storage opts with --storage-opt #9911
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 |
@srcshelton PTAL |
test/system/005-info.bats
Outdated
@@ -53,4 +53,8 @@ store.imageStore.number | 1 | |||
|
|||
} | |||
|
|||
@test "podman info --storage-opt="" " { |
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.
Suggestion: change "" (doublequote doublequote) to '' (singlequote singlequote) for log readability.
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
test/system/005-info.bats
Outdated
@@ -53,4 +53,8 @@ store.imageStore.number | 1 | |||
|
|||
} | |||
|
|||
@test "podman info --storage-opt="" " { | |||
run_podman --storage-opt="" info |
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.
This completely blows up on my laptop (rootless, that is; works fine as root of course):
Error: kernel does not support overlay fs: 'overlay' is not supported over btrfs at "/home/esm/.local/share/containers/storage/overlay": backing file system is unsupported for this graph driver
docs/source/markdown/podman.1.md
Outdated
@@ -148,7 +148,7 @@ specify additional options via the `--storage-opt` flag. | |||
|
|||
#### **\-\-storage-opt**=*value* | |||
|
|||
Storage driver option, Default storage driver options are configured in /etc/containers/storage.conf (`$HOME/.config/containers/storage.conf` in rootless mode). The `STORAGE_OPTS` environment variable overrides the default. The --storage-opt specified options overrides all. | |||
Storage driver option, Default storage driver options are configured in /etc/containers/storage.conf (`$HOME/.config/containers/storage.conf` in rootless mode). The `STORAGE_OPTS` environment variable overrides the default. The --storage-opt specified options overrides all. If you specify the --storage-opt="", no storage options will be used. |
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.
Unnecessary the
Unhappy red tests. |
So, to confirm, this replaces the If |
Complements it. Basically --root follows the settings in storage.conf. --storage-opt will ignore the storage.conf settings. |
I'm afraid that I'm not sure I understand how these two options are intended to be used… would be be able to give an example command-line which either pulls or builds a container definition into a directory declared as an additionalStorage location but which it not the main graphRoot?
(Is the intent that |
@srcshelton Yes, exactly you use case. |
We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. containers#9852 Signed-off-by: Daniel J Walsh <[email protected]>
@containers/podman-maintainers PTAL |
/lgtm |
Is there any use-case for Should |
We define in the man page that this overrides the default storage
options, but the code was appending to the existing options.
This PR also makes a change to allow users to specify --storage-opt="".
This will turn off all storage options.
#9852
Signed-off-by: Daniel J Walsh [email protected]