Bug 1674022

Summary: ceph-volume does not populate dictionary key rotational when passed a by-path disk list
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Nathan Morell <nmorell>
Component: Ceph-VolumeAssignee: Alfredo Deza <adeza>
Status: CLOSED DUPLICATE QA Contact: Vasishta <vashastr>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: aschoen, assingh, ceph-eng-bugs, ceph-qe-bugs, johfulto, mskalski
Target Milestone: rc   
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-26 14:58:53 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:
Attachments:
Description Flags
failed for by-path worked for /dev/sdb
none
ceph ansible output none

Description Nathan Morell 2019-02-08 19:04:06 UTC
Created attachment 1528203 [details]
failed for by-path worked for /dev/sdb

Description of problem:

When attempting to use a container based deployment of Openstack the ceph volume is not created when using /dev/disk/by-path, but works fine when using /dev/sdb 

Version-Release number of selected component (if applicable):
# ceph --version
ceph version 12.2.8-52.el7cp (3af3ca15b68572a357593c261f95038d02f46201) luminous (stable)

How reproducible:
100% when using by-path

Steps to Reproduce:
1. During OSP13 deployment use a config similar to the following:

parameter_defaults:
  CephAnsibleDisksConfig:
    osd_scenario: lvm
    osd_objectstore: bluestore
    devices:
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:1
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:2
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:3
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:4
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:5
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:6
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:7
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:8
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:9
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:10
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:11
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:12
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:13
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:14
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:15
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:16
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:17
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:18
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:19
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:20
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:21
      - /dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:0:22 
  CephAnsiblePlaybookVerbosity: 3


2.
3.

Actual results:
Install fails with error in ceph_volume.py:
"No JSON Object could be decoded"

If you dig a little deeper you can get to the lack of a "Key" not being found for "rotational" 

Expected results:
Per documentation, by-path is a supported option

Additional info:
Please see attached screenshot

Comment 1 Nathan Morell 2019-02-08 19:05:09 UTC
Created attachment 1528204 [details]
ceph ansible output

Comment 2 John Fulton 2019-04-16 12:41:34 UTC
This bug has something in common with bugs 1696860 and 1666822.

ceph-volume batch mode usually does the right thing but all three of these bugs are examples of it not working in certain conditions.

Until these bugs are fixed you can workaround it by not using batch mode. I.e. by passing it a list of pre-created LVMs (kind of doing what batch mode does for you but not as well).

If you're using openstack, then you can use the workaround from bug 1666822 to workaround this bug too. 

See the following attachment from 1666822:

 https://bugzilla.redhat.com/attachment.cgi?id=1549277

Comment 5 Alfredo Deza 2019-09-26 14:58:53 UTC
Going to close this as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1666822

I double checked and the code changes necessary for this to work correctly exist already in the ceph-4.0-rhel-patches branch

*** This bug has been marked as a duplicate of bug 1666822 ***