Skip to content

Commit

Permalink
bug: weave to flannel migration wrong task command flag (#4836)
Browse files Browse the repository at this point in the history
when migrating from weave to flannel the flannel add-on was asking users
to run a `task.sh` command with the `airgap` flag set in an environment
with internet access.

this commit fixes it by inverting the logic: only ask for `airgap` when
in a disconnected enfironment.
  • Loading branch information
ricardomaraschini authored Sep 21, 2023
1 parent 5d83e4d commit e789901
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions addons/flannel/0.20.0/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.20.1/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.20.2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.0/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.1/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.3/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.4/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.21.5/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.22.0/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.22.1/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.22.2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/0.22.3/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down
4 changes: 2 additions & 2 deletions addons/flannel/template/base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ function weave_to_flannel() {
printf "${worker_node_names}\n"

if [ "$AIRGAP" = "1" ]; then
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
printf "\n\t${GREEN}cat ./tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary airgap${NC}\n\n"
printf "\n\t${GREEN}${prefix}tasks.sh | sudo bash -s weave-to-flannel-secondary${NC}\n\n"
fi

printf "${YELLOW}Once this has been run on all nodes, press enter to continue.${NC}"
Expand Down

0 comments on commit e789901

Please sign in to comment.