From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJumJsu1c2FXTQEAgWs5BA (envelope-from ) for ; Sat, 23 Oct 2021 09:12:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QKBXIsu1c2GSLAAA1q6Kng (envelope-from ) for ; Sat, 23 Oct 2021 07:12:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E6F8F03C for ; Sat, 23 Oct 2021 09:12:10 +0200 (CEST) Received: from localhost ([::1]:58254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meBCL-0000xM-Nk for larch@yhetil.org; Sat, 23 Oct 2021 03:12:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meBCE-0000xA-5r for bug-guix@gnu.org; Sat, 23 Oct 2021 03:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meBCD-00074I-TQ for bug-guix@gnu.org; Sat, 23 Oct 2021 03:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meBCD-00048e-OF for bug-guix@gnu.org; Sat, 23 Oct 2021 03:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51141: guix home reconfigure does not apply changes to shepherd services Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Oct 2021 07:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51141 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Oleg Pykhalov Received: via spool by 51141-submit@debbugs.gnu.org id=B51141.163497309315873 (code B ref 51141); Sat, 23 Oct 2021 07:12:01 +0000 Received: (at 51141) by debbugs.gnu.org; 23 Oct 2021 07:11:33 +0000 Received: from localhost ([127.0.0.1]:34250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meBBl-00047x-6K for submit@debbugs.gnu.org; Sat, 23 Oct 2021 03:11:33 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:45898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meBBj-00047k-54 for 51141@debbugs.gnu.org; Sat, 23 Oct 2021 03:11:32 -0400 Received: by mail-lf1-f49.google.com with SMTP id x192so179501lff.12 for <51141@debbugs.gnu.org>; Sat, 23 Oct 2021 00:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=8jdG0B32B5fYiwZW+FSkdluaoX6csOgfLmBRuUpyPrQ=; b=eG07kW03q+bUWPQlkkexWU8fUiuiCmWXz+PfQ8sHculCFvFjwAz2pbuEERiDu3ntQY CULbniwE/snU4nVYo9biymxUBVpbdkajCjH5EBv7izVCyB9QCLY5oByaZxcJBsT20RfU bbSSpPj7sWpqB65iHDVXxeFbzCfY3r4aW7pK7WcUUvCqeNBXOOQTnU134L1WkY2vfBKq GYs5Kb1Neu1BollncfLCrjPCOwMYVXwpZltk2tko7KuvCpzz6mX0ZAxG0AFDxF8fqyxw 99VTGSSmUcfhxQNPLH8HjJDLGI6CMKDuvWpt3CDJC1JpKjzQ4AbKO7MkpqNOHZjttpxe Uc4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=8jdG0B32B5fYiwZW+FSkdluaoX6csOgfLmBRuUpyPrQ=; b=xdpNMxTbr1yKA0bzvVaF3k/28sYhe7jzRIMAccNWMB1gia0mq9HXYbZRgbYyu3XhvR 8n5GVv9GGQDvDdeOcKg75iWOoQ2qiQG8CEvigN4vPFcuCXb8RX7vqXaele5mN8p+CdGg DmQxiiDCCTJ4grARgAk25qI/0yER+/J8Hm5StVLKReHRMZOij8sHU755L5/OpPkQ14Qx c+8/i1lYis1BxjH9xU/Eo8Mhl49kYA2HTUFwSeq9pPQeULXFyMEBSGXQiN4LpFWpc+Mr pzpx13GgAh9ZYm3WwYBRxBubA6joLEoE+E5IhxBISyB+dZA3iegpxFOXR6qjvdmPHfjc lxcg== X-Gm-Message-State: AOAM530/VbTuEmmWbqAQNnrvsW6PNNwDFekcvkbwTAambJ2np+equCBH Ixheia6M4cqB88yTB2Jb6IfsDA== X-Google-Smtp-Source: ABdhPJywClBpgdePeCKytK/cJMw1ML7JtNJKiCRZGC8hxuZZ3YncYuXU/G1OhXpL3/kNsn2zb8EOVQ== X-Received: by 2002:a05:6512:22d6:: with SMTP id g22mr4171007lfu.577.1634973084984; Sat, 23 Oct 2021 00:11:24 -0700 (PDT) Received: from localhost (109-252-140-132.dynamic.spd-mgts.ru. [109.252.140.132]) by smtp.gmail.com with ESMTPSA id v3sm945857lfr.61.2021.10.23.00.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 00:11:24 -0700 (PDT) From: Andrew Tropin In-Reply-To: <878rymt0m4.fsf@gmail.com> References: <87k0ijxjfu.fsf@gmail.com> <878ryuoljj.fsf@trop.in> <87fst180wp.fsf@gmail.com> <8735oyhcnr.fsf@trop.in> <878rymt0m4.fsf@gmail.com> Date: Sat, 23 Oct 2021 10:11:20 +0300 Message-ID: <87bl3gkyg7.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 51141@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634973131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=8jdG0B32B5fYiwZW+FSkdluaoX6csOgfLmBRuUpyPrQ=; b=btFUypIJJ2pr84SmbdTa4tXMunn1h+ho++HxKvJPpw93VKu0WvwibS98PtYvAK0KwNxPuV hZIuGke8PNelAy9RmcaWUYctxAMLo1bGBrMtTKn9pSpdp4vn6Eu9UB7IwUJwQtHAbQ8gw/ I06oc35P5F9NLsVQzY+reRVaU8/aVKNgvouJkzuZ408oMQXGN3wyoRzGTggAaKBuXMhtHE CpRRU7FUuc8zzCOwvqvRSZPoXh6k45WkIcS2EphVX312eMrT3Z+f/WHbGT05sFtIH9sR4x +f/QouwROMgNMadCa+7w3IYUHA+XU/yLvmeiYQo5bXdMIfQmdGW8roB3RgFKwg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634973131; a=rsa-sha256; cv=none; b=LAYrR6Ljgj8y18fB1omnXv40XL4nej5dYwshmBu/tyqSgbC3+fBGwjhCapDoMD8QD3RTiQ 4EYQOOVHJTzuAhUFCFfJAdwqxkfdaca28Lu375Md44NLJM9U8uHVHmQIIYJfsmYGRv0V8a jjmqog/9Tcu9Mb+QfMGbj6oUhp8mznEOzkitpWstms2z/nXLJbrboDItX29GzcSC4aH6A0 dTHEvr9zwDYMCuYtSV11G6ptXYG+dBuyIjj4Q5QQpOdnrGG/PEReADlL+6WE9MQNiaRURE fRaXqQ9EWCMMdWHaD2So+zlwImGrN9AG70d18pErsCT1pUdKcV/TQZnjmOX3OQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b=eG07kW03; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b=eG07kW03; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 9E6F8F03C X-Spam-Score: -2.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: x8fUd0g6Pf7t --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-10-22 02:32, Oleg Pykhalov wrote: > Andrew Tropin writes: > > [=E2=80=A6] > >> According to what I see in the shepherd tests: >> https://git.savannah.gnu.org/cgit/shepherd.git/tree/tests/replacement.sh= ?h=3D4c5176f5a7a5a1e7d7f258f585e8ed127a21b99a#n61 >> >> and how it's implemented in home-shepherd: >> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shephe= rd.scm?h=3D7c3f28fdc4edc00f66801cd51a5ba08eee44f77f#n59 >> >> It should work as you expect it. > > It doesn't. > >> Tried to do the following: I updated documentation field for a shepherd >> service, reconfigured and it got loaded after I restarted a service. >> >> ~ $ herd doc state >> Init, update and maybe destroy state. >> ~ $ herd restart state >> Service state has been stopped. >> Service state has been started. >> ~ $ herd doc state >> Really init, update and maybe destroy state. >> >> Didn't check if start action gexp is updated too, but I expect it was. > > The start action is the interest, or configuration record, or service > extension. From=20the experiment above it's clear that new configuration got loaded and service record get updated after restart (at least one field of it). > > (guix scripts system reconfigure) has a upgrade-shepherd-services > procedure, which was created in 240b57f0ca576708ebf6cfa0dfe2803fa9ff2323 > and discussed in https://issues.guix.gnu.org/22039 The difference with update-shepherd-services is the usage of Shepherd CLI in home service instead of Shepherd API in system service. So the problem can hide somewhere around this part. Automatic unloading in home-service doesn't happens and as I said it's by design to prevent cases of losing unsaved work. However, it can be implemented with an optional separate flag to shepherd configuration record and extension to run-on-change-service or as it done in system shepherd with the list of services, which doesn't have to be unloaded automatically. > > > [ The following text only describes how to reproduce the issue. ] > > > When I tried to write goimapnotify service no changes applied after > modifications in home-goimapnotify-shepherd-service [1] and [2], which > are typical service-type and record. I didn't have similar issues with > self-written system services. > > [1]: https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4= aae39ad9645c2d/dotfiles/guixsd/modules/home/services/mail.scm#L28-45 > [2]: https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4= aae39ad9645c2d/dotfiles/guixsd/home.scm#L40-65 > I'm out of office for next 1.5 week, will check it when I come back. > > Service extension also requires to unload service, e.g. mcron service > extension in [1] and [2]. > > [1]: https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4= aae39ad9645c2d/dotfiles/guixsd/modules/home/services/package-management.scm= #L16-50 > [2]: https://gitlab.com/wigust/dotfiles/-/blob/ea2111906233099267f3b581b4= aae39ad9645c2d/dotfiles/guixsd/home.scm#L154-161 > > If I remove the guix-delete-generations service from home configuration, > mcron job still exists according to 'herd schedule mcron'. > --8<---------------cut here---------------start------------->8--- > (home-environment > (services > (list (service guix-delete-generations-service-type ;; ... > )))) > --8<---------------cut here---------------end--------------->8--- > > Oleg. BTW, please remove unreviewed changes to interpose function, they are incorrect. https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/configuration.= scm?id=3D41492639e0223dc8fc1a357e1f9537577c055db7#n362 The explanation: https://issues.guix.gnu.org/50967#66 The correct version: https://git.sr.ht/~abcdw/rde/commit/4961f47c3f97c21799= a39b3e906fa99b2625f331 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFztZgACgkQIgjSCVjB 3rCDNg//cfbza8wERHT56rQwiZN60nZ/NOK1MSFgCseazq4XfVath28H3fvHBEY8 vZwJW2JrDgph0+mJ6YyyPkuBszXWJGD+J8i43eQrEwWzzkIuOqVFlESHLHy3D1SK lUS670xHYW7hdTCjksMs8H7kIycYqES1vsK47PFOGdxlbj0K/BfBqRAAnBi23aPS 0KOzQ8uPVz7poTZWufpIlRQ7CXkTd1vrXY6JBK/1MdIcWSUQ1C5tXMHk0uKWT08G +r0oBbPQ5L/V7BYVYzYvjqg/mlEAxh0ewSRzh7ebLjo95yVK5xW5VRDzJu9f9qTu Ne8R8ZJ7tO37T0w7XnlG2UROTbAaG2Vx91s3A6WQvHnFrVtUVXHxtP1/cxd6907K ughs94fHTEnPXhBLc+49l1xpYa+1QfV+nLaWjr//QB8HlYMihBJ3PQgovR5Rnl4k iXUcbF3rjX3wyWIRJNWRVL1oOKuNmin9lu4RhJLXLcqWN4Gk45gYeOAYnslrzqHe qK3Pd53MoKaYkbAFJO/uZWYWN8prsCpQl6qr7lRXoaxJsC3oe8QX/1dZvaRrn8SG Ikj5Hd7aZ9p/JDQZBO16I6XoUJ6bUy/qxK/1vRzOQSOIgRwBB4WYXQZG+QdeV4FA ebQJP/8Zbqccv3ATkBGjmGiCY+kTuSRiUE2yQHIResFtZlarhxM= =2f9C -----END PGP SIGNATURE----- --=-=-=--