From: Sebastian Wagner Date: Wed, 22 Apr 2020 09:51:49 +0000 (+0200) Subject: cephadm: Aquire lock, if fsid != None X-Git-Tag: v16.1.0~2527^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2107649ffaf3d598a2d33cf94f40df1f91dff3c8;p=ceph.git cephadm: Aquire lock, if fsid != None Fixes: ``` Traceback (most recent call last): File "./cephadm", line 4494, in r = args.func() File "./cephadm", line 1077, in _infer_fsid return func() File "./cephadm", line 1103, in _infer_image return func() File "./cephadm", line 2813, in command_ceph_volume l = FileLock(args.fsid) File "./cephadm", line 560, in __init__ self._lock_file = os.path.join(LOCK_DIR, name + '.lock') TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' ``` Signed-off-by: Sebastian Wagner --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 6031e2535e88..5415e1df86b8 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2810,8 +2810,8 @@ def command_ceph_volume(): if args.fsid: make_log_dir(args.fsid) - l = FileLock(args.fsid) - l.acquire() + l = FileLock(args.fsid) + l.acquire() (uid, gid) = (0, 0) # ceph-volume runs as root mounts = get_container_mounts(args.fsid, 'osd', None)