Curtin doesn't handle type:mount entries without 'path' element

Bug #1892242 reported by Boroczki, Lajos on 2020-08-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Undecided
Unassigned
curtin (Ubuntu)
Undecided
Unassigned
Bionic
Medium
Unassigned
Focal
Medium
Unassigned
Groovy
Undecided
Unassigned

Bug Description

The following line fails on swap partitions, because their type is mount, but their path is not defined.

https://github.com/canonical/curtin/blob/2f78ee9e16891fd67497bc3e9b68109a4282bb89/curtin/commands/curthooks.py#L560

Related branches

Revision history for this message
Boroczki, Lajos (boroczki-lajos) wrote :
Revision history for this message
Boroczki, Lajos (boroczki-lajos) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

Thank you for filing a bug.

> The following line fails on swap partitions, because their type is mount, but their path is not defined

Right, it doesn;t have to be swap, but rather any type: mount which does not include a 'path' element.

The schema for type:mount does not require path so the line you mentioned needs fixing.

Thanks!

Ryan Harper (raharper) on 2020-08-19
summary: - Curtin doesn't handle swap partitions properly
+ Curtin doesn't handle type:mount entries without 'path' element
Changed in curtin:
status: New → In Progress
Eric Desrochers (slashd) on 2020-08-19
tags: added: seg sts
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 1304d3ea to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=1304d3ea

Changed in curtin:
status: In Progress → Fix Committed
Revision history for this message
Eric Desrochers (slashd) wrote :

@ryan,

Are you planning to SRU it ?

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

This bug was fixed in the package curtin - 20.1-20-g1304d3ea-0ubuntu1

---------------
curtin (20.1-20-g1304d3ea-0ubuntu1) groovy; urgency=medium

  * New upstream snapshot.
    - curthooks: uefi_find_grub_device_ids handle type:mount without path
      (LP: #1892242)
    - netplan openvswitch yaml changed (LP: #1891608)
    - tools/curtainer: do not wait for snapd.seeded.service
    - tools/curtainer: enable using ubuntu-minimal images
    - vmtests: add Groovy [Paride Legovini]
    - Drop the Eoan vmtests (EOL) [Paride Legovini]
    - tools: rename remove-vmtest-release to vmtest-remove-release
    - Snooze the tests failing because of LP: #1861941 for two more months
      [Paride Legovini]
    - LP: #1671951 is Fix Released => Drop the PPA [Paride Legovini]
    - swaps: handle swapfiles on btrfs (LP: #1884161)
    - curtainer: fail is masking of zfs-mount or zfs-share fails
      [Paride Legovini]
    - multipath: handle multipath nvme name fields correctly (LP: #1878041)
    - curtainer: mask the zfs-mount and zfs-share services [Paride Legovini]
    - tools/jenkins-runner: shuffle test-cases to randomize load
      [Paride Legovini]
    - Add Trusty/UEFI/HWE-X vmtest, drop realpath add, drop shell code
    - LP: #1881977 - Install realpath on Trusty UEFI. [Lee Trager]
    - vmtests: fix PreservePartitionWipeVg storage config
    - Fix mdraid name creates broken configuration
      [James Falcon] (LP: #1803933)
    - vmtests: update skiptests
    - vmtest: allow installed centos images to reboot (LP: #1881011)

 -- Ryan Harper <email address hidden> Thu, 20 Aug 2020 09:10:33 -0500

Changed in curtin (Ubuntu Groovy):
status: New → Fix Released
Revision history for this message
Richard Harding (rharding) wrote :

We will SRU at some point but we don't have a current timeline.

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

Tomorrows Curtin daily:ppa should have this (and as you can see, other fixes)

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

Revision history for this message
Eric Desrochers (slashd) wrote :

@Richard @Ryan,

Thanks, much appreciated.

Revision history for this message
Eric Desrochers (slashd) wrote :

It has been brought to my attention by an impacted user, the following:

"
Thank you for your update. I added this new version of ppa curtin into maas and restart regiond and now we successfully deployed servers with swap partition created in maas. It is working as expected.

Maybe one question when we can expect this patched version of curtin inside standard package repo?
"

- Eric on behalf of an impacted user.

Changed in curtin (Ubuntu Focal):
importance: Undecided → Medium
Changed in curtin (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
João Pedro Seara (jpseara) wrote :

Hello. On behalf of an impacted user:

"We have now been blocked for month not being able to provision new machines without dirty hacks.

There has also not been any activity on that page since we started the issue.

Any help to push this harder is welcome, this is urgent for us."

Revision history for this message
Eric Desrochers (slashd) wrote :

Unfortunately, Canonical don't SRU Curtin anymore as it is moving toward a SNAP installation where Curtin changes will be released and then consumed by MAAS (installed as a snap).

Does your customer have MAAS installed as DEB or as SNAP ?

If it's DEB, the procedure changes, meaning that you would need to take curtin from the its stable PPA[0].

The fix for this particular bug has been introduced in release:

1304d3ea curthooks: uefi_find_grub_device_ids handle type:mount without path

$ git describe --contains 1304d3ea
ubuntu/20.1-29-g81144052-0ubuntu1

https://github.com/canonical/curtin/releases/tag/ubuntu%2F20.1-29-g81144052-0ubuntu1

Hoping it answers your questions.

[0] https://launchpad.net/~curtin-dev/+archive/ubuntu/stable/+packages

Revision history for this message
Jeffrey Jay Scheel (jscheel) wrote :

So, where have clients (especially MaaS clients) been informed of this change to Curtin? I can imagine a few would want to add the Curtin PPA to their list of repos...

Revision history for this message
Eric Desrochers (slashd) wrote :

What I wrote on comment#12 is what I've been told by the Canonical's server team.

As far as I can tell, I don't think support sent any official communication in the field nor documented it. This way to work is also fairly new to my knowledge.

Let's talk about this internally on how we want to present this to UA customer (if need be).

- Eric

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

Other bug subscribers