mirror of
https://github.com/containers/podman.git
synced 2025-06-27 21:50:18 +08:00
update container status with new results
a bug was being caused by the fact that the container network results were not being updated properly. given that jhon is on PTO, this PR will replace #8362 Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -1144,8 +1144,8 @@ func (c *Container) NetworkConnect(nameOrID, netName string, aliases []string) e
|
||||
// build a list of network names so we can sort and
|
||||
// get the new name's index
|
||||
var networkNames []string
|
||||
for netName := range networks {
|
||||
networkNames = append(networkNames, netName)
|
||||
for name := range networks {
|
||||
networkNames = append(networkNames, name)
|
||||
}
|
||||
networkNames = append(networkNames, netName)
|
||||
// sort
|
||||
@ -1157,6 +1157,7 @@ func (c *Container) NetworkConnect(nameOrID, netName string, aliases []string) e
|
||||
// populate network status
|
||||
copy(networkStatus[index+1:], networkStatus[index:])
|
||||
networkStatus[index] = networkResults[0]
|
||||
c.state.NetworkStatus = networkStatus
|
||||
}
|
||||
c.newNetworkEvent(events.NetworkConnect, netName)
|
||||
return c.save()
|
||||
|
Reference in New Issue
Block a user