cloud-init fails to grow disk on physical servers with multipath.

Bug #1556260 reported by jinendra
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned
cloud-init (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

for provisioning ubuntu trusty on baremetal, cloud-init fails to grow root partition, below is the error.
physical server is HP bl460c blade , booting from SAN and using multipath ,

====================================
 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg. Using default: {'ignore_growroot_disabled': False, 'mode': 'auto', 'devices': ['/']}
 - util.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
 - util.py[DEBUG]: Reading from /proc/1005/mountinfo (quiet=False)
- util.py[DEBUG]: Read 1121 bytes from /proc/1005/mountinfo
- util.py[DEBUG]: resize_devices took 0.003 seconds
 - cc_growpart.py[DEBUG]: '/' SKIPPED: device_part_info(/dev/disk/by-label/cloudimg-rootfs) failed: /dev/disk/by-label/cloudimg-rootfs not a partition
====================================

upon checking seems like cc_growpart.py script is relying on "/sys/class/block/device-name/partition" file to check number of partitions.

but for dm multipath devices , there is no such "partition" attribute exists, hence script error out saying "not a partition".

I do not have any solution for now, but trying to find how to map multipath device like /dev/dm-1 to it's real scsi disk /dev/sda1 .. if that's figured out then we can put some logic to say if base name is dm-x then find mapped sdx and use that device to find a partition etc.

is this just me or someone else also has this issue with cloud-init failing on multipath disks.

jinendra (jinendra)
summary: - cloud-init fails to grow multipath disk
+ cloud-init fails to grow disk on physical servers with multipath.
Revision history for this message
Scott Moser (smoser) wrote :

You're probably right. I've not tried this with multipath, but growpart also does not work with "complex" disks (ie, lvm also does not work).

Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in cloud-init (Ubuntu):
status: New → Confirmed
Mathew Hodson (mhodson)
affects: centos → cloud-init (Ubuntu)
Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: New → Triaged
Revision history for this message
kobig (kobi.ginon) wrote :

HI jinendra
i'm having the same issue,
when using multipath , the OS is not extended over the rest of the disk,
since cc_growpart.py i believe not handling multipath correctly as you mentioned.

i have a workaround which i do not like,
do you have a code patch to fix it ?

Revision history for this message
jinendra (jinendra) wrote : Re: [Bug 1556260] Re: cloud-init fails to grow disk on physical servers with multipath.

Hi kobig,

Unfortunately no, my workaround is to expand the disk right after writing
qcow2 image and before booting system so do not have to rely on cloud-init.

On Feb 4, 2017 1:49 AM, "kobig" <email address hidden> wrote:

HI jinendra
i'm having the same issue,
when using multipath , the OS is not extended over the rest of the disk,
since cc_growpart.py i believe not handling multipath correctly as you
mentioned.

i have a workaround which i do not like,
do you have a code patch to fix it ?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1556260

Title:
  cloud-init fails to grow disk on physical servers with multipath.

Status in cloud-init:
  Triaged
Status in cloud-init package in Ubuntu:
  Triaged

Bug description:
  for provisioning ubuntu trusty on baremetal, cloud-init fails to grow
root partition, below is the error.
  physical server is HP bl460c blade , booting from SAN and using
multipath ,

  ====================================
   - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg. Using default:
{'ignore_growroot_disabled': False, 'mode': 'auto', 'devices': ['/']}
   - util.py[DEBUG]: Running command ['growpart', '--help'] with allowed
return codes [0] (shell=False, capture=True)
   - util.py[DEBUG]: Reading from /proc/1005/mountinfo (quiet=False)
  - util.py[DEBUG]: Read 1121 bytes from /proc/1005/mountinfo
  - util.py[DEBUG]: resize_devices took 0.003 seconds
   - cc_growpart.py[DEBUG]: '/' SKIPPED:
device_part_info(/dev/disk/by-label/cloudimg-rootfs)
failed: /dev/disk/by-label/cloudimg-rootfs not a partition
  ====================================

  upon checking seems like cc_growpart.py script is relying on
  "/sys/class/block/device-name/partition" file to check number of
  partitions.

  but for dm multipath devices , there is no such "partition" attribute
  exists, hence script error out saying "not a partition".

  I do not have any solution for now, but trying to find how to map
multipath device like /dev/dm-1 to it's real scsi disk /dev/sda1 .. if
that's figured out then we can put some logic to say if base name is
dm-x then find mapped sdx and use that device to find a partition etc.

  is this just me or someone else also has this issue with cloud-init
  failing on multipath disks.

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

Revision history for this message
Manjunath (manjunath) wrote :

I'm also facing this issue, I don't see any discussion or development for 3+ years,! not sure if anyone really spent any fixing this issue.!

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.