]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Call cephadm with --container-image 36822/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Wed, 26 Aug 2020 12:53:09 +0000 (14:53 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 2 Sep 2020 07:45:03 +0000 (09:45 +0200)
The kernel treats any process with PID 1 different. Especially
it does not generate a core dump. Call podman / docker with
--init in order to get core dumps.

In addition, we can now properly reap zombies processes.

Fixes: https://tracker.ceph.com/issues/44231
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
doc/man/8/cephadm.rst
src/cephadm/cephadm
src/pybind/mgr/cephadm/module.py

index 982a01f1bfd948d1a6d2824e66345e37de34126c..5a1da7a040e3257ec3329d64ebc26c38d2f2b0c5 100644 (file)
@@ -28,6 +28,7 @@ Synopsis
 | **cephadm** **adopt** [-h] --name NAME --style STYLE [--cluster CLUSTER]
 |                       [--legacy-dir LEGACY_DIR] [--config-json CONFIG_JSON]
 |                       [--skip-firewalld] [--skip-pull]
+|                       [--container-init]
 
 | **cephadm** **rm-daemon** [-h] --name NAME --fsid FSID [--force]
 |                           [--force-delete-data]
index 2c4b7d417084e912036743cef5145f181fb63797..7b524f3f80f3babe21aa381d0c93a5b94afb565d 100755 (executable)
@@ -2942,6 +2942,9 @@ def command_bootstrap():
         cli(['config', 'set', 'mgr', 'mgr/cephadm/registry_username', args.registry_username, '--force'])
         cli(['config', 'set', 'mgr', 'mgr/cephadm/registry_password', args.registry_password, '--force'])
 
+    if args.container_init:
+        cli(['config', 'set', 'mgr', 'mgr/cephadm/container_init', args.container_init, '--force'])
+
     if not args.skip_dashboard:
         # Configure SSL port (cephadm only allows to configure dashboard SSL port)
         # if the user does not want to use SSL he can change this setting once the cluster is up
@@ -5297,6 +5300,10 @@ def _get_parser():
         '--force-start',
         action='store_true',
         help="start newly adoped daemon, even if it wasn't running previously")
+    parser_adopt.add_argument(
+        '--container-init',
+        action='store_true',
+        help='Run podman/docker with `--init`')
 
     parser_rm_daemon = subparsers.add_parser(
         'rm-daemon', help='remove daemon instance')
index 149140a540ff0adf584f0473874cb2dbf9f48ae5..140a5b500fa72dbaf38f20950050a30c6680feb3 100644 (file)
@@ -205,6 +205,12 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
                          'can allow debugging daemons that encounter problems '
                          'at runtime.',
         },
+        {
+            'name': 'container_init',
+            'type': 'bool',
+            'default': False,
+            'desc': 'Run podman/docker with `--init`',
+        },
         {
             'name': 'prometheus_alerts_path',
             'type': 'str',
@@ -280,6 +286,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule,
             self.warn_on_stray_daemons = True
             self.warn_on_failed_host_check = True
             self.allow_ptrace = False
+            self.container_init = False
             self.prometheus_alerts_path = ''
             self.migration_current = None
             self.config_dashboard = True
@@ -1118,6 +1125,10 @@ you may want to run:
 
             if not no_fsid:
                 final_args += ['--fsid', self._cluster_fsid]
+
+            if self.container_init:
+                final_args += ['--container-init']
+
             final_args += args
 
             self.log.debug('args: %s' % (' '.join(final_args)))