GNU bug report logs - #31889
Filesystems must not depend on device mappings?

Previous Next

Package: guix;

Reported by: Taylan Ulrich Bayırlı/Kammer <taylanbayirli <at> gmail.com>

Date: Mon, 18 Jun 2018 21:13:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31889 in the body.
You can then email your comments to 31889 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#31889; Package guix. (Mon, 18 Jun 2018 21:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Taylan Ulrich Bayırlı/Kammer <taylanbayirli <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 18 Jun 2018 21:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Taylan Ulrich Bayırlı/Kammer
 <taylanbayirli <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: Filesystems must not depend on device mappings?
Date: Mon, 18 Jun 2018 23:11:54 +0200
[Message part 1 (text/plain, inline)]
If in my OS config I define some luks mappings, and define the
corresponding filesystems with dependencies on the mapped devices,
I get an error on 'guix system reconfigure'.

Example:

  (operating-system
    ...
    (mapped-devices
      (list (mapped-device ... (target "root"))))
    (file-systems
      (list (file-system (mount-point "/")
                         ...
                         (dependencies mapped-devices))))
    ...)

This will yield an error like:

  file-system-/ depends on device-mapping-root, which is not
  provided by any service

Funnily enough, one only needs to remove the 'dependencies' field to
make it work.  But this contradicts the example at:

https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html


Taylan
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#31889; Package guix. (Wed, 20 Jun 2018 21:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 31889 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Taylan Ulrich Bayırlı/Kammer
 <taylanbayirli <at> gmail.com>
Cc: 31889 <at> debbugs.gnu.org
Subject: Re: bug#31889: Filesystems must not depend on device mappings?
Date: Wed, 20 Jun 2018 23:17:48 +0200
Hi!

Taylan Ulrich "Bayırlı/Kammer" <taylanbayirli <at> gmail.com> skribis:

> If in my OS config I define some luks mappings, and define the
> corresponding filesystems with dependencies on the mapped devices,
> I get an error on 'guix system reconfigure'.
>
> Example:
>
>   (operating-system
>     ...
>     (mapped-devices
>       (list (mapped-device ... (target "root"))))
>     (file-systems
>       (list (file-system (mount-point "/")
>                          ...
>                          (dependencies mapped-devices))))
>     ...)
>
> This will yield an error like:
>
>   file-system-/ depends on device-mapping-root, which is not
>   provided by any service

Could you show the complete ‘mapped-devices’ and ‘file-systems’ fields,
without ellipses?

The message above suggests that “/” was not considered as
needed-for-boot.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#31889; Package guix. (Thu, 21 Jun 2018 16:45:01 GMT) Full text and rfc822 format available.

Message #11 received at 31889 <at> debbugs.gnu.org (full text, mbox):

From: Taylan Kammer <taylanbayirli <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 31889 <at> debbugs.gnu.org
Subject: Re: bug#31889: Filesystems must not depend on device mappings?
Date: Thu, 21 Jun 2018 20:44:42 +0200
ludo <at> gnu.org (Ludovic Courtès) writes:

> Hi!
>
> Taylan Ulrich "Bayırlı/Kammer" <taylanbayirli <at> gmail.com> skribis:
>
>> If in my OS config I define some luks mappings, and define the
>> corresponding filesystems with dependencies on the mapped devices,
>> I get an error on 'guix system reconfigure'.
>>
>> Example:
>>
>>   (operating-system
>>     ...
>>     (mapped-devices
>>       (list (mapped-device ... (target "root"))))
>>     (file-systems
>>       (list (file-system (mount-point "/")
>>                          ...
>>                          (dependencies mapped-devices))))
>>     ...)
>>
>> This will yield an error like:
>>
>>   file-system-/ depends on device-mapping-root, which is not
>>   provided by any service
>
> Could you show the complete ‘mapped-devices’ and ‘file-systems’ fields,
> without ellipses?
>
> The message above suggests that “/” was not considered as
> needed-for-boot.
>
> Thanks,
> Ludo’.

Sorry, looks like my example was wrong.  Here is a problematic OS
declaration:

    (operating-system
     (host-name "guixsd")
     (timezone "Europe/Berlin")
     (locale "en_US.utf8")
     
     (bootloader
      (bootloader-configuration
       (bootloader grub-bootloader)
       (target "/dev/sda")))
     
     (mapped-devices
      (list (mapped-device
             (source (uuid "b3d059f8-1c4f-4569-88dd-5485825b4373"))
             (target "guixsd")
             (type luks-device-mapping))
            (mapped-device
             (source (uuid "550d9258-bbbb-488c-af27-6b1fefa190ee"))
             (target "home")
             (type luks-device-mapping))))
     
     (file-systems
      (append
       (list (file-system
              (device "/dev/mapper/guixsd")
              (mount-point "/")
              (type "ext4")
              (dependencies mapped-devices))
             (file-system
              (device "/dev/mapper/home")
              (mount-point "/home")
              (type "ext4")
              (dependencies mapped-devices)))
       %base-file-systems))
     
     (users
      (append
       (list (user-account
              (name "taylan")
              (comment "Taylan Kammer")
              (group "users")
              (supplementary-groups '("wheel" "netdev" "audio" "video"))
              (home-directory "/home/taylan")))
       %base-user-accounts))
     
     (packages %base-packages)
     (services %desktop-services)
     
     ;; Allow resolution of '.local' host names with mDNS.
     (name-service-switch %mdns-host-lookup-nss))

It results in the error message:

    guix system: error: service 'file-system-/home' requires
    'device-mapping-home', which is not provided by any service

(I also got that for '/' rather than '/home' at some point, but can't
remember under what conditions.)

It works when both '(dependencies mapped-devices)' clauses are simply
removed.

All in all I can't really figure out the logic behind the whole thing
and what exactly is expected.  I think the error reporting and relevant
section of the documentation may need some improvement.

Taylan




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Thu, 21 Jun 2018 21:56:01 GMT) Full text and rfc822 format available.

Notification sent to Taylan Ulrich Bayırlı/Kammer <taylanbayirli <at> gmail.com>:
bug acknowledged by developer. (Thu, 21 Jun 2018 21:56:01 GMT) Full text and rfc822 format available.

Message #16 received at 31889-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Taylan Kammer <taylanbayirli <at> gmail.com>
Cc: 31889-done <at> debbugs.gnu.org
Subject: Re: bug#31889: Filesystems must not depend on device mappings?
Date: Thu, 21 Jun 2018 23:55:27 +0200
Hi,

Taylan Kammer <taylanbayirli <at> gmail.com> skribis:

>      (mapped-devices
>       (list (mapped-device
>              (source (uuid "b3d059f8-1c4f-4569-88dd-5485825b4373"))
>              (target "guixsd")
>              (type luks-device-mapping))
>             (mapped-device
>              (source (uuid "550d9258-bbbb-488c-af27-6b1fefa190ee"))
>              (target "home")
>              (type luks-device-mapping))))
>      
>      (file-systems
>       (append
>        (list (file-system
>               (device "/dev/mapper/guixsd")
>               (mount-point "/")
>               (type "ext4")
>               (dependencies mapped-devices))
>              (file-system
>               (device "/dev/mapper/home")
>               (mount-point "/home")
>               (type "ext4")
>               (dependencies mapped-devices)))
>        %base-file-systems))

[...]

> It results in the error message:
>
>     guix system: error: service 'file-system-/home' requires
>     'device-mapping-home', which is not provided by any service

[...]

> It works when both '(dependencies mapped-devices)' clauses are simply
> removed.

Yes, it’s “expected”: using “/dev/mapper/xyz” as the device is enough to
express the dependency.

When passing (dependencies mapped-devices), the effect was to each file
system depend on *both* mapped devices.  This leads to an inconsistency
because /dev/mapper/guixsd is “needed-for-boot” (i.e., set up from the
initrd), whereas /dev/mapper/home is not (i.e., set up as a Shepherd
service.)

The solution is to either use the /dev/mapper/xyz names in the ‘device’
field, or to specify only the relevant mapped device in ‘dependencies’.

Anyway, commit 68a58775e071d4b0e000b93ad121b6e64d161b79 fixes it by
doing exactly what this config asks for: setting up all the mapped
devices in the initrd.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#31889; Package guix. (Fri, 22 Jun 2018 16:22:01 GMT) Full text and rfc822 format available.

Message #19 received at 31889-done <at> debbugs.gnu.org (full text, mbox):

From: Taylan Kammer <taylanbayirli <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 31889-done <at> debbugs.gnu.org
Subject: Re: bug#31889: Filesystems must not depend on device mappings?
Date: Fri, 22 Jun 2018 20:21:07 +0200
ludo <at> gnu.org (Ludovic Courtès) writes:

> Hi,
>
> Taylan Kammer <taylanbayirli <at> gmail.com> skribis:
>
>>      (mapped-devices
>>       (list (mapped-device
>>              (source (uuid "b3d059f8-1c4f-4569-88dd-5485825b4373"))
>>              (target "guixsd")
>>              (type luks-device-mapping))
>>             (mapped-device
>>              (source (uuid "550d9258-bbbb-488c-af27-6b1fefa190ee"))
>>              (target "home")
>>              (type luks-device-mapping))))
>>      
>>      (file-systems
>>       (append
>>        (list (file-system
>>               (device "/dev/mapper/guixsd")
>>               (mount-point "/")
>>               (type "ext4")
>>               (dependencies mapped-devices))
>>              (file-system
>>               (device "/dev/mapper/home")
>>               (mount-point "/home")
>>               (type "ext4")
>>               (dependencies mapped-devices)))
>>        %base-file-systems))
>
> [...]
>
>> It results in the error message:
>>
>>     guix system: error: service 'file-system-/home' requires
>>     'device-mapping-home', which is not provided by any service
>
> [...]
>
>> It works when both '(dependencies mapped-devices)' clauses are simply
>> removed.
>
> Yes, it’s “expected”: using “/dev/mapper/xyz” as the device is enough to
> express the dependency.
>
> When passing (dependencies mapped-devices), the effect was to each file
> system depend on *both* mapped devices.  This leads to an inconsistency
> because /dev/mapper/guixsd is “needed-for-boot” (i.e., set up from the
> initrd), whereas /dev/mapper/home is not (i.e., set up as a Shepherd
> service.)
>
> The solution is to either use the /dev/mapper/xyz names in the ‘device’
> field, or to specify only the relevant mapped device in ‘dependencies’.
>
> Anyway, commit 68a58775e071d4b0e000b93ad121b6e64d161b79 fixes it by
> doing exactly what this config asks for: setting up all the mapped
> devices in the initrd.
>
> Thanks,
> Ludo’.

Thank you for the explanation and the fix! :-)

Taylan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 21 Jul 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.