Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Deregister node in api server during cordon-and-drain #2437

Merged
merged 3 commits into from
Mar 14, 2018

Conversation

dmitsh
Copy link

@dmitsh dmitsh commented Mar 12, 2018

After upgrade operation, the api server sometimes lists already deleted nodes.
Adding explicit call to deregister nodes during cordon-and-drain.

@ghost ghost assigned dmitsh Mar 12, 2018
@ghost ghost added the in progress label Mar 12, 2018
@@ -62,7 +62,16 @@ func SafelyDrainNode(az armhelpers.ACSEngineClient, logger *log.Entry, masterURL

//Evict pods in node
drainOp := &drainOperation{client: client, node: node, logger: logger, timeout: timeout}
return drainOp.deleteOrEvictPodsSimple()
if err = drainOp.deleteOrEvictPodsSimple(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

The original usage of return drainOp.deleteOrEvictPodsSimple() is preferred here.

@dmitsh dmitsh changed the title Deregister node in api server (optionally) during cordon-and-drain Deregister node in api server during cordon-and-drain Mar 13, 2018
Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

lgtm

@jackfrancis jackfrancis merged commit 87817ec into Azure:master Mar 14, 2018
@ghost ghost removed the in progress label Mar 14, 2018
tesharp pushed a commit to tesharp/acs-engine that referenced this pull request Mar 16, 2018
* Deregister node in api server (optionally) during cordon-and-drain

* addressed comments

* added warning message
@dmitsh dmitsh deleted the ds-delete-drained-node branch August 21, 2018 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants