Skip to content

[Backport release-1.3] fix(linstor): plunger demotes idle-Primary DRBD resources - #2580

Merged
myasnikovdaniil merged 1 commit into
release-1.3from
backport-2539-to-release-1.3
May 6, 2026
Merged

myasnikovdaniil merged 1 commit into
release-1.3from
backport-2539-to-release-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Description

Backport of #2539 to release-1.3.

DRBD auto-promotes a resource to Primary during the provisioning path
(e.g. mkfs.ext4 against a freshly created replica), but auto-demote
sometimes fails to fire on close. The resource then stays Primary on
a node that has no consumer, and CSI on the legitimate target node
fails NodePublishVolume with "failed to set source device readwrite".
The only recovery is an explicit drbdadm secondary on the stuck node.

Add a per-satellite plunger handler that detects local Primaries
where every device has open == false and demotes them. Both the
detection and the action are local to the satellite, so no peer
coordination is needed. open:no makes drbdadm secondary safe; if a
real consumer is about to arrive, auto-promote will redo it.

Upstream tracker: piraeusdatastore/piraeus-operator#942

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
(cherry picked from commit a6ac048)
@dosubot dosubot Bot added area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line kind/bug Categorizes issue or PR as related to a bug labels May 6, 2026
@myasnikovdaniil
myasnikovdaniil merged commit 8d4cd88 into release-1.3 May 6, 2026
4 of 5 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the backport-2539-to-release-1.3 branch May 6, 2026 11:01
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Author

Backport failed for release-1.3, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-1.3
git worktree add -d .worktree/backport-2580-to-release-1.3 origin/release-1.3
cd .worktree/backport-2580-to-release-1.3
git switch --create backport-2580-to-release-1.3
git cherry-pick -x 44f9e495561a62c665b98e9e13aca9679369dd29

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Author

Aleksei Sviridkin (lexfrei) added a commit that referenced this pull request May 6, 2026
## What this PR does

Fix the cascade where merging a backport PR (e.g. #2579) spawns another
backport (e.g. #2581 `[Backport release-1.2] [Backport release-1.3] …`).

Two compounding issues:

1. `pr-labeler.yaml` auto-added the `backport` label to any PR whose
title started with `[Backport release-X.Y]` — exactly the prefix
`korthout/backport-action` puts on every backport PR. Introduced in
`c8ed1c65` (CNCF/k8s label conventions). Fixed by dropping that
`toAdd.add('backport')` line.
2. `dosubot[bot]` independently re-applies `backport-previous` to
backport PRs based on similarity to the parent PR; it cannot be
controlled from this repo. Fixed by gating both jobs in `backport.yaml`
on `pull_request.base.ref == 'main'`, so backport PRs (which target
`release-X.Y`) cannot trigger the workflow regardless of labels.

Verified pre-fix behaviour by inspecting the label-event timeline of
#2580 (dosubot adds `backport-previous` 47s after PR open) and the diff
of `c8ed1c65` adding `pr-labeler.yaml`.

### Release note

```release-note
fix(ci): backport automation no longer creates duplicate backport PRs when a backport PR is merged.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced backport automation workflow with additional safety checks to
ensure operations only process pull requests targeting the main branch.
* Simplified pull request labeling workflow to streamline label
assignment logic.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) kind/backport Categorizes issue or PR as requiring a backport to the current release line kind/backport-previous Categorizes issue or PR as requiring a backport to the previous release line kind/bug Categorizes issue or PR as related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants