rgw: stream list buckets (containers) request

Fixes: #4760
Instead of retrieving the entire list of buckets in one
chunk, streamline it. This makes it so that if the request
takes too long, client isn't going to timeout before getting
any data.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: list container only shows stats if needed

Fixes: #4759
Add a new request param 'stats' for the swift list containers
request. If set to 'false' it disables stats retrieval, which
makes it go faster. Also, don't dump stats if format is plain,
as they're not going to be dumped.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix i386 compile error

error: rgw/rgw_op.cc:665:63: no matching function for call to ‘min(uint64_t, size_t&)’

Signed-off-by: Sage Weil <sage@inktank.com>
mon: be more careful about making sure we're up-to-date on sync check

We were looking at our own paxos_max_join_drift and using that to
calculate whether we were new enough to join without syncing, but
if those numbers don't match across monitors they might have trimmed. Use
the number they provide us as their first version and compare to that
as well.

Signed-off-by: Greg Farnum <greg@inktank.com>
mon: when electing, be sure acked leaders have new enough stores to lead

In general anybody participating in an election should be new enough to
lead thanks to the bootstrap process, but we've observed situations in
which a monitor is leader but gets so busy that it gets booted out
without noticing for a while, then processes the election messages
which were spawned, responds to them, and the other monitors kick those
up to a new election epoch. Then the old and behind monitor gets
elected as the new leader, which does bad things to our sync.

To deal with this, add the paxos first and last committed versions
to the MMonElection messages, and consider those values when deciding
whether to defer to a peer. Only defer to them if their newest value
is newer than our oldest, but also *do* defer to them if their oldest
value is newer than our newest even if we out-rank them otherwise.

Signed-off-by: Greg Farnum <greg@inktank.com>
perf-watch.py: remove unnecessary semicolons

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
perf-watch.py: add missing space after comma

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
perf-watch.py: fix naming of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
perf-watch.py: fix naming of a local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix bad indentation

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: remove unnecessary semicolon

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: add missing space after comma

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix naming of global variables/constants

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix naming of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
fix "Instance of 'list' has no 'split' member"

Cast with str() to fix issue.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix naming of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix naming of local variable opLOG

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_mon_config_key.py: fix some more naming of local vars

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
gen_state_diagram.py: remove unnecessary semicolon

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
gen_state_diagram.py: add some missing spaces around operators

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>