Skip to content

Commit

Permalink
chore(bors): merge pull request #622
Browse files Browse the repository at this point in the history
622: Cherry-pick #621 r=tiagolobocastro a=tiagolobocastro

fix(cordon-drain): return correct updated spec

Outdated spec was being returned as part of the cordon/drain operations.

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Jul 5, 2023
2 parents 5ec7437 + d832339 commit 7ec0bad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions control-plane/agents/src/bin/core/node/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ impl ResourceCordon for OperationGuardArc<NodeSpec> {
.start_update(registry, &cloned_node_spec, NodeOperation::Cordon(label))
.await?;

self.complete_update(registry, Ok(self.as_ref().clone()), spec_clone)
.await
self.complete_update(registry, Ok(()), spec_clone).await?;
Ok(self.as_ref().clone())
}

/// Uncordon a node via operation guard functions.
Expand All @@ -43,8 +43,8 @@ impl ResourceCordon for OperationGuardArc<NodeSpec> {
.start_update(registry, &cloned_node_spec, NodeOperation::Uncordon(label))
.await?;

self.complete_update(registry, Ok(self.as_ref().clone()), spec_clone)
.await
self.complete_update(registry, Ok(()), spec_clone).await?;
Ok(self.as_ref().clone())
}
}

Expand Down

0 comments on commit 7ec0bad

Please sign in to comment.