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

libnetwork/netavark: do not create config dir in init #2267

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Dec 9, 2024

Podman creates/initializes the network backend for every command. However most commands will not need it so we should keep the required actions we do to a minimum.

In this case the config directory /etc/containers/networks by default as root may not exists and then we try to create it which can fail, i.e. when /etc is read only[1].

The code here are a bit more changes then I would have liked but we must make sure the default in memory network always exists and do not create the directory there.

[1] #2265

Podman creates/initializes the network backend for every command. However
most commands will not need it so we should keep the required actions we
do to a minimum.

In this case the config directory /etc/containers/networks by default as
root may not exists and then we try to create it which can fail, i.e.
when /etc is read only[1].

The code here are a bit more changes then I would have liked but we must
make sure the default in memory network always exists and do not create
the directory there.

[1] containers#2265

Signed-off-by: Paul Holzinger <[email protected]>
Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Dec 9, 2024
@Luap99
Copy link
Member Author

Luap99 commented Dec 9, 2024

@mheon PTAL

cc @dustymabe

@dustymabe
Copy link
Contributor

Thank you!

@rhatdan
Copy link
Member

rhatdan commented Dec 9, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 9, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 36a929e into containers:main Dec 9, 2024
15 checks passed
@Luap99 Luap99 deleted the network-dir branch December 9, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants