From 576823bcb67eec0d0899ad961be07da7c0856732 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 27 Feb 2021 15:44:22 -0500 Subject: [PATCH] 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 --- src/cephadm/cephadm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 3caea22348a..b4e6dd3f1e5 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -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])