Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ source network.sh
export HUB_DIR=/ibio-gather/hub
mkdir -p ${HUB_DIR}
oc get baremetalhost ostest-extraworker-0 -n openshift-machine-api -o yaml > ${HUB_DIR}/baremetalhost.yaml
oc get dataimage ostest-extraworker-0 -n openshift-machine-api -o yaml > ${HUB_DIR}/dataimage.yaml
oc get clusterdeployment ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/clusterdeployment.yaml
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml
oc logs --tail=-1 -l app=image-based-install-operator -n image-based-install-operator -c manager > ${HUB_DIR}/image-based-install-operator-manager.log
Expand All @@ -36,7 +35,6 @@ export SSH_FLAGS="-n -o IdentityFile=/home/ib-orchestrate-vm/bip-orchestrate-vm/
# even if there is an error connecting to the ibi-host we still want the previous artifacts, so don't fail
ssh ${SSH_FLAGS} core@${IBI_VM_IP} "sudo journalctl -u installation-configuration.service" > ${IBI_HOST_DIR}/installation-configuration.log || true
ssh ${SSH_FLAGS} core@${IBI_VM_IP} "sudo tar -czf - /opt/openshift" > ${IBI_HOST_DIR}/opt-openshift.tar.gz || true
ssh ${SSH_FLAGS} core@${IBI_VM_IP} "sudo mkdir /mnt/config-iso && sudo mount /dev/sr0 /mnt/config-iso && sudo tar -czf - /mnt/config-iso" > ${IBI_HOST_DIR}/config-iso.tar.gz || true

EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ oc get baremetalhost ostest-extraworker-0 -n openshift-machine-api -o yaml > ${A
# in case of an error in deleting the dataimage, we want to see it
oc get dataimage ostest-extraworker-0 -n openshift-machine-api -o yaml > ${ARTIFACT_DIR}/dataimage.yaml || true
oc get clusterdeployment ibi-cluster -n ibi-cluster -o yaml > ${ARTIFACT_DIR}/clusterdeployment.yaml
# in case of an error in deleting the imageclusterinstall, we want to see it
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true
Comment on lines +29 to +30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Write imageclusterinstall.yaml to ${ARTIFACT_DIR} so it is exported.

On Line 30, output goes to ${HUB_DIR}, but Line 36 only tars /ibio-post-gather. This can drop the new artifact from collected results (and if HUB_DIR is unset in this shell, it may write to /imageclusterinstall.yaml).

Suggested fix
-oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true
+oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${ARTIFACT_DIR}/imageclusterinstall.yaml || true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# in case of an error in deleting the imageclusterinstall, we want to see it
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${HUB_DIR}/imageclusterinstall.yaml || true
oc get imageclusterinstall ibi-cluster -n ibi-cluster -o yaml > ${ARTIFACT_DIR}/imageclusterinstall.yaml || true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/image-based-install-operator/post/gather/image-based-install-operator-post-gather-commands.sh`
around lines 29 - 30, The post-gather script writes imageclusterinstall.yaml to
HUB_DIR, which can miss export and may land in the wrong place if HUB_DIR is
unset. Update the image-based-install-operator post/gather command in
image-based-install-operator-post-gather-commands.sh to write the
imageclusterinstall.yaml artifact into ARTIFACT_DIR instead, using the same
artifact-handling pattern as the other collected files so it is included in the
archived results.

oc logs --tail=-1 -l app=image-based-install-operator -n image-based-install-operator -c manager > ${ARTIFACT_DIR}/image-based-install-operator-manager.log
oc logs --tail=-1 -l app=image-based-install-operator -n image-based-install-operator -c server > ${ARTIFACT_DIR}/image-based-install-operator-server.log

Expand Down