Bug 1962511 - [cephadm] devices with GPT header : Available devices fail to become OSDs
Summary: [cephadm] devices with GPT header : Available devices fail to become OSDs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 5.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 5.2
Assignee: Adam King
QA Contact: Manasa
Akash Raj
URL:
Whiteboard:
Depends On:
Blocks: 2102272
TreeView+ depends on / blocked
 
Reported: 2021-05-20 08:51 UTC by Vasishta
Modified: 2022-08-09 17:36 UTC (History)
5 users (show)

Fixed In Version: ceph-16.2.8-14.el8cp
Doc Type: Bug Fix
Doc Text:
.Unavailable devices are no longer passed when creating OSDs in a batch Previously, devices with GPT headers were not marked as unavailable. Cephadm would attempt to create OSDs on those devices, along with other valid devices, in a batch leading to failure of the batch OSD creation, since OSDs cannot be created on devices with GPT headers. This would not create OSDs. With this fix, unavailable devices are no longer passed when creating OSDs in a batch and having devices with GPT headers no longer blocks creating OSDs on valid devices.
Clone Of: 1908065
Environment:
Last Closed: 2022-08-09 17:35:53 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 51061 0 None None None 2021-06-02 10:09:19 UTC
Red Hat Product Errata RHSA-2022:5997 0 None None None 2022-08-09 17:36:30 UTC

Description Vasishta 2021-05-20 08:51:38 UTC
This bug was initially created as a copy of Bug #1908065

I am copying this bug because:
Bug #1908065 was using to track a ceph-volume fix https://github.com/ceph/ceph/pull/40201 which will not list devices as available if there are gpt headers.

But even though the ceph-volume inventory returned a device as not available and ceph orch device ls returned as not available, 
ceph orch apply osd --all-available-devices
tries to deploy on device which is not available and fails to deploy OSDs as ceph-volume will not be able to deploy OSDs on devices wit GPT labels

Description of problem:
Running on single node, bare-metal, "ceph orch apply osd --all-available-devices" fails to deploy devices which are reported as 'Available'.

Version-Release number of selected component (if applicable):
# cephadm version
INFO:cephadm:Using recent ceph image docker.io/ceph/ceph:v15
ceph version 15.2.7 (88e41c6c49beb18add4fdb6b4326ca466d931db8) octopus (stable)

How reproducible:
yes

Steps to Reproduce:
1. Follow steps here to "Bootstrap a New Cluster"
Upstream Doc: https://docs.ceph.com/en/latest/cephadm/install/

2. # ceph status      ← HEALTH_WARN (no OSDs)

3. ADD OSDs
# ceph orch device ls  <- reports 12x HDDs AVAIL=True
# ceph orch apply osd --all-available-devices ←NOTHING!

4. REVIEW LOG
# ceph log last ceph-adm
<...>
INFO:cephadm:/bin/podman:stderr ceph-volume lvm batch: error: GPT headers found, they must be removed on: /dev/sda
<...>

Actual results:
No OSDs get deployed

Expected results:
Available devices get added as OSDs

Additional info:
   Three attachments provided:
   1) cephSTATUS.txt
   2) deviceLS.txt
   3) cephadmLOG.txt

Comment 1 Vasishta 2021-05-20 08:58:45 UTC
Sequence of operations - 
1) Boot strapped cluster using - 
cephadm -v --image registry-proxy.engineering.redhat.com/rh-osbs/rhceph:ceph-5.0-rhel-8-containers-candidate-54312-20210519174049 bootstrap --mon-ip 10.8.129.101 --cluster-network 172.20.20.0/24

2) checked
cephadm shell ceph-volume inventory and
cephadm shell ceph orch device ls

To make sure that all three devices on host we listed as available

3) Created gpt labels on one of the devices using 
parted /dev/sdd mklabel gpt

and checked 
cephadm shell ceph-volume inventory and
cephadm shell ceph orch device ls

to make sure that the device with gpt label created was marked as not available.
'cephadm shell ceph orch device ls' had to be tried after intervals to see that changes updated (Did not know about --refresh)

4) Executed 
ceph orch apply osd --all-available-devices   

And observed mgr logs
 sudo journalctl -fu ceph-d66b64e4-b923-11eb-ac53-0cc47a6ee150.juyiug.service

and observed that device with gpt label was not excluded from the list of available devices and operation failed as ceph-volume fails to configure OSD on devices with GPT headers.

Comment 3 Sebastian Wagner 2021-05-25 19:06:53 UTC
doesn't block 5.0

Comment 7 Juan Miguel Olmo 2021-10-06 16:17:31 UTC
This bug was not blocker for 5.0 , so i guess we can wait to have Cephadm agent in downstream.

WDYT Sebastian?

Comment 19 errata-xmlrpc 2022-08-09 17:35:53 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 (Moderate: Red Hat Ceph Storage Security, Bug Fix, and Enhancement 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-2022:5997


Note You need to log in before you can comment on or make changes to this bug.