machines keep failing deployment due too FileNotFoundError: [Errno 2] No such file or directory: '/dev/disk/by-id'

Bug #1891251 reported by matteo giaimo
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
MAAS
New
Undecided
Unassigned
curtin
New
Undecided
Unassigned

Bug Description

Maas machines keep failing deployment with error FileNotFoundError: [Errno 2] No such file or directory: '/dev/disk/by-id'

my setup is as follows
host machine is windows 10 and i am using virtualbox to run a guest vm of ubuntu desktop 18.04.4 LTS.
now in my ubuntu desktop guest virtual machine i have installed qemu/kvm/libvirt to virtualize two guest machines that will be deployed with maas. below i am creating an outline of my nested virtualized environment

-windows 10 running virtualbox
  -ubuntu desktop 18.04.4 LTS (qemu/kvm/libvirt)
       - guest ubuntu server 18.04.3 LTS running maas-region-controller and maas-rack-controller
           - 2 guest vm's to pxe boot from maas that are created from virtual machine manager in my ubuntu
             desktop VM

for my 2 guest virtual machines i am using the virsh power-parameters which maas has control of. maas is able to power them on, commission, and enter them into rescue mode and exit rescue mode. these features also work from the maas cli.

my problem is that every time i deploy these hosts they keep failing deployment. I upgraded from maas 2.4.2 to 2.8.1 as well and it did not resolve this problem, had the same error from both versions of maas. can someone please help as i am tasked with creating a virtualized devops environment. are company uses maas in our production environment.

 devsync happy - path /dev/vda now exists return volume path /dev/vda install_devices: ['/dev/vda'] Generating grub debconf_selections for devices=['/dev/vda'] uefi=False finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: installing grub to target devices finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/configuring-bootloader: FAIL: configuring target system bootloader finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks Traceback (most recent call last): File "/curtin/curtin/commands/main.py", line 202, in main ret = args.func(args) File "/curtin/curtin/commands/curthooks.py", line 1770, in curthooks builtin_curthooks(cfg, target, state) File "/curtin/curtin/commands/curthooks.py", line 1736, in builtin_curthooks setup_grub(cfg, target, osfamily=osfamily) File "/curtin/curtin/commands/curthooks.py", line 689, in setup_grub configure_grub_debconf(instdevs, target, uefi_bootable) File "/curtin/curtin/commands/curthooks.py", line 509, in configure_grub_debconf link = block.disk_to_byid_path(dev) File "/curtin/curtin/block/__init__.py", line 869, in disk_to_byid_path mapping = get_dev_disk_byid() File "/curtin/curtin/block/__init__.py", line 861, in get_dev_disk_byid return _get_dev_disk_by_prefix('/dev/disk/by-id') File "/curtin/curtin/block/__init__.py", line 846, in _get_dev_disk_by_prefix for path in os.listdir(prefix)] FileNotFoundError: [Errno 2] No such file or directory: '/dev/disk/by-id' [Errno 2] No such file or directory: '/dev/disk/by-id' Stderr: ''

Revision history for this message
Janghoon-Paul Sim (janghoon) wrote :

The same issue happened on my MAAS.
MAAS : 2.6.2
I changed a disk bus type of the VM from virtio to SATA. The deployment gets success.

Revision history for this message
Muthukumaran G (muthu883) wrote :

I have verified with Ubuntu 18.04.5 & MAAS versions 2.4.2, 2.6.2, 2.7, 2.8 and the same issue happened on MAAS. Its failing to configure grup and boot loader with disk type as virtio.

But the deployment was working 3 weeks back with ubuntu 18.04.4 and MAAS version 2.4.2 with KVM for disk type as virtio. I am not sure what happened suddenly to break this deployment functionality with disk type as "virtio" this virtio driver is required to boost the performance in the kvm environment rather to have disk type as IDE/SATA/SCSI

Revision history for this message
Janghoon-Paul Sim (janghoon) wrote :

I downgraded python3-curtin package version 18.1-5-g572ae5d6-0ubuntu1 and confirmed virtio disk type worked fine.
It seems the latest, version 20.1-2-g42a9667f-0ubuntu1 causes the issue.

Revision history for this message
Radoslav (radoslav-milanov) wrote :

I've done some limited testing and it seems to be working if virtual disk is a raw image. It fails with virtio disk being qcow2 image.

Revision history for this message
Janghoon-Paul Sim (janghoon) wrote :

This issue happens with the following combination.

1) python3-curtin 20.1-2-g42a9667f-0ubuntu1 installed
and
2) Virtio disk bus
and
3) Qcow2 image type

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

This bug (on the curtin-side) is a dup of this:

https://bugs.launchpad.net/curtin/+bug/1876258

On the MAAS side, all VM disks *must* include a serial attribute. There's no reason to not include the serial attribute.

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.