Actions
Bug #42957
closedceph-volume fails on non se-linux systems
% Done:
0%
Source:
Q/A
Tags:
Backport:
nautilus, mimic
Regression:
Yes
Severity:
3 - minor
Reviewed:
Description
Introduced by https://github.com/ceph/ceph/pull/31421 ceph-volume tries to call the selinuxenabled binary and assumes it is installed everywhere. Fails on non selinux systems.
TASK [ceph-osd : use ceph-volume to create bluestore osds] ********************* task path: /tmp/tox.WOaTV3ir2b/xenial-bluestore-dmcrypt/tmp/ceph-ansible/roles/ceph-osd/tasks/scenarios/lvm.yml:2 [WARNING]: The value False (type bool) in a string field was converted to u'False' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change. failed: [osd0] (item={u'data': u'data-lv1', u'data_vg': u'test_group', u'crush_device_class': u'test'}) => { "ansible_loop_var": "item", "changed": true, "cmd": [ "ceph-volume", "--cluster", "test", "lvm", "create", "--bluestore", "--data", "test_group/data-lv1", "--crush-device-class", "test", "--dmcrypt" ], "delta": "0:00:09.262882", "end": "2019-11-22 02:20:07.310261", "item": { "crush_device_class": "test", "data": "data-lv1", "data_vg": "test_group" }, "rc": 1, "start": "2019-11-22 02:19:58.047379" } STDERR: Running command: /usr/bin/ceph-authtool --gen-print-key Running command: /usr/bin/ceph-authtool --gen-print-key Running command: /usr/bin/ceph --cluster test --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/test.keyring -i - osd new 40d53ab7-5ac4-413d-84c2-c68f10f66f3c Running command: /usr/bin/ceph-authtool --gen-print-key Running command: /sbin/cryptsetup --batch-mode --key-file - luksFormat /dev/test_group/data-lv1 Running command: /sbin/cryptsetup --key-file - --allow-discards luksOpen /dev/test_group/data-lv1 kuFmDt-2GNa-4G5T-tRtA-czhx-cc7q-Dh5qEo Running command: /bin/mount -t tmpfs tmpfs /var/lib/ceph/osd/test-0 --> Absolute path not found for executable: selinuxenabled --> Ensure $PATH environment variable contains common executable locations --> Was unable to complete a new OSD, will rollback changes Running command: /usr/bin/ceph --cluster test --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/test.keyring osd purge-new osd.0 --yes-i-really-mean-it stderr: purged osd.0 Traceback (most recent call last): File "/usr/sbin/ceph-volume", line 9, in <module> load_entry_point('ceph-volume==1.0.0', 'console_scripts', 'ceph-volume')() File "/usr/lib/python2.7/dist-packages/ceph_volume/main.py", line 38, in __init__ self.main(self.argv) File "/usr/lib/python2.7/dist-packages/ceph_volume/decorators.py", line 59, in newfunc return f(*a, **kw) File "/usr/lib/python2.7/dist-packages/ceph_volume/main.py", line 149, in main terminal.dispatch(self.mapper, subcommand_args) File "/usr/lib/python2.7/dist-packages/ceph_volume/terminal.py", line 194, in dispatch instance.main() File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/main.py", line 40, in main terminal.dispatch(self.mapper, self.argv) File "/usr/lib/python2.7/dist-packages/ceph_volume/terminal.py", line 194, in dispatch instance.main() File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/create.py", line 69, in main self.create(args) File "/usr/lib/python2.7/dist-packages/ceph_volume/decorators.py", line 16, in is_root return func(*a, **kw) File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/create.py", line 26, in create prepare_step.safe_prepare(args) File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/prepare.py", line 219, in safe_prepare self.prepare() File "/usr/lib/python2.7/dist-packages/ceph_volume/decorators.py", line 16, in is_root return func(*a, **kw) File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/prepare.py", line 320, in prepare osd_fsid, File "/usr/lib/python2.7/dist-packages/ceph_volume/devices/lvm/prepare.py", line 107, in prepare_bluestore prepare_utils.create_osd_path(osd_id, tmpfs=True) File "/usr/lib/python2.7/dist-packages/ceph_volume/util/prepare.py", line 223, in create_osd_path mount_tmpfs(path) File "/usr/lib/python2.7/dist-packages/ceph_volume/util/prepare.py", line 216, in mount_tmpfs system.set_context(path) File "/usr/lib/python2.7/dist-packages/ceph_volume/util/system.py", line 300, in set_context stdout, stderr, code = process.call(['selinuxenabled'], verbose_on_failure=False) File "/usr/lib/python2.7/dist-packages/ceph_volume/process.py", line 201, in call **kw File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
Updated by Jan Fajerski over 4 years ago
- Status changed from 12 to Pending Backport
- Pull request ID set to 31809
Updated by Jan Fajerski over 4 years ago
- Copied to Backport #42965: nautilus: ceph-volume fails on non se-linux systems added
Updated by Jan Fajerski over 4 years ago
- Copied to Backport #42966: mimic: ceph-volume fails on non se-linux systems added
Updated by Jan Fajerski over 4 years ago
- Copied to Bug #42967: ceph-volume fails on non se-linux systems py2 added
Updated by Jan Fajerski about 4 years ago
- Status changed from Pending Backport to Resolved
Actions