Skip to content

Commit

Permalink
storcon: return an error for drain attempts while paused (#9997)
Browse files Browse the repository at this point in the history
## Problem

We currently allow drain operations to proceed while the node policy is
paused.

## Summary of changes

Return a precondition failed error in such cases. The orchestrator is
updated in neondatabase/infra#2544 to skip drain
and fills if the pageserver is paused.

Closes: #9907
  • Loading branch information
VladLazar authored Dec 4, 2024
1 parent 8d93d02 commit 68205c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage_controller/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5681,7 +5681,7 @@ impl Service {
}

match node_policy {
NodeSchedulingPolicy::Active | NodeSchedulingPolicy::Pause => {
NodeSchedulingPolicy::Active => {
self.node_configure(node_id, None, Some(NodeSchedulingPolicy::Draining))
.await?;

Expand Down

1 comment on commit 68205c4

@github-actions
Copy link

Choose a reason for hiding this comment

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

7155 tests run: 6837 passed, 0 failed, 318 skipped (full report)


Flaky tests (5)

Postgres 17

Postgres 16

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 30.8% (8266 of 26844 functions)
  • lines: 47.8% (65174 of 136378 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
68205c4 at 2024-12-04T11:30:26.288Z :recycle:

Please sign in to comment.