Skip to content

CORS-3855: Remove ARO build flag from installer #9124

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

Merged
merged 3 commits into from
Apr 18, 2025

Conversation

rna-afk
Copy link
Contributor

@rna-afk rna-afk commented Oct 22, 2024

Removing the ARO build flag from the installer to achieve the goal of moving ARO installs closer to the installer. Ideally, these ARO specific changes to the installs/installer need to be done either in the wrapper or hive.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 22, 2024

@rna-afk: This pull request references CORS-3493 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.18.0" version, but no target version was set.

In response to this:

Removing the ARO build flag from the installer to achieve the goal of moving ARO installs closer to the installer. Ideally, these ARO specific changes to the installs/installer need to be done either in the wrapper or hive.

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 openshift-eng/jira-lifecycle-plugin 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 Oct 22, 2024
@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 Oct 22, 2024
@openshift-ci openshift-ci bot requested review from jhixson74 and mtulio October 22, 2024 05:45
@rna-afk rna-afk force-pushed the remove_aro_build_flag branch 2 times, most recently from 67fb5b2 to 808e68c Compare October 23, 2024 20:56
@rna-afk rna-afk force-pushed the remove_aro_build_flag branch 2 times, most recently from 6154c08 to aba5982 Compare November 4, 2024 14:16
@rna-afk rna-afk changed the title WIP: CORS-3493: Remove ARO build flag from installer CORS-3493: Remove ARO build flag from installer Nov 4, 2024
@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 4, 2024
@sadasu
Copy link
Contributor

sadasu commented Nov 13, 2024

/retest-required

@rna-afk rna-afk force-pushed the remove_aro_build_flag branch 2 times, most recently from f2939ae to d322415 Compare January 2, 2025 17:54
@rna-afk rna-afk changed the title CORS-3493: Remove ARO build flag from installer CORS-3855: Remove ARO build flag from installer Jan 21, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 21, 2025

@rna-afk: This pull request references CORS-3855 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.19.0" version, but no target version was set.

In response to this:

Removing the ARO build flag from the installer to achieve the goal of moving ARO installs closer to the installer. Ideally, these ARO specific changes to the installs/installer need to be done either in the wrapper or hive.

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 openshift-eng/jira-lifecycle-plugin repository.

@rna-afk rna-afk force-pushed the remove_aro_build_flag branch from d322415 to b59c000 Compare January 21, 2025 18:15
@rna-afk rna-afk changed the title CORS-3855: Remove ARO build flag from installer WIP: CORS-3855: Remove ARO build flag from installer Jan 21, 2025
@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 Jan 21, 2025
@rna-afk rna-afk force-pushed the remove_aro_build_flag branch from b59c000 to 52eaa93 Compare February 4, 2025 03:53
@rna-afk
Copy link
Contributor Author

rna-afk commented Feb 4, 2025

@patrickdillon I'm working on fixing this validation but there's no reason to have a client check at this part.

if !p.IsARO() && publish != types.InternalPublishingStrategy {

@rna-afk rna-afk force-pushed the remove_aro_build_flag branch from 5a709db to b9f4fb4 Compare February 10, 2025 23:02
@rna-afk rna-afk changed the title WIP: CORS-3855: Remove ARO build flag from installer CORS-3855: Remove ARO build flag from installer Feb 10, 2025
@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 Feb 10, 2025
@rna-afk rna-afk force-pushed the remove_aro_build_flag branch 2 times, most recently from b2a7a39 to c85e6fc Compare February 13, 2025 15:57
@rna-afk
Copy link
Contributor Author

rna-afk commented Feb 14, 2025

/retest

Copy link
Contributor

@patrickdillon patrickdillon left a comment

Choose a reason for hiding this comment

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

I would like to see if we can actually remove all ARO flags--not just the build flag. So far I haven't seen any flags we could not remove...

The only check I think we were struggling with is the one we have discussed at length, about skipping validation if the resource group is not actually empty.

It looks like the current code is checking the ManagedBy field, but IIRC our conversation with @zaneb we were going to inspect tags on the resource group and skip the validation (i.e. allow non-empty resource group) if there was an ARO-specific tag (which we would need to identify) and/or a new installer specific tag.

Comment on lines 283 to 305
if aro && installConfig.Config.CredentialsMode != types.ManualCredentialsMode {
// config is used to created compatible secret to trigger azure cloud
// controller config merge behaviour
// https://github.com/openshift/origin/blob/90c050f5afb4c52ace82b15e126efe98fa798d88/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go#L83
session, err := installConfig.Azure.Session()
if err != nil {
return err
}
config := struct {
AADClientID string `json:"aadClientId" yaml:"aadClientId"`
AADClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
}{
AADClientID: session.Credentials.ClientID,
AADClientSecret: session.Credentials.ClientSecret,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL (or remembered) ARO is generating its own secret for the cloud provider... Does this even work? These are the credentials passed to the installer, but IIUC ARO does not use a secret--they use a certificate. So I would think the value for ClientSecret would be empty???

The reason this would not fail during install is because the CCCMO is actually authenticating the cloud provider through its credentials request: https://github.com/openshift/cluster-cloud-controller-manager-operator/blob/master/manifests/0000_26_cloud-controller-manager-operator_14_credentialsrequest-azure.yaml

So I'm wondering if we can actually just delete this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hlipsig Do you know if there's any other specific reason we would need this or should we remove it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should resolve this until we get a better sense of whether we can actually remove the secret. https://issues.redhat.com/browse/CORS-3883 is removing the VM identity which is how the installer used to authenticate the cloud provider, but testing has shown that it is no longer needed and the cloud provider seems to be authenticated through cred requests.

Copy link

Choose a reason for hiding this comment

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

Per slack conversations we are updating this secret for ARO clusters. I don't think we have any code to create it if it's not already present so I expect it would be breaking for us.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we have any code to create it if it's not already present so I expect it would be breaking for us.

The CCMO creates a credentials request which it uses to authenticate the cloud provider (see link in my first comment). We have already successfully tested removing the credentials which the installer creates for standalone openshift, so it stands to reason we can do the same for ARO. I think we should test it out so that we can drop this code.

Copy link
Member

Choose a reason for hiding this comment

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

Is this resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Finally decided to YOLO it and delete this in a separate commit

@rna-afk
Copy link
Contributor Author

rna-afk commented Apr 17, 2025

/retest-required

@rna-afk
Copy link
Contributor Author

rna-afk commented Apr 17, 2025

/retest

@rna-afk rna-afk force-pushed the remove_aro_build_flag branch from 346975e to 0385863 Compare April 17, 2025 21:00
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2025
rna-afk added 3 commits April 17, 2025 17:00
Removing the ARO build flag from the installer to
achieve the goal of moving ARO installs closer to
the installer. Ideally, these ARO specific changes
to the installs/installer need to be done either
in the wrapper or hive.

Adding a check for the aro tag and if exists, avoid
certain checks ARO does not need. Also removing pieces
of code that are no longer needed like the check if ARO
for resources in existing RG.

Also, as of [1], ARO adds a bogus base domain resource
group to the install config for installation and will not
have an empty field for that so removing the check if ARO
code for validating empty base domain

[1] - openshift/installer-aro-wrapper@86b8bf5
Removing CCO creds from the installer. Keeping a commit
to revert to in case there's trouble on ARO front.
@patrickdillon
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 8af70ee and 2 for PR HEAD 0385863 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 12b0fb9 and 1 for PR HEAD 0385863 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4cb998 and 0 for PR HEAD 0385863 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD a4cb998 and 2 for PR HEAD 0385863 in total

@rna-afk
Copy link
Contributor Author

rna-afk commented Apr 18, 2025

aws failure is due to a quota issue and not due to these changes in the PR.

/override ci/prow/e2e-aws-ovn

Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

@rna-afk: Overrode contexts on behalf of rna-afk: ci/prow/e2e-aws-ovn

In response to this:

aws failure is due to a quota issue and not due to these changes in the PR.

/override ci/prow/e2e-aws-ovn

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-sigs/prow repository.

@patrickdillon
Copy link
Contributor

/skip

@patrickdillon
Copy link
Contributor

/override ci/prow/e2e-azure-ovn

test has already passed before. stuck in restest hell. let's see if this gets it merged.

Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

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

In response to this:

/override ci/prow/e2e-azure-ovn

test has already passed before. stuck in restest hell. let's see if this gets it merged.

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-sigs/prow repository.

@patrickdillon
Copy link
Contributor

/override ci/prow/e2e-aws-ovn

Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

@patrickdillon: Overrode contexts on behalf of patrickdillon: ci/prow/e2e-aws-ovn

In response to this:

/override ci/prow/e2e-aws-ovn

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-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

@rna-afk: 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-edge-zones-manifest-validation aba5982f3e1b0a8913f5e219c9cbc1dba0bf1b04 link true /test e2e-aws-ovn-edge-zones-manifest-validation
ci/prow/e2e-azure-ovn-upi aba5982f3e1b0a8913f5e219c9cbc1dba0bf1b04 link true /test e2e-azure-ovn-upi
ci/prow/e2e-openstack-ovn aba5982f3e1b0a8913f5e219c9cbc1dba0bf1b04 link true /test e2e-openstack-ovn
ci/prow/e2e-gcp-ovn-upi aba5982f3e1b0a8913f5e219c9cbc1dba0bf1b04 link true /test e2e-gcp-ovn-upi
ci/prow/e2e-vsphere-host-groups-ovn-custom-no-upgrade 52eaa93 link false /test e2e-vsphere-host-groups-ovn-custom-no-upgrade
ci/prow/e2e-azure-default-config 0385863 link false /test e2e-azure-default-config
ci/prow/e2e-azurestack 0385863 link false /test e2e-azurestack
ci/prow/e2e-vsphere-ovn-multi-network 0385863 link false /test e2e-vsphere-ovn-multi-network
ci/prow/okd-scos-e2e-aws-ovn 0385863 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

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

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 68f5288 and 1 for PR HEAD 0385863 in total

@patrickdillon
Copy link
Contributor

/override ci/prow/e2e-aws-ovn

Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

@patrickdillon: Overrode contexts on behalf of patrickdillon: ci/prow/e2e-aws-ovn

In response to this:

/override ci/prow/e2e-aws-ovn

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-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit c0f0af4 into openshift:main Apr 18, 2025
26 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-terraform-providers
This PR has been included in build ose-installer-terraform-providers-container-v4.19.0-202504190118.p0.gc0f0af4.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-altinfra
This PR has been included in build ose-installer-altinfra-container-v4.19.0-202504190118.p0.gc0f0af4.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-baremetal-installer
This PR has been included in build ose-baremetal-installer-container-v4.19.0-202504190118.p0.gc0f0af4.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-artifacts
This PR has been included in build ose-installer-artifacts-container-v4.19.0-202504190118.p0.gc0f0af4.assembly.stream.el9.
All builds following this will include this PR.

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.

10 participants