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>
(cherry picked from commit
71ba01f0180fa1ee7ff37e09adc20a5a0f4e896e)
# apply the sysctl settings
if lines:
+ Path(ctx.sysctl_dir).mkdir(mode=0o755, exist_ok=True)
_write(conf, lines)
call_throws(ctx, ['sysctl', '--system'])