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

use the copied node obj to drain the node #165

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

ZihanJiang96
Copy link
Member

@ZihanJiang96 ZihanJiang96 commented Nov 14, 2023

fixes #164

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (99cb1d7) 69.74% compared to head (6f12728) 69.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   69.74%   69.78%   +0.04%     
==========================================
  Files          12       12              
  Lines        1312     1314       +2     
==========================================
+ Hits          915      917       +2     
  Misses        325      325              
  Partials       72       72              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

err = drainNodeUtil(node, int(timeout), kubeClient)
// create a copy of the node obj, since RunCordonOrUncordon() modifies the node obj
nodeCopy := node.DeepCopy()
err = drainNodeUtil(nodeCopy, int(timeout), kubeClient)
if err == nil {
log.Info("drain suceeded")
Copy link
Member

Choose a reason for hiding this comment

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

Can you also fix the spelling error and change to succeeded?

Copy link

Choose a reason for hiding this comment

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

Please help to add the node name and instance id in both retry drain and drain succeeded logs.
it will help debugging.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed both. please review again.

Signed-off-by: Zihan Jiang <zihan_jiang@intuit.com>
@ZihanJiang96 ZihanJiang96 merged commit 50c037d into keikoproj:master Nov 14, 2023
4 checks passed
@ZihanJiang96 ZihanJiang96 deleted the drain-node-use-copy branch November 14, 2023 21:51
@vasukiprasad1
Copy link
Member

Thanks for the fix.

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.

cordon() doesn't return any error even when the cordon opration failed
4 participants