]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm:Fix name argument parsing during image check for non-ceph components 33114/head
authorDaniel-Pivonka <dpivonka@redhat.com>
Thu, 6 Feb 2020 20:47:26 +0000 (15:47 -0500)
committerDaniel-Pivonka <dpivonka@redhat.com>
Thu, 6 Feb 2020 20:47:26 +0000 (15:47 -0500)
bug in parsing introduced in 97def7c
args.name may exist but will be none if flag is not used
check the value in addition to checking if it exists

Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
src/cephadm/cephadm

index 01478d2768502560ef9ef1541b771d12146ae602..c6bc9954f1f4c7bc6feb44425a9d6807bac41be7 100755 (executable)
@@ -2849,7 +2849,7 @@ def _parse_args(av):
     args = parser.parse_args(av)
 
     if not args.image:
-        if 'name' in args:
+        if 'name' in args and args.name:
             type_ = args.name.split('.', 1)[0]
             if type_ in Monitoring.components:
                 args.image = Monitoring.components[type_]['image']