saltstack / salt-bootstrap

Generic Salt Bootstrap Script
Other
928 stars 549 forks source link

Bootstrap of Cumulus fails with "End of life distributions are not supported" #1162

Closed acgustafson closed 6 years ago

acgustafson commented 7 years ago

Description of Issue/Question

The bootstrap install fails with * ERROR: End of life distributions are not supported. when attempting to install on Cumulus Linux 3.4.2 (derivative on Debian 8).

Steps to Reproduce Issue

Run sh boostrap-salt.sh on Cumulus Linux.

root@minion:/home/vagrant# sh bootstrap-salt.sh -D
 *  INFO: Running version: 2017.08.17
 *  INFO: Executed by: shell pipe
 *  INFO: Command line: 'bootstrap-salt.sh -D'

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   4.1.0-cl-6-amd64
 *  INFO:   Distribution: Cumulus Linux 3.4

 * DEBUG: Detected Debian 8.0 derivative
 * ERROR: End of life distributions are not supported.
 * ERROR: Please consider upgrading to the next stable. See:
 * ERROR:     https://wiki.debian.org/DebianReleases
 * DEBUG: Removing the logging pipe /tmp/bootstrap-salt.logpipe

Versions and Systems

root@minion:/home/vagrant# sh bootstrap-salt.sh -v
bootstrap-salt.sh -- Version 2017.08.17
root@minion:/home/vagrant# cat /etc/*release
IMAGE_ID="Cumulus Linux"
IMAGE_RELEASE=3.4.2
IMAGE_DESCRIPTION="Cumulus Linux 3.4.2"
IMAGE_SWITCH_ARCHITECTURE=vx-amd64
IMAGE_BUILD_ID=8f7b49az8d2dbba
IMAGE_BUILD_DATE=2017-10-01T01:09:29+0000
IMAGE_BUILD_USER=clbuilder
DISTRIB_ID="Cumulus Linux"
DISTRIB_RELEASE=3.4.2
DISTRIB_DESCRIPTION="Cumulus Linux 3.4.2"
NAME="Cumulus Linux"
VERSION_ID=3.4.2
VERSION="Cumulus Linux 3.4.2"
PRETTY_NAME="Cumulus Linux"
ID=cumulus-linux
ID_LIKE=debian
CPE_NAME=cpe:/o:cumulusnetworks:cumulus_linux:3.4.2
HOME_URL="http://www.cumulusnetworks.com/"
SUPPORT_URL="http://support.cumulusnetworks.com/"
root@minion:/home/vagrant# 
ymasson commented 6 years ago

The DISTRO_MAJOR_VERSION is set before the __debian_derivatives_translation call.

__debian_derivatives_translation set the DISTRO_VERSION but don't set the DISTRO_MAJOR_VERSION with Debian translated number.

So, when the __check_end_of_life_versions is called, the major version contain the number of the system.

ymasson commented 6 years ago

A simple workaround could be:

if [ "$_debian_version" != "" ]; then echodebug "Detected Debian $_debian_version derivative" DISTRO_NAME_L="debian" DISTRO_VERSION="$_debian_version" DISTRO_MAJOR_VERSION="$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')" fi

in __debian_derivatives_translation function

rallytime commented 6 years ago

Thanks for posting the work around @ymasson. @acgustafson Are you in a position to give that a try? If that works, would either of you like to submit a pull request?

ymasson commented 6 years ago

@rallytime , I have include this workaround in my PR #1165 .

Without it, the bootstrap script return "End of life distributions are not supported" for all distributions derived from Debian, with a major release less than 7.

rallytime commented 6 years ago

@ymasson Oh, I'm sorry. You are right. I missed that last line you added when I was glancing at it. Thank you for clarifying.

@acgustafson That should resolve this issue for you.

rallytime commented 6 years ago

Closed via #1165

acgustafson commented 6 years ago

@ymasson Thanks a bunch!