From fb5e4b3740241d5c41b348e0fc5f59ebde5ee558 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 9 Aug 2021 14:15:28 -0400 Subject: [PATCH] cephadm: fix container name detection 'enter' was broken because we weren't correctly identifying the container name. Strip the newline from the inspect result so that we can reliably match against the 'running' state. Signed-off-by: Sage Weil --- src/cephadm/cephadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 151ba372432e5..9a185aa7a9786 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2094,7 +2094,7 @@ def get_running_container_name(ctx: CephadmContext, c: 'CephContainer') -> Optio ctx.container_engine.path, 'container', 'inspect', '--format', '{{.State.Status}}', name ]) - if out == 'running': + if out.strip() == 'running': return name return None -- 2.39.5