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 cleanup order #2792

Merged
merged 1 commit into from May 11, 2023
Merged

fix cleanup order #2792

merged 1 commit into from May 11, 2023

Conversation

zhangzujian
Copy link
Member

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

E0511 08:37:22.113563      13 subnet.go:1729] failed to get vlan ovn-vlan: vlan.kubeovn.io "ovn-vlan" not found
E0511 08:37:22.113659      13 subnet.go:925] reconcile vlan for subnet ovn-default failed, vlan.kubeovn.io "ovn-vlan" not found
E0511 08:37:22.113767      13 subnet.go:713] reconcile subnet for ovn-default failed, vlan.kubeovn.io "ovn-vlan" not found
E0511 08:37:22.113872      13 subnet.go:195] error syncing 'ovn-default': vlan.kubeovn.io "ovn-vlan" not found, requeuing

WHAT

copilot:summary

copilot:poem

HOW

copilot:walkthrough

@github-actions
Copy link
Contributor

  • The cleanup.sh script is deleting the VLAN and Provider Network resources after deleting other resources. This can cause issues if there are dependencies on these resources. It would be better to delete them before deleting other resources.
  • The script is using a for loop to iterate over resources and delete them one by one. This can be slow and inefficient, especially if there are many resources. It would be better to use kubectl delete with the --all flag to delete all resources of a certain type at once.
  • The script is not checking for errors when deleting resources. If a resource fails to delete, the script will continue to try to delete other resources, potentially leaving the cluster in an inconsistent state. It would be better to check for errors and handle them appropriately.
  • The script is deleting the kube-ovn-monitor deployment without checking if it is still running. This can cause issues if the deployment is still needed. It would be better to check if the deployment is running before deleting it.
  • The script is deleting config maps without checking if they are still being used by other resources. This can cause issues if the config maps are still needed. It would be better to check if the config maps are still being used before deleting them.

@zhangzujian zhangzujian merged commit c8af3dd into kubeovn:master May 11, 2023
53 of 56 checks passed
@zhangzujian zhangzujian deleted the fix-cleanup branch May 11, 2023 08:58
zhangzujian added a commit that referenced this pull request May 16, 2023
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