unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68093: Guix system reconfigure starts services with auto-start? #f
@ 2023-12-28 22:25 Richard Sent
  2024-03-14 19:46 ` Richard Sent
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Sent @ 2023-12-28 22:25 UTC (permalink / raw)
  To: 68093

[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]

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:
--8<---------------cut here---------------start------------->8---
richard@test ~$ sudo herd status
Password:
Started:
[...]
Stopped:
  - ganeti-metad
  - ssh-daemon
[...]
--8<---------------cut here---------------end--------------->8---

While running reconfigure:
--8<---------------cut here---------------start------------->8---
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.
--8<---------------cut here---------------end--------------->8---

After running reconfigure:
--8<---------------cut here---------------start------------->8---
richard@test ~$ sudo herd status
Started:
[...]
  + ssh-daemon
[...]
Failed to start:
  ! ganeti-metad
--8<---------------cut here---------------end--------------->8---

Guix describe output:
--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: clean-boot-herd-status.txt --]
[-- Type: text/plain, Size: 1094 bytes --]

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

[-- Attachment #3: guix-describe.txt --]
[-- Type: text/plain, Size: 338 bytes --]

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

[-- Attachment #4: post-reconfigure-herd-status.txt --]
[-- Type: text/plain, Size: 1091 bytes --]

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

[-- Attachment #5: reconfigure_log.txt --]
[-- Type: text/plain, Size: 3205 bytes --]

-*- 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

[-- Attachment #6: test.scm --]
[-- Type: text/plain, Size: 2274 bytes --]

(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 #7: upgrade-shepherd-services.scm --]
[-- Type: text/plain, Size: 5059 bytes --]

#!/gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/bin/guile --no-auto-compile
!#
(eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lambda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (loop (cdr items) (cons (car items) (delete (car items) lst)))))))) (set! %load-path (prepend (cons "/gnu/store/1w8vi9acqbsv76plfgc4564irncjknkd-module-import" (map (lambda (extension) (string-append extension "/share/guile/site/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-path (prepend (cons "/gnu/store/dkdp16vvmlnbl0ilfx83l11ihvin8mrf-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))(begin (use-modules (gnu services herd) (srfi srfi-1)) (parameterize ((shepherd-message-port (%make-void-port "w"))) (load-services/safe (quote ("/gnu/store/rwnbrwksf07abdfk7r34gsc17sapdhc0-shepherd-swap-a5da62d0-0f8e-4401-8fb6-17b284e166d0.scm" "/gnu/store/m3vg39qma81hnlx34lxpbd0y6jp94i3j-shepherd-file-systems.scm" "/gnu/store/rasnwijkacdca7fsr644qs5hrqc4dg4q-shepherd-user-file-systems.scm" "/gnu/store/s649bkd4nhwj5vb5lpwahyia3g355il9-shepherd-file-system--boot-efi.scm" "/gnu/store/y9s7bx5m5s2b4ih91hrh9zdvk7njya20-shepherd-file-system--dev-pts.scm" "/gnu/store/413cakx4p0ncq9gzq62x162i14vgwqva-shepherd-file-system--sys-kernel-debug.scm" "/gnu/store/fsr3xgm1hjdlv3l73ib6iz7vizqn4s2b-shepherd-file-system--dev-shm.scm" "/gnu/store/zr8cw898ll98k51fv714190kvrqj27g6-shepherd-file-system--sys-firmware-efi-efivars.scm" "/gnu/store/3ndxis3ck67vnyr8ynifc0qdl1g6alzm-shepherd-file-system--gnu-store.scm" "/gnu/store/qnhwkikhw1dn9dfb6sx6yj5hqb3gf9bj-shepherd-file-system--run-systemd.scm" "/gnu/store/8qc4h5n7czf0nilb1j03vx0ci51yhkqf-shepherd-file-system--run-user.scm" "/gnu/store/qm5l5nnbqh577xh9rihjr47w03wdnks6-shepherd-file-system--sys-fs-cgroup-elogind.scm" "/gnu/store/hxlznya054iwmz4gx5migqngkrd4rldq-shepherd-file-system--sys-fs-cgroup.scm" "/gnu/store/hiwvgi2xrlxm01g95735xll44irx33zb-shepherd-file-system--var-cache-fontconfig.scm" "/gnu/store/2szda8p3wxrcm6d5rdlb5pl5qy8m58ja-shepherd-file-system--var-lib-gdm.scm" "/gnu/store/01ksp4rgj0qwsnbmacy5656xzq4jn3ph-shepherd-root-file-system.scm" "/gnu/store/5pdvhsmpbl3kb3spgn2c7b65sk6g3h9i-shepherd-user-processes.scm" "/gnu/store/amzaaa3wsyi3kvdf5vl1nbbwrr8j7czh-shepherd-host-name.scm" "/gnu/store/57pzvyari5kcs8vm17xc70vk6f4zlq5w-shepherd-user-homes.scm" "/gnu/store/ni21876zisgb842pmg94d09l1wjw0zgj-shepherd-pam.scm" "/gnu/store/w834wf9m5wjj8wlcfs43bg6wms4ji9y5-shepherd-sysctl.scm" "/gnu/store/gmgd67h49h0kc7m754r9hc3dwqjpvhwc-shepherd-udev.scm" "/gnu/store/k0zawlhhc9g1q2dja3pi36kp4n398vx9-shepherd-nscd.scm" "/gnu/store/gby743907sz0ddw9fv4l0zg9d6yxzw44-shepherd-guix-daemon.scm" "/gnu/store/w81qnrz5fwqyfgvmwwypx4aga0vbislg-shepherd-urandom-seed.scm" "/gnu/store/lkc3kad3h9dmfn9y08mwhdijw1c9i97m-shepherd-loopback.scm" "/gnu/store/yjzmqcwfjdv3r4z8r2kvfbw1ax35i0sb-shepherd-term-tty6.scm" "/gnu/store/rhmiab5407jkr5bmppidriwx5rgrnixy-shepherd-term-tty5.scm" "/gnu/store/4j2959k7ckz1c4xxg95bk7li81aq36xi-shepherd-term-tty4.scm" "/gnu/store/jr3klmkb2ngihrzfm52xqgrisxb4ix8w-shepherd-term-tty3.scm" "/gnu/store/3f4vb2rqdx40fcyhbxizd6hbsynh96v8-shepherd-term-tty2.scm" "/gnu/store/5pjs21vrhkgpv7ghqmp5yp8gcllh3z59-shepherd-term-tty1.scm" "/gnu/store/h5xwhki1qrr877zpfm6h0wypf0w1fi92-shepherd-term-console.scm" "/gnu/store/i04r8ga5n6kwi93hkdcii6kiaz151psd-shepherd-syslogd.scm" "/gnu/store/ma1xl0m4gdxlsylsi91qwl1lmvljdk83-shepherd-console-font-tty1.scm" "/gnu/store/6qhcf7xhi3gpyqvcx1h16mgliidsya9l-shepherd-console-font-tty2.scm" "/gnu/store/kb8y25d31ilzi6nix8g1gkyy4j5gqn0g-shepherd-console-font-tty3.scm" "/gnu/store/jhwnjglvzyh7bpn3nf4120rdzxidayz7-shepherd-console-font-tty4.scm" "/gnu/store/5qdvs1clyhwp4dd90igysfpba17dv2jc-shepherd-console-font-tty5.scm" "/gnu/store/a79hjns5yxdncbdf33d0han0radhsh97-shepherd-console-font-tty6.scm" "/gnu/store/mafr3hi19pgh28a5c1ylqb5rk8q7ln0b-shepherd-virtual-terminal.scm" "/gnu/store/cdk3ndlhflqx81qj8gp7r6yz9b9b3mx9-shepherd-x11-socket-directory.scm" "/gnu/store/a1k2js5qx9h2vhn8nsk38r6287rcr71i-shepherd-ntpd.scm" "/gnu/store/82l7mkfy7kxwc8s3id23gajv6922n94f-shepherd-dbus-system.scm" "/gnu/store/g35366nf8scx3cwqfrpg6igy0g5h6m4v-shepherd-elogind.scm" "/gnu/store/xvribapx948i7shr8xjgszh8arkxaf6i-shepherd-upower-daemon.scm" "/gnu/store/kinflmzjci9l428v3f593v6b10fp4923-shepherd-avahi-daemon.scm" "/gnu/store/2swffnr400h8c5b45ilj0kr6v2d5z0m3-shepherd-wpa-supplicant.scm" "/gnu/store/2s60gfbvpi9fs80lyq7v9swf3k6v02si-shepherd-NetworkManager-networking.scm" "/gnu/store/78qgzf9a3j18wbdc0064jy1lsgrxssar-shepherd-xorg-server.scm" "/gnu/store/4i29im39r50c60hy3lc2vx9ml8i3m9z7-shepherd-ganeti-metad.scm" "/gnu/store/881grw1lw4nnb8g6apczdx05rhzi2rg1-shepherd-ssh-daemon-ssh-sshd.scm" "/gnu/store/zna9bd9sj4irvjy0n80mc6hzvznzird8-shepherd-mcron.scm")))) (for-each unload-service (quote ())) (for-each start-service (quote (host-name user-homes sysctl x11-socket-directory ganeti-metad ssh-daemon))))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#68093: Guix system reconfigure starts services with auto-start? #f
  2023-12-28 22:25 bug#68093: Guix system reconfigure starts services with auto-start? #f Richard Sent
@ 2024-03-14 19:46 ` Richard Sent
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sent @ 2024-03-14 19:46 UTC (permalink / raw)
  To: 68093

Patch submitted, https://issues.guix.gnu.org/69801

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-14 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-28 22:25 bug#68093: Guix system reconfigure starts services with auto-start? #f Richard Sent
2024-03-14 19:46 ` Richard Sent

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).