Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1496295

Summary: container-storage-setup fails on multipath device
Product: Red Hat Enterprise Linux 7 Reporter: Rohan McGovern <rmcgover>
Component: container-storage-setupAssignee: Vivek Goyal <vgoyal>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: dma, dornelas, fkluknav, jkaur, lfriedma, sakulkar, vgoyal
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-16 16:05:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1186913, 1537321, 1571903    

Description Rohan McGovern 2017-09-27 01:45:52 UTC
Description of problem:

When I run container-storage-setup on a multipath device, it fails with "Partition specification unsupported at this time" unnecessarily.


Version-Release number of selected component (if applicable):

container-storage-setup-0.6.0-1.gite67c964.el7.noarch

How reproducible:

100%

Steps to Reproduce:
1. Set up a multipath device, as in the following example:

# multipath -ll
3600a0980383030567a3f472d78475237 dm-3 NETAPP  ,LUN C-Mode      
size=100G features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 7:0:0:0 sde 8:64 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  |- 5:0:0:0 sdc 8:32 active ready running
  |- 4:0:0:0 sdb 8:16 active ready running
  |- 6:0:0:0 sdd 8:48 active ready running
  |- 8:0:0:0 sdf 8:80 active ready running
  `- 3:0:0:0 sda 8:0  active ready running

2. Use the multipath device as DEVS in /etc/sysconfig/docker-storage-setup as in example:

# cat /etc/sysconfig/docker-storage-setup
# Edit this file to override any configuration options specified in
# /usr/lib/docker-storage-setup/docker-storage-setup.
#
# For more details refer to "man docker-storage-setup"
STORAGE_DRIVER=overlay2
DEVS=/dev/mapper/3600a0980383030567a3f472d78475237
CONTAINER_ROOT_LV_NAME=dockerlv
CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/docker
CONTAINER_ROOT_LV_SIZE=100%FREE
WIPE_SIGNATURES=true
VG=vg_docker

3. Run container-storage-setup

Actual results:

container-storage-setup gives fatal error "Partition specification unsupported at this time" and exits.


Expected results:

container-storage-setup completes successfully.

Additional info:

Can be worked around by patching container-storage-setup like this:

--- container-storage-setup.old	2017-09-27 01:45:19.749736493 +0000
+++ container-storage-setup	2017-09-27 01:22:53.386518050 +0000
@@ -666,6 +666,9 @@
   if [ "$disktype" == "part" ];then
     return 0
   fi
+  if [ "$disktype" == "mpath" ];then
+    return 1
+  fi
 
   # For loop device partitions, lsblk reports type as "loop" and not "part".
   # So check if device has a parent in the tree and if it does, there are high

Comment 2 Derrick Ornelas 2017-11-06 22:58:33 UTC
I'm able to reproduce this issue as well.  Just adding to what's already been posted


# cat /etc/sysconfig/docker-storage-setup
DEVS=/dev/mapper/mpatha
VG=dockervg
WIPE_SIGNATURES=true


---
Nov 01 17:25:13 docker2.example.com systemd[1]: Starting Docker Storage Setup...
Nov 01 17:25:13 docker2.example.com container-storage-setup[2464]: ERROR: Partition specification unsupported at this time.
Nov 01 17:25:13 docker2.example.com systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=1/FAILURE
Nov 01 17:25:13 docker2.example.com systemd[1]: Failed to start Docker Storage Setup.
Nov 01 17:25:13 docker2.example.com systemd[1]: Unit docker-storage-setup.service entered failed state.
Nov 01 17:25:13 docker2.example.com systemd[1]: docker-storage-setup.service failed.
---

Looking for where this error originates:

/usr/bin/container-storage-setup:
---
 732     if is_block_dev_partition ${dev_abs}; then
 733       Fatal "Partition specification unsupported at this time."
 734     fi
[...]
 663 is_block_dev_partition() {
 664   local bdev=$1 devparent
 665 
 666   if ! disktype=$(lsblk -n --nodeps --output type ${bdev}); then
 667     Fatal "Failed to run lsblk on device $bdev"
 668   fi
 669 
 670   if [ "$disktype" == "part" ];then
 671     return 0
 672   fi
 673 
 674   # For loop device partitions, lsblk reports type as "loop" and not "part".
 675   # So check if device has a parent in the tree and if it does, there are high
 676   # chances it is partition (except the case of lvm volumes)
 677   if ! devparent=$(lsblk -npls -o NAME ${bdev}|tail -n +2); then
 678     Fatal "Failed to run lsblk on device $bdev"
 679   fi
 680 
 681   if [ -n "$devparent" ];then
 682     return 0
 683   fi
 684 
 685   return 1
 686 }
---


# lsblk -npls -o NAME /dev/mapper/mpatha|tail -n +2
/dev/sda

# lsblk -npls -o NAME /dev/sda|tail -n +2 | wc -l
0

Comment 3 Mimmus 2018-03-16 14:09:04 UTC
Same for me. Resolved with indicated workaround

Comment 14 errata-xmlrpc 2018-08-16 16:05:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2474