From 0de48dc81c60ae8db6478fec322a9d9d76fe5d8c Mon Sep 17 00:00:00 2001 From: Jose Castillo Lema Date: Fri, 5 Sep 2025 12:02:57 +0200 Subject: [PATCH 1/5] [PERFSCALE-4126] Improve SSM description Signed-off-by: Jose Castillo Lema --- ...hift-qe-installer-bm-self-sched-commands.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh index 450cd9c2f6527..f902a39307467 100644 --- a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh +++ b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh @@ -40,11 +40,19 @@ fi # Create self scheduling assignment echo echo "Create self scheduling assignment ..." -if [ -z "${VLAN_ID}" ]; then - CLOUD_OUTPUT=$(curl -fsSk -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"description": "Temporary allocation from openshift-ci", "owner": "metal-perfscale-cpt", "qinq": 1, "wipe": "true"}' $QUADS_INSTANCE/api/v3/assignments/self) -else - CLOUD_OUTPUT=$(curl -fsSk -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"description": "Temporary allocation from openshift-ci", "owner": "metal-perfscale-cpt", "qinq": 1, "vlan": "'"$VLAN_ID"'", "wipe": "true"}' $QUADS_INSTANCE/api/v3/assignments/self) -fi + +CLOUD_OUTPUT=$(curl -fsSk -X POST \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + "description":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$JOB_NAME-$PULL_TITLE-$PULL_NUMBER\", + "owner": "metal-perfscale-cpt", + "qinq": 1, + $([ -n \"$VLAN_ID\" ] && echo "\"vlan\":\"$VLAN_ID\",") + "wipe": "true" + }" \ + "$QUADS_INSTANCE/api/v3/assignments/self") + echo $CLOUD_OUTPUT | jq . CLOUD=$(echo $CLOUD_OUTPUT | jq -r .'cloud.name') echo "The cloud name is: $CLOUD" From 70e433d8fe61245183d7d22c51e254ffe7eac572 Mon Sep 17 00:00:00 2001 From: Jose Castillo Lema Date: Fri, 5 Sep 2025 12:04:45 +0200 Subject: [PATCH 2/5] Better readability Signed-off-by: Jose Castillo Lema --- .../self-sched/openshift-qe-installer-bm-self-sched-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh index f902a39307467..9aafaa2e6601f 100644 --- a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh +++ b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh @@ -48,7 +48,7 @@ CLOUD_OUTPUT=$(curl -fsSk -X POST \ "description":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$JOB_NAME-$PULL_TITLE-$PULL_NUMBER\", "owner": "metal-perfscale-cpt", "qinq": 1, - $([ -n \"$VLAN_ID\" ] && echo "\"vlan\":\"$VLAN_ID\",") + $([ -n \"$VLAN_ID\" ] && echo "vlan": \"$VLAN_ID\") "wipe": "true" }" \ "$QUADS_INSTANCE/api/v3/assignments/self") From 93942e7091e317ca6dfb6b12478d3f73cccaef30 Mon Sep 17 00:00:00 2001 From: Jose Castillo Lema Date: Fri, 5 Sep 2025 12:27:02 +0200 Subject: [PATCH 3/5] Fix bash Signed-off-by: Jose Castillo Lema --- .../openshift-qe-installer-bm-self-sched-commands.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh index 9aafaa2e6601f..501dbf781f9e6 100644 --- a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh +++ b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh @@ -45,12 +45,11 @@ CLOUD_OUTPUT=$(curl -fsSk -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d "{ - "description":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$JOB_NAME-$PULL_TITLE-$PULL_NUMBER\", - "owner": "metal-perfscale-cpt", - "qinq": 1, - $([ -n \"$VLAN_ID\" ] && echo "vlan": \"$VLAN_ID\") - "wipe": "true" - }" \ + \"description\":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$JOB_NAME-$PULL_TITLE-$PULL_NUMBER\", + \"owner\":\"metal-perfscale-cpt\", + \"qinq\":1, + $([ -n "$VLAN_ID" ] && echo "\"vlan\":\"$VLAN_ID\",") + \"wipe\":\"true\"}" \ "$QUADS_INSTANCE/api/v3/assignments/self") echo $CLOUD_OUTPUT | jq . From 7505f7fb2e68f7a078fd8366273621575ba408b0 Mon Sep 17 00:00:00 2001 From: Jose Castillo Lema Date: Fri, 5 Sep 2025 12:47:51 +0200 Subject: [PATCH 4/5] Enable trace mode Signed-off-by: Jose Castillo Lema --- .../self-sched/openshift-qe-installer-bm-self-sched-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh index 501dbf781f9e6..c5315c8dbe8ac 100644 --- a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh +++ b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh @@ -40,7 +40,7 @@ fi # Create self scheduling assignment echo echo "Create self scheduling assignment ..." - +set -x CLOUD_OUTPUT=$(curl -fsSk -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ From ade4a59ccbcb58a86c9c21cda953567894da6ca4 Mon Sep 17 00:00:00 2001 From: Jose Castillo Lema Date: Fri, 5 Sep 2025 13:54:59 +0200 Subject: [PATCH 5/5] Shorten description Signed-off-by: Jose Castillo Lema --- .../openshift-qe-installer-bm-self-sched-commands.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh index c5315c8dbe8ac..13a1806926000 100644 --- a/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh +++ b/ci-operator/step-registry/openshift-qe/installer/bm/self-sched/openshift-qe-installer-bm-self-sched-commands.sh @@ -40,12 +40,12 @@ fi # Create self scheduling assignment echo echo "Create self scheduling assignment ..." -set -x +set -x CLOUD_OUTPUT=$(curl -fsSk -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d "{ - \"description\":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$JOB_NAME-$PULL_TITLE-$PULL_NUMBER\", + \"description\":\"Temporary allocation from openshift-ci: $REPO_OWNER-$REPO_NAME-$JOB_TYPE-$PULL_NUMBER\", \"owner\":\"metal-perfscale-cpt\", \"qinq\":1, $([ -n "$VLAN_ID" ] && echo "\"vlan\":\"$VLAN_ID\",")