centos-ssh icon indicating copy to clipboard operation
centos-ssh copied to clipboard

SCMI installation with systemd manager option fails on CoreOS/Ubuntu hosts.

Open jdeathe opened this issue 5 years ago • 1 comments

This issue is only known to effect CoreOS and Ubuntu hosts it does not effect any of the EL based hosts such as CentOS-7, Centos Atomic Host.

Docker host environment details used to replicate this issue

Environment 1.

NAME="Container Linux by CoreOS"
VERSION=2023.4.0

Environment 2 (inc. Docker CE).

NAME="Ubuntu" 
VERSION="18.04.2 LTS (Bionic Beaver)"

When scmi attempts to run systemctl commands in the chroot that allows the container to run commands on the host the following error is returned.

Failed to connect to bus: No data available

To reproduce:

$ docker run --rm \
  --privileged \
  --volume /:/media/root \
  jdeathe/centos-ssh:2.5.1 \
    /usr/sbin/scmi -i -c /media/root -m systemd -t 2.5.1 -n ssh.1

Expected outcome: Install should complete successfully with the message "Install complete"

Actual outcome:

WARNING: No swap limit support
---> Installing [email protected]
 ---> Installing template unit-file: /media/root/etc/systemd/system/[email protected]
 ---> Populating drop-in: /media/root/etc/systemd/system/[email protected]/10-override.conf
 ---> Removing template unit-file: /media/root/etc/systemd/system/[email protected]
 ---> Removing /media/root/etc/systemd/system/[email protected]
Failed to connect to bus: No data available
 ---> Enabling [email protected]
Failed to connect to bus: No data available
Failed to connect to bus: No data available
 ---> Releasing host mounted container
WARNING: No swap limit support
 ---> Restarting [email protected]
-- Logs begin at Thu 2019-02-28 09:04:59 UTC. --
Failed to connect to bus: No data available
Failed to connect to bus: No data available
 ---> Install error
        Review the status for additonal information: systemctl status [email protected]

jdeathe avatar Mar 03 '19 22:03 jdeathe

Work-around could be to install locally from a source image:

$ docker run --rm --detach --name scmi-src jdeathe/centos-ssh:2.5.1 sleep infinity
$ sudo docker cp scmi-src:/etc/systemd/system /etc/systemd/
$ sudo docker cp scmi-src:/usr/sbin/scmi /usr/local/sbin/
$ sudo docker cp scmi-src:/opt/scmi /opt/
$ docker rm -f scmi-src
$ sudo chmod +x /usr/local/sbin/scmi
$ sudo -E scmi -i -m systemd --register -t 2.5.1 -n ssh.1

Or, after running the scmi installation, complete the installation manually:

$ sudo systemctl daemon-reload
$ sudo systemctl enable -f [email protected]
$ sudo systemctl start [email protected]

jdeathe avatar Mar 03 '19 23:03 jdeathe