Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibm_pi_instance is not able to complete with pi_health_status "WARNING" #3401

Closed
Beilmann opened this issue Dec 7, 2021 · 0 comments · Fixed by #3403
Closed

ibm_pi_instance is not able to complete with pi_health_status "WARNING" #3401

Beilmann opened this issue Dec 7, 2021 · 0 comments · Fixed by #3403
Assignees
Labels
service/Power Systems Issues related to Power Systems

Comments

@Beilmann
Copy link

Beilmann commented Dec 7, 2021

Documentation describes, that by setting "health state" to "warning" by creating a new PowerVS instance, the creation process would complete successfully after the instance becomes state "warning". This would reduce deployment time of large instances from 1 hour to 15-20 minutes.

At the moment it is not working.

Documentation:
https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/pi_instance

Terraform CLI and Terraform IBM Provider Version

Terraform v1.0.11
Provider 1.36.0

Affected Resource(s)

ibm_pi_instance

Terraform Configuration Files

resource "ibm_pi_instance" "snat-host" {
    pi_memory             = "4"
    pi_processors         = "1"
    pi_instance_name      = "${var.prefix}-SNAT"
    pi_proc_type          = "shared"
    pi_image_id           = var.pi_image_id 
    pi_network_ids        = var.pi_network_ids
    pi_key_pair_name      = var.pi_key_pair_name
    pi_sys_type           = "s922"
    pi_health_status     = "WARNING"
    pi_cloud_instance_id  = var.pi_cloud_instance_id
    pi_volume_ids         = []
    pi_storage_type       = "tier1"

    timeouts {
     create = "60m"
     update = "30m"
     delete = "30m"
    }

    lifecycle {
      ignore_changes = all
      prevent_destroy = true
    }
}

Expected Behavior

Instance creation completes after the remote instance becomes health state 'warning'

Actual Behavior

Instance creation is running for 2 hours and ends with an error.

Additional

Discussed internally. Probably change to:

if *pvm.Status == helpers.PIInstanceAvailable && (pvm.Health.Status == allowableStatus || pvm.Health.Status == "OK") {

in isPIInstanceRefreshFunc would help.

@yussufsh yussufsh added the service/Power Systems Issues related to Power Systems label Dec 7, 2021
yussufsh added a commit to yussufsh/terraform-provider-ibm that referenced this issue Dec 7, 2021
hkantare pushed a commit that referenced this issue Dec 8, 2021
Fixes #3401

Signed-off-by: Yussuf Shaikh <[email protected]>
@yussufsh yussufsh self-assigned this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Power Systems Issues related to Power Systems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants