[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#46031] services: cuirass: Add "simple-cuirass-services".

From: Ludovic Courtès
Subject: [bug#46031] services: cuirass: Add "simple-cuirass-services".
Date: Mon, 22 Feb 2021 13:59:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


Mathieu Othacehe <> skribis:

>> I wonder if it would make sense to allow users to pass directly a
>> manifest, as in (pseudo syntax):
>>   (simple-cuirass-configuration
>>     (build (list (build-manifest … (local-file "my-manifest.scm"))))
>>     (channels …))
> It would be nice but Cuirass doesn't support specification update for
> now. Passing a manifest this way would require to drop the database
> content at each reconfiguration.

Ah yes, that wouldn’t be convenient.

>> What about exposing ‘simple-cuirass-configuration->specs’, and document
>> it such that one can do:
>>   (service cuirass-service-type
>>            (cuirass-configuration
>>              (specifications
>>               (simple-cuirass-configuration->specs config))))
> I agree it feels nicer, however with this service I'd like to hide the
> dependencies to postgresql-service-type and
> postgresql-role-service-type. That's why "simple-cuirass-services"
> returns three services. Maybe you see another way?

When a service extends a service type, an instance of that service type
is automatically added if it’s missing (provided that service type has a
default value).  This happens in ‘instantiate-missing-services’.

So, if postgresql-role-service-type and postgresql-service-type have a
default value, simple-cuirass-service could extend them both (possibly
with a dummy value) and it would just work.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]