-
Notifications
You must be signed in to change notification settings - Fork 228
Teardown IPMasq rules for all actual configured bridges instead of using the hardcoded default string #461
Teardown IPMasq rules for all actual configured bridges instead of using the hardcoded default string #461
Conversation
++ @najeal |
…ing the hardcoded default string
dba82ba
to
32a5341
Compare
@chanwit I consolidated the errors. I moved this cleanup into function. The error is wrapped with the util defer helper. |
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.
lgtm
return err | ||
} | ||
|
||
cleanupErr := plugin.cleanupBridges(containerID) | ||
if cleanupErr != nil { | ||
defer util.DeferErr(&err, func() error { |
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 do you defer the return error?
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.
We can still try to remove the network if the cleanup fails.
PR description edit:
|
Followup #460
This logic seems to work well.
I added a trace line.
This protects us from a class of network removal bugs when stopping vm's that were created on the previous network names or CNI networks that are user configured.
You can create a vm with an old version of ignite on the
172.18/16
network, stop it with this new version without error.If you remove the CNI configuration and then start it again it will be on the new
10.61/16
network.This gives us our migration plan.