]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: don't send stale hb msgr's addresses in MOSDBoot 56521/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Tue, 7 Mar 2023 12:30:11 +0000 (13:30 +0100)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Wed, 27 Mar 2024 12:01:18 +0000 (19:01 +0700)
commit67a738f17d454231265ed04da13e986d3b717dc6
treecdc418200a7bc2a9465a67b79b78a1b981f3b366
parent2fc507a99f64bdeab1ce2e5adeb36a2c5db9d3df
osd: don't send stale hb msgr's addresses in MOSDBoot

See comments in the ticket for the RCA.

NOTE: we can't just hold a reference to what `get_myaddrs()`
returns as the `safe_item_history` is involved:

```cpp
template<class T>
class safe_item_history {
  //...
  T *current = nullptr;

  // ...
  const T& operator=(const T& other) {
    std::lock_guard l(lock);
    history.push_back(other);
    current = &history.back();
    return *current;
  }
```

Fixes: https://tracker.ceph.com/issues/58915
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
(cherry picked from commit 81944f60478abe2d4253caaeb4165da5ccffaca1)
src/osd/OSD.cc