Salt-bootstrap: Bootstrap doesn't work for Debian 10 (Buster)

Created on 8 Nov 2019  路  3Comments  路  Source: saltstack/salt-bootstrap

Description of Issue/Question

Debian 10 Salt packages are only available for Python 3.
But, the Debian 10 default is Python 2.
Bootstrap Python version detection find 2, and try to install packages for this version.

Setup

$ docker run --rm -it debian:buster-slim bash
root@b153991e056a:/# apt-get update
root@b153991e056a:/# apt-get -y install curl
root@b153991e056a:/# curl -L https://bootstrap.saltstack.com -o install_salt.sh

Steps to Reproduce Issue

root@b153991e056a:/# sh install_salt.sh -P

 *  INFO: Running version: 2019.11.04
 *  INFO: Executed by: 
 *  INFO: Command line: 'install_salt.sh -P'

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   4.9.0-11-amd64
 *  INFO:   Distribution: Debian 10.1

 *  INFO: Installing minion
 *  INFO: Found function install_debian_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_debian_stable
 *  INFO: Found function install_debian_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Found function install_debian_check_services
 *  INFO: Running install_debian_deps()
[...]
The following NEW packages will be installed:
  ..... python python-minimal python-yaml
  python2 python2-minimal python2.7 python2.7-minimal .....
[...]
The following NEW packages will be installed:
  apt-transport-https .....
[...]
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
 * ERROR: Failed to run install_debian_deps()!!!

Python 2.7 and wrong repository:

root@b153991e056a:/# cat /etc/apt/sources.list.d/saltstack.list 
deb https://repo.saltstack.com/apt/debian/10/amd64/latest buster main

It is not a major issue, but apt-transport-https is now useless for Debian 10.
apt include it.

Idea

Since packages are only available for Python 3. I think the Python version detection is not necessary anymore for Debian 10 and we could just set version to 3.

And we also can remove apt-transport-https from dependencies.

Do you agree with that ?

Feature Fixed Pending Verification

Most helpful comment

We encountered this problem and I support the movement above, to use use python3 by default with 2020 coming up fast.

For everyone else looking for a quickfix: Run the bootstrap.sh script with -x python3

All 3 comments

https://drone.saltstack.com/saltstack/salt-bootstrap/259/8/1

Tests can't detect this failure because we don't test the default behavior.
I think testing bootstrap without any parameters might be a good idea.
By default, it should not fail.

We encountered this problem and I support the movement above, to use use python3 by default with 2020 coming up fast.

For everyone else looking for a quickfix: Run the bootstrap.sh script with -x python3

Was this page helpful?
0 / 5 - 0 ratings