cephadm: set CEPH_USE_RANDOM_NONCE if using --init

This ensures that daemon messenger nonces don't collide by using PIDs that are
no longer unique for the IP address.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2021-02-27 15:44:22 -05:00
parent d18f60854e
commit 576823bcb6

View File

@ -3030,6 +3030,7 @@ class CephContainer:
cmd_args.append('--cap-add=SYS_PTRACE')
if self.init:
cmd_args.append('--init')
envs += ['-e', 'CEPH_USE_RANDOM_NONCE=1']
if self.cname:
cmd_args.extend(['--name', self.cname])
if self.envs:
@ -3070,6 +3071,7 @@ class CephContainer:
])
if self.init:
cmd_args.append('--init')
envs += ['-e', 'CEPH_USE_RANDOM_NONCE=1']
if self.envs:
for env in self.envs:
envs.extend(['-e', env])