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

e2e: fix opensuse cloud-init and handle wrong containerd #701

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions demo/lib/distro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ distro-refresh-pkg-db() { distro-resolve "$@"; }
distro-install-pkg() { distro-resolve "$@"; }
distro-remove-pkg() { distro-resolve "$@"; }
distro-setup-proxies() { distro-resolve "$@"; }
distro-setup-oneshot() { distro-resolve "$@"; }
distro-install-utils() { distro-resolve "$@"; }
distro-install-golang() { distro-resolve "$@"; }
distro-install-runc() { distro-resolve "$@"; }
Expand Down Expand Up @@ -531,6 +532,12 @@ opensuse-pkg-type() {
echo "rpm"
}

opensuse-setup-oneshot() {
# Remove bad version of containerd if it is already installed,
# otherwise valid version of the package will not be installed.
vm-command "rpm -q containerd && ( zypper info containerd | awk '/Repository/{print $3}' | grep -v Virtualization ) && echo Removing wrong containerd version && zypper --non-interactive rm containerd"
}

opensuse-install-repo() {
opensuse-wait-for-zypper
vm-command "$ZYPPER addrepo $* && $ZYPPER refresh" ||
Expand Down Expand Up @@ -691,11 +698,9 @@ EOF
command-error "failed to enable kubelet"
}

opensuse-bootstrap-commands() {
opensuse-bootstrap-commands-pre() {
cat <<EOF
export HTTP_PROXY="$http_proxy"
export HTTPS_PROXY="$http_proxy"
zypper refresh && zypper install ssh && systemctl enable ssh && systemctl start ssh
sed -e '/Signature checking/a gpgcheck = off' -i /etc/zypp/zypp.conf
EOF
}

Expand Down Expand Up @@ -803,6 +808,10 @@ EOF
done
}

default-setup-oneshot() {
:
}

default-install-utils() {
# $distro-install-utils() is responsible for installing common
# utilities, such as pidof and killall, that the test framework
Expand Down
1 change: 1 addition & 0 deletions demo/lib/vm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ vm-install-pkg() {
vm-setup-oneshot() {
local util
( distro-refresh-pkg-db ) || true
distro-setup-oneshot
distro-install-utils
# Verify that all required utilities exit on the VM.
for util in pidof killall; do
Expand Down