← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1692087] [NEW] check_partition_layout has false positives when partitioned with gpt

 

Public bug reported:

As reported in bug 1686514 (comment 11), there is a bug in the code
that determines if a device layout is "the same" and will thus be re-used.

Even when functional, this code has some serious shortcomings:
a.) it does not check sizes at all, only partition types
b.) it does not check the partition table correctly

The bug to fix here is simply some issues with its usage of sgdisk.
 * 'sgdisk -p' was being used to determine the size of a disk.
   this can fail if it believes there is a bad gpt partition table.
 * parsing of sgdisk -p output assumed that the 'name' of the partition
   type would not have any spaces (Microsoft basic data)
 * interaction with sgdisk did not realize that sgdisk wants input
   of '8300' rather than '83'.

Related bugs:
 * bug 1686514: Azure: cloud-init does not handle reformatting GPT partition ephemeral disks
 * bug 1691489: fstab entries written by cloud-config may not be mounted

** Affects: cloud-init
     Importance: Medium
         Status: Confirmed

** Changed in: cloud-init
       Status: New => Confirmed

** Changed in: cloud-init
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1692087

Title:
  check_partition_layout has false positives when partitioned with gpt

Status in cloud-init:
  Confirmed

Bug description:
  As reported in bug 1686514 (comment 11), there is a bug in the code
  that determines if a device layout is "the same" and will thus be re-used.

  Even when functional, this code has some serious shortcomings:
  a.) it does not check sizes at all, only partition types
  b.) it does not check the partition table correctly

  The bug to fix here is simply some issues with its usage of sgdisk.
   * 'sgdisk -p' was being used to determine the size of a disk.
     this can fail if it believes there is a bad gpt partition table.
   * parsing of sgdisk -p output assumed that the 'name' of the partition
     type would not have any spaces (Microsoft basic data)
   * interaction with sgdisk did not realize that sgdisk wants input
     of '8300' rather than '83'.

  Related bugs:
   * bug 1686514: Azure: cloud-init does not handle reformatting GPT partition ephemeral disks
   * bug 1691489: fstab entries written by cloud-config may not be mounted

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1692087/+subscriptions


Follow ups