canonical / canonical/cloud-init
cloud-init fails to grow disk on physical servers with multipath.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1556260](https://bugs.launchpad.net/cloud-init/+bug/1556260)
Launchpad details
affected_projects = ['cloud-init (Ubuntu)']
assignee = None
assignee_name = None
date_closed = None
date_created = 2016-03-11T19:44:11.969495+00:00
date_fix_committed = None
date_fix_released = None
id = 1556260
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1556260
milestone = None
owner = jinendra
owner_name = jinendra
private = False
status = triaged
submitter = jinendra
submitter_name = jinendra
tags = []
duplicates = []
_Launchpad user **jinendra(jinendra)** wrote on 2016-03-11T19:44:11.969495+00:00_
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.
Contributor guide
Assessment
This issue has not been assessed yet.