-
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
[WIP] Return slirp ip information from getHosts() #13219
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2377,7 +2377,17 @@ func (c *Container) getHosts() string { | |
|
||
if depCtr != nil { | ||
host := "" | ||
if depCtr.config.NetMode.IsSlirp4netns() { | ||
// When using slirp4netns, the interface gets a static IP | ||
if slirp4netnsIP, err := GetSlirp4netnsIP(depCtr.slirp4netnsSubnet); err != nil { | ||
logrus.Warnf("Failed to determine slirp4netnsIP: %v", err.Error()) | ||
} else { | ||
return fmt.Sprintf("%s\t%s %s\n", slirp4netnsIP.String(), c.Hostname(), c.config.Name) | ||
} | ||
} | ||
outer: | ||
// Paul this is returning nothing, even though I know depctr is up and | ||
// running with an IP Address in rootfull mode? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you want to change c.cniHosts() and not the code here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fine, how do I change it. It looks like depctr has no network in rootfull mode. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems to work for me, what are you expecting? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where would you suggest? |
||
for net, status := range depCtr.getNetworkStatus() { | ||
network, err := c.runtime.network.NetworkInspect(net) | ||
// only add the host entry for bridge networks | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package libpod | ||
|
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 block has to be moved to line 2318, you are changing the host.containers.internal code here.
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 did not find the depCtr until now.