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 deleting old sb chassis for a re-added node #2989

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented Jun 27, 2023

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

I0627 07:27:07.575182       7 node.go:594] handle update node ubuntu-1
W0627 07:27:07.583831       7 ovn-sbctl.go:46] ovn-sbctl command error: ovn-sbctl --timeout=60 --db=tcp:[172.16.70.140]:6642 set chassis c4ef0754-8d6a-433b-ad55-8a15a0ce330c external_ids:vendor=kube-ovn external_ids:node=ubuntu-1 in 8ms
E0627 07:27:07.583882       7 node.go:617] failed to set chassis nodeTag for node 'ubuntu-1', failed to set chassis external_ids, ovn-sbctl: no row "c4ef0754-8d6a-433b-ad55-8a15a0ce330c" in table Chassis
, "exit status 1"
E0627 07:27:07.583926       7 node.go:155] error syncing 'ubuntu-1': failed to set chassis external_ids, ovn-sbctl: no row "c4ef0754-8d6a-433b-ad55-8a15a0ce330c" in table Chassis
, "exit status 1", requeuing

WHAT

🤖 Generated by Copilot at 5fbb74c

Refine chassis management and validation in ovn-sbctl.go and node.go. This improves the efficiency and reliability of node status updates and network connectivity.

🤖 Generated by Copilot at 5fbb74c

Sing, O Muse, of the mighty deeds of the ovn-kubernetes team
Who strive to fix the network woes of the nodes and pods supreme
They refactor and refine the code with skill and diligence
To validate and set the chassis nodeTag with elegance

HOW

🤖 Generated by Copilot at 5fbb74c

  • Refactor the logic of validating and setting the chassis nodeTag for a node into a separate function validateChassis (link)
  • Simplify the logic of deleting the chassis by node name by calling GetChassis and DeleteChassisByName functions (link)
  • Swap the order of the ovn-sb commands in the GetChassis function to use the node name as the external_id first, and then the hostname (link)

@zhangzujian zhangzujian added bug Something isn't working need backport labels Jun 27, 2023
@zhangzujian zhangzujian marked this pull request as ready for review June 28, 2023 02:16
@zhangzujian zhangzujian merged commit d5d196e into kubeovn:master Jun 28, 2023
@zhangzujian zhangzujian deleted the fix-chassis branch June 28, 2023 07:13
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Jun 28, 2023
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants