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

MULTIARCH-2590: PowerVS create service instance #7695

Merged

Conversation

hamzy
Copy link
Contributor

@hamzy hamzy commented Nov 7, 2023

Currently, a user has to create a Power IAAS service instance before creating a cluster. It will then be put into install-config.yaml in the serviceInstanceID field. Now, this field will be removed and the IPI installer will create the service instance itself.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 7, 2023

@hamzy: This pull request references MULTIARCH-2590 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

Currently, a user has to create a Power IAAS service instance before creating a cluster. It will then be put into install-config.yaml in the serviceInstanceID field. Now, this field will be removed and the IPI installer will create the service instance itself.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 7, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 7, 2023
@openshift-ci openshift-ci bot requested review from clnperez and rwsu November 7, 2023 20:11
@hamzy hamzy changed the title WIP: MULTIARCH-2590: Power vs create service instance WIP: MULTIARCH-2590: PowerVS create service instance Nov 7, 2023
Copy link
Contributor

@mjturek mjturek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments and suggestions

pkg/asset/quota/quota.go Show resolved Hide resolved
pkg/types/powervs/platform.go Show resolved Hide resolved
pkg/asset/quota/quota.go Show resolved Hide resolved
@hamzy
Copy link
Contributor Author

hamzy commented Nov 7, 2023

/test ci/prow/govet

Copy link
Contributor

openshift-ci bot commented Nov 7, 2023

@hamzy: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test agent-integration-tests
  • /test altinfra-images
  • /test aro-unit
  • /test e2e-agent-compact-ipv4
  • /test e2e-aws-ovn
  • /test e2e-aws-ovn-upi
  • /test e2e-azure-ovn
  • /test e2e-azure-ovn-upi
  • /test e2e-gcp-ovn
  • /test e2e-gcp-ovn-upi
  • /test e2e-metal-ipi-ovn-ipv6
  • /test e2e-openstack-ovn
  • /test e2e-vsphere-ovn
  • /test e2e-vsphere-upi
  • /test gofmt
  • /test golint
  • /test govet
  • /test images
  • /test okd-images
  • /test okd-scos-images
  • /test okd-unit
  • /test okd-verify-codegen
  • /test openstack-manifests
  • /test shellcheck
  • /test tf-lint
  • /test unit
  • /test verify-codegen
  • /test verify-vendor
  • /test yaml-lint

The following commands are available to trigger optional jobs:

  • /test altinfra-e2e-aws-ovn
  • /test altinfra-e2e-aws-ovn-imdsv2
  • /test altinfra-e2e-aws-ovn-localzones
  • /test altinfra-e2e-aws-ovn-shared-vpc
  • /test altinfra-e2e-aws-ovn-shared-vpc-localzones
  • /test altinfra-e2e-azure-ovn
  • /test altinfra-e2e-azure-ovn-resourcegroup
  • /test altinfra-e2e-azure-ovn-shared-vpc
  • /test altinfra-e2e-vsphere-ovn
  • /test altinfra-e2e-vsphere-static-ovn
  • /test altinfra-e2e-vsphere-zones
  • /test e2e-agent-compact-ipv4-appliance
  • /test e2e-agent-compact-ipv4-none-platform
  • /test e2e-agent-ha-dualstack
  • /test e2e-agent-sno-ipv4-pxe
  • /test e2e-agent-sno-ipv6
  • /test e2e-alibaba
  • /test e2e-aws-custom-security-groups
  • /test e2e-aws-ovn-fips
  • /test e2e-aws-ovn-imdsv2
  • /test e2e-aws-ovn-localzones
  • /test e2e-aws-ovn-proxy
  • /test e2e-aws-ovn-public-subnets
  • /test e2e-aws-ovn-shared-vpc
  • /test e2e-aws-ovn-shared-vpc-localzones
  • /test e2e-aws-ovn-single-node
  • /test e2e-aws-ovn-upgrade
  • /test e2e-aws-ovn-workers-rhel8
  • /test e2e-aws-upi-proxy
  • /test e2e-azure-ovn-resourcegroup
  • /test e2e-azure-ovn-shared-vpc
  • /test e2e-azurestack
  • /test e2e-azurestack-upi
  • /test e2e-crc
  • /test e2e-gcp-ovn-shared-vpc
  • /test e2e-gcp-ovn-xpn
  • /test e2e-gcp-secureboot
  • /test e2e-gcp-upgrade
  • /test e2e-gcp-upi-xpn
  • /test e2e-ibmcloud-ovn
  • /test e2e-libvirt
  • /test e2e-metal-assisted
  • /test e2e-metal-ipi-ovn-dualstack
  • /test e2e-metal-ipi-sdn
  • /test e2e-metal-ipi-sdn-swapped-hosts
  • /test e2e-metal-ipi-sdn-virtualmedia
  • /test e2e-metal-single-node-live-iso
  • /test e2e-nutanix-ovn
  • /test e2e-nutanix-sdn
  • /test e2e-openstack-ccpmso
  • /test e2e-openstack-ccpmso-zone
  • /test e2e-openstack-dualstack-techpreview
  • /test e2e-openstack-externallb
  • /test e2e-openstack-nfv-intel
  • /test e2e-openstack-proxy
  • /test e2e-openstack-sdn-parallel
  • /test e2e-openstack-upi
  • /test e2e-vsphere-static-ovn
  • /test e2e-vsphere-upi-zones
  • /test e2e-vsphere-zones
  • /test e2e-vsphere-zones-techpreview
  • /test okd-e2e-agent-compact-ipv4
  • /test okd-e2e-agent-ha-dualstack
  • /test okd-e2e-agent-sno-ipv6
  • /test okd-e2e-aws-ovn
  • /test okd-e2e-aws-ovn-upgrade
  • /test okd-e2e-gcp
  • /test okd-e2e-gcp-ovn-upgrade
  • /test okd-e2e-vsphere
  • /test okd-scos-e2e-agent-compact-ipv4
  • /test okd-scos-e2e-agent-sno-ipv6
  • /test okd-scos-e2e-aws-ovn
  • /test okd-scos-e2e-aws-upgrade
  • /test okd-scos-e2e-gcp
  • /test okd-scos-e2e-gcp-ovn-upgrade
  • /test okd-scos-e2e-vsphere
  • /test okd-scos-unit
  • /test okd-scos-verify-codegen
  • /test tf-fmt

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-installer-master-altinfra-images
  • pull-ci-openshift-installer-master-aro-unit
  • pull-ci-openshift-installer-master-e2e-aws-ovn
  • pull-ci-openshift-installer-master-gofmt
  • pull-ci-openshift-installer-master-golint
  • pull-ci-openshift-installer-master-govet
  • pull-ci-openshift-installer-master-images
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn-upgrade
  • pull-ci-openshift-installer-master-okd-images
  • pull-ci-openshift-installer-master-okd-scos-images
  • pull-ci-openshift-installer-master-okd-scos-unit
  • pull-ci-openshift-installer-master-okd-scos-verify-codegen
  • pull-ci-openshift-installer-master-okd-unit
  • pull-ci-openshift-installer-master-okd-verify-codegen
  • pull-ci-openshift-installer-master-shellcheck
  • pull-ci-openshift-installer-master-tf-fmt
  • pull-ci-openshift-installer-master-tf-lint
  • pull-ci-openshift-installer-master-unit
  • pull-ci-openshift-installer-master-verify-codegen
  • pull-ci-openshift-installer-master-verify-vendor
  • pull-ci-openshift-installer-master-yaml-lint

In response to this:

/test ci/prow/govet

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@hamzy
Copy link
Contributor Author

hamzy commented Nov 7, 2023

/test govet

@hamzy hamzy force-pushed the PowerVS-create-service-instance branch 2 times, most recently from 8134f94 to 9f11466 Compare November 7, 2023 22:35
@hamzy
Copy link
Contributor Author

hamzy commented Nov 8, 2023

/retest-required

@hamzy
Copy link
Contributor Author

hamzy commented Nov 8, 2023

/test tf-fmt
/test okd-scos-verify-codegen

@hamzy hamzy force-pushed the PowerVS-create-service-instance branch from 9f11466 to dfe7dab Compare November 8, 2023 16:29
@hamzy hamzy changed the title WIP: MULTIARCH-2590: PowerVS create service instance MULTIARCH-2590: PowerVS create service instance Nov 8, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2023
@clnperez
Copy link
Contributor

clnperez commented Nov 8, 2023

@mjturek @hamzy -- this isn't finalized yet, right? as per our slack discussion the hope is that we can just make this optional to keep some flexibility

@hamzy
Copy link
Contributor Author

hamzy commented Nov 8, 2023

/assign @r4f4

We are moving away from using a predefined service instance
(serviceInstanceID).  We are now creating it in Terraform, so
we cannot check for space in the pool, since we do not know
the GUID yet.
Currently, a user has to create a Power IAAS service instance before creating
a cluster.  It will then be put into install-config.yaml in the serviceInstanceID
field.  Now, this field will be removed and the IPI installer will create the
service instance itself.
Remove the requirement that the user creates a service instance
before creating a cluster.
Since PVSNetworkName is associated with an existing Power IAAS service instance,
and we are removing support for existing service instances, therefore we are
removing it.
@hamzy hamzy force-pushed the PowerVS-create-service-instance branch from dfe7dab to 8261f9e Compare November 9, 2023 16:30
return "", fmt.Errorf("failed to get instance: %w", err)
}
if response != nil && response.StatusCode == gohttp.StatusNotFound || response.StatusCode == gohttp.StatusInternalServerError {
return "", fmt.Errorf("failed to get instance, response is: %v", response)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a chance that you'll fail to get some resource instances but you can still find the one you're looking for. So you can increase the chances of success by saving the last error you saw but keep going through the resources. Then, at the end of the loop, you can return the last error found. Of course it's OK If you prefer to fail right away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm. Destroy code is written to fail at the first sign of trouble. I do agree in this scenario, that ignoring an unrelated and very transitory hiccup while searching for the correct service instance could make this code more resilient. In the long run, with PowerVS, a problem found usually indicates more problems down the road.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjturek We should have a TODO to mention in the documentation that destroy code will fail at the first sign of trouble. And that the customer should open a support ticket and try again after support responds.

@r4f4
Copy link
Contributor

r4f4 commented Nov 9, 2023

/approve

Copy link
Contributor

openshift-ci bot commented Nov 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2023
@mjturek
Copy link
Contributor

mjturek commented Nov 9, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit f60ebb0 into openshift:master Nov 9, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants