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

CORS-3462: use static openshift-installer when possible #1651

Closed
wants to merge 1 commit into from

Conversation

r4f4
Copy link

@r4f4 r4f4 commented Apr 16, 2024

With openshift/installer#8161, the baremetal installer is now part of the regular installer which is now statically linked.

Using the static binary has the advantage of working on both CS8 and CS9 VMs and is a necessary step for moving the Installer images to a RHEL9 base.

Copy link

openshift-ci bot commented Apr 16, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cybertron for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

openshift-ci bot commented Apr 16, 2024

Hi @r4f4. Thanks for your PR.

I'm waiting for a openshift-metal3 member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 16, 2024
@andfasano
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 16, 2024
@r4f4
Copy link
Author

r4f4 commented Apr 16, 2024

/retitle CORS-3024,CORS-2797: use static openshift-installer when possible

Copy link

openshift-ci bot commented Apr 16, 2024

@r4f4: Re-titling can only be requested by trusted users, like repository collaborators.

In response to this:

/retitle CORS-3024,CORS-2797: use static openshift-installer when possible

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 r4f4 changed the title CORS-2797: use static openshift-installer when possible CORS-3024,CORS-2797: use static openshift-installer when possible Apr 16, 2024
@zaneb
Copy link
Member

zaneb commented Apr 16, 2024

/retitle CORS-3462: use static openshift-installer when possible

@openshift-ci openshift-ci bot changed the title CORS-3024,CORS-2797: use static openshift-installer when possible CORS-3462: use static openshift-installer when possible Apr 16, 2024
common.sh Outdated
export OPENSHIFT_INSTALLER=${OPENSHIFT_INSTALLER:-${OCP_DIR}/openshift-baremetal-install}
# On 4.16+ the baremetall installer was merged into the regular installer
if is_lower_version $OPENSHIFT_VERSION 4.16; then
export OPENSHIFT_INSTALLER=${OPENSHIFT_INSTALLER:-${OCP_DIR}/openshift-baremetal-install}
Copy link
Member

Choose a reason for hiding this comment

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

We also have OPENSHIFT_INSTALLER_CMD used in a couple of places, but not here (probably because of dependencies).

I think we need to define a DEFAULT_OPENSHIFT_INSTALLER_CMD and set it on the basis of the release version, then use that as the binary name here and as the default for OPENSHIFT_INSTALLER_CMD in the 2 places where that is defined.

@r4f4 r4f4 force-pushed the use-static-installer branch 2 times, most recently from 14f440d to 2576c9a Compare April 16, 2024 13:11
@dtantsur
Copy link
Member

I wonder if this actually works. The CI fails with

rhcos.sh: line 26: ocp/cluster16/openshift-baremetal-install: No such file or directory

This file uses variable called OPENSHIFT_INSTALLER. I'm not sure why @zaneb suggested _CMD suffix, but we now need to update a lot more places.

@andfasano
Copy link
Member

/retest-required

@r4f4 in general the changes look fine to me, leaving the final approval to the metal folks since it will impact mostly metal jobs

common.sh Outdated
@@ -174,6 +174,12 @@ fi

export OPENSHIFT_RELEASE_TAG=$(echo $OPENSHIFT_RELEASE_IMAGE | sed -E 's/[[:alnum:]\/.-]*(release|okd).*://')

# On 4.16+ the baremetall installer was merged into the regular installer
export DEFAULT_OPENSHIFT_INSTALLER_CMD="openshift-install"
if is_lower_version ${OPENSHIFT_VERSION:-""} 4.16; then
Copy link
Member

Choose a reason for hiding this comment

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

OPENSHIFT_VERSION is empty in the CI run

 ++(common.sh:179): source(): is_lower_version '' 4.16
+++(common.sh:34): is_lower_version(): echo ' 4.16'
+++(common.sh:34): is_lower_version(): tr ' ' '\n'
+++(common.sh:34): is_lower_version(): sort -V
+++(common.sh:34): is_lower_version(): head -n1
++(common.sh:34): is_lower_version(): [[ '' != 4.16 ]]
++(common.sh:35): is_lower_version(): return 0
++(common.sh:180): source(): export DEFAULT_OPENSHIFT_INSTALLER_CMD=openshift-baremetal-install
++(common.sh:180): source(): DEFAULT_OPENSHIFT_INSTALLER_CMD=openshift-baremetal-install 

Copy link
Author

Choose a reason for hiding this comment

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

Any suggestions on how to get the release version so it works also in CI?

Copy link
Member

Choose a reason for hiding this comment

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

Ops! It's the lowercase function openshift_version that returns the current payload version

Copy link
Member

Choose a reason for hiding this comment

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

Then there's existing code that's wrong:

if is_lower_version $OPENSHIFT_VERSION 4.9; then

@r4f4 r4f4 force-pushed the use-static-installer branch 4 times, most recently from 9809b0c to 8a645a6 Compare April 16, 2024 22:20
With openshift/installer#8161, the baremetal
installer is now part of the regular installer which is now statically
linked.

Using the static binary has the advantage of working on both CS8 and CS9
VMs and is a necessary step for moving the Installer images to a RHEL9
base.
Copy link

openshift-ci bot commented Apr 16, 2024

@r4f4: 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-metal-ipi-ovn-dualstack 454c29c link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/e2e-metal-ipi-ovn-ipv6 454c29c link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-metal-ipi-virtualmedia 454c29c link false /test e2e-metal-ipi-virtualmedia
ci/prow/e2e-metal-ipi-bm-bond 454c29c link false /test e2e-metal-ipi-bm-bond
ci/prow/e2e-agent-ha-dualstack 454c29c link false /test e2e-agent-ha-dualstack
ci/prow/e2e-metal-ipi-serial-ovn-ipv6 454c29c link false /test e2e-metal-ipi-serial-ovn-ipv6
ci/prow/e2e-agent-compact-ipv4 454c29c link true /test e2e-agent-compact-ipv4
ci/prow/e2e-metal-ipi-bm 454c29c link true /test e2e-metal-ipi-bm
ci/prow/e2e-metal-ipi-serial-ipv4 454c29c link true /test e2e-metal-ipi-serial-ipv4
ci/prow/e2e-agent-sno-ipv6 454c29c link false /test e2e-agent-sno-ipv6

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

@r4f4
Copy link
Author

r4f4 commented Apr 17, 2024

/hold
Depends on #1652

@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 Apr 17, 2024
@zaneb
Copy link
Member

zaneb commented Apr 22, 2024

/close
in favour of #1653

Copy link

openshift-ci bot commented Apr 22, 2024

@zaneb: Closed this PR.

In response to this:

/close
in favour of #1653

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 openshift-ci bot closed this Apr 22, 2024
@r4f4 r4f4 deleted the use-static-installer branch April 22, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants