]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/monc: renew_rotating_keyring() doesn't assume the clock is monotonic 47277/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 26 Jul 2022 09:39:08 +0000 (09:39 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 26 Jul 2022 12:04:54 +0000 (12:04 +0000)
commiteac4c56af0b7d931f2d7b553e64c7a51eec8cbe3
tree005df85cd866f1ffa9e2fe701bdb0887143fb40c
parentb9d2456fa6939eed317eaddef8ddf7ca077b564d
crimson/monc: renew_rotating_keyring() doesn't assume the clock is monotonic

According to the `seastar::lowres_system_clock` reference:

> This clock has the same granularity as lowres_clock,
> but it is not required to be monotonic and its time
> points correspond to system time.

we should similar check as the classical `MonClient` does:

```cpp
  if ((now > last_rotating_renew_sent) &&
      double(now - last_rotating_renew_sent) < 1) {
    ldout(cct, 10) << __func__ << " called too often (last: "
                   << last_rotating_renew_sent << "), skipping refresh" << dendl;
    return 0;
  }
```

This check is rather paranoidal and the main reason behind it
in crimson is replicating the classical behaviour.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/mon/MonClient.cc