Skip to content

Conversation

@clobrano
Copy link
Collaborator

Replace hardcoded 1 billion revision bump with dynamic calculation based on 20% of the last known maxRaftIndex from revision.json.

This aligns with the logic used by cluster-etcd-operator's quorum-restore-pod utility and ensures the bump amount is proportional to the cluster's actual revision state.

The implementation:

  • Adds compute_bump_revision() function with safe fallback to 1bn default
  • Extracts magic values to named constants (ETCD_REVISION_BUMP_PERCENTAGE, ETCD_BUMP_REV_DEFAULT, ETCD_REVISION_JSON)
  • Validates computed values (non-zero, not exceeding default)
  • Logs computation results for debugging

Reference:
https://github.com/openshift/cluster-etcd-operator/blob/215998939f5223da916622c71fd07d17656faf6b/bindata/etcd/quorum-restore-pod.yaml#L26-L34

Replace hardcoded 1 billion revision bump with dynamic calculation based
on 20% of the last known maxRaftIndex from revision.json.

This aligns with the logic used by cluster-etcd-operator's
quorum-restore-pod utility and ensures the bump amount is proportional
to the cluster's actual revision state.

The implementation:
- Adds compute_bump_revision() function with safe fallback to 1bn
  default
- Extracts magic values to named constants
  (ETCD_REVISION_BUMP_PERCENTAGE, ETCD_BUMP_REV_DEFAULT,
  ETCD_REVISION_JSON)
- Validates computed values (non-zero, not exceeding default)
- Logs computation results for debugging

Reference:
https://github.com/openshift/cluster-etcd-operator/blob/215998939f5223da9166
22c71fd07d17656faf6b/bindata/etcd/quorum-restore-pod.yaml#L26-L34
@knet-jenkins
Copy link

knet-jenkins bot commented Oct 21, 2025

Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-2087/1/input

@clobrano clobrano marked this pull request as ready for review October 22, 2025 12:46
@clobrano clobrano requested a review from oalbrigt October 22, 2025 12:46
@knet-jenkins
Copy link

knet-jenkins bot commented Oct 24, 2025

Can one of the project admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-2087/2/input

@oalbrigt oalbrigt merged commit 6a5608f into ClusterLabs:main Oct 28, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants