From f870e01ef9ac98fd0f16d0a423b26b6ac580cc2d Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Fri, 10 Oct 2025 14:54:32 -0500 Subject: [PATCH 01/10] adding logic to give more details on version of rhocs Signed-off-by: Natalia Jordan --- openshift-install-powervs | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/openshift-install-powervs b/openshift-install-powervs index f33c89b..a609372 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -159,6 +159,68 @@ function output { $TF output "$output_var" } +#------------------------------------------------------------------------- +# Check for required environment variables and display helpful information +#------------------------------------------------------------------------- +function check_required_env_vars { + missing_vars=0 + + log "Checking required environment variables..." + + # Check IBMCLOUD_API_KEY + if [[ -z "${IBMCLOUD_API_KEY}" ]]; then + warn "IBMCLOUD_API_KEY is not set" + echo " Description: IBM Cloud API key for authentication" + echo " How to set: export IBMCLOUD_API_KEY='your-api-key-here'" + echo "" + missing_vars=1 + fi + + # Check RELEASE_VER (optional but recommended) + if [[ -z "${RELEASE_VER}" ]]; then + warn "RELEASE_VER is not set (will use default: 4.15 type 4.15 if you want to use defualt elsee export correct rhcos version)" + echo " Description: OpenShift release version to install" + echo " Default: 4.15" + echo " How to set: export RELEASE_VER='4.16'" + echo "" + missing_vars=1 + else + log "Using RHCOS release version: ${RELEASE_VER}, to change run export RELEASE_VER=''" + fi + + # Check RHEL_SUBS_PASSWORD (optional) + if [[ -z "${RHEL_SUBS_PASSWORD}" ]]; then + warn "RHEL_SUBS_PASSWORD is not set" + echo " Description: RHEL subscription password for bastion nodes" + echo " Note: You can provide this during the 'variables' prompt or set it now" + echo " How to set: export RHEL_SUBS_PASSWORD='your-password-here'" + echo "" + fi + + # Check NO_OF_RETRY (optional) + if [[ -z "${NO_OF_RETRY}" ]]; then + log "NO_OF_RETRY not set (using default: 5)" + else + log "Using retry count: ${NO_OF_RETRY}" + fi + + # Check ARTIFACTS_VERSION (optional) + if [[ -z "${ARTIFACTS_VERSION}" ]]; then + log "ARTIFACTS_VERSION not set (using default: main)" + else + log "Using artifacts version: ${ARTIFACTS_VERSION}" + fi + + echo "" + + if [[ $missing_vars -eq 1 ]]; then + error "Required environment variables are missing. Please set them and try again." + fi + + success "Environment variable check completed" +} + + #------------------------------------------------------------------------- # Util for retrying any command, special case for curl downloads #------------------------------------------------------------------------- @@ -1694,6 +1756,9 @@ function main { [[ -z "$ACTION" ]] && help platform_checks + if [[ "$ACTION" != "help" ]]; then + check_required_env_vars + fi setup_tools case "$ACTION" in From 0f85b69f394cecd90925cb811f29d77b6a944737 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Mon, 13 Oct 2025 16:54:48 -0500 Subject: [PATCH 02/10] addinng a troubleshooting document and updating readme accordingly Signed-off-by: Natalia Jordan --- README.md | 2 + docs/troubleShooting.md | 189 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 docs/troubleShooting.md diff --git a/README.md b/README.md index 1ce1eab..56df6ce 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ You'll need to place the file in the install directory and name it as **pull-sec ``` +**Note**: If you encounter terraform-related errors during the create command, see ["Known Issues & Troubleshooting"](https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md) and ["TroubleShooting Document"](docs/troubleShooting.md) + ## Advanced Usage Before running the script, you may choose to override some environment variables as per your requirement. diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md new file mode 100644 index 0000000..059516e --- /dev/null +++ b/docs/troubleShooting.md @@ -0,0 +1,189 @@ + +# OpenShift on IBM PowerVS: Common Issues and Resolutions + +This document lists common issues encountered when deploying OpenShift on IBM PowerVS using the `openshift-install-powervs` wrapper, along with their causes and resolutions. + +--- + +## Terraform Stored Resource IDs + +**Error:** + +Error: cannot find resource with id + +**Cause:** +Terraform retains deleted PowerVS resource IDs in its state or backup files. This often occurs after a Terraform rerun when instances or resources have changed in PowerVS. + + +**Resolution:** + +Search for the stale ID in Terraform state or backup files: + +```bash +grep -R "" . +``` + +Remove stale state entries: + +```bash + +terraform state rm +``` + +Re-run the apply: + +```bash +terraform apply +``` + +To rebuild specific worker or master nodes: + +```bash + +terraform taint module.nodes.ibm_pi_instance.worker[0] +terraform apply +``` + +## Bastion Node OS Compatibility + +If getting errors regarding missing packages or incorrect storage type while using CentOS 10, switch to CentOS Stream 9 to avoid missing package errors or volume type mismatches. + +Common Issues and Fixes + +Missing Required Packages (e.g. Ansible) + +**Error**: +Missing ansible or dependency packages during setup. + +**Resolution**: +SSH into the bastion node using the generated key: +ssh -i id_rsa root@ +sudo dnf install ansible + +- note: you can also import using python and pip, if the above does not work. + +**Error** +Incorrect Storage Type (e.g. "nfs" not recognized) + +Error: "pi_volume_type" must contain a value from ["ssd", "standard", "tier1", "tier3"], got "" + + +**Resolution**: +Edit your variables.tf or corresponding .tfvars file: +bastion_storage_type = "tier3" + +- if needed change the defautlt bastion_storage_type in variables.tf to the storage type you desire +- note you can easly find this by hitting CTRL + W and searching for `bastion_storage_type` + + +## Re-installation / Network Name Conflict + +**Error:** + +Error: Network with name "ocp-net" already exists. + + +**Cause:** +On a subsequent UPI install attempt, Terraform tries to create a network with the same name that already exists. +PowerVS does not allow duplicate network names—even if the old network is inactive. + +**Resolution:** + +- Log into your PowerVS workspace. + +- Delete or rename the existing ocp-net network or subnet. + +- Re-run the installer: +```bash + terraform apply ./openshift-install-powervs create +``` + +⚠️ Renaming networks automatically is not recommended—it can lead to subnet sprawl and degraded performance. + +## Remote-Exec Provisioning Errors + +**Error:** + +Terraform remote-exec provisioner failures + + +Cause: +These are transient SSH or remote-execution issues that occur during provisioning. + +Resolution: +Re-run Terraform: + +terraform apply + + +This typically resolves the issue automatically. +See ocp4-upi-powervs known issues for more details. ["OCP Known issues"]((https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md)) + +5. LPAR in WARNING State + +Error: + +Error: the operation cannot be performed when the lpar health in the WARNING State + + +Cause: +Terraform cannot modify instances whose PowerVS LPAR health is in WARNING state. +This often occurs after partial provisioning, failed networking setup, or API timeouts. + +Resolution: + +Check instance health: +```bash + +ibmcloud pi instance get +``` + + +**Note**: Due to RSCT daemon not being available for RHCOS, RHCOS instances in dashboard can show "Warning" Status, ignore this! + +In console reboot instances by OS shutting down the instance, then restarting + +To rebuild only specific nodes: +```bash + +terraform taint module.nodes.ibm_pi_instance.master[1] +terraform taint module.nodes.ibm_pi_instance.worker[0] +terraform apply +``` + +## Missing or Outdated Images (RHEL / RHCOS) + +**Error:** + +Error: failed to perform Get Image Operation for image rhcos-4.15 +[pcloudCloudinstancesImagesGetNotFound] image does not exist. ID: rhcos-4.12 + +**Cause:** +Terraform and the PowerVS provider reference image names (e.g. rhcos-4.15, rhel-8.3) that may not exist in your workspace. +The wrapper may also use the RHEL version for RHCOS images by mistake. + +**Resolution:** + +Option 1 — Import Pre-built Images + +Use pre-built RHCOS and RHEL OVA images from IBM’s public repository. +See Christy Norman’s blog + for steps. ["Blog"](https://community.ibm.com/community/user/blogs/christy-norman/2024/08/06/import-pre-built-red-hat-coreos-ovas-into-powervs) + +Option 2 — Update variables.tf + +Set available image names manually: +```bash + +variable "rhel_image_name" { + default = "rhel-8.9" +} + +variable "rhcos_image_name" { + default = "rhcos-4.15" +} +``` +Option 3 — Export Versions Before Running +export RELEASE_VER=4.9 + +Ensure RHEL and RHCOS versions are aligned and available. \ No newline at end of file From f1e3688d39a2d18cd8556e3032c11972f70c8b56 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Wed, 15 Oct 2025 16:04:17 -0500 Subject: [PATCH 03/10] updating comments for clarity Signed-off-by: Natalia Jordan --- openshift-install-powervs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openshift-install-powervs b/openshift-install-powervs index a609372..9812190 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -176,14 +176,13 @@ function check_required_env_vars { missing_vars=1 fi - # Check RELEASE_VER (optional but recommended) + # Check RELEASE_VER (optional since we have default) if [[ -z "${RELEASE_VER}" ]]; then warn "RELEASE_VER is not set (will use default: 4.15 type 4.15 if you want to use defualt elsee export correct rhcos version)" echo " Description: OpenShift release version to install" echo " Default: 4.15" echo " How to set: export RELEASE_VER='4.16'" echo "" - missing_vars=1 else log "Using RHCOS release version: ${RELEASE_VER}, to change run export RELEASE_VER=''" fi From 7afea671e12c5eae6ac1240b73a053127f49ab3f Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Thu, 16 Oct 2025 16:33:18 -0500 Subject: [PATCH 04/10] updating for reccomened suggestions from PR comments (i.e blank spaces) Signed-off-by: Natalia Jordan --- docs/troubleShooting.md | 10 ++-------- openshift-install-powervs | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md index 059516e..1462907 100644 --- a/docs/troubleShooting.md +++ b/docs/troubleShooting.md @@ -39,7 +39,6 @@ terraform apply To rebuild specific worker or master nodes: ```bash - terraform taint module.nodes.ibm_pi_instance.worker[0] terraform apply ``` @@ -98,8 +97,6 @@ PowerVS does not allow duplicate network names—even if the old network is inac terraform apply ./openshift-install-powervs create ``` -⚠️ Renaming networks automatically is not recommended—it can lead to subnet sprawl and degraded performance. - ## Remote-Exec Provisioning Errors **Error:** @@ -134,11 +131,8 @@ Resolution: Check instance health: ```bash - ibmcloud pi instance get ``` - - **Note**: Due to RSCT daemon not being available for RHCOS, RHCOS instances in dashboard can show "Warning" Status, ignore this! In console reboot instances by OS shutting down the instance, then restarting @@ -176,11 +170,11 @@ Set available image names manually: ```bash variable "rhel_image_name" { - default = "rhel-8.9" + default = "rhel-9.6" } variable "rhcos_image_name" { - default = "rhcos-4.15" + default = "rhcos-4.19" } ``` Option 3 — Export Versions Before Running diff --git a/openshift-install-powervs b/openshift-install-powervs index 9812190..ea2588e 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -180,7 +180,7 @@ function check_required_env_vars { if [[ -z "${RELEASE_VER}" ]]; then warn "RELEASE_VER is not set (will use default: 4.15 type 4.15 if you want to use defualt elsee export correct rhcos version)" echo " Description: OpenShift release version to install" - echo " Default: 4.15" + echo " Default: " echo " How to set: export RELEASE_VER='4.16'" echo "" else From ea9e92bce0040459f6b43a545fde1e9719f0824e Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Thu, 30 Oct 2025 10:02:51 -0500 Subject: [PATCH 05/10] updating release versions to 4.19 Signed-off-by: Natalia Jordan --- docs/troubleShooting.md | 2 +- openshift-install-powervs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md index 1462907..c1572a5 100644 --- a/docs/troubleShooting.md +++ b/docs/troubleShooting.md @@ -178,6 +178,6 @@ variable "rhcos_image_name" { } ``` Option 3 — Export Versions Before Running -export RELEASE_VER=4.9 +export RELEASE_VER=4.19 Ensure RHEL and RHCOS versions are aligned and available. \ No newline at end of file diff --git a/openshift-install-powervs b/openshift-install-powervs index ea2588e..7478d4e 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -60,7 +60,7 @@ EOF exit 0 } -RELEASE_VER=${RELEASE_VER:-"4.15"} +RELEASE_VER=${RELEASE_VER:-"4.19"} ARTIFACTS_REPO=${ARTIFACTS_REPO:-"https://github.com/ocp-power-automation/ocp4-upi-powervs"} ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"main"} #ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"release-$RELEASE_VER"} From 06665e3192f205710d7e7493bb35cf862e112569 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Thu, 30 Oct 2025 10:38:40 -0500 Subject: [PATCH 06/10] updating to account for signature check Signed-off-by: Natalia Jordan --- docs/troubleShooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md index c1572a5..ffedf4a 100644 --- a/docs/troubleShooting.md +++ b/docs/troubleShooting.md @@ -150,7 +150,7 @@ terraform apply **Error:** Error: failed to perform Get Image Operation for image rhcos-4.15 -[pcloudCloudinstancesImagesGetNotFound] image does not exist. ID: rhcos-4.12 +[pcloudCloudinstancesImagesGetNotFound] Image does not exist. ID: rhcos-4.12 **Cause:** Terraform and the PowerVS provider reference image names (e.g. rhcos-4.15, rhel-8.3) that may not exist in your workspace. From d04dcc4d4137875ed70f1de5f413281e38a0674e Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Fri, 31 Oct 2025 16:48:00 -0500 Subject: [PATCH 07/10] updating troubleShooting guide for uniformity and clarity Signed-off-by: Natalia Jordan --- README.md | 2 +- docs/troubleShooting.md | 190 +++++++++++++++++--------------------- openshift-install-powervs | 2 +- 3 files changed, 87 insertions(+), 107 deletions(-) diff --git a/README.md b/README.md index 56df6ce..941b0d2 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ You'll need to place the file in the install directory and name it as **pull-sec ``` -**Note**: If you encounter terraform-related errors during the create command, see ["Known Issues & Troubleshooting"](https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md) and ["TroubleShooting Document"](docs/troubleShooting.md) +**Note**: If you encounter terraform-related errors during the create command, see ["Known Issues & Troubleshooting"](https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md) and ["TroubleShooting Document"](docs/troubleshooting.md) ## Advanced Usage diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md index ffedf4a..3574e51 100644 --- a/docs/troubleShooting.md +++ b/docs/troubleShooting.md @@ -1,92 +1,23 @@ -# OpenShift on IBM PowerVS: Common Issues and Resolutions +# Common Issues and Resolutions -This document lists common issues encountered when deploying OpenShift on IBM PowerVS using the `openshift-install-powervs` wrapper, along with their causes and resolutions. +The following lists common issues encountered when deploying OpenShift on IBM PowerVS using the `openshift-install-powervs` wrapper, along with their causes and resolutions. ---- -## Terraform Stored Resource IDs -**Error:** - -Error: cannot find resource with id - -**Cause:** -Terraform retains deleted PowerVS resource IDs in its state or backup files. This often occurs after a Terraform rerun when instances or resources have changed in PowerVS. - - -**Resolution:** - -Search for the stale ID in Terraform state or backup files: - -```bash -grep -R "" . -``` - -Remove stale state entries: - -```bash - -terraform state rm -``` - -Re-run the apply: - -```bash -terraform apply -``` - -To rebuild specific worker or master nodes: - -```bash -terraform taint module.nodes.ibm_pi_instance.worker[0] -terraform apply -``` - -## Bastion Node OS Compatibility - -If getting errors regarding missing packages or incorrect storage type while using CentOS 10, switch to CentOS Stream 9 to avoid missing package errors or volume type mismatches. - -Common Issues and Fixes - -Missing Required Packages (e.g. Ansible) - -**Error**: -Missing ansible or dependency packages during setup. - -**Resolution**: -SSH into the bastion node using the generated key: -ssh -i id_rsa root@ -sudo dnf install ansible - -- note: you can also import using python and pip, if the above does not work. +## 1. Re-installation / Network Name Conflict **Error** -Incorrect Storage Type (e.g. "nfs" not recognized) - -Error: "pi_volume_type" must contain a value from ["ssd", "standard", "tier1", "tier3"], got "" - -**Resolution**: -Edit your variables.tf or corresponding .tfvars file: -bastion_storage_type = "tier3" +"Network with name "ocp-net" already exists." -- if needed change the defautlt bastion_storage_type in variables.tf to the storage type you desire -- note you can easly find this by hitting CTRL + W and searching for `bastion_storage_type` +**Cause** -## Re-installation / Network Name Conflict - -**Error:** - -Error: Network with name "ocp-net" already exists. - - -**Cause:** On a subsequent UPI install attempt, Terraform tries to create a network with the same name that already exists. PowerVS does not allow duplicate network names—even if the old network is inactive. -**Resolution:** +**Resolution** - Log into your PowerVS workspace. @@ -97,87 +28,136 @@ PowerVS does not allow duplicate network names—even if the old network is inac terraform apply ./openshift-install-powervs create ``` -## Remote-Exec Provisioning Errors +## 2. Remote-Exec Provisioning Errors + +**Error** -**Error:** +"Terraform remote-exec provisioner failures" -Terraform remote-exec provisioner failures +**Cause** -Cause: These are transient SSH or remote-execution issues that occur during provisioning. -Resolution: -Re-run Terraform: +**Resolution** -terraform apply +Re-run Terraform using the following command: + `terraform apply` This typically resolves the issue automatically. -See ocp4-upi-powervs known issues for more details. ["OCP Known issues"]((https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md)) +See ocp4-upi-powervs known issues for more details: ["OCP Known issues"](https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/release-4.6/docs/known_issues.md) + +## 3. LPAR in WARNING State -5. LPAR in WARNING State +**Error** -Error: +"The operation cannot be performed when the lpar health in the WARNING State." -Error: the operation cannot be performed when the lpar health in the WARNING State +**Cause** -Cause: Terraform cannot modify instances whose PowerVS LPAR health is in WARNING state. This often occurs after partial provisioning, failed networking setup, or API timeouts. -Resolution: +**Resolution** Check instance health: ```bash ibmcloud pi instance get ``` -**Note**: Due to RSCT daemon not being available for RHCOS, RHCOS instances in dashboard can show "Warning" Status, ignore this! +**Note**: Due to RSCT daemon not being available for RHCOS, RHCOS instances in dashboard can show "Warning" Status, you can safely ignore this. -In console reboot instances by OS shutting down the instance, then restarting +In the console, reboot instances by OS shutting them down and restarting them To rebuild only specific nodes: ```bash - terraform taint module.nodes.ibm_pi_instance.master[1] terraform taint module.nodes.ibm_pi_instance.worker[0] terraform apply ``` -## Missing or Outdated Images (RHEL / RHCOS) +## 4. Missing or Outdated Images (RHEL / RHCOS) + +**Error** -**Error:** +"failed to perform Get Image Operation for image rhcos-4.20 +[pcloudCloudinstancesImagesGetNotFound] Image does not exist. ID: rhcos-4.20" -Error: failed to perform Get Image Operation for image rhcos-4.15 -[pcloudCloudinstancesImagesGetNotFound] Image does not exist. ID: rhcos-4.12 +**Cause** -**Cause:** -Terraform and the PowerVS provider reference image names (e.g. rhcos-4.15, rhel-8.3) that may not exist in your workspace. +Terraform and the PowerVS provider reference image names (e.g. rhcos-4.20, rhel-9.63) that may not exist in your workspace. The wrapper may also use the RHEL version for RHCOS images by mistake. -**Resolution:** +**Resolution** -Option 1 — Import Pre-built Images +*Option 1* — Import Pre-built Images Use pre-built RHCOS and RHEL OVA images from IBM’s public repository. See Christy Norman’s blog for steps. ["Blog"](https://community.ibm.com/community/user/blogs/christy-norman/2024/08/06/import-pre-built-red-hat-coreos-ovas-into-powervs) -Option 2 — Update variables.tf +*Option 2* — Update variables.tf Set available image names manually: ```bash - variable "rhel_image_name" { default = "rhel-9.6" } variable "rhcos_image_name" { - default = "rhcos-4.19" + default = "rhcos-4.20" } ``` -Option 3 — Export Versions Before Running -export RELEASE_VER=4.19 +*Option 3* — Export Versions Before Running +export RELEASE_VER=4.20 + +Ensure that the RHEL and RHCOS versions are aligned and available in your workspace. + +## 5. Terraform Stored Resource IDs + +### **Developers Only** + +> ⚠️ WARNING: The following command is intended **for developers or advanced users only**. +> +> Using this command without a full understanding of its purpose and impact can lead to an **inconsistent Terraform state**, **resource corruption**, or **loss of data**. +> +> Proceed **only if you understand** how Terraform manages state and resource dependencies. +> Always create a state backup before making manual modifications. + + +**Error** + +"cannot find resource with id ``" + +**Cause** + +Terraform retains deleted PowerVS resource IDs in its state or backup files. This often occurs after a Terraform rerun when instances or resources have changed in PowerVS. + + +**Resolution** + +Search for the stale ID in Terraform state or backup files: -Ensure RHEL and RHCOS versions are aligned and available. \ No newline at end of file +```bash +grep -R "" . +``` + +Remove stale state entries: + +```bash +terraform state rm +``` + +Re-run the apply: + +```bash +terraform apply +``` + +To rebuild specific worker or master nodes: + +```bash +terraform taint module.nodes.ibm_pi_instance.worker[0] +terraform apply +``` diff --git a/openshift-install-powervs b/openshift-install-powervs index 7478d4e..c49bff9 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -60,7 +60,7 @@ EOF exit 0 } -RELEASE_VER=${RELEASE_VER:-"4.19"} +RELEASE_VER=${RELEASE_VER:-"4.20"} ARTIFACTS_REPO=${ARTIFACTS_REPO:-"https://github.com/ocp-power-automation/ocp4-upi-powervs"} ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"main"} #ARTIFACTS_VERSION=${ARTIFACTS_VERSION:-"release-$RELEASE_VER"} From 838f5dc95b85c15486e30903ec7779cb33b4299c Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Fri, 31 Oct 2025 16:49:52 -0500 Subject: [PATCH 08/10] incoporating changes after review Signed-off-by: Natalia Jordan --- docs/troubleShooting.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/troubleShooting.md b/docs/troubleShooting.md index 3574e51..1b3db0f 100644 --- a/docs/troubleShooting.md +++ b/docs/troubleShooting.md @@ -20,9 +20,7 @@ PowerVS does not allow duplicate network names—even if the old network is inac **Resolution** - Log into your PowerVS workspace. - - Delete or rename the existing ocp-net network or subnet. - - Re-run the installer: ```bash terraform apply ./openshift-install-powervs create From b5f41b51c7ffcf8257cfa359502d1dd7de1599f3 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Tue, 4 Nov 2025 10:22:25 -0600 Subject: [PATCH 09/10] updating script from 4.16 to 4.20 Signed-off-by: Natalia Jordan --- openshift-install-powervs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshift-install-powervs b/openshift-install-powervs index c49bff9..623e6bc 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -181,7 +181,7 @@ function check_required_env_vars { warn "RELEASE_VER is not set (will use default: 4.15 type 4.15 if you want to use defualt elsee export correct rhcos version)" echo " Description: OpenShift release version to install" echo " Default: " - echo " How to set: export RELEASE_VER='4.16'" + echo " How to set: export RELEASE_VER='4.20'" echo "" else log "Using RHCOS release version: ${RELEASE_VER}, to change run export RELEASE_VER=''" From e80bef9d2a5ba039394ef1a2c2453580f4c16d82 Mon Sep 17 00:00:00 2001 From: Natalia Jordan Date: Tue, 4 Nov 2025 11:14:44 -0600 Subject: [PATCH 10/10] updating script to resolve PR comment, removing redundant checking adding more clarity behind RHOCS version and switching to desired release version Signed-off-by: Natalia Jordan --- openshift-install-powervs | 64 +++++---------------------------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/openshift-install-powervs b/openshift-install-powervs index 623e6bc..b20fcc3 100755 --- a/openshift-install-powervs +++ b/openshift-install-powervs @@ -160,66 +160,18 @@ function output { } #------------------------------------------------------------------------- -# Check for required environment variables and display helpful information +# Display environment variable information for user awareness #------------------------------------------------------------------------- -function check_required_env_vars { - missing_vars=0 +function display_env_info { + log "Using RHCOS release version: ${RELEASE_VER}" - log "Checking required environment variables..." - - # Check IBMCLOUD_API_KEY - if [[ -z "${IBMCLOUD_API_KEY}" ]]; then - warn "IBMCLOUD_API_KEY is not set" - echo " Description: IBM Cloud API key for authentication" - echo " How to set: export IBMCLOUD_API_KEY='your-api-key-here'" - echo "" - missing_vars=1 - fi - - # Check RELEASE_VER (optional since we have default) - if [[ -z "${RELEASE_VER}" ]]; then - warn "RELEASE_VER is not set (will use default: 4.15 type 4.15 if you want to use defualt elsee export correct rhcos version)" - echo " Description: OpenShift release version to install" - echo " Default: " - echo " How to set: export RELEASE_VER='4.20'" - echo "" - else - log "Using RHCOS release version: ${RELEASE_VER}, to change run export RELEASE_VER=''" - fi - - # Check RHEL_SUBS_PASSWORD (optional) - if [[ -z "${RHEL_SUBS_PASSWORD}" ]]; then - warn "RHEL_SUBS_PASSWORD is not set" - echo " Description: RHEL subscription password for bastion nodes" - echo " Note: You can provide this during the 'variables' prompt or set it now" - echo " How to set: export RHEL_SUBS_PASSWORD='your-password-here'" - echo "" - fi - - # Check NO_OF_RETRY (optional) - if [[ -z "${NO_OF_RETRY}" ]]; then - log "NO_OF_RETRY not set (using default: 5)" - else - log "Using retry count: ${NO_OF_RETRY}" + # Only show how to change if using default + if [[ "${RELEASE_VER}" == "4.20" ]]; then + echo " To use a different version: export RELEASE_VER=''" fi - - # Check ARTIFACTS_VERSION (optional) - if [[ -z "${ARTIFACTS_VERSION}" ]]; then - log "ARTIFACTS_VERSION not set (using default: main)" - else - log "Using artifacts version: ${ARTIFACTS_VERSION}" - fi - echo "" - - if [[ $missing_vars -eq 1 ]]; then - error "Required environment variables are missing. Please set them and try again." - fi - - success "Environment variable check completed" } - #------------------------------------------------------------------------- # Util for retrying any command, special case for curl downloads #------------------------------------------------------------------------- @@ -1755,8 +1707,8 @@ function main { [[ -z "$ACTION" ]] && help platform_checks - if [[ "$ACTION" != "help" ]]; then - check_required_env_vars + if [[ "$ACTION" != "help" ]]; then + display_env_info fi setup_tools