saltstack / salt-bootstrap

Generic Salt Bootstrap Script
Other
928 stars 551 forks source link

[BUG] Ubuntu 20.04: Failed to run install_ubuntu_onedir_deps()!!! #2047

Closed Tsubajashi closed 5 days ago

Tsubajashi commented 1 week ago

Description of Issue/Question

First of all, im very sorry for the relatively short and not too informative issue request. On a Ubuntu 20.04 VM, the bootstrap errors: "Failed to run install_ubuntu_onedir_deps()!!!" This also happens on Ubuntu 20.04 VMs that previously had salt-minion, but moving to the new repo seems to not work as intended.

Setup

(Please provide relevant configs (Be sure to remove sensitive info).) Happens even on a stock Ubuntu 20.04. 100% failure rate in my 12 tests.

Steps to Reproduce Issue

(Include debug logs if possible, bootstrap-salt.sh -D.) ssh into Ubuntu 20.04 VM curl https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s -- onedir 3006

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version, cloud/VM provider as appropriate.) A Ubuntu 20.04 vm running on proxmox.

ruslantum commented 1 week ago

problem seems to be here: https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh#L3035 on ubuntu 20 for example path of hwclock is /sbin/hwclock not /usr/sbin/hwclock, also on ubuntu below 23+ there is no such package as util-linux-extra. there should be additional condition to check major version. workaround for now before the PR #2048 has not benn merged would be to create a symlink on ubuntus before 23+: ln -s /sbin/hwclock /usr/sbin/hwclock

dmurphy18 commented 5 days ago

@ruslantum Disagree about Ubuntu 20.04 and having /usr/sbin/hwclock

root@tu2004:/home/david# find / -name hwclock | xargs ls -alh
find: ‘/run/user/1000/gvfs’: Permission denied
-rwxr-xr-x 1 root root  59K Mar  5  2020 /snap/core18/1880/sbin/hwclock
-rw-r--r-- 1 root root  938 Mar  5  2020 /snap/core18/1880/usr/share/bash-completion/completions/hwclock
-rwxr-xr-x 1 root root  59K Sep 16  2020 /snap/core18/2846/sbin/hwclock
-rw-r--r-- 1 root root  938 Sep 16  2020 /snap/core18/2846/usr/share/bash-completion/completions/hwclock
-rwxr-xr-x 1 root root  51K Apr  9  2024 /snap/core22/1663/usr/sbin/hwclock
-rw-r--r-- 1 root root  960 Apr  9  2024 /snap/core22/1663/usr/share/bash-completion/completions/hwclock
-rwxr-xr-x 1 root root 103K Apr  9  2024 /usr/sbin/hwclock
-rw-r--r-- 1 root root  960 Apr  9  2024 /usr/share/bash-completion/completions/hwclock
root@tu2004:/home/david# l /usr/sbin/hwclock 
-rwxr-xr-x 1 root root 103K Apr  9  2024 /usr/sbin/hwclock
root@tu2004:/home/david# l /sbin/hwclock 
-rwxr-xr-x 1 root root 103K Apr  9  2024 /sbin/hwclock
root@tu2004:/home/david# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:    20.04
Codename:   focal
root@tu2004:/home/david#

so fine using /usr/sbin/hwclock on Ubuntu 20.04

dmurphy18 commented 5 days ago

Closing this since associated https://github.com/saltstack/salt-bootstrap/pull/2048 is merged