Bug 2058038 - cephadm adopt fails to start OSDs when dmcrypt: true
Summary: cephadm adopt fails to start OSDs when dmcrypt: true
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 5.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.2
Assignee: Guillaume Abrioux
QA Contact: Sayalee
Akash Raj
URL:
Whiteboard:
: 2104936 (view as bug list)
Depends On: 2099828
Blocks: 1820257 2102272
TreeView+ depends on / blocked
 
Reported: 2022-02-24 10:38 UTC by Francesco Pantano
Modified: 2022-09-16 06:36 UTC (History)
11 users (show)

Fixed In Version: ceph-ansible-6.0.27.9-1.el8cp
Doc Type: Bug Fix
Doc Text:
.Adopting clusters with custom name is now supported Previously, adopting Ceph OSD containers from a Ceph cluster with custom name failed as `cephadm` would not propagate custom clusters in the `unit.run` file. With this release, `cephadm` changes the LVM metadata and enforces the default cluster name “Ceph” thereby adopting a cluster with custom cluster names works as expected.
Clone Of:
Environment:
Last Closed: 2022-08-09 17:37:28 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 7273 0 None open [skip ci] adopt: fix placement update calls for rgw 2022-08-02 07:04:50 UTC
Github ceph ceph pull 46481 0 None Merged cephadm: fix osd adoption with custom cluster name 2022-07-07 05:26:45 UTC
Github ceph ceph pull 46552 0 None Merged pacific: backport of cephadm: fix osd adoption with custom cluster name 2022-07-07 05:26:47 UTC
Red Hat Issue Tracker RHCEPH-3572 0 None None None 2022-02-24 10:44:02 UTC
Red Hat Knowledge Base (Solution) 6967051 0 None None None 2022-07-11 07:53:05 UTC
Red Hat Product Errata RHSA-2022:5997 0 None None None 2022-08-09 17:38:02 UTC

Description Francesco Pantano 2022-02-24 10:38:15 UTC
Description of problem:

During the cephadm adoption for an existing ceph cluster (upgraded from RHCS4 to RHCS5) throught the cephadm-adopt.yaml playbook provided by ceph-ansible, OSDs fail to start after the adoption with the following trace:


WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
WARNING: The same type, major and minor should not be used for multiple devices.
Running command: /usr/bin/mount -t tmpfs tmpfs /var/lib/ceph/osd/Monolithic0-2
Running command: /usr/bin/ceph-authtool /var/lib/ceph/osd/Monolithic0-2/lockbox.keyring --create-keyring --name client.osd-lockbox.2fb4a40a-7f58-441a-96bb-c66d24cdda4f --add-key AQCrhfFhMdlDChAAq7avFk70uEgwarQ6pWUbkA==
 stdout: creating /var/lib/ceph/osd/Monolithic0-2/lockbox.keyring
added entity client.osd-lockbox.2fb4a40a-7f58-441a-96bb-c66d24cdda4f auth(key=AQCrhfFhMdlDChAAq7avFk70uEgwarQ6pWUbkA==)
Running command: /usr/bin/chown -R ceph:ceph /var/lib/ceph/osd/Monolithic0-2/lockbox.keyring
Running command: /usr/bin/ceph --cluster Monolithic0 --name client.osd-lockbox.2fb4a40a-7f58-441a-96bb-c66d24cdda4f --keyring /var/lib/ceph/osd/Monolithic0-2/lockbox.keyring config-key get dm-crypt/osd/2fb4a40a-7f58-441a-96bb-c66d24cdda4f/luks
 stderr: Error initializing cluster client: ObjectNotFound('RADOS object not found (error calling conf_read_file)',)
Traceback (most recent call last):
  File "/usr/sbin/ceph-volume", line 11, in <module>
    load_entry_point('ceph-volume==1.0.0', 'console_scripts', 'ceph-volume')()
  File "/usr/lib/python3.6/site-packages/ceph_volume/main.py", line 40, in __init__
    self.main(self.argv)
  File "/usr/lib/python3.6/site-packages/ceph_volume/decorators.py", line 59, in newfunc
    return f(*a, **kw)
  File "/usr/lib/python3.6/site-packages/ceph_volume/main.py", line 152, in main
    terminal.dispatch(self.mapper, subcommand_args)
  File "/usr/lib/python3.6/site-packages/ceph_volume/terminal.py", line 194, in dispatch
    instance.main()
  File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/main.py", line 46, in main
    terminal.dispatch(self.mapper, self.argv)
  File "/usr/lib/python3.6/site-packages/ceph_volume/terminal.py", line 194, in dispatch
    instance.main()
  File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/activate.py", line 375, in main
    self.activate(args)
  File "/usr/lib/python3.6/site-packages/ceph_volume/decorators.py", line 16, in is_root
    return func(*a, **kw)
  File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/activate.py", line 299, in activate
    activate_bluestore(lvs, args.no_systemd)
  File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/activate.py", line 173, in activate_bluestore
    dmcrypt_secret = encryption_utils.get_dmcrypt_key(osd_id, osd_fsid)
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/encryption.py", line 139, in get_dmcrypt_key
    raise RuntimeError('Unable to retrieve dmcrypt secret')
RuntimeError: Unable to retrieve dmcrypt secret

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 14 Guillaume Abrioux 2022-07-08 06:53:36 UTC
*** Bug 2104936 has been marked as a duplicate of this bug. ***

Comment 34 errata-xmlrpc 2022-08-09 17:37:28 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.