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
add documentation on imagestore and add a warning if set #1695
Conversation
b0fb599
to
b405fe6
Compare
docs/containers-storage.conf.5.md
Outdated
@@ -56,10 +56,13 @@ $ restorecon -R -v /NEWSTORAGEPATH | |||
A common use case for this field is to provide a local storage directory when user home directories are NFS-mounted (podman does not support container storage over NFS). | |||
|
|||
**imagestore**="" | |||
image storage path (default is assumed to be same as `graphroot`). |
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.
Ah when I am reading at to me this string looks unnecessary , imagestore
is either used or not and if it is used then path must be different from graphRoot
.
I think last line is okay.
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.
Yea I wanted to follow a similar pattern as other values. The first sentence describes what the field is.
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.
For example, graphroot:
graphroot="" container storage graph dir (default: "/var/lib/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.
b405fe6
to
49bceb8
Compare
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.
A couple of nits picked, otherwise LGTM
49bceb8
to
0559809
Compare
docs/containers-storage.conf.5.md
Outdated
Path of imagestore different from `graphroot`, by default storage library stores all images in `graphroot` but if `imagestore` is provided it will store newly pulled images in provided `imagestore` but will keep using `graphroot` for everything else. If user is using `overlay` driver then images which were already part of `graphroot` will still be accessible ( Internally storage library will mount `graphroot` as an `additionalImageStore` to allow this behaviour ). | ||
|
||
A common use case for this field is for the users who want to split the file-system in different parts i.e disk which stores images vs disk used by the container created by the image. | ||
|
||
Imagestore must be different from `graphroot`. |
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.
Imagestor, if set, must be different from graphroot
.
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.
updated.
types/options.go
Outdated
@@ -179,6 +179,10 @@ func defaultStoreOptionsIsolated(rootless bool, rootlessUID int, storageConf str | |||
storageOpts.RootlessStoragePath = storagePath | |||
} | |||
|
|||
if storageOpts.ImageStore != "" && storageOpts.ImageStore == storageOpts.GraphRoot { | |||
return storageOpts, fmt.Errorf("imagestore if set must be a different location than graphroot") |
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.
It is set, o error should be.
return fmt..Errorf("imagestore %s must either be not set or be different then graphroot", storageOpts.ImageStore)
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.
updated.
Signed-off-by: Kevin Hannon <kehannon@redhat.com>
0559809
to
91da0c2
Compare
LGTM |
Fixes #1694
During testing of imagestore in CRIO, I found this error. Added some documentation and add an error if set to the same value.