projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

Add support for multipath devices #270

Closed control-d closed 6 years ago

control-d commented 6 years ago

Previously, when a device-mapper multipath device was specified for DEVS setup would fail with "Partition specification unsupported at this time." Each device is checked to see if it has a parent, and, if so, it is assumed to be a partition. Multipath devices are not partitions, and their backing paths are reported as parent devices.

This change adds the ability to correctly identify multipath devices by checking for device type of "mpath" so that they are not mistaken for partitions.

This should resolve RHBZ #1496295 - container-storage-setup fails on multipath device

rh-atomic-bot commented 6 years ago

Can one of the admins verify this patch? I understand the following commands:

rhatdan commented 6 years ago

bot, add author to whitelist

rhatdan commented 6 years ago

bot, test pull request

rhatdan commented 6 years ago

LGTM @rhvgoyal PTAL

rhvgoyal commented 6 years ago

@control-d Can you update commit message of the patch. Describe well what exactly is the problem and how your patch fixes it.

control-d commented 6 years ago

I've updated the commit message. Thanks.

rhvgoyal commented 6 years ago

@control-d Two things.

rhvgoyal commented 6 years ago

Ok, this works for me. I tested multipath both on fedora and rhel images and also tested error paths and it worked.

I guess it works because "lsblk" reports partition device as type "part" for multipath. So if /dev/mapper/mpath1 is partition, it is correctly detected and reported as error.

LGTM

rhvgoyal commented 6 years ago

@rh-atomic-bot r+ ea8643c

rh-atomic-bot commented 6 years ago

:zap: Test exempted: merge already tested.