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

salt-bootstrap fails to start services when installing OneDir on AlmaLinux and Rocky Linux 8 #1876

Closed
ggiesen opened this issue Oct 31, 2022 · 2 comments · Fixed by #1877
Closed

Comments

@ggiesen
Copy link
Contributor

ggiesen commented Oct 31, 2022

Description of Issue/Question

salt-bootstrap fails to start services after installation when using OneDir on AlmaLinux 8:

 *  INFO: Running install_almalinux_check_services()
 * ERROR: Failed to run install_almalinux_check_services()!!!

Installing using classic installation (stable instead of onedir) installs without issue. It also fails on Rocky Linux 8 so the issue seems not to be specific to AlmaLinux.

Setup

> mkdir salt-bootstrap-almalinux

> cd salt-bootstrap-almalinux

 salt-bootstrap-almalinux> vagrant init almalinux/8
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

salt-bootstrap-almalinux> vagrant up
Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Cloning VMware VM: 'almalinux/8'. This can take some time...
==> default: Checking if box 'almalinux/8' version '8.6.20221001' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 22 => 2222
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Configuring network adapters within the VM...
==> default: Waiting for HGFS to become available...
==> default: Enabling and configuring shared folders...
    default: -- salt-bootstrap-almalinux: /vagrant

salt-bootstrap-almalinux> vagrant ssh

Steps to Reproduce Issue

(Include debug logs if possible, bootstrap-salt.sh -D.)

[vagrant@localhost ~]$ curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  320k  100  320k    0     0  2564k      0 --:--:-- --:--:-- --:--:-- 2585k

[vagrant@localhost ~]$ sudo sh bootstrap-salt.sh -D onedir
 *  INFO: Running version: 2022.10.04
 *  INFO: Executed by: sh
 *  INFO: Command line: 'bootstrap-salt.sh -D onedir'

 *  INFO: System Information:
 *  INFO:   CPU:          GenuineIntel
 *  INFO:   CPU Arch:     x86_64
 *  INFO:   OS Name:      Linux
 *  INFO:   OS Version:   4.18.0-372.26.1.el8_6.x86_64
 *  INFO:   Distribution: AlmaLinux 8.6

 * DEBUG: Binaries will be searched using the following $PATH: /sbin:/bin:/usr/sbin:/usr/bin
 *  INFO: Installing minion
 * DEBUG: install_almalinux_8_onedir_deps not found....
 * DEBUG: install_almalinux_8_6_onedir_deps not found....
 * DEBUG: install_almalinux_8_deps not found....
 * DEBUG: install_almalinux_8_6_deps not found....
 *  INFO: Found function install_almalinux_onedir_deps
 * DEBUG: DEPS_INSTALL_FUNC=install_almalinux_onedir_deps
 * DEBUG: config_almalinux_8_onedir_salt not found....
 * DEBUG: config_almalinux_8_6_onedir_salt not found....
 * DEBUG: config_almalinux_8_salt not found....
 * DEBUG: config_almalinux_8_6_salt not found....
 * DEBUG: config_almalinux_onedir_salt not found....
 * DEBUG: config_almalinux_salt not found....
 *  INFO: Found function config_salt
 * DEBUG: CONFIG_SALT_FUNC=config_salt
 * DEBUG: preseed_almalinux_8_onedir_master not found....
 * DEBUG: preseed_almalinux_8_6_onedir_master not found....
 * DEBUG: preseed_almalinux_8_master not found....
 * DEBUG: preseed_almalinux_8_6_master not found....
 * DEBUG: preseed_almalinux_onedir_master not found....
 * DEBUG: preseed_almalinux_master not found....
 *  INFO: Found function preseed_master
 * DEBUG: PRESEED_MASTER_FUNC=preseed_master
 * DEBUG: INSTALL_FUNC_NAMES=install_almalinux_8_onedir install_almalinux_8_6_onedir install_almalinux_onedir
 * DEBUG: install_almalinux_8_onedir not found....
 * DEBUG: install_almalinux_8_6_onedir not found....
 *  INFO: Found function install_almalinux_onedir
 * DEBUG: INSTALL_FUNC=install_almalinux_onedir
 * DEBUG: install_almalinux_8_onedir_post not found....
 * DEBUG: install_almalinux_8_6_onedir_post not found....
 * DEBUG: install_almalinux_8_post not found....
 * DEBUG: install_almalinux_8_6_post not found....
 * DEBUG: install_almalinux_onedir_post not found....
 * DEBUG: install_almalinux_post not found....
 * DEBUG: POST_INSTALL_FUNC=null
 * DEBUG: install_almalinux_8_onedir_restart_daemons not found....
 * DEBUG: install_almalinux_8_6_onedir_restart_daemons not found....
 * DEBUG: install_almalinux_8_restart_daemons not found....
 * DEBUG: install_almalinux_8_6_restart_daemons not found....
 * DEBUG: install_almalinux_onedir_restart_daemons not found....
 *  INFO: Found function install_almalinux_restart_daemons
 * DEBUG: STARTDAEMONS_INSTALL_FUNC=install_almalinux_restart_daemons
 * DEBUG: daemons_running_almalinux_8_onedir not found....
 * DEBUG: daemons_running_almalinux_8_6_onedir not found....
 * DEBUG: daemons_running_almalinux_8 not found....
 * DEBUG: daemons_running_almalinux_8_6 not found....
 * DEBUG: daemons_running_almalinux_onedir not found....
 * DEBUG: daemons_running_almalinux not found....
 *  INFO: Found function daemons_running_onedir
 * DEBUG: DAEMONS_RUNNING_FUNC=daemons_running_onedir
 * DEBUG: install_almalinux_8_onedir_check_services not found....
 * DEBUG: install_almalinux_8_6_onedir_check_services not found....
 * DEBUG: install_almalinux_8_check_services not found....
 * DEBUG: install_almalinux_8_6_check_services not found....
 * DEBUG: install_almalinux_onedir_check_services not found....
 *  INFO: Found function install_almalinux_check_services
 * DEBUG: CHECK_SERVICES_FUNC=install_almalinux_check_services
 *  INFO: Running install_almalinux_onedir_deps()
AlmaLinux 8 - BaseOS                             13 MB/s | 8.1 MB     00:00
AlmaLinux 8 - AppStream                          18 MB/s |  12 MB     00:00
AlmaLinux 8 - Extras                             56 kB/s |  18 kB     00:00
epel-next-release-latest-8.noarch.rpm            59 kB/s |  11 kB     00:00
epel-release-latest-8.noarch.rpm                135 kB/s |  24 kB     00:00
Dependencies resolved.
================================================================================
 Package                 Architecture Version          Repository          Size
================================================================================
Installing:
 epel-next-release       noarch       8-17.el8         @commandline        11 k
 epel-release            noarch       8-17.el8         @commandline        24 k

Transaction Summary
================================================================================
Install  2 Packages

Total size: 35 k
Installed size: 37 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : epel-release-8-17.el8.noarch                           1/2
  Running scriptlet: epel-release-8-17.el8.noarch                           1/2
Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

  Installing       : epel-next-release-8-17.el8.noarch                      2/2
  Running scriptlet: epel-next-release-8-17.el8.noarch                      2/2
  Verifying        : epel-next-release-8-17.el8.noarch                      1/2
  Verifying        : epel-release-8-17.el8.noarch                           2/2

Installed:
  epel-next-release-8-17.el8.noarch         epel-release-8-17.el8.noarch

Complete!
Cache was expired
28 files removed
AlmaLinux 8 - BaseOS                             13 MB/s | 8.1 MB     00:00
AlmaLinux 8 - AppStream                          15 MB/s |  12 MB     00:00
AlmaLinux 8 - Extras                             55 kB/s |  18 kB     00:00
Extra Packages for Enterprise Linux 8 - x86_64   12 MB/s |  13 MB     00:01
Extra Packages for Enterprise Linux Modular 8 - 1.8 MB/s | 733 kB     00:00
Extra Packages for Enterprise Linux 8 - Next -  1.9 MB/s | 1.4 MB     00:00
SaltStack latest Release Channel for RHEL/CentO 205 kB/s |  41 kB     00:00
Package chkconfig-1.19.1-1.el8.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package           Architecture   Version                  Repository      Size
================================================================================
Installing:
 yum-utils         noarch         4.0.21-11.el8            baseos          72 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 72 k
Installed size: 23 k
Downloading Packages:
yum-utils-4.0.21-11.el8.noarch.rpm              820 kB/s |  72 kB     00:00
--------------------------------------------------------------------------------
Total                                           259 kB/s |  72 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : yum-utils-4.0.21-11.el8.noarch                         1/1
  Running scriptlet: yum-utils-4.0.21-11.el8.noarch                         1/1
  Verifying        : yum-utils-4.0.21-11.el8.noarch                         1/1

Installed:
  yum-utils-4.0.21-11.el8.noarch

Complete!
 *  INFO: Running install_almalinux_onedir()
Last metadata expiration check: 0:00:03 ago on Mon 31 Oct 2022 03:41:26 PM UTC.
Dependencies resolved.
================================================================================
 Package            Architecture  Version                Repository        Size
================================================================================
Installing:
 salt-minion        x86_64        3005.1-1.el8           saltstack         44 k
Installing dependencies:
 salt               x86_64        3005.1-1.el8           saltstack         48 M

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 48 M
Installed size: 135 M
Downloading Packages:
(1/2): salt-minion-3005.1-1.el8.x86_64.rpm      510 kB/s |  44 kB     00:00
(2/2): salt-3005.1-1.el8.x86_64.rpm              29 MB/s |  48 MB     00:01
--------------------------------------------------------------------------------
Total                                            29 MB/s |  48 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : salt-3005.1-1.el8.x86_64                               1/2
  Installing       : salt-minion-3005.1-1.el8.x86_64                        2/2
  Running scriptlet: salt-minion-3005.1-1.el8.x86_64                        2/2
  Verifying        : salt-3005.1-1.el8.x86_64                               1/2
  Verifying        : salt-minion-3005.1-1.el8.x86_64                        2/2

Installed:
  salt-3005.1-1.el8.x86_64            salt-minion-3005.1-1.el8.x86_64

Complete!
 *  INFO: Running install_almalinux_check_services()
 * DEBUG: Checking if service salt-minion is enabled
 * DEBUG: Service salt-minion is NOT enabled
 * ERROR: Failed to run install_almalinux_check_services()!!!
 * DEBUG: Removing the logging pipe /tmp/bootstrap-salt.logpipe
 * DEBUG: Removing the temporary apt error file /tmp/apt_error.SzgjMu

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)

[vagrant@localhost ~]$ sh bootstrap-salt.sh -v
bootstrap-salt.sh -- Version 2022.10.04
@ggiesen ggiesen changed the title salt-bootstrap fails to start services when installing OneDir on AlmaLinux 8 salt-bootstrap fails to start services when installing OneDir on AlmaLinux and Rocky Linux 8 Oct 31, 2022
@ggiesen
Copy link
Contributor Author

ggiesen commented Oct 31, 2022

So I believe I found the issue:

 * DEBUG: INSTALL_FUNC=install_almalinux_onedir
 * DEBUG: install_almalinux_8_onedir_post not found....
 * DEBUG: install_almalinux_8_6_onedir_post not found....
 * DEBUG: install_almalinux_8_post not found....
 * DEBUG: install_almalinux_8_6_post not found....
 * DEBUG: install_almalinux_onedir_post not found....
 * DEBUG: install_almalinux_post not found....

The function install_almalinux_onedir_post is missing (and likely same for install_rocky_linux_onedir_post). If I add the following:

install_almalinux_onedir_post() {
    install_centos_onedir_post || return 1
    return 0
}

at

install_almalinux_testing_post() {
then the install seems to work.

@ggiesen
Copy link
Contributor Author

ggiesen commented Nov 1, 2022

It may be worth noting, that on RHEL (8 at least) that bootstrap succeeds simply because both the install_red_hat_enterprise_linux_onedir_post and install_red_hat_enterprise_linux_onedir_check_services functions are missing, and it simply proceeds to install_red_hat_enterprise_linux_restart_daemons:

 * DEBUG: install_red_hat_enterprise_linux_8_onedir_post not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_onedir_post not found....
 * DEBUG: install_red_hat_enterprise_linux_8_post not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_post not found....
 * DEBUG: install_red_hat_enterprise_linux_onedir_post not found....
 * DEBUG: install_red_hat_enterprise_linux_post not found....
 * DEBUG: POST_INSTALL_FUNC=null
 * DEBUG: install_red_hat_enterprise_linux_8_onedir_restart_daemons not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_onedir_restart_daemons not found....
 * DEBUG: install_red_hat_enterprise_linux_8_restart_daemons not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_restart_daemons not found....
 * DEBUG: install_red_hat_enterprise_linux_onedir_restart_daemons not found....
 *  INFO: Found function install_red_hat_enterprise_linux_restart_daemons
 * DEBUG: STARTDAEMONS_INSTALL_FUNC=install_red_hat_enterprise_linux_restart_daemons
 * DEBUG: daemons_running_red_hat_enterprise_linux_8_onedir not found....
 * DEBUG: daemons_running_red_hat_enterprise_linux_8_6_onedir not found....
 * DEBUG: daemons_running_red_hat_enterprise_linux_8 not found....
 * DEBUG: daemons_running_red_hat_enterprise_linux_8_6 not found....
 * DEBUG: daemons_running_red_hat_enterprise_linux_onedir not found....
 * DEBUG: daemons_running_red_hat_enterprise_linux not found....
 *  INFO: Found function daemons_running_onedir
 * DEBUG: DAEMONS_RUNNING_FUNC=daemons_running_onedir
 * DEBUG: install_red_hat_enterprise_linux_8_onedir_check_services not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_onedir_check_services not found....
 * DEBUG: install_red_hat_enterprise_linux_8_check_services not found....
 * DEBUG: install_red_hat_enterprise_linux_8_6_check_services not found....
 * DEBUG: install_red_hat_enterprise_linux_onedir_check_services not found....
 * DEBUG: install_red_hat_enterprise_linux_check_services not found....
 * DEBUG: CHECK_SERVICES_FUNC=null
 *  INFO: Running install_red_hat_enterprise_linux_onedir_deps()
...
 *  INFO: Running install_red_hat_enterprise_linux_restart_daemons()
 * DEBUG: Waiting 3 seconds for processes to settle before checking for them
 *  INFO: Running daemons_running_onedir()
 * DEBUG: Waiting 3 seconds for processes to settle before checking for them
 *  INFO: Salt installed!
 * DEBUG: Removing the logging pipe /tmp/bootstrap-salt.logpipe
 * DEBUG: Removing the temporary apt error file /tmp/apt_error.RGBn9N

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

Successfully merging a pull request may close this issue.

1 participant