IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
341 stars 669 forks source link

PowerVS deployment failing when deployed via Terraform #3341

Closed ktania46 closed 3 years ago

ktania46 commented 3 years ago

On running the terraform script, I'm getting following error

module.prepare.null_resource.bastion_init[1] (remote-exec):   Certificate: false
module.prepare.null_resource.bastion_init[1] (remote-exec):   SSH Agent: false
module.prepare.null_resource.bastion_init[1] (remote-exec):   Checking Host Key: false
module.prepare.null_resource.bastion_init[1]: Still creating... [14m40s elapsed]
module.prepare.null_resource.bastion_init[1]: Still creating... [14m50s elapsed]

Error: timeout - last error: dial tcp 169.54.110.99:22: i/o timeout

error: Error: timeout - last error: dial tcp 169.54.113.11:22: i/o timeout

terraform -v

Your version of Terraform is out of date! The latest version
is 1.0.11. You can update by downloading from https://www.terraform.io/downloads.html
Terraform v0.13.0
+ provider registry.terraform.io/community-terraform-providers/ignition v2.1.2
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v2.3.1
+ provider registry.terraform.io/ibm-cloud/ibm v1.24.0

$ terraform init

Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Using previously-installed ibm-cloud/ibm v1.24.0
- Using previously-installed hashicorp/random v2.3.1
- Using previously-installed community-terraform-providers/ignition v2.1.2
- Using previously-installed hashicorp/null v2.1.2

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Repo used: https://github.com/ocp-power-automation/ocp4-upi-powervs

Command used

$ terraform apply -var-file=var.tfvars --parallelism=1

Configuration:

### IBM Cloud details

ibmcloud_api_key    = ""
ibmcloud_region     = "mon"
ibmcloud_zone       = "mon01"
service_instance_id = "bc895dc9-f626-41c0-bfd3-94a0d8942a5f"

### OpenShift Cluster Details

### This is default minimalistic config. For PowerVS processors are equal to entitled physical count
### So N processors == N physical core entitlements == ceil[N] vCPUs.
### Example 0.5 processors == 0.5 physical core entitlements == ceil[0.5] = 1 vCPU == 8 logical OS CPUs (SMT=8)
### Example 1.5 processors == 1.5 physical core entitlements == ceil[1.5] = 2 vCPU == 16 logical OS CPUs (SMT=8)
### Example 2 processors == 2 physical core entitlements == ceil[2] = 2 vCPU == 16 logical OS CPUs (SMT=8)
bastion   = { memory = "16", processors = "1", "count" = 1 }
bootstrap = { memory = "16", processors = "0.5", "count" = 1 }
master    = { memory = "32", processors = "0.5", "count" = 3 }
worker    = { memory = "32", processors = "0.5", "count" = 2 }

rhel_image_name  = "rhel-83-03192021"
rhcos_image_name = "rhcos-46-09182020"
processor_type   = "shared"
system_type      = "s922"
network_name     = "ocp-net"

rhel_username                   = "root"
public_key_file                 = "data/id_rsa.pub"
private_key_file                = "data/id_rsa"
rhel_subscription_username      = ""       #Leave this as-is if using CentOS as bastion image
rhel_subscription_password      = "" #Leave this as-is if using CentOS as bastion image
rhel_subscription_org           = ""                        # Define it only when using activationkey for RHEL subscription
rhel_subscription_activationkey = ""                        # Define it only when using activationkey for RHEL subscription
rhel_smt                        = 4

### OpenShift Installation Details

openshift_install_tarball = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest/openshift-install-linux.tar.gz"
openshift_client_tarball  = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest/openshift-client-linux.tar.gz"
release_image_override    = "quay.io/openshift-release-dev/ocp-release@sha256:648bcde3fa361eea652a2de96530731a0c42fed91af743bb0b99c5c7532a534d"
pull_secret_file          = "data/pull-secret.txt"

cluster_domain    = "redhat.com"  #Set domain to nip.io or xip.io if you prefer using online wildcard domain and avoid modifying /etc/hosts
cluster_id_prefix = "rdr-tania" # Set it to empty if just want to use cluster_id without prefix
cluster_id        = "46"         # It will use random generated id with cluster_id_prefix if this is not set

use_zone_info_for_names = true # If set it to false, the zone info would not be used in resource names on PowerVS.

### Using IBM Cloud Services
#use_ibm_cloud_services    = true
#ibm_cloud_vpc_name        = "ocp-vpc"
#ibm_cloud_vpc_subnet_name = "ocp-subnet"
#iaas_classic_username     = "apikey"     # Can be passed via environment variable IAAS_CLASSIC_USERNAME
#iaas_classic_api_key      = ""           # if empty, will default to ibmcloud_api_key. Can be passed via environment variable IAAS_CLASSIC_API_KEY
#iaas_vpc_region       = ""               # if empty, will default to ibmcloud_region.

### Misc Customizations

#enable_local_registry      = false  #Set to true to enable usage of local registry for restricted network install.
#local_registry_image       = "docker.io/ibmcom/registry-ppc64le:2.6.2.5"
#ocp_release_tag            = "4.4.9-ppc64le"
#ocp_release_name           = "ocp-release"
#release_image_override     = ""

#helpernode_repo            = "https://github.com/RedHatOfficial/ocp4-helpernode"
#helpernode_tag             = ""
#install_playbook_repo      = "https://github.com/ocp-power-automation/ocp4-playbooks"
#install_playbook_tag       = ""

#bastion_health_status      = "OK"
#installer_log_level        = "info"
#ansible_extra_options      = "-v"
#ansible_repo_name          = "ansible-2.9-for-rhel-8-ppc64le-rpms"
#dns_forwarders             = "1.1.1.1; 9.9.9.9"
#rhcos_kernel_options       = []
#chrony_config              = true
#chrony_config_servers      = [ {server = "0.centos.pool.ntp.org", options = "iburst"}, {server = "1.centos.pool.ntp.org", options = "iburst"} ]

#setup_squid_proxy          = false

## N/A when `setup_squid_proxy = true`, set `setup_squid_proxy = false` when using external proxy.
#proxy                      = {server = "hostname_or_ip", port = "3128", user = "pxuser", password = "pxpassword"}

storage_type               = "none"
volume_size                = "300"    #Value in GB
volume_shareable           = false

#master_volume_size         = "500"   #Value in GB
#worker_volume_size         = "500"   #Value in GB

#upgrade_version            = ""
#upgrade_pause_time         = "70"
#upgrade_delay_time         = "600"

#ibm_cloud_dl_endpoint_net_cidr = ""  #Set this to IBM Cloud DirectLink endpoint network cidr eg. 10.0.0.0/8
#ibm_cloud_http_proxy = ""            #Set this to IBM Cloud http/squid proxy eg. http://10.166.13.64:3128

#cni_network_provider       = "OpenshiftSDN"

#setup_snat                 = true

Opened the ticket for same : https://cloud.ibm.com/unifiedsupport/cases/manage/CS2560290

Expected Behavior

Successful cluster https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/master/docs/quickstart.md#start-install

Steps to Reproduce

  1. Made changes to var.tf file
  2. terraform init
  3. terraform apply -var-file=var.tfvars --parallelism=1

References

https://github.com/ocp-power-automation/ocp4-upi-powervs/blob/master/docs/quickstart.md

kavya498 commented 3 years ago

@yussufsh ^^

yussufsh commented 3 years ago

This is the public vlan connectivity issues to your instance. Please follow up on the support ticket why you are not able to access the vm via public ip.