From ff3dd995b5f07d1a4d48e1f62d5054dadea9eb72 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 11 Nov 2021 08:05:39 -0700 Subject: [PATCH] cephadm: fixup expect-hostname message show either a success or a failure message Signed-off-by: Michael Fritch --- src/cephadm/cephadm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index b367b38eea4..957ac2d239c 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -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)) -- 2.39.5