Skip to content

OCPBUGS-84695: podman-etcd single-node cluster handling and transitions#2155

Open
jaypoulz wants to merge 1 commit into
ClusterLabs:mainfrom
jaypoulz:single-node-support
Open

OCPBUGS-84695: podman-etcd single-node cluster handling and transitions#2155
jaypoulz wants to merge 1 commit into
ClusterLabs:mainfrom
jaypoulz:single-node-support

Conversation

@jaypoulz

@jaypoulz jaypoulz commented Apr 30, 2026

Copy link
Copy Markdown

OCPBUGS-84695: fix(podman-etcd): single-node cluster handling and transitions

Add comprehensive single-node cluster support to podman-etcd resource agent,
including initial deployment, restart scenarios, and transitions between
single-node and two-node configurations.

This PR works in tandem with openshift/cluster-etcd-operator#1605

Changes:

  • Add is_single_node() helper function for clean single-node detection
  • Handle single-node mode in peer management (clean up learners, set standalone_node)
  • Set standalone_node during single-node start to mark standalone state
  • Fix monitor path to set standalone_node during two-node to single-node transitions
  • Clean up learner members during 2→1 node transitions in monitor path
  • Fix restart failures by skipping revision comparison when no peer exists
  • Ensure standalone_node attribute is properly maintained across all transitions

Fixes restart failures, 2→1 node transitions, and initial single-node deployments.

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

@knet-jenkins

knet-jenkins Bot commented Apr 30, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/1/input

@jaypoulz jaypoulz marked this pull request as draft April 30, 2026 20:43
@jaypoulz jaypoulz changed the title podman-etcd single-node cluster handling and transitions OCPBUGS-84695: podman-etcd single-node cluster handling and transitions Apr 30, 2026
@jaypoulz jaypoulz force-pushed the single-node-support branch 2 times, most recently from 2d74c72 to 7e16970 Compare April 30, 2026 20:57
@knet-jenkins

knet-jenkins Bot commented Apr 30, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/3/input

@jaypoulz jaypoulz force-pushed the single-node-support branch from 7e16970 to 4d7a89a Compare May 1, 2026 14:21
@knet-jenkins

knet-jenkins Bot commented May 1, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/4/input

@jaypoulz jaypoulz force-pushed the single-node-support branch from 4d7a89a to dde2aa5 Compare May 1, 2026 14:41
@knet-jenkins

knet-jenkins Bot commented May 1, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/5/input

@jaypoulz jaypoulz force-pushed the single-node-support branch from dde2aa5 to 0d09525 Compare May 1, 2026 14:49
@knet-jenkins

knet-jenkins Bot commented May 1, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/6/input

@jaypoulz

jaypoulz commented May 1, 2026

Copy link
Copy Markdown
Author

Proof of the rabbit:

(default) jpoulin@fedora:~/Projects/jaypoulz/resource-agents$ coderabbit review --base 1fea31887ae44d0fda288bed1d7d225c9895318c
╔═══════════════════════════════════════════╗
║                                           ║
║   New update available! 0.4.3 -> 0.4.4    ║
║          Run: coderabbit update           ║
║                                           ║
╚═══════════════════════════════════════════╝

Starting CodeRabbit review in plain text mode...

Review directory: /home/jpoulin/Projects/jaypoulz/resource-agents

Connecting to review service
Setting up
Summarizing
Reviewing

Review completed: No findings ✔

@jaypoulz jaypoulz marked this pull request as ready for review May 1, 2026 14:52
@jaypoulz jaypoulz force-pushed the single-node-support branch from 0d09525 to c097465 Compare May 1, 2026 14:55
@knet-jenkins

knet-jenkins Bot commented May 1, 2026

Copy link
Copy Markdown

Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2155/7/input

…sitions

Add comprehensive single-node cluster support to podman-etcd resource agent,
including initial deployment, restart scenarios, and transitions between
single-node and two-node configurations.

Changes:
- Add is_single_node() helper function for clean single-node detection
- Handle single-node mode in peer management (clean up learners, set standalone_node)
- Set standalone_node during single-node start to mark standalone state
- Fix monitor path to set standalone_node during two-node to single-node transitions
- Clean up learner members during 2→1 node transitions in monitor path
- Fix restart failures by skipping revision comparison when no peer exists
- Ensure standalone_node attribute is properly maintained across all transitions

Fixes restart failures, 2→1 node transitions, and initial single-node deployments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jaypoulz jaypoulz force-pushed the single-node-support branch from c097465 to a1290c6 Compare May 29, 2026 20:16
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.

1 participant