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: v13.2.9~53^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d7b8f362a8f2acb33c1bb0c81de21c62c95fddb7;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 (cherry picked from commit 81ff4be4d13ce034d7a8b921113138a942e3051a) --- diff --git a/src/ceph-volume/ceph_volume/systemd/main.py b/src/ceph-volume/ceph_volume/systemd/main.py index bf24f0a01549f..51fe8352dbb11 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