From: taodd Date: Sun, 8 Dec 2019 02:10:59 +0000 (+0800) Subject: ceph-volume: fix the type mismatch, covert the tries and interval to int from string. X-Git-Tag: v15.1.0~611^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32106%2Fhead;p=ceph.git ceph-volume: fix the type mismatch, covert the tries and interval to int from string. Fixes: https://tracker.ceph.com/issues/43186 Signed-off-by: dongdong tao --- diff --git a/src/ceph-volume/ceph_volume/systemd/main.py b/src/ceph-volume/ceph_volume/systemd/main.py index e4d244f5d56d..2cb1d1b80ad4 100644 --- a/src/ceph-volume/ceph_volume/systemd/main.py +++ b/src/ceph-volume/ceph_volume/systemd/main.py @@ -92,8 +92,8 @@ def main(args=None): logger.info('parsed sub-command: %s, extra data: %s', sub_command, extra_data) command = ['ceph-volume', sub_command, 'trigger', extra_data] - tries = os.environ.get('CEPH_VOLUME_SYSTEMD_TRIES', 30) - interval = os.environ.get('CEPH_VOLUME_SYSTEMD_INTERVAL', 5) + tries = int(os.environ.get('CEPH_VOLUME_SYSTEMD_TRIES', 30)) + interval = int(os.environ.get('CEPH_VOLUME_SYSTEMD_INTERVAL', 5)) while tries > 0: try: # don't log any output to the terminal, just rely on stderr/stdout