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

storcon: requests to detach should automatically set scheduling policy to Active #9957

Closed
jcsp opened this issue Dec 1, 2024 · 0 comments · Fixed by #10011
Closed

storcon: requests to detach should automatically set scheduling policy to Active #9957

jcsp opened this issue Dec 1, 2024 · 0 comments · Fixed by #10011
Assignees
Labels
c/storage/controller Component: Storage Controller t/bug Issue Type: Bug triaged bugs that were already triaged

Comments

@jcsp
Copy link
Collaborator

jcsp commented Dec 1, 2024

We saw a call to /location_config mode=Detached for a shard in Pause state, which resulted in a weird response where we reported locations for all but the 0th shard.

If we are called with mode=Detached we should take it as given that the caller wants us to act on that, and override any existing scheduling policy.

@jcsp jcsp added c/storage/controller Component: Storage Controller t/bug Issue Type: Bug labels Dec 1, 2024
@jcsp jcsp self-assigned this Dec 1, 2024
@jcsp jcsp added the triaged bugs that were already triaged label Dec 3, 2024
jcsp added a commit that referenced this issue Dec 4, 2024
jcsp added a commit that referenced this issue Dec 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 7, 2024
… detaches (#10011)

## Problem

We saw a tenant get stuck when it had been put into Pause scheduling
mode to pin it to a pageserver, then it was left idle for a while and
the control plane tried to detach it.

Close: #9957

## Summary of changes

- When changing policy to Detached or Secondary, set the scheduling
policy to Active.
- Add a test that exercises this
- When persisting tenant shards, set their `generation_pageserver` to
null if the placement policy is not Attached (this enables consistency
checks to work, and avoids leaving state in the DB that could be
confusing/misleading in future)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage/controller Component: Storage Controller t/bug Issue Type: Bug triaged bugs that were already triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant