summaryrefslogtreecommitdiffstats
path: root/src/ceph_osd.cc
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzyns@redhat.com>2023-03-01 17:10:38 +0100
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2023-04-11 23:37:09 +0200
commite27f6c6a856d6ba7cad08bb933ec84e226aae6ad (patch)
treeb78e64fee9cf4cc6548c60f6342d8028b0eff145 /src/ceph_osd.cc
parentMerge pull request #50245 from baergj/bluefs-perf-stats-write-count (diff)
downloadceph-e27f6c6a856d6ba7cad08bb933ec84e226aae6ad.tar.xz
ceph-e27f6c6a856d6ba7cad08bb933ec84e226aae6ad.zip
msg: always generate random nonce; don't try to reuse PID
Too much of pain with containerized world. The autodection, based on `getpid() == 1`, turned out to be problematic. This patch removes it and switches the behavior to always use a random-generated nonce. Fixes: https://tracker.ceph.com/issues/57977 Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/ceph_osd.cc')
-rw-r--r--src/ceph_osd.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ceph_osd.cc b/src/ceph_osd.cc
index 6428a0ed522..9e85923ab6b 100644
--- a/src/ceph_osd.cc
+++ b/src/ceph_osd.cc
@@ -544,7 +544,7 @@ flushjournal_out:
public_msg_type = public_msg_type.empty() ? msg_type : public_msg_type;
cluster_msg_type = cluster_msg_type.empty() ? msg_type : cluster_msg_type;
- uint64_t nonce = Messenger::get_pid_nonce();
+ uint64_t nonce = Messenger::get_random_nonce();
Messenger *ms_public = Messenger::create(g_ceph_context, public_msg_type,
entity_name_t::OSD(whoami), "client", nonce);
Messenger *ms_cluster = Messenger::create(g_ceph_context, cluster_msg_type,