The disk id_path isn't recorded correctly on commissioning

Bug #1859481 reported by Björn Tillenius
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

This is with MAAS 2.7.0~rc1-8207-g.b148a8b9c.

After commissioning a machine, you'll see that the disks will have
id_paths like "pci-0000:00:1f.2-ata-1", when it should be something
like "/dev/disk/by-id/..."

This causes problems editing disk tags for example, since the validation
of id_path fails when adding a tag to the disk.

Note that this isn't visible with VMs using virtio disks, since virtio
doesn't implement /dev/disk/by-id/ and thus MAAS puts the normal
device path there.

Related branches

tags: added: ui
Changed in maas:
milestone: none → 2.7.0rc2
Changed in maas:
assignee: nobody → Caleb Ellis (caleb-ellis)
Changed in maas:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

I am not getting this behaviour - see attached video. Can you paste what's sent through the websocket and what's returned?

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Björn Tillenius (bjornt) wrote :

Interesting.

You can see the websocket request and response here:

  https://pastebin.ubuntu.com/p/QPnjVmcHJ8/

Revision history for this message
Björn Tillenius (bjornt) wrote :

Ok, I think we've found the problem. It's a backend bug.

The problem is that when commissioning a machine, the id_path of a disk
get set to the wrong value. For example, one of the disks have and id_path
of "pci-0000:00:1f.2-ata-1", where it should be something like
"/dev/disk/by-id/...".

The reason you're not seeing the bug is that you use a VM with virtio disks.
The virtio driver doesn't support id paths, so none get reported to MAAS,
which in turn simply puts the normal device path there (e.g. "/dev/vda")

tags: removed: ui
Changed in maas:
status: Incomplete → Triaged
assignee: Caleb Ellis (caleb-ellis) → nobody
summary: - Adding tags to a disk doesn't save them in the DB
+ The disk id_path isn't recorded correctly on commissioning
description: updated
Revision history for this message
Alberto Donato (ack) wrote :

Field is being added in LXD code at https://github.com/lxc/lxd/pull/6719

Alberto Donato (ack)
Changed in maas:
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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