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

network reload without ports should not reload ports #12242

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 9, 2021

What this PR does / why we need it:

When run as rootless the podman network reload command tries to reload
the rootlessport ports because the childIP could have changed.
However if the containers has no ports we should skip this instead of
printing a warning.

network reload return error if we cannot reload ports

As rootless we have to reload the port mappings. If it fails we should
return an error instead of the warning.

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 9, 2021

[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 Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2021
@mheon
Copy link
Member

mheon commented Nov 9, 2021

Code LGTM, tests are red

@Luap99
Copy link
Member Author

Luap99 commented Nov 9, 2021

Looks like a registry failure only the podman search tests are failing.

@rhatdan
Copy link
Member

rhatdan commented Nov 9, 2021

@Luap99 sorry rebase required
LGTM

@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2021

Tests are green, please merge

@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2021

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2021
@Luap99 Luap99 force-pushed the port-reload branch 2 times, most recently from c94798c to 2251be6 Compare November 10, 2021 17:38
@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2021

/hold cancel This should be good now, thanks @edsantiago

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

All three additions are NOPs. Also, even when I fix them on my end, I still can't get the test to fail using podman @ main.

test/system/500-networking.bats Outdated Show resolved Hide resolved
@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2021

The changed e2e test should fail on main.

@edsantiago
Copy link
Member

Solved it! Could I make a friendly suggestion?

diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 4d1d88aba..21350ed36 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -456,6 +456,12 @@ load helpers
         die "MAC address did not change after podman network disconnect/connect"
     fi

+    # Disconnect/reconnect of a container *with no ports* should succeed quietly
+    run_podman network disconnect $netname $background_cid
+    is "$output" "" "disconnect of container with no open ports"
+    run_podman network connect $netname $background_cid
+    is "$output" "" "(re)connect of container with no open ports"
+
     # FIXME FIXME FIXME: #11825: bodhi tests are failing, remote+rootless only,
     # with "dnsmasq: failed to create inotify". This error has never occurred
     # in CI, and Ed has been unable to reproduce it on 1minutetip. This next

With the above addition, the test fails on main and passes on your PR.

When run as rootless the podman network reload command tries to reload
the rootlessport ports because the childIP could have changed.
However if the containers has no ports we should skip this instead of
printing a warning.

Signed-off-by: Paul Holzinger <[email protected]>
As rootless we have to reload the port mappings. If it fails we should
return an error instead of the warning.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2021

@edsantiago added your diff, thanks

@rhatdan
Copy link
Member

rhatdan commented Nov 10, 2021

/lgtm
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2021
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2021
@openshift-merge-robot openshift-merge-robot merged commit 546ad0e into containers:main Nov 10, 2021
@Luap99 Luap99 deleted the port-reload branch November 11, 2021 09:10
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants