Actions
Bug #51526
closedZeroDivisionError when specifying only LVs as --db-devices
% Done:
0%
Source:
Community (dev)
Tags:
Backport:
pacific,octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
One can give LVs (logical volumes, each LV will be one slot) and/or physical devices (will be split into slots) to "--db-devices".
Ceph-volume throws a ZeroDivisionError when only LVs are specified as arguments to the "--db-devices" parameter.
The following log shows the issue:
2021-07-05 08:18:36.049906 D | exec: Running command: stdbuf -oL ceph-volume --log-path /tmp/ceph-log lvm batch --prepare --bluestore --yes --dmcrypt --osds-per-device 1 --crush-device-class ssd /dev/sdc /dev/sdd /dev/sda /dev/sdb --db-devices /dev/vg-metadata-0/metadata-0 --report 2021-07-05 08:18:36.814674 D | exec: --> passed data devices: 4 physical, 0 LVM 2021-07-05 08:18:36.814710 D | exec: --> relative data size: 1.0 2021-07-05 08:18:36.814714 D | exec: --> passed block_db devices: 0 physical, 1 LVM 2021-07-05 08:18:36.815635 D | exec: Traceback (most recent call last): 2021-07-05 08:18:36.815646 D | exec: File "/usr/sbin/ceph-volume", line 11, in <module> 2021-07-05 08:18:36.815650 D | exec: load_entry_point('ceph-volume==1.0.0', 'console_scripts', 'ceph-volume')() 2021-07-05 08:18:36.815653 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/main.py", line 40, in __init__ 2021-07-05 08:18:36.815656 D | exec: self.main(self.argv) 2021-07-05 08:18:36.815659 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/decorators.py", line 59, in newfunc 2021-07-05 08:18:36.815661 D | exec: return f(*a, **kw) 2021-07-05 08:18:36.815663 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/main.py", line 152, in main 2021-07-05 08:18:36.815666 D | exec: terminal.dispatch(self.mapper, subcommand_args) 2021-07-05 08:18:36.815668 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/terminal.py", line 194, in dispatch 2021-07-05 08:18:36.815670 D | exec: instance.main() 2021-07-05 08:18:36.815673 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/main.py", line 42, in main 2021-07-05 08:18:36.815675 D | exec: terminal.dispatch(self.mapper, self.argv) 2021-07-05 08:18:36.815677 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/terminal.py", line 194, in dispatch 2021-07-05 08:18:36.815680 D | exec: instance.main() 2021-07-05 08:18:36.815682 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/decorators.py", line 16, in is_root 2021-07-05 08:18:36.815684 D | exec: return func(*a, **kw) 2021-07-05 08:18:36.815687 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/batch.py", line 402, in main 2021-07-05 08:18:36.815689 D | exec: plan = self.get_plan(self.args) 2021-07-05 08:18:36.815692 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/batch.py", line 440, in get_plan 2021-07-05 08:18:36.815694 D | exec: args.wal_devices) 2021-07-05 08:18:36.815698 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/batch.py", line 472, in get_deployment_layout 2021-07-05 08:18:36.815701 D | exec: fast_type) 2021-07-05 08:18:36.815704 D | exec: File "/usr/lib/python3.6/site-packages/ceph_volume/devices/lvm/batch.py", line 514, in fast_allocations 2021-07-05 08:18:36.815707 D | exec: if (requested_osds - len(lvm_devs)) % len(phys_devs): 2021-07-05 08:18:36.815710 D | exec: ZeroDivisionError: integer division or modulo by zero failed to configure devices: failed to initialize lvm based osd: failed ceph-volume report: exit status 1
I have prepared a PR that fixes this issue.
Updated by Jonas Zeiger almost 3 years ago
PR submitted: https://github.com/ceph/ceph/pull/42181
Updated by Dimitri Savineau almost 3 years ago
- Status changed from New to Fix Under Review
- Assignee set to Jonas Zeiger
- Pull request ID set to 42181
Updated by Dimitri Savineau almost 3 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to pacific,octopus
Updated by Backport Bot almost 3 years ago
- Copied to Backport #51852: pacific: ZeroDivisionError when specifying only LVs as --db-devices added
Updated by Backport Bot almost 3 years ago
- Copied to Backport #51853: octopus: ZeroDivisionError when specifying only LVs as --db-devices added
Updated by Guillaume Abrioux over 2 years ago
- Status changed from Pending Backport to Resolved
Actions