Skip to content

Cleanup handling of default driver name, when storage.conf has drivername=""#486

Closed
rhatdan wants to merge 1 commit intocontainers:masterfrom
rhatdan:driver
Closed

Cleanup handling of default driver name, when storage.conf has drivername=""#486
rhatdan wants to merge 1 commit intocontainers:masterfrom
rhatdan:driver

Conversation

@rhatdan
Copy link
Member

@rhatdan rhatdan commented Dec 5, 2019

If the user specifies drivername="" in the storage.conf
then we default to the first driver name based on priority list, usually
overla.

The problem with this, is now the storage.conf file has options that are
driver specific. The code does not catch this so ends up looking for a driver
name of "", and finds no matching options.

This code will set the drivername that the storage layer would choose earlies,
so that storage will get the correct options out of the config file.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

@rhatdan rhatdan changed the title Cleanup handling of default driver name Cleanup handling of default driver name, when storage.conf has drivername="" Dec 5, 2019
@rhatdan rhatdan force-pushed the driver branch 3 times, most recently from aaad2f3 to 9a03161 Compare December 9, 2019 15:41
store.go Outdated
}
name, err := drivers.GetDefaultDriverName(options)
if err != nil {
fmt.Print(err)
Copy link
Member

Choose a reason for hiding this comment

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

Should the error be returned here, too?

Copy link
Member Author

Choose a reason for hiding this comment

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

The errors above for parsing the UID Maps were just printing errors, so I was matching, but I am fine with returning an error. Problem is ReloadConfigurationFile currently does not return errors, so this would need to be an API Breaking change.

@rhatdan rhatdan force-pushed the driver branch 6 times, most recently from 4c1f0dc to 61005ae Compare December 10, 2019 19:32
If the user specifies drivername="" in the storage.conf
then we default to the first driver name based on priority list, usually
overla.

The problem with this, is now the storage.conf file has options that are
driver specific.  The code does not catch this so ends up looking for a driver
name of "", and finds no matching options.

This code will set the drivername that the storage layer would choose earlies,
so that storage will get the correct options out of the config file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan
Copy link
Member Author

rhatdan commented Dec 10, 2019

This does not seem to be possible, without a lot of horrible hacking. So I am going to give up and tell users to specify the driver in the storage name.

@rhatdan rhatdan closed this Dec 10, 2019
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 4, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 4, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 5, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 5, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 11, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/container-libs that referenced this pull request Mar 11, 2026
The option logic was chnaged in the prior commit to handle the case
without driver name properly.

Based on  the comment in [1] the reason we had this warning was only
because of this special option handling.

[1] containers/storage#486

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.

2 participants