BugRoger / coreos-nvidia-driver

Compile, Install and Update NVIDIA Drivers for CoreOS Container Linux
Apache License 2.0
16 stars 9 forks source link

systemctl: Failed to connect to bus: No data available #3

Closed coreyjewett closed 6 years ago

coreyjewett commented 6 years ago

nvidia-update.service executes run.sh which attempts to run systemctl in a chroot. I was getting "Failed to connect to bus: No data available" and non-zero exit code. This blocked the whole chain of services.

I made the following changes; moving the systemctl commands from the chroot jail up into the nvidia-update.service. Seems to be working as I now have the drivers working after a reboot. I have not tried a release update. Working on stable release channel; 1745.7.0.

--- install.sh  2018-06-15 20:22:52.000000000 +0000
+++ install.sh.new      2018-06-27 08:28:32.000000000 +0000
@@ -21,8 +21,13 @@
 TimeoutStartSec=0
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=/usr/bin/docker pull bugroger/coreos-nvidia-driver:\${VERSION}-$DRIVER_VERSION-$NVIDIA_PRODUCT_TYPE
-ExecStart=/usr/bin/docker run -v /:/rootfs --privileged bugroger/coreos-nvidia-driver:\${VERSION}-$DRIVER_VERSION-$NVIDIA_PRODUCT_TYPE
+#ExecStartPre=/usr/bin/docker pull coreos-nvidia-driver:\${VERSION}-$DRIVER_VERSION-$NVIDIA_PRODUCT_TYPE
+ExecStart=/usr/bin/docker run -v /:/rootfs --privileged coreos-nvidia-driver:\${VERSION}-$DRIVER_VERSION-$NVIDIA_PRODUCT_TYPE
+ExecStartPost=/usr/bin/systemctl daemon-reload
+ExecStartPost=/usr/bin/systemctl enable nvidia-update
+ExecStartPost=/usr/bin/systemctl enable usr-lib64.mount
+ExecStartPost=/usr/bin/systemctl enable nvidia
+ExecStartPost=/usr/bin/systemctl enable nvidia-persistenced

 [Install]
 WantedBy=multi-user.target
@@ -86,8 +91,3 @@
 udevadm control --reload-rules
 useradd -c "NVIDIA Persistence Daemon" --shell /sbin/nologin --home-dir / nvidia-persistenced || true

-systemctl daemon-reload
-systemctl enable nvidia-update
-systemctl enable usr-lib64.mount
-systemctl enable nvidia
-systemctl enable nvidia-persistenced
BugRoger commented 6 years ago

Thanks for the hint. I was already wondering about that error but didn't really follow up on it.

Copied your changes over to the shell scripts.