FAIL: installing grub to target devices

Bug #1898550 reported by Tony
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
curtin
New
Undecided
Unassigned

Bug Description

MAAS: 2.6.2

Today deployment is constantly failing. I've tried recommissioning and went through a live DVD of Gparted and wiped the storages to be sure. Still, I can't get past this:

start: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: installing grub to target devices
setup grub on target /tmp/tmplwfmv7xv/target
Found primary UEFI ESP: sda-part1
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 623, in setup_grub
    for dev_id in uefi_find_grub_device_ids(storage_cfg_odict)])
  File "/curtin/curtin/commands/curthooks.py", line 560, in uefi_find_grub_device_ids
    if item['type'] == 'mount' and item['path'] == '/boot/efi':
KeyError: 'path'
'path'
Stderr: ''

Previous deployment that worked used: curtin: Installation started. (19.3-26-g82f23e3d-0ubuntu1~18.04.1)
This failing one uses: curtin: Installation started. (20.1-2-g42a9667f-0ubuntu1~18.04.1)

Revision history for this message
David van der Spek (vanderspek-david) wrote :
Download full text (4.4 KiB)

I believe I am facing a similar situation, but with MAAS 2.9.1 and the latest grub. I also noticed that sudo apt-get upgrade on my nodes is having issues with installing the latest grub. I have also tried the above fix of using gparted and clearing everything of the disks and recomissioning, but the issue remains. Here are the MAAS logs for the deployment:

Using grub install command: /usr/lib/grub/grub-multi-install
Grub install cmds:
[['efibootmgr', '-v'], ['dpkg-reconfigure', 'grub-efi-amd64'], ['update-grub'], ['/usr/lib/grub/grub-multi-install'], ['efibootmgr', '-v']]
Running command ['mount', '--bind', '/dev', '/tmp/tmpp_j3sjq8/target/dev'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/proc', '/tmp/tmpp_j3sjq8/target/proc'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/run', '/tmp/tmpp_j3sjq8/target/run'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/sys', '/tmp/tmpp_j3sjq8/target/sys'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/sys/firmware/efi/efivars', '/tmp/tmpp_j3sjq8/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'efibootmgr', '-v'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'dpkg-reconfigure', 'grub-efi-amd64'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'update-grub'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', '/usr/lib/grub/grub-multi-install'] with allowed return codes [0] (capture=True)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED subp(['udevadm', 'settle']): 0.021
Running command ['umount', '/tmp/tmpp_j3sjq8/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/sys'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/run'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/proc'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/dev'] with allowed return codes [0] (capture=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 1884, in curthooks
    builtin_curthooks(cfg, target, state)
  File "/curtin/curtin/commands/curthooks.py", line 1849, in builtin_curthooks
    setup_grub(...

Read more...

Revision history for this message
David van der Spek (vanderspek-david) wrote :

The version of grub seems to be grub2 - 2.04-1ubuntu26.8

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub (Ubuntu):
status: New → Confirmed
affects: grub → grub (Ubuntu)
Steve Langasek (vorlon)
no longer affects: grub (Ubuntu)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 1898550] Re: FAIL: installing grub to target devices

Can you attach the curtin config that is triggering this error?

On Wed, 27 Jan 2021, 06:08 Adam Collard, <email address hidden> wrote:

> ** Also affects: curtin
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to curtin.
> https://bugs.launchpad.net/bugs/1898550
>
> Title:
> FAIL: installing grub to target devices
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1898550/+subscriptions
>

Revision history for this message
David van der Spek (vanderspek-david) wrote :

I have not changed anything regarding the default curtin config so I'm not sure where I should look to find the curtin config that was used.

Revision history for this message
David van der Spek (vanderspek-david) wrote :

I'm not sure if anything changed over night (for me), but today I was able to successfully deploy the server.

Revision history for this message
Alberto Donato (ack) wrote :

Closing this as it seems it's not longer reproducible. Please reopen if it happens again

Changed in maas:
status: New → Invalid
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.