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

Fix antrea-ubi image build #5723

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

antoninbas
Copy link
Contributor

Starting with Go 1.21, the runtime system needs to have a version of glibc "compatible" with the version available at build time. The ubi8 image comes with a very old version of glibc compared to the golang builder, and the Antrea binaries no longer run.

To address this, we use the ubi8 image to build Antrea, which means we need to install Go manually.

Fixes #5722

Starting with Go 1.21, the runtime system needs to have a version of
glibc "compatible" with the version available at build time. The ubi8
image comes with a very old version of glibc compared to the golang
builder, and the Antrea binaries no longer run.

To address this, we use the ubi8 image to build Antrea, which means we
need to install Go manually.

Fixes antrea-io#5722

Signed-off-by: Antonin Bas <abas@vmware.com>
@antoninbas antoninbas added action/backport Indicates a PR that requires backports. action/release-note Indicates a PR that should be included in release notes. labels Nov 17, 2023
@antoninbas
Copy link
Contributor Author

/skip-all

@antoninbas antoninbas merged commit 2afab06 into antrea-io:main Nov 17, 2023
50 of 58 checks passed
@antoninbas antoninbas deleted the fix-ubi-image branch November 17, 2023 21:11
antoninbas added a commit to antoninbas/antrea that referenced this pull request Feb 14, 2024
This reverts commit 2afab06.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
antoninbas added a commit to antoninbas/antrea that referenced this pull request Feb 14, 2024
This reverts commit 2afab06.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
antoninbas added a commit that referenced this pull request Feb 21, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes #5724

* Revert "Add git to antrea-build image for UBI build (#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
luolanzone pushed a commit to luolanzone/antrea that referenced this pull request Mar 20, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes antrea-io#5724

* Revert "Add git to antrea-build image for UBI build (antrea-io#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (antrea-io#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
tnqn pushed a commit that referenced this pull request Mar 21, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes #5724

* Revert "Add git to antrea-build image for UBI build (#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
luolanzone pushed a commit to luolanzone/antrea that referenced this pull request Mar 22, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes antrea-io#5724

* Revert "Add git to antrea-build image for UBI build (antrea-io#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (antrea-io#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
tnqn pushed a commit that referenced this pull request Mar 25, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes #5724

* Revert "Add git to antrea-build image for UBI build (#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
luolanzone pushed a commit to luolanzone/antrea that referenced this pull request Mar 26, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes antrea-io#5724

* Revert "Add git to antrea-build image for UBI build (antrea-io#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (antrea-io#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
tnqn pushed a commit that referenced this pull request Mar 27, 2024
* Disable cgo for all Antrea binaries

Instead of selectively disabling cgo for some binaries (e.g., release
assets), we now unconditionally disable cgo for all binaries, even those
that only run inside the container image for which they were built
(e.g., antrea-controller). After some analysis, there seems to be no
downside in doing this. We also get some benefits such as reduced build
time for the default make command.

Fixes #5724

* Revert "Add git to antrea-build image for UBI build (#5727)"

This reverts commit 2f8441b.

* Revert "Fix antrea-ubi image build (#5723)"

This reverts commit 2afab06.

---------

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/backport Indicates a PR that requires backports. action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

antrea/antrea-ubi:v1.14.0 image is broken
2 participants