Skip to content

storage.conf: respect CONTAINERS_STORAGE_CONF env#1249

Merged
rhatdan merged 2 commits intocontainers:mainfrom
Luap99:storage.conf
Jun 1, 2022
Merged

storage.conf: respect CONTAINERS_STORAGE_CONF env#1249
rhatdan merged 2 commits intocontainers:mainfrom
Luap99:storage.conf

Conversation

@Luap99
Copy link
Copy Markdown
Member

@Luap99 Luap99 commented Jun 1, 2022

CONTAINERS_STORAGE_CONF env var should overwrite the default path even
for the first config load at init time.

Fixes containers/podman#14267

types: do not load storage.conf at init time

Using init in libs is bad. init() has to be run every time the
application which imports this package starts. This slows down startup
time even if the application will never use this code path.

Instead use a sync.Once to only the config when it is required.

Luap99 added 2 commits June 1, 2022 16:23
CONTAINERS_STORAGE_CONF env var should overwrite the default path even
for the first config load at init time.

Fixes containers/podman#14267

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Using init in libs is bad. init() has to be run every time the
application which imports this package starts. This slows down startup
time even if the application will never use this code path.

Instead use a sync.Once to only the config when it is required.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@nalind
Copy link
Copy Markdown
Member

nalind commented Jun 1, 2022

LGTM.

@rhatdan
Copy link
Copy Markdown
Member

rhatdan commented Jun 1, 2022

LGTM

@rhatdan rhatdan merged commit d7d1dae into containers:main Jun 1, 2022
@Luap99 Luap99 deleted the storage.conf branch June 1, 2022 15:14
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.

Unable to override storage.conf with CONTAINERS_STORAGE_CONF env var in podman-remote

3 participants