-
Notifications
You must be signed in to change notification settings - Fork 232
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
Proposal: gracefully fallback to other drivers when loading the provided one fails #1457
Comments
Yes, I agree. If the user explicitly requested a specific driver, I think that we must error out. If the user doesn't request a specific driver, c/storage already picks a working and reasonable default. |
So if podman would want to gracefully fall back or pick a new driver, it would be up to podman to implement such behavior then? |
No, Podman should error out as well. Maybe I am misreading the proposal but if the user does a |
No, this is more for the case when e.g. the system wide driver is set to btrfs/zfs via /etc/containers/storage.conf, but your home partition is on xfs. It would be nice if podman would then just display a warning and gracefully fallback to the best working driver for rootless containers (would be overlay I guess?). If you explicitly ask for a driver, then repicking shouldn't happen imho. |
If @giuseppe WDYT? |
|
as a user, I also expect that. If the storage-driver is specified in If anything, it should be a different setting IMO, something like Side question: any reason to default to |
That sounds like a viable option to me.
That was just a random example. In my case the driver was actually A preferred storage driver or a priority list sounds like a good solution for this problem. Would |
Isn't c/storage picking the preferred/right driver automatically? In that case, distributions don't need to hard-code it in their configs. |
No, it picks the driver according to its own priority list (if the driver is not set): storage/drivers/driver_linux.go Line 93 in 46e9455
However, there is no way for a distro to change that priority list. |
Making that list configurable SGTM. The changes would be minimal and there's no hidden magic. 👍 |
I would prefer not to rely on the priority list. Having a fallback driver in storage.conf would be preferable. |
Can you elaborate?
What if that doesn't suffice and users want a third option? To me, making the priority list configurable covers all there is to cover. |
I guess doing that would be fine, but I think the need for a third option is a really small number. I did not like the priority list and prefer users to always specify "overlay" or something else. |
This fixes containers#1457 Signed-off-by: Dan Čermák <dcermak@suse.com>
This fixes containers#1457 Signed-off-by: Dan Čermák <dcermak@suse.com>
To be honest I find the configurable priority list to be a more elegant solution than to have a default and a fallback. A default and a fallback would result in more or less the same code as a priority list, only imho being less flexible. Also, I personally don't see the big advantage of restricting the user to a default and a fallback when they get a lot more fallbacks out of the box. Also, this is a pretty niche/specific setting. So allowing a distribution vendor/poweruser more flexibility is imho fine, as they should be knowing what they are doing. |
Anyways please open a PR to make the change. |
This fixes containers#1457 Signed-off-by: Dan Čermák <dcermak@suse.com>
This fixes containers#1457 Signed-off-by: Dan Čermák <dcermak@suse.com>
This fixes containers#1457 Co-authored-by: Valentin Rothberg <vrothberg@redhat.com> Signed-off-by: Dan Čermák <dcermak@suse.com>
This fixes containers#1457 Co-authored-by: Valentin Rothberg <vrothberg@redhat.com> Signed-off-by: Dan Čermák <dcermak@suse.com>
This fixes containers#1457 Co-authored-by: Valentin Rothberg <vrothberg@redhat.com> Signed-off-by: Dan Čermák <dcermak@suse.com>
c/storage will pick a new driver by name in
storage/drivers/driver.go
Line 332 in a747b27
In certain cases the situation could arise that a given driver is requested, but it is not a valid choice, e.g. the system dictates to use the zfs driver, but $HOME is on anything but zfs.
It would be simple in principle to allow for such a case and gracefully fall back to a supported driver, but that could be quite unexpected to API consumers.
Would this be something that could be added? If yes, what would you think for such a change to be the best place?
The text was updated successfully, but these errors were encountered: