Bug 1919084

Summary: [GSS][ceph-ansible] Creating OSD with device name as by-path fails if we are using dedicated_devices.
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Lijo Stephen Thomas <lithomas>
Component: Ceph-AnsibleAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1CC: aschoen, ceph-eng-bugs, cswanson, dsavinea, gabrioux, gfidente, gmeno, gsitlani, jansingh, mmuench, nm-s, nthomas, tserlin, vashastr, ykaul
Target Milestone: ---   
Target Release: 4.2z2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-ansible-4.0.54-1.el8cp, ceph-ansible-4.0.54-1.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-15 17:13:37 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: 1760354    

Description Lijo Stephen Thomas 2021-01-22 04:54:59 UTC
Description of problem:
-----------------------

---- Creating OSD with persistent device naming i.e if we are using by-path it recognizes devices but fails to recognize dedicated_devices.

---- It fails due to below task:-

~~~~~
roles/ceph-facts/tasks/facts.yml:224
- name: resolve device link(s)
  command: readlink -f {{ item }}
  changed_when: false
  check_mode: no
  with_items: "{{ devices }}"                <----------
  register: devices_prepare_canonicalize
  when:
    - devices is defined
    - inventory_hostname in groups.get(osd_group_name, [])
    - not osd_auto_discovery | default(False) | bool
~~~~


Version-Release number of selected component (if applicable):
RHCS 4.x


How reproducible:

Steps to Reproduce:
-------------------

1. Deploy RHCS 4.1 with persistent device naming by using by-path.

2. Use below scenario:
~~~
egrep -v "^#|^$" group_vars/osds.yml
---
dummy:
osd_scenario: lvm
devices:
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:6
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:7
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:4
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:5
dedicated_devices:
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:2
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:2
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1
  - /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1
~~~


Actual results:
---------------
Fails to deploy OSDs in the cluster

Expected results:
-----------------
Should be able to deploy OSDs.


Additional info:
----------------

Ref:- 
- https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-facts/tasks/facts.yml#L193-L202
- https://github.com/ceph/ceph-ansible/pull/5584

Comment 5 errata-xmlrpc 2021-06-15 17:13:37 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 (Important: Red Hat Ceph Storage 4.2 Security and Bug Fix Update), 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/RHSA-2021:2445