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.

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