-
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
options: fall back to default graph
and run
root for empty case
#1083
Conversation
While reloading from config files `graph` and `run` root could be set to empty. We should fall back to default if they are empty. See: containers/podman#12467 Signed-off-by: Aditya Rajan <[email protected]>
Still need to add tests for this. |
types/options.go
Outdated
@@ -53,6 +53,13 @@ func init() { | |||
} | |||
ReloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions) | |||
} | |||
// reload could set values to empty for run and graph root if config does not contains anything | |||
if defaultStoreOptions.RunRoot == "" { | |||
defaultStoreOptions.RunRoot = "/run/containers/storage" |
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.
Will this work in rootless mode?
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.
At least make these a constant.
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.
@rhatdan I think issue only happens for rootful case. But i need to try it myself ill confirm it and make changes.
And sure I agree ill make these constant.
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.
@rhatdan Following bug is only for rootful* users for rootless path is constructed via getRootlessStorageOpts()
which handles case correctly.
Signed-off-by: Aditya Rajan <[email protected]>
LGTM, are we waiting for tests to be added? |
I am also in the "adding tests camp". There's no guarantee we won't regress another time. |
@umohnani8 @vrothberg Yes i was trying to figure out the best way to test this in |
While reloading from config files
graph
andrun
root could be set toempty. We should fall back to default if they are empty.
Closes: containers/podman#12467