Skip to content

Commit bc88c2b

Browse files
prb112rh-rahulshetty
authored andcommitted
MULTIARCH-4516: change path to limit redaction (openshift#49884)
* MULTIARCH-4516: change path to limit redaction Signed-off-by: Paul Bastide <[email protected]> * MULTIARCH-4516: change path to limit redaction Signed-off-by: Paul Bastide <[email protected]> --------- Signed-off-by: Paul Bastide <[email protected]>
1 parent 5936038 commit bc88c2b

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

ci-operator/step-registry/upi/deprovision/heterogeneous/vpc/upi-deprovision-heterogeneous-vpc-commands.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ NO_OF_RETRY=${NO_OF_RETRY:-"3"}
4545

4646
function retry {
4747
cmd=$1
48-
for i in $(seq 1 "$NO_OF_RETRY"); do
49-
echo "Attempt: $i/$NO_OF_RETRY"
48+
for retry in $(seq 1 "$NO_OF_RETRY"); do
49+
echo "Attempt: $retry/$NO_OF_RETRY"
5050
ret_code=0
5151
$cmd || ret_code=$?
5252
if [ $ret_code = 0 ]; then
5353
break
54-
elif [ "$i" == "$NO_OF_RETRY" ]; then
54+
elif [ "$retry" == "$NO_OF_RETRY" ]; then
5555
error_handler "All retry attempts failed! Please try running the script again after some time" $ret_code
5656
else
5757
sleep 30

ci-operator/step-registry/upi/deprovision/powervs/cluster/upi-deprovision-powervs-cluster-commands.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ NO_OF_RETRY=${NO_OF_RETRY:-"5"}
3737

3838
function retry {
3939
cmd=$1
40-
for i in $(seq 1 "$NO_OF_RETRY"); do
41-
echo "Attempt: $i/$NO_OF_RETRY"
40+
for retry in $(seq 1 "$NO_OF_RETRY"); do
41+
echo "Attempt: $retry/$NO_OF_RETRY"
4242
ret_code=0
4343
$cmd || ret_code=$?
4444
if [ $ret_code = 0 ]; then
4545
break
46-
elif [ "$i" == "$NO_OF_RETRY" ]; then
46+
elif [ "$retry" == "$NO_OF_RETRY" ]; then
4747
error_handler "All retry attempts failed! Please try running the script again after some time" $ret_code
4848
else
4949
sleep 30

ci-operator/step-registry/upi/install/heterogeneous/vpc/upi-install-heterogeneous-vpc-commands.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ NO_OF_RETRY=${NO_OF_RETRY:-"3"}
6565

6666
function retry {
6767
cmd=$1
68-
for i in $(seq 1 "$NO_OF_RETRY"); do
69-
echo "Attempt: $i/$NO_OF_RETRY"
68+
for retry in $(seq 1 "$NO_OF_RETRY"); do
69+
echo "Attempt: $retry/$NO_OF_RETRY"
7070
ret_code=0
7171
$cmd || ret_code=$?
7272
if [ $ret_code = 0 ]; then
7373
break
74-
elif [ "$i" == "$NO_OF_RETRY" ]; then
74+
elif [ "$retry" == "$NO_OF_RETRY" ]; then
7575
error_handler "All retry attempts failed! Please try running the script again after some time" $ret_code
7676
else
7777
sleep 30

ci-operator/step-registry/upi/install/powervs/cluster/upi-install-powervs-cluster-commands.sh

+19-19
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ echo "${POWERVS_REGION}" > "${SHARED_DIR}"/POWERVS_REGION
5454
echo "${POWERVS_ZONE}" > "${SHARED_DIR}"/POWERVS_ZONE
5555
echo "${VPC_REGION}" > "${SHARED_DIR}"/VPC_REGION
5656
echo "${VPC_ZONE}" > "${SHARED_DIR}"/VPC_ZONE
57-
echo "POWERVS_REGION:- ${POWERVS_REGION}"
58-
echo "POWERVS_ZONE:- ${POWERVS_ZONE}"
59-
echo "VPC_REGION:- ${VPC_REGION}"
60-
echo "VPC_ZONE:- ${VPC_ZONE}"
57+
# Dev Note: this may be triggering redaction.
58+
# echo "POWERVS_REGION:- ${POWERVS_REGION}"
59+
# echo "POWERVS_ZONE:- ${POWERVS_ZONE}"
60+
# echo "VPC_REGION:- ${VPC_REGION}"
61+
# echo "VPC_ZONE:- ${VPC_ZONE}"
6162
export POWERVS_REGION
6263
export POWERVS_ZONE
6364
export VPC_REGION
@@ -72,13 +73,13 @@ NO_OF_RETRY=${NO_OF_RETRY:-"5"}
7273
7374
function retry {
7475
cmd=$1
75-
for i in $(seq 1 "$NO_OF_RETRY"); do
76-
echo "Attempt: $i/$NO_OF_RETRY"
76+
for retry in $(seq 1 "$NO_OF_RETRY"); do
77+
echo "Attempt: $retry/$NO_OF_RETRY"
7778
ret_code=0
7879
$cmd || ret_code=$?
7980
if [ $ret_code = 0 ]; then
8081
break
81-
elif [ "$i" == "$NO_OF_RETRY" ]; then
82+
elif [ "$retry" == "$NO_OF_RETRY" ]; then
8283
error_handler "All retry attempts failed! Please try running the script again after some time" $ret_code
8384
else
8485
sleep 30
@@ -158,13 +159,13 @@ EOF
158159
159160
function create_upi_powervs_cluster() {
160161
cd "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/ || true
161-
./openshift-install-powervs create -var-file var-mac-upi.tfvars -verbose || true
162+
# Dev Note: https://github.com/ocp-power-automation/openshift-install-power/blob/devel/openshift-install-powervs#L767C1-L767C145
163+
# May trigger the redaction
164+
./openshift-install-powervs create -var-file var-mac-upi.tfvars -verbose | sed '/.*client-certificate-data*/d; /.*token*/d; /.*client-key-data*/d; /- name: /d' || true
162165
cp "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/automation/terraform.tfstate "${SHARED_DIR}"/terraform-mac-upi.tfstate
163166
./openshift-install-powervs output > "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/mac-upi-output
164167
./openshift-install-powervs access-info > "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/mac-upi-access-info
165168
# Dev Note: the following two lines may be causing the redaction routine to remove the log
166-
# cat "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/mac-upi-output
167-
# cat "${IBMCLOUD_HOME_FOLDER}"/ocp-install-dir/mac-upi-access-info
168169
./openshift-install-powervs output bastion_private_ip | tr -d '"' > "${SHARED_DIR}"/BASTION_PRIVATE_IP
169170
./openshift-install-powervs output bastion_public_ip | tr -d '"' > "${SHARED_DIR}"/BASTION_PUBLIC_IP
170171
@@ -282,7 +283,6 @@ function cleanup_ibmcloud_powervs() {
282283
for COUNT in $(seq 0 5)
283284
do
284285
FIND=$(ic pi workspace ls 2> /dev/null | grep "${CRN}" || true)
285-
echo "FIND: ${FIND}"
286286
if [ -z "${FIND}" ]
287287
then
288288
echo "service-instance is deprovisioned"
@@ -340,13 +340,13 @@ function create_powervs_workspace() {
340340
341341
##Create a Workspace on a Power Edge Router enabled PowerVS zone
342342
# Dev Note: uses a custom loop since we want to redirect errors
343-
for i in $(seq 1 "$NO_OF_RETRY"); do
344-
echo "Attempt: $i/$NO_OF_RETRY"
343+
for retry in $(seq 1 "$NO_OF_RETRY"); do
344+
echo "Attempt: $retry/$NO_OF_RETRY"
345345
ret_code=0
346346
ic pi workspace create "${workspace_name}" --datacenter "${POWERVS_ZONE}" --group "${RESOURCE_GROUP_ID}" --plan public 2>&1 || ret_code=$?
347347
if [ $ret_code = 0 ]; then
348348
break
349-
elif [ "$i" == "$NO_OF_RETRY" ]; then
349+
elif [ "$retry" == "$NO_OF_RETRY" ]; then
350350
error_handler "All retry attempts failed! Please try running the script again after some time" $ret_code
351351
else
352352
sleep 30
@@ -377,7 +377,7 @@ function create_powervs_workspace() {
377377
do
378378
WS_COUNTER=$((WS_COUNTER+1))
379379
TEMP_STATE="$(ic pi workspace get "${POWERVS_SERVICE_INSTANCE_ID}" --json 2> /dev/null | jq -r '.status')"
380-
echo "Current State is: ${TEMP_STATE}"
380+
echo "pvs workspace state: ${TEMP_STATE}"
381381
echo ""
382382
if [ "${TEMP_STATE}" == "active" ]
383383
then
@@ -439,7 +439,7 @@ function create_transit_gateway() {
439439
do
440440
TGW_COUNTER=$((TGW_COUNTER+1))
441441
TEMP_STATE="$(ic tg gw "${TGW_ID}" --output json 2> /dev/null | jq -r '.status')"
442-
echo "Current State is: ${TEMP_STATE}"
442+
echo "tg state: ${TEMP_STATE}"
443443
echo ""
444444
if [ "${TEMP_STATE}" == "available" ]
445445
then
@@ -470,7 +470,7 @@ function create_vpc() {
470470
do
471471
VPC_COUNTER=$((VPC_COUNTER+1))
472472
TEMP_STATE="$(ic is vpc "${vpc_name}" --output json 2> /dev/null | jq -r '.status')"
473-
echo "Current State is: ${TEMP_STATE}"
473+
echo "vpc state: ${TEMP_STATE}"
474474
echo ""
475475
if [ "${TEMP_STATE}" == "available" ]
476476
then
@@ -513,7 +513,7 @@ function create_vpc() {
513513
do
514514
TGW_PER_COUNTER=$((TGW_PER_COUNTER+1))
515515
TEMP_STATE="$(ic tg connection "${TGW_ID}" "${TGW_PER_ID}" --output json 2> /dev/null | jq -r '.status')"
516-
echo "Current State is: ${TEMP_STATE}"
516+
echo "tg connection state: ${TEMP_STATE}"
517517
echo ""
518518
if [ "${TEMP_STATE}" == "attached" ]
519519
then
@@ -542,7 +542,7 @@ function create_vpc() {
542542
do
543543
TGW_VPC_COUNTER=$((TGW_VPC_COUNTER+1))
544544
TEMP_STATE="$(ic tg connection "${TGW_ID}" "${TGW_VPC_ID}" --output json 2> /dev/null | jq -r '.status')"
545-
echo "Current State is: ${TEMP_STATE}"
545+
echo "tg connection state: ${TEMP_STATE}"
546546
echo ""
547547
if [ "${TEMP_STATE}" == "attached" ]
548548
then

0 commit comments

Comments
 (0)