Skip to content

Conversation

@MayXuQQ
Copy link
Contributor

@MayXuQQ MayXuQQ commented Feb 17, 2023

CORS-2557 CI Integration: [ibmcloud] Add support to validate and utilize a networkResourceGroupName install-config.yaml option and configure that value in Infrastructure's PlatformStatus for IBM Cloud
Prow CI ibmcloud-ipi-private all failed after [openshift/installer#6613: CORS-2386: IBMCloud: Add networkResourceGroupName](openshift/installer#6613)
https://qe-private-deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gs/qe-private-deck/logs/periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7/1626441733703208960

level=error msg=failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: platform.ibmcloud.networkResourceGroupName: Invalid value: "": networkResourceGroupName cannot be empty when providing a vpcName: ci-op-433mwgm2-eef7e-vpc

@openshift-ci openshift-ci bot requested review from dgoodwin and xueqzhan February 17, 2023 17:24
@openshift-ci-robot
Copy link
Contributor

@MayXuQQ: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7 N/A periodic Registry content changed
periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7 N/A periodic Registry content changed
periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud N/A periodic Registry content changed
periodic-ci-openshift-verification-tests-master-installer-rehearse-4.12-installer-rehearse-ibmcloud N/A periodic Registry content changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 10 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 20 rehearsals
Comment: /pj-rehearse max to run up to 35 rehearsals
Comment: /pj-rehearse auto-ack to run up to 10 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse refresh to get an updated list of affected jobs (useful if you have new pushes to the branch)

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 17, 2023
@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 17, 2023

/pj-rehearse

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.12-installer-rehearse-ibmcloud
/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7
/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.12-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/retest

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/retest

1 similar comment
@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/retest

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 20, 2023

@cjschaef Could you help look at the changes, thanks a lot.

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

@jianlinliu thanks

delete_vpc "${vpc_name}"

echo "DEBUG" "Removing the resource reclamations ..."
set +o errexit
${IBMCLOUD_CLI} resource reclamations | awk '(NR>4) {print $1}' | xargs -n1 ibmcloud resource reclamation-delete -f
Copy link
Contributor

@jianlinliu jianlinliu Feb 21, 2023

Choose a reason for hiding this comment

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

This commands will be always executed, even the resources are not created by this install workflow? I think this command is out of scope.

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

step installer-rehearse-ibmcloud-ipi-deprovision-deprovision failed is caused by OCPBUGS-7511

echo "DEBUG" "Removing the resource reclamations ..."
hasReclamations=$("${IBMCLOUD_CLI}" resource reclamations | awk '(NR==4) {print $1}')
if [ "${hasReclamations}" != "No" ]; then
${IBMCLOUD_CLI} resource reclamations | awk '(NR>4) {print $1}' | xargs -n1 ibmcloud resource reclamation-delete -f
Copy link
Contributor

@jianlinliu jianlinliu Feb 21, 2023

Choose a reason for hiding this comment

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

My point is not deleting the reclamations resources irrelevant with the installed cluster, or even we can keep the issue remaining, but run the commands locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the reclamations will block cleanup the resource group, then the step will failed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me confirm, will the command will delete all the reclamations, even not be created from this cluster install, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will delete the reclamations under the resource group (the vpc created under this group)

Copy link
Contributor

Choose a reason for hiding this comment

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

If that, I think you do not need the line to check:

hasReclamations=$("${IBMCLOUD_CLI}" resource reclamations | awk '(NR==4) {print $1}')

And I think the removal of reclamations should happen prior to delete_vpc.

Copy link
Contributor

@jianlinliu jianlinliu Feb 21, 2023

Choose a reason for hiding this comment

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

Let us finish the discussion of adding how many reclamation-delete commands here, I am okay with your present code. Now the only comment is #36512 (comment), we do not need the checking line of hasReclamations=$("${IBMCLOUD_CLI}" resource reclamations | awk '(NR==4) {print $1}') .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when no reclamations, the reclamation-delete will caused error.
$ ic resource reclamations | awk '(NR==4) {print $1}'
No
$ ic resource reclamations | awk '(NR==4) {print $1}'| xargs -n1 ibmcloud resource reclamation-delete -f
Submitting request to delete resource reclamation No under account fdc2e14cf8bc4d53a67f972dc2e2c861 as ServiceId-dff277a9-b608-410a-ad24-c544e59e3778...
FAILED
Resource reclamation 'No' was not found.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you show me an example output when reclamations are existing?

Copy link
Contributor

@jianlinliu jianlinliu Feb 21, 2023

Choose a reason for hiding this comment

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

 ic resource reclamations | awk '(NR==4) {print $1}'| xargs -n1 ibmcloud resource reclamation-delete -f

Do you mean only the resources shown on 4th line will be deleted?
If there are multiple lines for reclamations resources, how to deal with?

Copy link
Contributor

Choose a reason for hiding this comment

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

To easy reading for the code, I think it should be:

echo "DEBUG" "Removing the resource reclamations ..."
if [[ $(ibmcloud resource reclamations -q) == "No reclamation found" ]]; then
  echo "No reclamation found"
else
  ${IBMCLOUD_CLI} resource reclamations -q |  awk '{print $1}' | xargs -n1 ibmcloud resource reclamation-delete -f
fi

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

/auto-cc

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7

@MayXuQQ MayXuQQ force-pushed the ibm-CORS-2557 branch 2 times, most recently from 9261f75 to 2c839fe Compare February 21, 2023 14:42
@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 21, 2023

/pj-rehearse periodic-ci-openshift-verification-tests-master-installer-rehearse-4.13-installer-rehearse-ibmcloud

@MayXuQQ
Copy link
Contributor Author

MayXuQQ commented Feb 22, 2023

@jianlinliu how about merging the PR, then check periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-ibmcloud-ipi-private-fips-p2-f7 whether has regression in e2e test?

if [[ $("${IBMCLOUD_CLI}" resource reclamations -q) == "No reclamation found" ]]; then
echo "No reclamation found"
else
${IBMCLOUD_CLI} resource reclamations -q | awk '(NR>1) {print $1}' | xargs -n1 ibmcloud resource reclamation-delete -f
Copy link
Contributor

Choose a reason for hiding this comment

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

When already added -q option, still need (NR>1) in awk ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you show me an example output when reclamations are existing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reclamation-delete succeed
the first row is "ID" ( ${IBMCLOUD_CLI} resource reclamations|awk '(NR>3) {print $1}') so got is

Submitting request to delete resource reclamation ID under account fdc2e14cf8bc4d53a67f972dc2e2c861 as ServiceId-dff277a9-b608-410a-ad24-c544e59e3778...
FAILED

@jianlinliu
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jianlinliu, MayXuQQ

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

The pull request process is described 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

@jianlinliu
Copy link
Contributor

/pj-rehearse ack

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 22, 2023
@openshift-merge-robot openshift-merge-robot merged commit 669d65c into openshift:master Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants