-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Antrea base image to ubuntu:22.04
Ubuntu 20.04 comes with iptables 1.8.4, which seems to have several bugs when used with nft. In particular, we observe that iptables-restore sometimes segfaults when restoring the ANTREA-NODE-PORT-LOCAL chain in the nat table. Ubuntu 22.04 comes with a more recent iptables version, 1.8.7. As part of this change, we change the tag format for base images (antrea/openvswitch and antrea/base-ubuntu). The tag now includes a hash (md5sum) generated from the list of dependencies (with their version), as well as the minor Antrea version number. Fixes #4435 Signed-off-by: Antonin Bas <abas@vmware.com>
- Loading branch information
1 parent
630f68f
commit dceeb06
Showing
21 changed files
with
184 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Managing dependency versions | ||
|
||
For each build chain (e.g., "ubuntu"), a `.def` text file should be added to | ||
this directory. It must define the following variables: | ||
|
||
* `tag_prefix`: a string which will be used as prefix to the final build tag. | ||
* `deps`: a Bash array of dependency names. | ||
* `deps_files`: a Bash array listing version files (from the [deps/](../deps) | ||
directory) which are used to track the version of build / runtime | ||
dependencies (e.g., OVS version). Unlike for `deps`, the dependencies | ||
included here tend to be generic and not specific to a given build chain. | ||
|
||
To generate the build tag, a hash (md5sum) is computed from the `deps` string | ||
and from the contents of the version files listed in `deps_files`. | ||
|
||
To add a dependency to a build chain, you typically define a new version file in | ||
[deps/](../deps) and include it in `deps_files` for all appropriate build | ||
chains. | ||
|
||
See [ubuntu.def](ubuntu.def) for an example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# call with build chain name (e.g. ubuntu) | ||
function build_tag() { | ||
local chain="$1" | ||
local this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
source "$this_dir/$chain.def" | ||
local deps_str="" | ||
for x in "${deps[@]}"; do | ||
deps_str="$deps_str $x" | ||
done | ||
for x in "${deps_files[@]}"; do | ||
local v=$(head -n 1 $this_dir/../deps/$x) | ||
deps_str="$deps_str $v" | ||
done | ||
local hash="$(echo $deps_str| md5sum| head -c 10)" | ||
local antrea_version=$(head -n 1 $this_dir/../../../VERSION | cut -f1,2 -d'.') | ||
local tag="${antrea_version}_$hash" | ||
if [ "$tag_prefix" != "" ]; then | ||
tag="${tag_prefix}_${tag}" | ||
fi | ||
echo "$tag" | ||
} | ||
|
||
echo "$(build_tag "$@")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# call with build chain name (e.g. ubuntu) | ||
function show_deps() { | ||
local chain="$1" | ||
local this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
source "$this_dir/$chain.def" | ||
for x in "${deps[@]}"; do | ||
echo "$x" | ||
done | ||
for x in "${deps_files[@]}"; do | ||
local v=$(head -n 1 $this_dir/../deps/$x) | ||
echo "$x: $v" | ||
done | ||
} | ||
|
||
echo "$(show_deps "$@")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tag_prefix="" | ||
deps=("centos7" "ubi8") | ||
deps_files=("ovs-version" "go-version" "cni-binaries-version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Will be prepended to the tag | ||
tag_prefix="22.04" | ||
# The image is built using the Ubuntu 22.04 distribution | ||
deps=("ubuntu22.04") | ||
# Build or runtime dependencies whose version is tracked using a file in this directory | ||
deps_files=("ovs-version" "go-version" "cni-binaries-version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.