Subject: Re: bug#41116: Guix deploy fails with new version of Herd

From: Marius Bakke <[email-masked]>
Date: Fri, 08 May 2020 15:44:18 +0200

Diego Nicola Barbato <[email-masked]> writes:

> Hey,
>
> Ludovic Courtès <[email-masked]> writes:
>
>> Hello Alex & Marius,
>>
>> Marius Bakke <[email-masked]> skribis:
>>
>>> Alex Sassmannshausen via Bug reports for GNU Guix <[email-masked]>
>>> writes:
>>>
>>>> Hello,
>>>>
>>>> I maintain a number of servers using Guix deploy.  It seems that the
>>>> recent upgrade to Herd in Guix, and specifically commit
>>>> 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec might have introduced a bug.
>>>>
>>>> From my testing, guix deploy currently consistently fails with:
>>>> -----------------8<----------------------------->8-------------------
>>>> ice-9/boot-9.scm:1667:16: In procedure raise-exception:
>>>> ERROR:
>>>>   1. &inferior-exception:
>>>>       arguments: (srfi-34 #<inferior-object #<condition &action-exception-error [service: root action: eval key: keyword-argument-error args: ("#<procedure 7fe24816e240 at shepherd/service.scm:903:4 (command #:key user group directory environment-variables pid-file pid-file-timeout log-file) | (program . program-args)>" "Unrecognized keyword" () (#:file-creation-mask))] 7eff2bd7be00>>)
>>>>       inferior: #f
>>>>       stack: ()
>>>> -----------------8<----------------------------->8-------------------
>>>>
>>>> A workaround is to build the system configuration locally on the target
>>>> server, then to reconfigure.  It will still error at the same place, but
>>>> at this point, after restarting the server, the new version of Herd will
>>>> be running and both deploy and reconfigure will work.
>>>>
>>>> I don't know what a good solution to this could be, but it may be
>>>> something we need to consider in future development of Herd.
>>>
>>> This issue has been reported by a number of users on IRC.  I think the
>>> problem is that the the #:file-creation-mask keyword requires support
>>> from the running Shepherd, which may not have it yet.  I think we should
>>> revert commit 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec until we find a
>>> smooth upgrade path.  Can you try it and push if that fixes guix deploy?
>>
>> I’ve reverted the patch in 5aa4d2dcf2f4f8786358feb45338893ed08a4cd9.
>>
>> Diego: I guess we can reinstate the patch “later”, once Shepherd 0.8 can
>> be considered widespread.
>
> I'm sorry I broke reconfigure and deploy.  I didn't consider testing
> upgrading from before Shepherd 0.8 to after my change and I didn't even
> think of deploy.  Going forth I'll leave messing with core functionality
> to the pros.

Mistakes happen, don't worry about it.

One thing that would be really useful and can prevent such situations in
the future is to have a "system test" that tries to run reconfigure from
the latest released version of Guix (currently 1.1.0).

There are already a few Shepherd tests in gnu/tests/base.scm and
gnu/tests/reconfigure.scm that can be used as inspiration.

Food for thought, patches welcome, etc.  :-)