Skip to content

Better logic to derive vpcRegion/Zone from vpcName/Subnets#6665

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
miyamotoh:vpc-region-zone-from-name-subnets
Jan 4, 2023
Merged

Better logic to derive vpcRegion/Zone from vpcName/Subnets#6665
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
miyamotoh:vpc-region-zone-from-name-subnets

Conversation

@miyamotoh
Copy link
Contributor

This change would allow users to specify which region to create a new or locate an existing VPC instance and its subnet. With this, users would no longer be tied to the installer-picked region for VPC resources that is hardcoded to be close to the PowerVS region, essentially allowing reuse of an existing VPC infrastructure the user always has, regardless of where the PowerVS instance is located.

The relevant params for VPC resources in question are; 1) vpcRegion, 2) vpcName, and 3) vpcSubnets.

Whether publish: External (default) or publish: Internal, when vpcRegion is specified, the VPC instance the installer works with will be in that region. If vpcName is specified additionally, a VPC instance with that name has to be found in that region. If not, one will be created in that region.

If vpcSubnets is specified additionally, the subnet must be found in and attached to the VPC specified by vpcName. Custom vpcSubnets without vpcName will not be supported and thus error outcl.

If vpcName is provided without vpcRegion, the VPC by the name will be searched in the nearby region of the PowerVS region, and would be accepted/reused if found, error out otherwise.

The validation[_test].go changes would validate all these combos of vpc* params.

Signed-off-by: Hiro Miyamoto miyamotoh@us.ibm.com

@openshift-ci openshift-ci bot requested review from barbacbd and mjturek December 5, 2022 21:41
@miyamotoh miyamotoh force-pushed the vpc-region-zone-from-name-subnets branch 2 times, most recently from fe8c04e to f935b39 Compare December 6, 2022 15:40
Copy link
Contributor

Choose a reason for hiding this comment

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

An error occurred, is there a reason to skip it here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That check came from IBM Cloud code, and turns out it's rather misleading (giving the idea of potentially skipping), and in fact, it virtually never happens. So, I'm dropping the check in the next force-push. Thanks!!

@miyamotoh miyamotoh force-pushed the vpc-region-zone-from-name-subnets branch from f935b39 to 67c16ea Compare December 6, 2022 20:47
@miyamotoh
Copy link
Contributor Author

/retest-required

1 similar comment
@miyamotoh
Copy link
Contributor Author

/retest-required

@miyamotoh
Copy link
Contributor Author

All checks passed. @barbacbd PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not familiar with powervs but looking at this I see some potentials for errors. What if there are other options for sub nets. Should we search for valid subnets and if you still want to use a random, randomly select from the list of valid subnets ?

Copy link
Contributor

@clnperez clnperez Dec 8, 2022

Choose a reason for hiding this comment

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

this is the way we've done it for a while. we (@mjturek and I) made a lot of time making sure it wasn't going to cause problems. however, we know it's not ideal to randomly select the vpc zone this way. but it's fine for now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not officially documented, but this knowledge of "valid zones" with the number 1 to 3 as suffix per region is gained from internal discussion with the IBM Cloud team. Therefore, this bit is basically allowing user to reuse his/her existing subnet, making sure it exists and deriving the zone from it, if specified, or we just pick one randomly from existing ones for the installer.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for the explanations !

Copy link
Contributor

@clnperez clnperez left a comment

Choose a reason for hiding this comment

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

looks good and i can lgtm it when you've addressed the other review comments. thanks so much!

Copy link
Contributor

@clnperez clnperez Dec 8, 2022

Choose a reason for hiding this comment

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

this is the way we've done it for a while. we (@mjturek and I) made a lot of time making sure it wasn't going to cause problems. however, we know it's not ideal to randomly select the vpc zone this way. but it's fine for now :)

@miyamotoh miyamotoh force-pushed the vpc-region-zone-from-name-subnets branch from 67c16ea to 3b46ef8 Compare December 8, 2022 16:36
Copy link
Contributor

@barbacbd barbacbd left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2022
@miyamotoh
Copy link
Contributor Author

/retest-required

1 similar comment
@miyamotoh
Copy link
Contributor Author

/retest-required

@rna-afk
Copy link
Contributor

rna-afk commented Dec 9, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rna-afk

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

The pull request process is described here

Details 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 Dec 9, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 40cf6fe and 2 for PR HEAD 3b46ef833d6e37a6aa72c8daa3bf2d5ad6b76eee in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6de3bb4 and 1 for PR HEAD 3b46ef833d6e37a6aa72c8daa3bf2d5ad6b76eee in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 3c693eb and 0 for PR HEAD 3b46ef833d6e37a6aa72c8daa3bf2d5ad6b76eee in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 3b46ef833d6e37a6aa72c8daa3bf2d5ad6b76eee was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2022
@miyamotoh
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 780b29a and 2 for PR HEAD 3b46ef833d6e37a6aa72c8daa3bf2d5ad6b76eee in total

@miyamotoh
Copy link
Contributor Author

/retest-required

1 similar comment
@miyamotoh
Copy link
Contributor Author

/retest-required

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 20, 2022
@r4f4 r4f4 removed their assignment Dec 20, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 8fde53a and 2 for PR HEAD 42e4531 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD cb0702c and 1 for PR HEAD 42e4531 in total

@miyamotoh
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7f980fc and 0 for PR HEAD 42e4531 in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 42e4531 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 22, 2022
@miyamotoh
Copy link
Contributor Author

/test e2e-azure-ovn

2 similar comments
@miyamotoh
Copy link
Contributor Author

/test e2e-azure-ovn

@miyamotoh
Copy link
Contributor Author

/test e2e-azure-ovn

@r4f4
Copy link
Contributor

r4f4 commented Dec 23, 2022

/override ci/prow/e2e-azure-ovn
Install and e2e succeeded, timed out during gather

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 23, 2022

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-azure-ovn

Details

In response to this:

/override ci/prow/e2e-azure-ovn
Install and e2e succeeded, timed out during gather

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.

@r4f4
Copy link
Contributor

r4f4 commented Dec 23, 2022

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2022
@r4f4
Copy link
Contributor

r4f4 commented Dec 23, 2022

/skip

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 52b495c and 2 for PR HEAD 42e4531 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 1d972a8 and 1 for PR HEAD 42e4531 in total

@miyamotoh
Copy link
Contributor Author

/retest-required

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 9de173a and 0 for PR HEAD 42e4531 in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 42e4531 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2023
@r4f4
Copy link
Contributor

r4f4 commented Jan 4, 2023

/override ci/prow/e2e-azure-ovn ci/prow/e2e-gcp-ovn
Install succeeded, timed out after 4h.
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 4, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 4, 2023

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-azure-ovn, ci/prow/e2e-gcp-ovn

Details

In response to this:

/override ci/prow/e2e-azure-ovn ci/prow/e2e-gcp-ovn
Install succeeded, timed out after 4h.
/hold cancel

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
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD ce13271 and 2 for PR HEAD 42e4531 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 4, 2023

@miyamotoh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-disruptive 42e4531 link false /test e2e-aws-ovn-disruptive
ci/prow/e2e-aws-ovn-workers-rhel8 42e4531 link false /test e2e-aws-ovn-workers-rhel8
ci/prow/e2e-aws-ovn-upgrade 42e4531 link false /test e2e-aws-ovn-upgrade
ci/prow/okd-e2e-aws-ovn-upgrade 42e4531 link false /test okd-e2e-aws-ovn-upgrade
ci/prow/e2e-libvirt 42e4531 link false /test e2e-libvirt
ci/prow/e2e-ibmcloud-ovn 42e4531 link false /test e2e-ibmcloud-ovn
ci/prow/e2e-metal-assisted 42e4531 link false /test e2e-metal-assisted
ci/prow/okd-e2e-aws-ovn 42e4531 link false /test okd-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@r4f4
Copy link
Contributor

r4f4 commented Jan 4, 2023

/override ci/prow/e2e-vsphere-ovn
Unrelated e2e failures

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 4, 2023

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-vsphere-ovn

Details

In response to this:

/override ci/prow/e2e-vsphere-ovn
Unrelated e2e failures

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-merge-robot openshift-merge-robot merged commit 23ed14b into openshift:master Jan 4, 2023
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants