From: Lukas Stockner Date: Mon, 25 Jan 2021 23:58:19 +0000 (+0100) Subject: python-common/drivegroups: avoid dropping "rotational: 0" from DeviceSelection X-Git-Tag: v15.2.9~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1c38a1e62c01ef4c180f625805b61bce0f7d9ea1;p=ceph.git python-common/drivegroups: avoid dropping "rotational: 0" from DeviceSelection False is a legitimate value for the rotational setting and should be included in the JSON output, only None should be ignored. Fixes: http://tracker.ceph.com/issues/49014 Fixes: cd6a488ab2ca036dd4fb36751b938f605e97e1c8 Signed-off-by: Lukas Stockner (cherry picked from commit c32f6f5448e51d3196f7a2644ea97ecd22a04f92) --- diff --git a/src/python-common/ceph/deployment/drive_group.py b/src/python-common/ceph/deployment/drive_group.py index 81e78df57b42..f2636c7f838a 100644 --- a/src/python-common/ceph/deployment/drive_group.py +++ b/src/python-common/ceph/deployment/drive_group.py @@ -99,7 +99,7 @@ class DeviceSelection(object): ret['vendor'] = self.vendor if self.size: ret['size'] = self.size - if self.rotational: + if self.rotational is not None: ret['rotational'] = self.rotational if self.limit: ret['limit'] = self.limit