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: Only stop OVN device if network is populated #13114

Merged
merged 1 commit into from Mar 12, 2024

Conversation

roosterfish
Copy link
Contributor

@roosterfish roosterfish commented Mar 12, 2024

This fixes a panic caused when stopping a device with an invalid config.

This doesn't yet fully resolve all the issues in #13082 but allows running the evacuation.

This fixes a panic caused when stopping a device with an invalid config.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
if err != nil {
// Don't fail here as we still want the postStop hook to run to clean up the local veth pair.
d.logger.Error("Failed to remove OVN device port", logger.Ctx{"err": err})
}
Copy link
Member

Choose a reason for hiding this comment

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

Does returning an error cause the evacuation to fail, because I think we should return an error if d.network is nil as something is clear very wrong in such situations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we return an error it gets logged but the evacuation will continue on.

@tomponline tomponline merged commit 667c79b into canonical:main Mar 12, 2024
28 checks passed
@roosterfish roosterfish deleted the fix_recovery branch March 12, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants