We don't send the message back to the MDS and modifying the incoming message is
evil; it should be treated const.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Otherwise the Mutation for Truncate is done on obj_id of the last iteration of the previous loop.
Fixes: http://tracker.ceph.com/issues/37836
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
use the internal buffer semantics provided by
basic_streambuf, in hope to improve the performance when a single
character is inserted into buf.
* xsputn(): use memcpy() directly instead of creating a temporary
string_view
* overflow(): overflow() should be called only if the internal buffer
overflows when a single character is put into the streambuf. so
we can use the fact that the size of inserted buffer is known,
and use push_back() instead.
also, please see libstdc++'s implementation of basic_streambuf::sputc(),
where __builtin_expect() is used to instruct the compiler that
the non-overflow branch is more likely to be chosen. so, we need
to optimize for that branch. hence this change.
* remove the no-more-used push() method
Signed-off-by: Kefu Chai <kchai@redhat.com>
* Created a common class `OrchestratorClientMixin`
* `s/self._oremote("meth"...),/self.meth(...)/g`
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
mgr/dashboard: Added breadcrumb and tab tests to Pools menu
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
re.split can still produce a list with empty string elements (e.g. if
'rbd_stats_pools' is just an empty string) and we want to filter out
those.
Signed-off-by: Mykola Golub <mgolub@suse.com>
We found quite a few OSDs were unable to re-join the cluster
after the updation of the core switch was done.
The symptoms are similar - all these OSDs are complaining about not
being able to renew rotating keys, which are necessary
for authorized entities to talk with each other.
The root cause is that a specific OSD would keep hunting a reachable Mon,
and if unavailable, the hunting process would reboot every __timeout__ seconds,
causing the async-connection in progress torn down and re-created.
However the underlying thread in charge of the hunting process could be
blocked if there were hundreds of async-connections which were also waiting
for new rotating keys, e.g.:
```
2018-12-29 16:35:19.210884 7f416d6ee700 0 -- 172.18.35.6:6808/1036230 >> 172.18.35.4:6810/1037600 conn(0x7f41d9e3c000 :6808 s=STATE_CONNECTING_WAIT_CONNECT_REPLY_AUTH
pgs=293 cs=25 l=0).handle_connect_reply connect got BADAUTHORIZER
2018-12-29 16:35:19.210891 7f416d6ee700 10 monclient(hunting): wait_auth_rotating waiting (until 2018-12-29 16:35:29.210889)
2018-12-29 16:35:29.210947 7f416d6ee700 0 monclient(hunting): wait_auth_rotating timed out after 10
2018-12-29 16:35:29.211101 7f416d6ee700 0 -- 172.18.35.6:6808/1036230 >> 172.18.35.4:6824/1028882 conn(0x7f418195d000 :-1 s=STATE_CONNECTING_WAIT_CONNECT_REPLY_AUTH p
gs=1433 cs=8 l=0).handle_connect_reply connect got BADAUTHORIZER
2018-12-29 16:35:29.211108 7f416d6ee700 10 monclient(hunting): wait_auth_rotating waiting (until 2018-12-29 16:35:39.211108)
2018-12-29 16:35:39.211167 7f416d6ee700 0 monclient(hunting): wait_auth_rotating timed out after 10
```
which as a result causes the corresponding OSD being stuck at hunting forever.
Fix by avoiding updating rotating keys on the messenger level and
making monclient do it instead. On detecting a bad or an outdated
rotating key, we could simply backoff and restart the connecting
procedure.
Signed-off-by: yanjun <yan.jun8@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* refs/pull/25621/head:
mds: allow boot on read-only
mds: setup readonly mode for PurgeQueue
mds: return string_view for type str
mds: add missing locks for PurgeQueue methods
mds: delete on_error context on des
Reviewed-by: Zheng Yan <zyan@redhat.com>
With v2 and v1 addresses, it helps to be a bit more aggressive
searching for mons since the v1 or v2 ports may not be in use.
- try 3 parallel connection attempts, not 2
- increase the timeout interval more slowly
Signed-off-by: Sage Weil <sage@redhat.com>
The peer addr stuff via asok is a bit fragile because the user must
provide an exact addrvec matching the mon to avoid some weirdness, but
it's rarely used, and the fix would be some robustness/tolerance in the
messenger that is a bigger project than this.
Signed-off-by: Sage Weil <sage@redhat.com>
- osd_numa_node manually specifies a numa node.
- osd_numa_prefer_iface makes us prefer IPs in public_network that are
on the same numa node as the storage
- osd_numa_auto_affinity will set affinity to a numa node when both the
store and network(s) are on the same numa node.
These options are all flagged as 'startup', although osd_numa_node and
osd_numa_auto_affinity takes effect when the OSD is marked up, so doing
'ceph osd down ...' is sufficient to induce an update.
Signed-off-by: Sage Weil <sage@redhat.com>