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

fix: If pod has snat or eip, also delete staticRoute when delete pod. #1731

Merged
merged 1 commit into from
Jul 22, 2022
Merged

fix: If pod has snat or eip, also delete staticRoute when delete pod. #1731

merged 1 commit into from
Jul 22, 2022

Conversation

xujunjie-cover
Copy link
Member

Signed-off-by: xujunjie-cover [email protected]

What type of this PR

Examples of user facing changes:

  • Bug fixes

Which issue(s) this PR fixes:

Fixes #1727

@@ -645,6 +645,12 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
} else if err != nil {
return err
}
// If pod has snat or eip, also need delete staticRoute when delete pod
if vpc.Name == util.DefaultVpc {
if err := c.ovnLegacyClient.DeleteStaticRoute(address.Ip, vpc.Status.Router); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if err := c.ovnLegacyClient.DeleteStaticRoute(address.Ip, vpc.Status.Router); err != nil {
if err := c.ovnLegacyClient.DeleteStaticRoute(address.Ip, vpc.Name); err != nil {

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, Thanks

@oilbeater oilbeater added bug Something isn't working need backport labels Jul 22, 2022
@oilbeater oilbeater merged commit ce40f7e into kubeovn:master Jul 22, 2022
oilbeater pushed a commit that referenced this pull request Jul 22, 2022
… pod. (#1731)

Signed-off-by: xujunjie-cover <[email protected]>
(cherry picked from commit ce40f7e)
oilbeater pushed a commit that referenced this pull request Jul 22, 2022
… pod. (#1731)

Signed-off-by: xujunjie-cover <[email protected]>
(cherry picked from commit ce40f7e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

关于默认vpc的eip与snat
2 participants