GNU bug report logs -
#68747
Extending postgresql-role-service-type as shown in manual leads to crash
Previous Next
To reply to this bug, email your comments to 68747 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#68747
; Package
guix
.
(Sat, 27 Jan 2024 02:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 27 Jan 2024 02:15:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
We have this example in the manual, in (info "(guix) Database
Services"):
--8<---------------cut here---------------start------------->8---
(service-extension postgresql-role-service-type
(const (postgresql-role
(name "alice")
(create-database? #t))))
--8<---------------cut here---------------end--------------->8---
Unfortunately, it doesn't seem to work as intended. Adding the
following to my configuration:
--8<---------------cut here---------------start------------->8---
(service postgresql-service-type)
(service postgresql-role-service-type
(postgresql-role-configuration
(roles
(list (postgresql-role
(name "maxim")
(create-database? #t))))))
(service-extension postgresql-role-service-type
(const (postgresql-role
(name "cuirass")
(create-database? #t))))
--8<---------------cut here---------------end--------------->8---
I get the following error upon reconfiguration:
--8<---------------cut here---------------start------------->8---
Backtrace:
18 (primitive-load "/home/maxim/.config/guix/current/bin/g…")
In guix/ui.scm:
2324:7 17 (run-guix . _)
2287:10 16 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 15 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
859:3 14 (_)
839:4 13 (call-with-status-report _ _)
In guix/scripts/system.scm:
1305:4 12 (_)
In ice-9/boot-9.scm:
1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
661:37 10 (thunk)
1300:8 9 (call-with-build-handler #<procedure 7f446c6d5c90 at g…> …)
2180:25 8 (run-with-store #<store-connection 256.99 7f44768a8a00> …)
In guix/scripts/system.scm:
847:2 7 (_ _)
721:8 6 (_ #<store-connection 256.99 7f44768a8a00>)
In gnu/system.scm:
1295:19 5 (operating-system-derivation _)
In gnu/services.scm:
1166:6 4 (instantiate-missing-services _)
In srfi/srfi-1.scm:
460:18 3 (fold #<procedure 7f446a968960 at gnu/services.scm:116…> …)
In gnu/services.scm:
1167:27 2 (_ #<<service-extension> target: #<service-type postgr…> …)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure service-kind: Wrong type argument: #<<service-extension> target: #<service-type postgresql-role 7f4471875640> compute: #<procedure 7f446afc63a0 at ice-9/boot-9.scm:809:2 _>>
--8<---------------cut here---------------end--------------->8---
--
Thanks,
Maxim
Information forwarded
to
bug-guix <at> gnu.org
:
bug#68747
; Package
guix
.
(Tue, 30 Jan 2024 22:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 68747 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Maxim,
I guess this is not explained that well, but the service-extension
snippet is supposed to go under the (extensions ...) field of a
<service-type> record. If you want to extend this in your system
config, you want (simple-service ...) instead, with e.g.
--8<---------------cut here---------------start------------->8---
(simple-service 'alice-role postgresql-role-service-type
(postgresql-role
(name "alice")
(create-database? #t)))
--8<---------------cut here---------------end--------------->8---
Best,
--
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 1 year and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.