Skip to content

Updating main.yaml to get the correct output from oc get hc command - #506

Open
shallike wants to merge 2 commits into
IBM:mainfrom
shallike:patch-1
Open

Updating main.yaml to get the correct output from oc get hc command#506
shallike wants to merge 2 commits into
IBM:mainfrom
shallike:patch-1

Conversation

@shallike

Copy link
Copy Markdown

Adding changes to get the right output for oc get hc command

Adding changes to get the right output for oc get hc command
@shallike

Copy link
Copy Markdown
Author

FAILED - RETRYING: [bastion_hcp]: Wait for Hosted Control Plane to Complete (2 retries left).
FAILED - RETRYING: [bastion_hcp]: Wait for Hosted Control Plane to Complete (1 retries left).
fatal: [bastion_hcp]: FAILED! => {"attempts": 60, "changed": true, "cmd": "oc get hc -n kvm --no-headers | awk '{print $4}'", "delta": "0:00:00.127855", "end": "2026-06-17 08:24:04.866526", "msg": "", "rc": 0, "start": "2026-06-17 08:24:04.738671", "stderr": "", "stderr_lines": [], "stdout": "hosted-cluster-admin-kubeconfig", "stdout_lines": ["hosted-cluster-admin-kubeconfig"]}

This particular code is returning hosted-cluster-admin-kubeconfig as the output instead of Completed.
So instead of hosted-cluster-admin-kubeconfig, it should point to Completed , and because of that playbook is failing.

@shallike shallike changed the title Update main.yaml Updating main.yaml to get the correct output from oc get hc command Jun 18, 2026

- name: Wait for Hosted Control Plane to Complete
shell: oc get hc -n {{ hcp.control_plane.clusters_namespace }} --no-headers | awk '{print $4}'
shell: oc get hc -n {{ hcp.control_plane.clusters_namespace }} --no-headers | awk '{print $5}'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @shallike
From which OCP/MCE version this change is applicable ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @veera-damisetti ,
I am seeing this from 4.22.0 OCP version and MCE version 2.17

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @veera-damisetti ,
does this PR need any more changes or is it ok to merge??

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes @shallike
This changes might cause failure for older versions.
Better to have a version based check , or try to get status from json.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@github-actions

Copy link
Copy Markdown

🔔 Stale PR Notice

This pull request has been automatically marked as stale because it has not had any activity for 30 days.

To remove the stale label, do any of the following:

  • 💬 Comment on this PR with an update
  • 📝 Push new commits to the branch
  • 🏷️ Add a protective label (right sidebar → Labels → select one): keep-open, in-progress, or blocked

⚠️ If no activity occurs, this PR may be marked for closure after 6 months of total inactivity.

@github-actions github-actions Bot added the Stale label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants