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

[release-4.8] OCPBUGS-16208: Dockerfile: build both RHEL7 and RHEL8 shims #1776

Merged

Conversation

jcaamano
Copy link
Contributor

Since the shim (ovn-k8s-cni-overlay) gets copied to the host OS and executed in the host mount namespace by CRIO/Multus it needs to be runtime compatible with the host OS. Running a RHEL8-built shim on a RHEL7 system doesn't work due to different shared library dependencies between the two OS versions.

This wasn't a problem before because CGO_ENABLED=0 which essentially statically linked everything into the binary. But since we actually need CGO_ENABLED=1 (which ART forces on "official" builds anyway) to ensure we use OpenSSL's crypto for FIPS compliance, we run into the OS version problem with our binaries since they are really always built with CGO_ENABLED=1 anyway.

So... build two separate versions of ovn-kubernetes in different layers, and copy the RHEL7 shim into a special location where our container startup scripts can find it.

Signed-off-by: Jaime Caamaño Ruiz jcaamano@redhat.com
(cherry picked from commit 932ef31)

- What this PR does and why is it needed

- Special notes for reviewers

- How to verify it

- Description for the changelog

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 24, 2023
@openshift-ci-robot
Copy link
Contributor

@jcaamano: This pull request references Jira Issue OCPBUGS-16208, which is invalid:

  • expected the bug to target the "4.8.z" version, but no target version was set
  • expected Jira Issue OCPBUGS-16208 to depend on a bug targeting a version in 4.9.0, 4.9.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Since the shim (ovn-k8s-cni-overlay) gets copied to the host OS and executed in the host mount namespace by CRIO/Multus it needs to be runtime compatible with the host OS. Running a RHEL8-built shim on a RHEL7 system doesn't work due to different shared library dependencies between the two OS versions.

This wasn't a problem before because CGO_ENABLED=0 which essentially statically linked everything into the binary. But since we actually need CGO_ENABLED=1 (which ART forces on "official" builds anyway) to ensure we use OpenSSL's crypto for FIPS compliance, we run into the OS version problem with our binaries since they are really always built with CGO_ENABLED=1 anyway.

So... build two separate versions of ovn-kubernetes in different layers, and copy the RHEL7 shim into a special location where our container startup scripts can find it.

Signed-off-by: Jaime Caamaño Ruiz jcaamano@redhat.com
(cherry picked from commit 932ef31)

- What this PR does and why is it needed

- Special notes for reviewers

- How to verify it

- Description for the changelog

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 requested review from dcbw and trozet July 24, 2023 08:55
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2023
@jcaamano
Copy link
Contributor Author

/retest-required

@jcaamano
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@jcaamano: This pull request references Jira Issue OCPBUGS-16208, which is invalid:

  • expected dependent Jira Issue OCPBUGS-15865 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

Since the shim (ovn-k8s-cni-overlay) gets copied to the host OS
and executed in the host mount namespace by CRIO/Multus it needs
to be runtime compatible with the host OS. Running a RHEL8-built
shim on a RHEL7 system doesn't work due to different shared library
dependencies between the two OS versions.

This wasn't a problem before because CGO_ENABLED=0 which essentially
statically linked everything into the binary. But since we actually
need CGO_ENABLED=1 (which ART forces on "official" builds anyway)
to ensure we use OpenSSL's crypto for FIPS compliance, we run into
the OS version problem with our binaries since they are really
always built with CGO_ENABLED=1 anyway.

So... build two separate versions of ovn-kubernetes in different
layers, and copy the RHEL7 shim into a special location where our
container startup scripts can find it.

Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
(cherry picked from commit 932ef31)
@dcbw
Copy link
Contributor

dcbw commented Jul 24, 2023

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-local-gateway
/override ci/prow/e2e-azure-ovn
/override ci/prow/e2e-vsphere-ovn
/override ci/prow/e2e-vsphere-windows

Need 4.8 backport of openshift/origin#27422, plus one image pull backoff issue for ingress-canary

@dcbw
Copy link
Contributor

dcbw commented Jul 24, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 24, 2023

@dcbw: Overrode contexts on behalf of dcbw: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-local-gateway, ci/prow/e2e-azure-ovn, ci/prow/e2e-vsphere-ovn, ci/prow/e2e-vsphere-windows

In response to this:

/override ci/prow/e2e-aws-ovn
/override ci/prow/e2e-aws-ovn-local-gateway
/override ci/prow/e2e-azure-ovn
/override ci/prow/e2e-vsphere-ovn
/override ci/prow/e2e-vsphere-windows

Need 4.8 backport of openshift/origin#27422, plus one image pull backoff issue for ingress-canary

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.

@dcbw dcbw added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jul 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dcbw, jcaamano

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

openshift-ci bot commented Jul 24, 2023

@jcaamano: 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-vsphere-windows 20f8d23 link true /test e2e-vsphere-windows
ci/prow/e2e-vsphere-ovn 20f8d23 link true /test e2e-vsphere-ovn
ci/prow/okd-e2e-gcp-ovn 20f8d23 link false /test okd-e2e-gcp-ovn
ci/prow/e2e-aws-ovn-local-gateway 20f8d23 link true /test e2e-aws-ovn-local-gateway
ci/prow/e2e-metal-ipi-ovn-dualstack 20f8d23 link false /test e2e-metal-ipi-ovn-dualstack
ci/prow/4.8-upgrade-from-stable-4.7-e2e-aws-ovn-upgrade 20f8d23 link false /test 4.8-upgrade-from-stable-4.7-e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn-shared-to-local-gateway-mode-migration 20f8d23 link false /test e2e-aws-ovn-shared-to-local-gateway-mode-migration
ci/prow/e2e-azure-ovn 20f8d23 link true /test e2e-azure-ovn
ci/prow/e2e-aws-ovn 20f8d23 link true /test 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/test-infra repository. I understand the commands that are listed here.

@zhaozhanqi
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jul 25, 2023
@mrunalp mrunalp added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 25, 2023
@openshift-merge-robot openshift-merge-robot merged commit eafcda0 into openshift:release-4.8 Jul 25, 2023
13 of 17 checks passed
@openshift-ci-robot
Copy link
Contributor

@jcaamano: Jira Issue OCPBUGS-16208: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-16208 has been moved to the MODIFIED state.

In response to this:

Since the shim (ovn-k8s-cni-overlay) gets copied to the host OS and executed in the host mount namespace by CRIO/Multus it needs to be runtime compatible with the host OS. Running a RHEL8-built shim on a RHEL7 system doesn't work due to different shared library dependencies between the two OS versions.

This wasn't a problem before because CGO_ENABLED=0 which essentially statically linked everything into the binary. But since we actually need CGO_ENABLED=1 (which ART forces on "official" builds anyway) to ensure we use OpenSSL's crypto for FIPS compliance, we run into the OS version problem with our binaries since they are really always built with CGO_ENABLED=1 anyway.

So... build two separate versions of ovn-kubernetes in different layers, and copy the RHEL7 shim into a special location where our container startup scripts can find it.

Signed-off-by: Jaime Caamaño Ruiz jcaamano@redhat.com
(cherry picked from commit 932ef31)

- What this PR does and why is it needed

- Special notes for reviewers

- How to verify it

- Description for the changelog

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

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-ovn-kubernetes-container-v4.8.0-202311261141.p0.geafcda0.assembly.stream for distgit ose-ovn-kubernetes.
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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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