]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: ensure sysctl_dir exist 42291/head
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 12 Jul 2021 14:39:36 +0000 (10:39 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Mon, 12 Jul 2021 15:40:12 +0000 (11:40 -0400)
For some reason, the sysctl directory could not exist if no packages dropping
a custom sysctl file is installed on the host.
Instead we create the directory if it doesn't exist.

Closes: https://tracker.ceph.com/issues/51620
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
src/cephadm/cephadm

index 4b8aff238f495c13cae942f8d73ac89eeac8230d..3995b304b38b4239ba006e138471e67d280e9402 100755 (executable)
@@ -3017,6 +3017,7 @@ def install_sysctl(ctx: CephadmContext, fsid: str, daemon_type: str) -> None:
 
     # apply the sysctl settings
     if lines:
+        Path(ctx.sysctl_dir).mkdir(mode=0o755, exist_ok=True)
         _write(conf, lines)
         call_throws(ctx, ['sysctl', '--system'])