From df57237579c4163d1768c5597798318bacc4f0de Mon Sep 17 00:00:00 2001 From: Mark Clarkson Date: Mon, 21 Oct 2024 18:09:50 +0100 Subject: [PATCH] Fix `mok build` failure Fixes error: ERROR: docker network create failed --- Makefile | 2 +- package/mok | 12 +++++++----- src/buildimage.sh | 2 ++ src/globals.sh | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 401b1c2..525b296 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 0.8.15 +VERSION = 0.8.16 K8SVERSION = 1.31.1 .PHONY: all diff --git a/package/mok b/package/mok index 1fe2300..ea5d1fd 100755 --- a/package/mok +++ b/package/mok @@ -428,7 +428,7 @@ _PA_new # Args: None expected. _GL_new() { - declare -rg MOKVERSION="0.8.15" + declare -rg MOKVERSION="0.8.16" declare -rg K8SVERSION="1.31.1" declare -rg GO_VERSION="1.23.2" @@ -539,7 +539,7 @@ _ER_new || exit 1 # shellcheck shell=bash disable=SC2148 # UT - Utilities -# _UT is an associative array that holds data specific to shared utilities. +# _UT is an associative array that holds data specific to general utilities. declare -A _UT # Declare externally defined global variables --------------------------------- @@ -926,7 +926,7 @@ _GC_new || exit 1 # shellcheck shell=bash disable=SC2148 # EX - EXec -# EX is an associative array that holds data specific to the get cluster command. +# EX is an associative array that holds data specific to the exec cluster command. declare -A _EX # Declare externally defined variables ---------------------------------------- @@ -1098,7 +1098,7 @@ _EX_new || exit 1 # shellcheck shell=bash disable=SC2148 # DC - Delete Cluster -# _DC is an associative array that holds data specific to the get cluster command. +# _DC is an associative array that holds data specific to deleting a cluster. declare -A _DC # Declare externally defined variables ---------------------------------------- @@ -2240,7 +2240,7 @@ EnD # shellcheck shell=bash disable=SC2148 # CU - Container Utilities -# _CU is an associative array that holds data specific to containers. +# _CU is an associative array that holds data specific to container utils. declare -A _CU # Declare externally defined variables ---------------------------------------- @@ -2739,6 +2739,8 @@ _BI_modify_container_image() { docker stop -t 5 mok-build-modify &>/dev/null docker rm mok-build-modify &>/dev/null + CC_set_clustername "build" || err || return + # Start container CU_create_container "mok-build-modify" "mok-build-modify" "${K8SVERSION}" || return diff --git a/src/buildimage.sh b/src/buildimage.sh index 4a876c4..6e99520 100644 --- a/src/buildimage.sh +++ b/src/buildimage.sh @@ -225,6 +225,8 @@ _BI_modify_container_image() { docker stop -t 5 mok-build-modify &>/dev/null docker rm mok-build-modify &>/dev/null + CC_set_clustername "build" || err || return + # Start container CU_create_container "mok-build-modify" "mok-build-modify" "${K8SVERSION}" || return diff --git a/src/globals.sh b/src/globals.sh index 785d658..c81abd5 100644 --- a/src/globals.sh +++ b/src/globals.sh @@ -10,7 +10,7 @@ # Args: None expected. _GL_new() { - declare -rg MOKVERSION="0.8.15" + declare -rg MOKVERSION="0.8.16" declare -rg K8SVERSION="1.31.1" declare -rg GO_VERSION="1.23.2"