time_t is `signed int` on linux, which is ambiguous when encode() or decode() on i386-linux.
see also 8f9e7b0b.
Signed-off-by: Kefu Chai <kchai@redhat.com>
In tests we allow to reset EventCenter instance in the same CephContext,
so it may let global_centers->centers to set the same position multi times.
Signed-off-by: Haomai Wang <haomai@xsky.com>
When the connection is lossy and enter fault, it will dispatch reset event.
If cleanup handler is executed as well as ms_handle_reset call mark_down,
it may exists racing for "cs". cleanup handler will reset "cs" but
_conn_prefix in mark_down will access "cs".
Signed-off-by: Haomai Wang <haomai@xsky.com>
Because daemon() will termniate all existing threads, it will make something go
wrong.
So we want to add hook at CephContext, do something before/after fork.
Signed-off-by: Haomai Wang <haomai@xsky.com>
New async msgr runtime need to spawn threads when binding, but ceph-osd will
call daemon() after binding port. So we need to respawn threads if forked.
Then thread spawn delay will increase complexity for this change and it's
really a simple strategy which help less, we disable auto spawn now.
Signed-off-by: Haomai Wang <haomai@xsky.com>
AsyncMessenger will try to loop the bind port range, so it will produce
some addr inuse errors which is not abnormal.
Signed-off-by: Haomai Wang <haomai@xsky.com>
Now only dispatch external event will wakeup event thread(previously
delete_time_event will call wakeup), we only need to use
"external_num_events" to indicate whether we have extra events.
Signed-off-by: Haomai Wang <haomai@xsky.com>
Add default posix backend support, it should be the full replacement for
the original AsyncMessenger IO logics.
Signed-off-by: Haomai Wang <haomai@xsky.com>
Stack is a network IO framework which encapsulates all necessary basic network
interface, then it manages threads to work.
Different network backend like posix, dpdk even RDMA need to inherit Stack
class to implement necessary interfaces. So it will make ease for other
network backend to integrated into ceph. Otherwise, each backend need to
implement the whole Messenger logics like reconnect, policy handle, session
maintain...
Signed-off-by: Haomai Wang <haomai@xsky.com>
while testing with multiple gateways per zone, i started seeing
omap-get-keys requests fail with EIO. this led to a failed
'assert(next)' in RGWMetaSyncCR due to a bug in error handling
Fixes: http://tracker.ceph.com/issues/17044
Signed-off-by: Casey Bodley <cbodley@redhat.com>
A non-primary image's commit possition won't accurately reflect
the current demotion/promotion chain. Therefore, directly specify
the predecessor for promotion events.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
the rgw_user_st_syn thread use the pointer meta_mgr in RGWUserStatsCache::sync_all_users() fuction, so we should close the thread before delete the pointer in RGWRados::finalize() function when close storage before reopen_logs.
Fixes: http://tracker.ceph.com/issues/17036
Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
if any OSD is full or the pause flag is set in cluster, objecter will
always try to subscribe the next osdmap using the mon client shared with
OSD. but if the OSD's osdmap is very far behind on osd maps due to some
reasons, `MonClient::sub_want_increment()` will reject the subscribe
request from OSD, because it's asking for older maps while the mon client
is about to send the request from objecter for the *next* osdmap.
so we need to update objecter with the latest local osdmap, so it is
able to skip the new osdmaps if OSD needs to catch up with the cluster
first.
Fixes: http://tracker.ceph.com/issues/17023
Signed-off-by: Kefu Chai <kchai@redhat.com>
std::map::insert() does not overwrite existing items with the same key.
so we need to do this in a different way. and we will check sub_sent
aftewards, so we need to keep an updated sub_sent around.
Fixes: http://tracker.ceph.com/issues/17023
Signed-off-by: Kefu Chai <kchai@redhat.com>