]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: don't send stale hb msgr's addresses in MOSDBoot 50422/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Tue, 7 Mar 2023 12:30:11 +0000 (13:30 +0100)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Tue, 7 Mar 2023 12:36:35 +0000 (13:36 +0100)
commit81944f60478abe2d4253caaeb4165da5ccffaca1
tree03afe366cd2fe9120ce9d9fcfdbed7566573c491
parent9ec470a8fa6999e95d0137d00f2c092b439d8c8e
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>
src/osd/OSD.cc