Inconsistent dnames on deployed machines

Bug #1771342 reported by Ante Karamatić
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Committed
Medium
Unassigned

Bug Description

When deploying bcache devices, there is no way to consistently name devices across the machines.

I have three machines, all with identical hardware and with identical configuration (curtin data attached). Device name for / for all machines in MAAS is bcache0. This is also expressed in curtin data.

However, upon deployment, on two machines I get:

/dev/disk/by-dname/bcache1 -> /dev/bcache4 (mounted as /)

On third I get:

/dev/disk/by-dname/bcache2 -> /dev/bcache3 (mounted as /)

While nobody expect consistent /dev/bcache naming, /dev/disks/by-dname/bcache naming must be consistent. Because udev rules for bcache* devices must contain UUIDs. Ie, udev rule (for server1):

SUBSYSTEM=="block", ACTION=="add|change", ENV{DEVNAME}=="/dev/bcache0", SYMLINK+="disk/by-dname/bcache0"

should in fact be:

SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_UUID_ENC}=="4d646141-dbc4-43f7-9f06-5d521dc74515", SYMLINK+="disk/by-dname/bcache0"

While this solves the problem with filesystems and would uniformly solve /dev/disks/by-dname/bcache links, it doesn't solve partitioning problem.

Revision history for this message
Ante Karamatić (ivoks) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

Can you include the install.log from a system? Which curtin version is being used? The udev rules you show are from curtin 18.1-1 or less. In Bionic and Cosmic (18.1-5) where bcache dnames have been fixed to use uuid of the backing disk look like:

SUBSYSTEM=="block", ACTION=="add|change", ENV{CACHED_UUID}=="272a62c4-ed8f-4714-8909-78720ffad1e5", SYMLINK+="disk/by-dname/cached_array"

Changed in curtin:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Ante Karamatić (ivoks) wrote :

It says:

May 15 14:31:03 server3 cloud-init[1132]: curtin: Installation started. (18.1-5-g572ae5d6-0ubuntu1)

Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1771342] Re: Inconsistent dnames on deployed machines

Well, shoot. It didn't make bionic;

commit aa003740b4d70a2ddb7f9f5ad51de7a10034d012 (HEAD -> ubuntu/devel,
tag: ubuntu/18.1-5-g572ae5d6-0ubuntu1,
raharper/ubuntu/devel/newupload-20180418)
Author: Ryan Harper <email address hidden>
Date: Wed Apr 18 10:15:57 2018 -0500

    releasing curtin version 18.1-5-g572ae5d6-0ubuntu1

commit 12d7163cea870b7e76f36249ffc5eab7a29c5582
Author: Ryan Harper <email address hidden>
Date: Thu Apr 19 10:47:20 2018 -0500

    make_dname for bcache should use backing device uuid

On Tue, May 15, 2018 at 10:36 AM, Ante Karamatić
<email address hidden> wrote:
> It says:
>
> May 15 14:31:03 server3 cloud-init[1132]: curtin: Installation started.
> (18.1-5-g572ae5d6-0ubuntu1)
>
>
> ** Attachment added: "messages"
> https://bugs.launchpad.net/curtin/+bug/1771342/+attachment/5139872/+files/messages
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1771342
>
> Title:
> Inconsistent dnames on deployed machines
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1771342/+subscriptions

Revision history for this message
Ryan Harper (raharper) wrote :

Is it possible to give curtin daily a test to confirm? We're working on a new upload to cosmic and an SRU to bionic, artful and xenial.

https://launchpad.net/~curtin-dev/+archive/ubuntu/daily

Changed in curtin:
status: Incomplete → Fix Committed
Revision history for this message
Ante Karamatić (ivoks) wrote :

Yes, daily works as expected!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.