Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux Post Neon #1423

Closed
B1ue-W01f opened this issue Feb 1, 2020 · 3 comments · Fixed by #1424
Closed

Arch Linux Post Neon #1423

B1ue-W01f opened this issue Feb 1, 2020 · 3 comments · Fixed by #1424

Comments

@B1ue-W01f
Copy link

B1ue-W01f commented Feb 1, 2020

Description of Issue/Question

bootstrap-salt.sh appears to try and use yum for arch linux based distributions.

Setup

Using the standard arch platform in use on all the Saltstack-Formulas for testing with test-kitchen and docker:

- name: arch-base-latest-master-py2
    driver:
      image: netmanagers/salt-master-py2:arch-base-latest
      provision_command:
        - curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
        - sh bootstrap-salt.sh -XdPbfrq -x python2 git master
      run_command: /usr/lib/systemd/systemd

Steps to Reproduce Issue

Ran 'kitchen test' using the standard test-kitchen platform config above. Cut down results below:

INFO: Running version: 2020.01.29
 *  INFO: Executed by: 
 *  INFO: Command line: 'bootstrap-salt.sh -XdPbfrq -x python2 git master'
 *  INFO: Detected -x option. Using python2 to install Salt.

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   5.4.15-2-MANJARO
 *  INFO:   Distribution: Arch Linux 

 *  INFO: Installing minion
 *  INFO: Daemons will not be started

 *  WARN: Post Neon git based installations will always install salt and it's dependencies using pip
 *  WARN: You have 10 seconds to cancel and stop the bootstrap process

 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_arch_linux_git
 *  INFO: Found function install_arch_linux_git_post
 *  INFO: Found function install_arch_linux_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Forced shallow cloning of git repository.
 *  INFO: Attempting to shallow clone master from Salt's repository https://github.com/saltstack/salt.git
Cloning into 'salt'...
 *  INFO: Cloning Salt's git repository succeeded
 *  INFO: Running config_salt()
 *  INFO: Running install_arch_linux_git()
bootstrap-salt.sh: line 2021: yum: command not found
 * ERROR: Failed to run install_arch_linux_git()!!!
STDERR: The command '/bin/sh -c sh bootstrap-salt.sh -XdPbfrq -x python2 git master' returned a non-zero code: 1
---- End output of docker -H unix:///var/run/docker.sock build -f Dockerfile-kitchen20200201-10013-fnw37c . ----
Ran docker -H unix:///var/run/docker.sock build -f Dockerfile-kitchen20200201-10013-fnw37c . returned 1] on arch-desktop-arch-base-latest-master-py2

Versions and Systems

See top of output above.

I could be completely wrong, but I think it may relate to this extract of bootstrap-salt.sh:

    # Install pip and pip dependencies
    if ! __check_command_exists "${_pip_cmd} --version"; then
        __PACKAGES="${_py_pkg}-pip gcc"
        # shellcheck disable=SC2086
        if [ "$DISTRO_NAME_L" = "debian" ];then
            __PACKAGES="${__PACKAGES} ${_py_pkg}-dev"
            __apt_get_install_noinput ${__PACKAGES} || return 1
        else
            __PACKAGES="${__PACKAGES} ${_py_pkg}-devel"
            __yum_install_noinput ${__PACKAGES} || return 1
        fi

    fi

It appears to attempt to use either apt or yum only as install methods.
I appreciate that Arch Linux isnt officially supported, and I appreciate that I could be entirely wrong in my assessment.

@s0undt3ch
Copy link
Contributor

Thank you for reporting this issue.
We were already aware of it but an issue was not created.

Sadly this was an uncaught copy/paste mistake I did on the last release and it doesn't just affect Arch.

I've been working of a fix which satisfies all of the officially supported salt platforms(at least) and I should get another stable release out this upcoming week.

@B1ue-W01f
Copy link
Author

No worries, thought that may be the case.

Thanks very much for the work you do (and don't officially do :) ).

@max-arnold
Copy link
Contributor

The same thing happens on Ubuntu:

Using Bootstrap Options: -P -x python3 -f -g https://github.com/saltstack/salt.git -F -c /tmp -k /tmp/minion-seed-keys -M -N git master
Bootstrapping Salt... (this may take a while)
 *  INFO: Running version: 2020.01.29
 *  INFO: Executed by:
 *  INFO: Command line: 'bootstrap-salt.sh -P -x python3 -f -g https://github.com/saltstack/salt.git -F -c /tmp -k /tmp/minion-seed-keys -M -N git master'
 *  INFO: Detected -x option. Using python3 to install Salt.
 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   4.15.0-72-generic
 *  INFO:   Distribution: Ubuntu 18.04
 *  INFO: Installing master
 *  WARN: Post Neon git based installations will always install salt and it's dependencies using pip
 *  WARN: You have 10 seconds to cancel and stop the bootstrap process
 *  INFO: Found function install_ubuntu_git_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_ubuntu_git
 *  INFO: Found function install_ubuntu_git_post
 *  INFO: Found function install_ubuntu_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Found function install_ubuntu_check_services
 *  INFO: Running install_ubuntu_git_deps()
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists...

Reading package lists...

Building dependency tree...

Reading state information...

ca-certificates is already the newest version (20180409).
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
 *  INFO: Forced shallow cloning of git repository.
 *  INFO: Attempting to shallow clone master from Salt's repository https://github.com/saltstack/salt.git
Cloning into 'salt'...
 *  INFO: Cloning Salt's git repository succeeded
 *  INFO: Running config_salt()
 *  INFO: Running preseed_master()
 *  INFO: Running install_ubuntu_git()
bootstrap-salt.sh: 2021: bootstrap-salt.sh: yum: not found
 * ERROR: Failed to run install_ubuntu_git()!!!
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/tmp/bootstrap_salt.sh -P -x python3 -f -g https://github.com/saltstack/salt.git -F -c /tmp -k /tmp/minion-seed-keys -M -N git master

Stdout from the command:

 *  INFO: Running version: 2020.01.29
 *  INFO: Executed by:
 *  INFO: Command line: 'bootstrap-salt.sh -P -x python3 -f -g https://github.com/saltstack/salt.git -F -c /tmp -k /tmp/minion-seed-keys -M -N git master'
 *  INFO: Detected -x option. Using python3 to install Salt.

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   4.15.0-72-generic
 *  INFO:   Distribution: Ubuntu 18.04

 *  INFO: Installing master

 *  WARN: Post Neon git based installations will always install salt and it's dependencies using pip
 *  WARN: You have 10 seconds to cancel and stop the bootstrap process

 *  INFO: Found function install_ubuntu_git_deps
 *  INFO: Found function config_salt
 *  INFO: Found function preseed_master
 *  INFO: Found function install_ubuntu_git
 *  INFO: Found function install_ubuntu_git_post
 *  INFO: Found function install_ubuntu_restart_daemons
 *  INFO: Found function daemons_running
 *  INFO: Found function install_ubuntu_check_services
 *  INFO: Running install_ubuntu_git_deps()
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20180409).
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
 *  INFO: Forced shallow cloning of git repository.
 *  INFO: Attempting to shallow clone master from Salt's repository https://github.com/saltstack/salt.git
Cloning into 'salt'...
 *  INFO: Cloning Salt's git repository succeeded
 *  INFO: Running config_salt()
 *  INFO: Running preseed_master()
 *  INFO: Running install_ubuntu_git()
bootstrap-salt.sh: 2021: bootstrap-salt.sh: yum: not found
 * ERROR: Failed to run install_ubuntu_git()!!!


Stderr from the command:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants