]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fixup expect-hostname message
authorMichael Fritch <mfritch@suse.com>
Thu, 11 Nov 2021 15:05:39 +0000 (08:05 -0700)
committerSebastian Wagner <sewagner@redhat.com>
Mon, 3 Jan 2022 13:59:54 +0000 (14:59 +0100)
show either a success or a failure message

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit ff3dd995b5f07d1a4d48e1f62d5054dadea9eb72)

src/cephadm/cephadm

index 910cc765cd4bdc09158c76f15540a6d98b3b4c44..77542628c12c57e52d7a6dfbdb6f58bed04ccffc 100755 (executable)
@@ -5867,8 +5867,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))