Actions
Bug #37963
closedceph-volume lvm prepare --dmcrypt raises TypeError (py3)
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Using Python 3.6.5 and Ceph 13.2.4:
# ceph-volume lvm prepare --bluestore --data rootvg/osd-test --dmcrypt --no-systemd
Running command: /usr/bin/ceph-authtool --gen-print-key
Running command: /usr/bin/ceph-authtool --gen-print-key
--> TypeError: integer argument expected, got float
Bug is here: https://github.com/ceph/ceph/blob/master/src/ceph-volume/ceph_volume/util/encryption.py#L26 - that needs to be // (works in both Python 2 and 3 for truncating division).
Might be worth auditing all of the Python codebase for division that should be integer instead of float, and/or adding from __future__ import division
to all modules so that the behavior is consistent between both Python versions.
Actions