rbd-mirror: include local pool id in resync throttle unique key
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
as we don't build or test on i386 machines now. also, we don't build
i386 releases anymore. and regular users are on amd64 or arm.
Signed-off-by: Kefu Chai <kchai@redhat.com>
mon/MonitorDBStore: do not use snapshot iterator; close on close
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
there are too many variables involved in main() of ceph_dencoder.cc, but
-fvar-tracking-assignments is enabled by default, when the compiler
finds that the number of variables exceeds the limit
"max-vartrack-size", it gives up, and tries again disabling this option.
this change avoids the recompilation of ceph_dencoder.cc and also silences
the warning of
```
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/encoding/ceph_dencoder.cc:
In function ‘int main(int, const char**)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/test/encoding/ceph_dencoder.cc:289:5:
note: variable tracking size limit exceeded with
-fvar-tracking-assignments, retrying without
int main(int argc, const char **argv)
^
```
Signed-off-by: Kefu Chai <kchai@redhat.com>
I tried using these settings in tests without success. The correct config names
are prefixed with "mds".
Fixes: http://tracker.ceph.com/issues/16664
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
the mock_open() does not support "for i in open()", and readline() and
readlines() support was added in py3.3 and py3.4 so for better backwards
compatibility, we should change the code being tested to use the plain
read() call.
and also use open(path) instead of open(path, 'rb') for simplicity,
otherwise we need to use bytestring for comparison and pass the same
parameters to mock.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this fixes the pep8 failure:
```
pep8 runtests: commands[0] | flake8 ceph_detect_init tests
tests/test_all.py:121:17: E128 continuation line under-indented for
visual indent
tests/test_all.py:125:17: E128 continuation line under-indented for
visual indent
tests/test_all.py:129:17: E128 continuation line under-indented for
visual indent
tests/test_all.py:133:17: E128 continuation line under-indented for
visual indent
```
Signed-off-by: Kefu Chai <kchai@redhat.com>
1. A -> B
2. goto standby
3. B mark down
4. A reconnect to B
5. got reset session and dispatch remote reset
6. because remote reset is executed in DispatchQueue, it will be delayed
7. A -> B successfully and begin to send message
8. assert because we found the first message is missing but it's reasonble
if policy.resetcheck is true
Signed-off-by: Haomai Wang <haomai@xsky.com>
because we want to get the right log sequence which mixes ceph logginer and
cerr. Otherwise, cerr output make the logs a little disordered.
Signed-off-by: Haomai Wang <haomai@xsky.com>
Otherwise if message in queue, we will continue to reconnect right now,
it won't meet our expectation that we want our connect request delay
Signed-off-by: Haomai Wang <haomai@xsky.com>
When replacing and someone called mark_down, it will delete_time_event which
isn't allowed. Because we're exchaning EventCenter now!
Signed-off-by: Haomai Wang <haomai@xsky.com>
When we create event thread, it need a little time to enter event loop(like
calling set_owner), if caller is going to call create_file_event before event
thread enter event loop, it will trigger assert.
Signed-off-by: Haomai Wang <haomai@xsky.com>
EventCenter::init is called by other thread instead of event thread, so we
need to move create_file_event to set_owner which is called by event thread.
Signed-off-by: Haomai Wang <haomai@xsky.com>
Previously we only exchange fd when replacing, now we will introduce dpdk
plugin in the near future. It needs all fd used locally which not like
kernel socket shared by all cores.
So we need to add EventCenter swapping to let each socket is associated to
EventCenter.
Signed-off-by: Haomai Wang <haomai@xsky.com>
We are make each AsyncConnection/AsyncMessenger only modify its file event
in event thread. So make sure create/delete_file_event aren't directly called.
Signed-off-by: Haomai Wang <haomai@xsky.com>