Skip to content

Commit

Permalink
fix check for missing stackscript
Browse files Browse the repository at this point in the history
  • Loading branch information
eljohnson92 committed Aug 15, 2024
1 parent 3b0f50c commit 24d71b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cloud/services/stackscripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func EnsureStackscript(ctx context.Context, machineScope *scope.MachineScope) (i
if util.IgnoreLinodeAPIError(err, http.StatusNotFound) != nil {
return 0, fmt.Errorf("failed to get stackscript with label %s: %w", stackscriptName, err)
}
if stackscripts != nil {
if len(stackscripts) != 0 {
return stackscripts[0].ID, nil
}
stackscriptCreateOptions := linodego.StackscriptCreateOptions{
Expand Down
4 changes: 2 additions & 2 deletions scripts/pre-kubeadminit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EOF
sed -i '/swap/d' /etc/fstab
swapoff -a
# check for required tools and only install missing tools
REQUIRED_TOOLS=(containerd socat conntrack iptables)
REQUIRED_TOOLS=(containerd socat conntrack ethtool iptables)
INSTALL_TOOLS=()
for tool in ${REQUIRED_TOOLS[*]}; do
echo "checking for ${tool}"
Expand All @@ -85,7 +85,7 @@ done
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
# use containerd files we write instead of package defaults
apt-get install -o Dpkg::Options::="--force-confold" -y "${INSTALL_TOOLS[*]}"
apt-get install -o Dpkg::Options::="--force-confold" -y ${INSTALL_TOOLS[*]}

PATCH_VERSION=${1#[v]}
VERSION=${PATCH_VERSION%.*}
Expand Down

0 comments on commit 24d71b0

Please sign in to comment.