]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fixup expect-hostname message 43888/head
authorMichael Fritch <mfritch@suse.com>
Thu, 11 Nov 2021 15:05:39 +0000 (08:05 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 11 Nov 2021 15:05:39 +0000 (08:05 -0700)
show either a success or a failure message

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index b367b38eea480894f62e6181288a1a73116c7484..957ac2d239cb41da765855ee152c60b7b24f2a64 100755 (executable)
@@ -6322,8 +6322,9 @@ def command_check_host(ctx: CephadmContext) -> None:
         if get_hostname().lower() != ctx.expect_hostname.lower():
             errors.append('hostname "%s" does not match expected hostname "%s"' % (
                 get_hostname(), ctx.expect_hostname))
-        logger.info('Hostname "%s" matches what is expected.',
-                    ctx.expect_hostname)
+        else:
+            logger.info('Hostname "%s" matches what is expected.',
+                        ctx.expect_hostname)
 
     if errors:
         raise Error('\nERROR: '.join(errors))