Guix system reconfigure starts services with auto-start? #f

  • Done
  • quality assurance status badge
Details
One participant
  • Richard Sent
Owner
unassigned
Submitted by
Richard Sent
Severity
normal
R
R
Richard Sent wrote on 28 Dec 2023 23:25
(address . bug-guix@gnu.org)
3d11dff820f24113781d738ecb2dc246@freakingpenguin.com
When reconfiguring the system with Guix, shepherd services that have
auto-start? set to #f are started during reconfiguration. Per
https://issues.guix.gnu.org/22039#26,services shouldn't be started by
reconfigure if auto-start is #f. These services are not started on boot,
which matches expected behavior.

This is different from bug#42167, as this problem occurs even if the
service already exists and is stopped.

I created an test OS configuration to help others reproduce it, see
attached. This was run on guix 931d893c550128591018587c90d2491fd66a11a4.

I used openssh-service with %auto-start set to #f as well as
ganeti-metad-service since both of these services are already supplied
with Guix and are/can be set to auto-start?=#f. I haven't actually
configured ganeti-metad-service so the service won't start successfully,
but we can still see Guix attempt to start the service when it
shouldn't.

Below are snippets of the console output. I've attached the full
versions to this email. I also attached result of building
upgrade-shepherd-services.scm.drv.

On a clean boot, post test.scm reconfiguration:
Toggle snippet (10 lines)
richard@test ~$ sudo herd status
Password:
Started:
[...]
Stopped:
- ganeti-metad
- ssh-daemon
[...]

While running reconfigure:
Toggle snippet (14 lines)
building
/gnu/store/6dcgjsa8gbv6wdq8nyrdkm5sxw8zgxl3-upgrade-shepherd-services.scm.drv...
[...]
shepherd: Service user-homes has been started.
shepherd: Starting service ganeti-metad...
shepherd: Service ganeti-metad could not be started.
shepherd: Service user-homes has been started.
shepherd: Starting service ssh-daemon...
shepherd: Service ssh-daemon has been started.
To complete the upgrade, run 'herd restart SERVICE' to stop,
upgrade, and restart each service that was not automatically restarted.
Run 'herd status' to view the list of services on your system.

After running reconfigure:
Toggle snippet (9 lines)
richard@test ~$ sudo herd status
Started:
[...]
+ ssh-daemon
[...]
Failed to start:
! ganeti-metad

Guix describe output:
Toggle snippet (10 lines)
Generation 5 Dec 27 2023 16:35:46 (current)
nonguix 71a53fa
repository URL: https://gitlab.com/nonguix/nonguix
branch: master
commit: 71a53faf2e1925a309b480f17e5b836740ce54bc
guix 931d893
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 931d893c550128591018587c90d2491fd66a11a4
richard@test ~$ sudo herd status
Password:
Started:
+ NetworkManager
+ avahi-daemon
+ console-font-tty1
+ console-font-tty2
+ console-font-tty3
+ console-font-tty4
+ console-font-tty5
+ console-font-tty6
+ dbus-system
+ elogind
+ file-system-/boot/efi
+ file-system-/dev/pts
+ file-system-/dev/shm
+ file-system-/gnu/store
+ file-system-/run/systemd
+ file-system-/run/user
+ file-system-/sys/firmware/efi/efivars
+ file-system-/sys/fs/cgroup
+ file-system-/sys/fs/cgroup/elogind
+ file-system-/sys/kernel/debug
+ file-system-/var/cache/fontconfig
+ file-system-/var/lib/gdm
+ file-systems
+ guix-daemon
+ loopback
+ mcron
+ nscd
+ ntpd
+ pam
+ root
+ root-file-system
+ swap-a5da62d0-0f8e-4401-8fb6-17b284e166d0
+ syslogd
+ term-console
+ term-tty1
+ term-tty2
+ term-tty3
+ term-tty4
+ term-tty5
+ term-tty6
+ udev
+ upower-daemon
+ urandom-seed
+ user-file-systems
+ user-processes
+ virtual-terminal
+ wpa-supplicant
+ xorg-server
Stopped:
- ganeti-metad
- ssh-daemon
One-shot:
* host-name
* sysctl
* user-homes
* x11-socket-directory
Generation 5 Dec 27 2023 16:35:46 (current)
nonguix 71a53fa
branch: master
commit: 71a53faf2e1925a309b480f17e5b836740ce54bc
guix 931d893
branch: master
commit: 931d893c550128591018587c90d2491fd66a11a4
richard@test ~$ sudo herd status
Started:
+ NetworkManager
+ avahi-daemon
+ console-font-tty1
+ console-font-tty2
+ console-font-tty3
+ console-font-tty4
+ console-font-tty5
+ console-font-tty6
+ dbus-system
+ elogind
+ file-system-/boot/efi
+ file-system-/dev/pts
+ file-system-/dev/shm
+ file-system-/gnu/store
+ file-system-/run/systemd
+ file-system-/run/user
+ file-system-/sys/firmware/efi/efivars
+ file-system-/sys/fs/cgroup
+ file-system-/sys/fs/cgroup/elogind
+ file-system-/sys/kernel/debug
+ file-system-/var/cache/fontconfig
+ file-system-/var/lib/gdm
+ file-systems
+ guix-daemon
+ loopback
+ mcron
+ nscd
+ ntpd
+ pam
+ root
+ root-file-system
+ ssh-daemon
+ swap-a5da62d0-0f8e-4401-8fb6-17b284e166d0
+ syslogd
+ term-console
+ term-tty1
+ term-tty2
+ term-tty3
+ term-tty4
+ term-tty5
+ term-tty6
+ udev
+ upower-daemon
+ urandom-seed
+ user-file-systems
+ user-processes
+ virtual-terminal
+ wpa-supplicant
+ xorg-server
One-shot:
* host-name
* sysctl
* user-homes
* x11-socket-directory
Failed to start:
! ganeti-metad
-*- mode: compilation; default-directory: "~/guix-config/" -*-
Comint started at Thu Dec 28 16:41:52

./reconfigure.rb --system --config test
Reconfiguring system environment
Executing sudo --preserve-env=GUILE_LOAD_PATH guix system reconfigure lib/rsent/system/test.scm --no-grafts
Password:
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 0.0%guix substitute: warning: ci.guix.gnu.org: host not found: Name or service not known
substitute:
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 0.0%guix substitute: warning: bordeaux.guix.gnu.org: host not found: Name or service not known
substitute:
The following derivations will be built:
/gnu/store/3m60hizha7zggdnwkaapdqm2s911vg18-system.drv
/gnu/store/ngw8bs2v4pm64mm4vy0aa7xpq7r4ml43-provenance.drv
/gnu/store/jij9h7v9rnjywcq5pndy6w9gnjcnfy7h-grub.cfg.drv

substitute: updating substitutes from 'https://ci.guix.gnu.org'... 0.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 0.0%
building /gnu/store/ngw8bs2v4pm64mm4vy0aa7xpq7r4ml43-provenance.drv...
building /gnu/store/3m60hizha7zggdnwkaapdqm2s911vg18-system.drv...
building /gnu/store/jij9h7v9rnjywcq5pndy6w9gnjcnfy7h-grub.cfg.drv...
/gnu/store/3krnlysmvaw3qx0xx72ycxk2g83cjhsn-system
/gnu/store/n74q9x5lbzwnxh8nkparrfia10qgf174-grub.cfg

activating system...
The following derivation will be built:
/gnu/store/z6jg4vcrv63cy3w1blszv7ngy7ksshl2-switch-to-system.scm.drv

building /gnu/store/z6jg4vcrv63cy3w1blszv7ngy7ksshl2-switch-to-system.scm.drv...
making '/gnu/store/3krnlysmvaw3qx0xx72ycxk2g83cjhsn-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/8n6v0a02hj5px58p5b0x895n3zadaw41-etc...
The following derivation will be built:
/gnu/store/diaap4b02nyznz423v93dcqxx0gsl7yy-install-bootloader.scm.drv

building /gnu/store/diaap4b02nyznz423v93dcqxx0gsl7yy-install-bootloader.scm.drv...
guix system: bootloader successfully installed on '(/boot/efi)'
The following derivation will be built:
/gnu/store/6dcgjsa8gbv6wdq8nyrdkm5sxw8zgxl3-upgrade-shepherd-services.scm.drv

building /gnu/store/6dcgjsa8gbv6wdq8nyrdkm5sxw8zgxl3-upgrade-shepherd-services.scm.drv...
shepherd: Starting service host-name...
shepherd: Service host-name started.
shepherd: Service host-name running with value #<unspecified>.
shepherd: Service host-name has been started.
shepherd: Starting service user-homes...
shepherd: Service user-homes has been started.
shepherd: Starting service sysctl...
shepherd: Service sysctl has been started.
shepherd: Starting service x11-socket-directory...
shepherd: Service x11-socket-directory has been started.
shepherd: Service user-homes has been started.
shepherd: Starting service ganeti-metad...
shepherd: Service ganeti-metad could not be started.
shepherd: Service user-homes has been started.
shepherd: Starting service ssh-daemon...
shepherd: Service ssh-daemon has been started.
To complete the upgrade, run 'herd restart SERVICE' to stop,
upgrade, and restart each service that was not automatically restarted.
Run 'herd status' to view the list of services on your system.

Comint finished at Thu Dec 28 16:42:11
(define-module (rsent system test) #:use-module (gnu) #:use-module (gnu system) #:use-module (gnu services) #:use-module (gnu services desktop) #:use-module (gnu services ganeti) #:use-module (gnu services xorg) #:use-module (gnu services ssh) #:use-module (gnu packages networking) #:use-module (guix gexp) #:export (test-system)) (define test-system (operating-system (locale "en_US.utf8") (timezone "America/New_York") (keyboard-layout (keyboard-layout "us")) (host-name "test") (users (cons* (user-account (name "richard") (comment "Richard") (group "users") (home-directory "/home/richard") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) ;; Packages installed system-wide. (packages (append (list) %base-packages)) (services (append (list (service gnome-desktop-service-type) (service openssh-service-type (openssh-configuration (x11-forwarding? #t) (%auto-start? #f) )) ;; service with auto-start=#f, see if shepherd starts this on reconfigure (service ganeti-metad-service-type)) %desktop-services)) (swap-devices (list (swap-space (target (uuid "a5da62d0-0f8e-4401-8fb6-17b284e166d0"))))) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets (list "/boot/efi")) (keyboard-layout keyboard-layout))) (file-systems (cons* (file-system (mount-point "/boot/efi") (device (uuid "3b39-a8ba" 'fat32)) (type "vfat")) (file-system (mount-point "/") (device (uuid "d30c3bb1-7bc6-4f2d-8bce-4e26beae02f2" 'ext4)) (type "ext4")) %base-file-systems)))) test-system
Attachment: upgrade-shepherd-services.scm (.00 MiB)
R
R
R
Richard Sent wrote on 3 Apr 04:12 +0200
control message for bug #68093
(address . control@debbugs.gnu.org)
87cyr7ry6y.fsf@freakingpenguin.com
close 68093
quit
?