-
Notifications
You must be signed in to change notification settings - Fork 246
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
ReloadConfigurationFile should Reset storage options #867
Conversation
1007bdd
to
0838108
Compare
b9ecc81
to
d21a962
Compare
Basically I am trying to not use /var/lib/shared as an addiitonal store. CONTAINERS_STORAGE_CONF=/etc/containers/storage.conf.shared ./bin/podman --root /var/lib/shared pull alpine |
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
@containers/podman-maintainers PTAL |
How much of |
I don't believe we want to retain anything, so just resetting storeOptions to init value. |
121ca21
to
82c4a9c
Compare
types/options.go
Outdated
@@ -278,6 +278,9 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) { | |||
fmt.Printf("Failed to parse %s %v\n", configFile, err.Error()) | |||
return | |||
} | |||
|
|||
// Clear storeOptions of previos settings | |||
storeOptions = StoreOptions{} |
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.
should this be storeOptions = &StoreOptions{}
?
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.
Yup
Currently in Podman if we reset the CONTAINERS_STORAGE_CONF path, we get the graph driver options from the original config file as well as the options from the override path. This PR resets the storageconf to the initial state when called multiple times. Also if user sets STORAGE_OPTS="" then we should use it to override all other storage options. Signed-off-by: Daniel J Walsh <[email protected]>
I want to get this in so we can cut a release. |
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
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
Currently in Podman if we reset the CONTAINERS_STORAGE_CONF path, we get
the graph driver options from the original config file as well as the
options from the override path. This PR resets the storageconf to the
initial state when called multiple times.
Signed-off-by: Daniel J Walsh [email protected]