Skip to content

[os_must_gather] Add exit rc to os-must-gather main task#3643

Open
evallesp wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
evallesp:os-must-gather-return-error
Open

[os_must_gather] Add exit rc to os-must-gather main task#3643
evallesp wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
evallesp:os-must-gather-return-error

Conversation

@evallesp
Copy link
Contributor

With this we allow to run the rescue block. Previously any timeout in the main task would return the code from the echo which was always success.

Also, we're removing from the rescue block the always block. And we've create a always section for finding existing os-must-gather directories and the symlink creation.

Also we've changed the dest-dir for the generic fallback command to match the same folder of the symlink.

Finally, we've parametriced SOS_EDPM as cifmw_os_must_gather_sos_edpm and we've added default value to "all"

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign pkomarov for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

echo "The must gather command did not finish on time!"
echo "{{ shell_cmd_timeout }} seconds was not enough to finish the task."
fi
exit $rc
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that improvement. In rescue block, we can check if it gets 124, and if yes, can do must-gather without SOS. I suggest to not execute similar command if exit code was e.g. 1 or 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack, moving to draft! thanks!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've just added that when clause to the oc adm must-gather command.
Still maintaining the rest of the rescue block without that when clause.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/13b13b3cca114b689ce68b1c964b9265

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 25m 06s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 16m 23s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 38m 28s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 06m 07s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 34s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 13s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 33s
cifmw-molecule-os_must_gather TIMED_OUT in 30m 50s

With this we allow to run the rescue block. Previously any timeout
in the main task would return the code from the echo which was
always success.

Also, we're removing from the rescue block the always block.
And we've create a always section for finding existing os-must-gather
directories and the symlink creation.

Also we've changed the dest-dir for the generic fallback command
to match the same folder of the symlink.

Finally, we've parametriced SOS_EDPM as cifmw_os_must_gather_sos_edpm
and we've added default value to "all"

Signed-off-by: Enrique Vallespi Gil <evallesp@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants