-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use hosts public ip address in rootless containers #12375
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan 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 |
} else { | ||
hosts += fmt.Sprintf("%s host.containers.internal\n", gatewayIP.String()) | ||
// getLocalIP returns the non loopback local IP of the host | ||
getLocalIP := func() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a local function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it was local in Buildah, I will make it Public in Buildah and then we can use it in both places, but this will take a while.
} | ||
return "" | ||
} | ||
if ip := getLocalIP(); ip != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fallback to GetSlirp4netnsGateway()
if the ip is empty.
LGTM once comments from @Luap99 are addressed |
@edsantiago I will need you to look at the Buildah bud failures. |
The first one: The second one, hmmm, I'm really confused by. I don't think I'll have time to get deep into it tonight, but basically, there's a buildah test that expects a 128 exit status, and I honestly kind of think that this is a bug in buildah itself: I think this failure should be 125, not 128. I don't know how to fix it for purposes of this PR. Maybe a The third one, no idea, something is expecting manifests to be >1 but it's ==1. I can try to take a closer look later tonight, but more likely tomorrow, sorry. |
Is |
Yeah... I think the first and third are that |
Not sure where it comes from, but buildah does exit with a 128.
|
The exit code comes from git, which buildah is executing.
|
It comes from |
It should probably be equivalent. But not sure why 128 shouldn't work correctly in a test. |
UNIX exit statuses are 0-127. When bit 7 is set, it means there was a signal, e.g., 130 = 128 | 2 = SIGINT. So exit status 128 is what: SIGNOTHING?? |
Currently we are only wiring the logger into run_linux.go Not into the Config section. This PR is needed in order to update vendor in Podman. containers/podman#12375 [NO NEW TESTS NEEDED] Tests will be done in Podman. Signed-off-by: Daniel J Walsh <[email protected]>
} | ||
if arch == "" { | ||
arch = runtime.GOARCH | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides values computed from (possibly multiple) Platform
values with the single values from arch
and os
, which looks wrong. They should only be used in place of the values returned by github.com/containerd/containerd/platforms.DefaultSpec()
if no Platform
values are present, otherwise they should be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall, why I added those, they do not look correct from reading parse. I will remove and see if errors return.
f2ee714
to
45da1ce
Compare
Add first non localhost ipv4 of all host interfaces as destination for host.contaners.internal for rootless containers. Fixes: containers#12000 Signed-off-by: Daniel J Walsh <[email protected]>
/lgtm |
Add first non localhost ipv4 of all host interfaces as destination
for host.contaners.internal for rootless containers.
Fixes: #12000
Signed-off-by: Daniel J Walsh [email protected]
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer: