containers / storage

Container Storage Library
Apache License 2.0
558 stars 240 forks source link

`getRootlessStorageOpts` should be called after `storageConf` is loaded #1041

Open sayap opened 2 years ago

sayap commented 2 years ago

On a machine where $HOME is using zfs, I have a storage config where rootless_storage_path is on ext4, which should work fine with rootless overlay:

$ cat ~/.config/containers/storage.conf 
[storage]
driver = "overlay"
rootless_storage_path = "/ext4/sayap/containers/storage"

However, as getRootlessStorageOpts is called before the storage config is even loaded, I got the following error instead:

Error: kernel does not support overlay fs: 'overlay' is not supported over <unknown> at "/home/sayap/.local/share/containers/storage/overlay": backing file system is unsupported for this graph driver

For now, I work around this by calling reloadConfigurationFileIfNeeded before getRootlessStorageOpts.

rhatdan commented 2 years ago

Interested in opening a PR to fix?

cyrushu commented 2 months ago

still an issue. And it is very painful when my home mounted on nfs.

Error: kernel does not support overlay fs: 'overlay' is not supported over <unknown> at "/home/user/.local/share/containers/storage/overlay": backing file system is unsupported for this graph driver