Skip to content

Conversation

@kyounghunJang
Copy link

@kyounghunJang kyounghunJang commented Nov 26, 2025

Description

This PR exposes the default network name in podman info output under networkBackendInfo.

Currently, the default network is usually podman, but users can customize this in containers.conf. Downstream tools (like Podman Desktop) and users need a way to programmatically determine what the current default network name is.

Fixes #27580

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

podman info now displays the name of the default network.

@openshift-ci openshift-ci bot added the do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None label Nov 26, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 26, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kyounghunJang
Once this PR has been reviewed and has the lgtm label, please assign honny1 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 release-note and removed do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Nov 26, 2025
Copy link
Member

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

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

Hello, could you please remove the vendoring commit from this PR? If this requires a bump of common, I would suggest doing it in a separate PR.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Thanks, you need to reorder your commits, the vendor commit should be first otherwise you break the build.

Also please squash the lint commit into the right commit, we don't want fixup commits on PRs as we merge commits as is.

@Luap99
Copy link
Member

Luap99 commented Nov 26, 2025

Hello, could you please remove the vendoring commit from this PR? If this requires a bump of common, I would suggest doing it in a separate PR.

Eh, we do vendoring all the time in the same PR with other changes, as long as you do it in separate commits that is fine.
Given this needs the common change doing it like this is fine.

@Honny1
Copy link
Member

Honny1 commented Nov 26, 2025

Hello, could you please remove the vendoring commit from this PR? If this requires a bump of common, I would suggest doing it in a separate PR.

Eh, we do vendoring all the time in the same PR with other changes, as long as you do it in separate commits that is fine. Given this needs the common change doing it like this is fine.

I got confused by the failed build. I didn't realize strict ordering was the issue. That's why I thought a separate PR was needed.

@Luap99
Copy link
Member

Luap99 commented Nov 26, 2025

#27612 did the vendoring for another feature so you can drop the vendor here and just add the podman test

@kyounghunJang kyounghunJang force-pushed the feature/Add-DefaultNetwork branch 2 times, most recently from da91463 to 266ba5a Compare November 27, 2025 01:21
@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@kyounghunJang
Copy link
Author

@Luap99 @Honny1
Thanks for the feedback! I’ve incorporated the suggested changes.

configContent := fmt.Sprintf("[network]\ndefault_network=%q\n", customNetName)

err := os.WriteFile(configPath, []byte(configContent), os.ModePerm)
Expect(err).ToNot(HaveOccurred())
Copy link
Member

Choose a reason for hiding this comment

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

Ah I missed this before, you are going to have to add podmanTest.RestartRemoteService() after writing the file here to make the server process pick it up.

That is why the remote tests are failing

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.

expose default network name in podman info

3 participants