]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fixing logging output for rm-cluster operation 45931/head
authorRedouane Kachach <rkachach@redhat.com>
Mon, 18 Apr 2022 13:42:39 +0000 (15:42 +0200)
committerRedouane Kachach <rkachach@redhat.com>
Mon, 18 Apr 2022 15:10:57 +0000 (17:10 +0200)
Fixes: https://tracker.ceph.com/issues/51671
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
src/cephadm/cephadm

index 58315e602ef68618092bf44480f7d0a4c3682695..d2b5f7f0d3bf452437949510c75e56a8658932f3 100755 (executable)
@@ -260,10 +260,10 @@ class ExcludeErrorsFilter(logging.Filter):
         return record.levelno < logging.WARNING
 
 
-# During bootstrap operation we use:
+# When cephadm is used as standard binary (bootstrap, rm-cluster, etc) we use:
 # stdout: for debug and info
 # stderr: for errors and warnings
-bootstrap_logging_config = {
+interactive_logging_config = {
     'version': 1,
     'filters': {
         'exclude_errors': {
@@ -8937,8 +8937,9 @@ def cephadm_init_logging(ctx: CephadmContext, args: List[str]) -> None:
     global logger
     if not os.path.exists(LOG_DIR):
         os.makedirs(LOG_DIR)
-    if 'bootstrap' in args:
-        dictConfig(bootstrap_logging_config)
+    operations = ['bootstrap', 'rm-cluster']
+    if any(op in args for op in operations):
+        dictConfig(interactive_logging_config)
     else:
         dictConfig(logging_config)