Skip to content
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

types/options: check prior drivers using readdir #1637

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Jun 12, 2023

Fetch prior drivers if any using ReadDir and looking for traces of %s-images dirs if present already on the system where %s is the prior driver.

Closes: #1618 (comment)

@flouthoc
Copy link
Collaborator Author

@giuseppe @nalind @rhatdan @containers/storage-maintainers PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

types/options.go Outdated
if strings.HasSuffix(entry.Name(), "-images") {
res := strings.Split(entry.Name(), "-images")
if len(res) > 0 {
opts.GraphDriverName = res[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a break here

types/options.go Outdated
if err == nil {
for _, entry := range dirEntries {
if strings.HasSuffix(entry.Name(), "-images") {
res := strings.Split(entry.Name(), "-images")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using TrimSuffix() is better than using Split().

Fetch prior drivers if any using `ReadDir` and looking for traces of
`%s-images` dirs if present already on the system where `%s` is the
prior driver.

Signed-off-by: Aditya R <arajan@redhat.com>
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 12, 2023

LGTM

@rhatdan rhatdan merged commit dd10122 into containers:main Jun 12, 2023
18 checks passed
Luap99 added a commit to Luap99/libpod that referenced this pull request Jun 13, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637
Luap99 added a commit to Luap99/libpod that referenced this pull request Jun 13, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/libpod that referenced this pull request Jun 13, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
cgiradkar pushed a commit to cgiradkar/podman that referenced this pull request Jul 12, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
cgiradkar pushed a commit to cgiradkar/podman that referenced this pull request Jul 13, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
cgiradkar pushed a commit to cgiradkar/podman that referenced this pull request Jul 17, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
cgiradkar pushed a commit to cgiradkar/podman that referenced this pull request Jul 17, 2023
This reverts commit ebf7474.

With the c/storage change[1] we no longer need this workaround.

[1] containers/storage#1637

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants