salt-bootstrap fail to install salt 3000 stable when specified on command line
* INFO: Running version: 2020.02.04
* INFO: Executed by:
* INFO: Command line: '/tmp/saltbootstrap.sh -XUdfP -x python3 stable 3000'
Unknown stable version: 3000 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, 2016.3, 2016.11, 2017.7, 2018.3, 2019.2, latest, $MAJOR.$MINOR.$PATCH)
saltbootstrap.sh -XUdfP -x python3 stable 3000
Same on Ubuntu 18.04. I made a quick patch, but it is a hack:
--- bootstrap-salt.sh.1 2020-02-12 13:19:40.000000000 +0700
+++ bootstrap-salt.sh 2020-02-12 13:06:41.000000000 +0700
@@ -606,7 +606,7 @@
if [ "$(echo "$1" | grep -E '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5|2015\.8|2016\.3|2016\.11|2017\.7|2018\.3|2019\.2)$')" != "" ]; then
STABLE_REV="$1"
shift
- elif [ "$(echo "$1" | grep -E '^([0-9]*\.[0-9]*\.[0-9]*)$')" != "" ]; then
+ elif [ "$(echo "$1" | grep -E '^([0-9]*\.[0-9]*\.[0-9]*|3000)$')" != "" ]; then
if [ "$(uname)" = "Darwin" ]; then
STABLE_REV="$1"
else
@@ -614,7 +614,7 @@
fi
shift
else
- echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, 2016.3, 2016.11, 2017.7, 2018.3, 2019.2, latest, \$MAJOR.\$MINOR.\$PATCH)"
+ echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, 2016.3, 2016.11, 2017.7, 2018.3, 2019.2, 3000, latest, \$MAJOR.\$MINOR.\$PATCH)"
exit 1
fi
fi
IIUC there are two problems here:
The current workaround is to use stable latest instead of stable 3000, though, I'm working on a fix.
stable latest is not an option for me as it breaks my packer builds, especially at final tests round where I compare installed version vs requested version (3000 vs latest so test fails).
But I use a patched version of the bootstrap script as a workaround.
Bear in mind that this affects the PowerShell script as well.
Fixed in #1433
Most helpful comment
IIUC there are two problems here: