rgw: fix crash in swift CORS preflight request

Fixes: #8586

This fixes error handling, in accordance with commit 6af5a537 that fixed
the same issue for the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
test/cli-integration/rbd: fix trailing space

Newer versions of json.tool remove the trailing ' ' after the comma.  Add
it back in with sed so that the .t works on both old and new versions, and
so that we don't have to remove the trailing spaces from all of the test
cases.

Backport: firefly
Fixes: #8920
Signed-off-by: Sage Weil <sage@redhat.com>
atomic: fix read() on i386, clean up types

Among other things, fixes #8969

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2171 from ceph/wip-cli-integration

fix rbd cli-integratoin tests

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
mon/OSDMonitor: fix i386 floating point rounding error

This would round .123 to .122999 on i386; now it does not.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2162 from ceph/wip-8586

rgw: fix crash in swift CORS preflight request

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2173 from ceph/wip-8969

fix i386 atomics

Reviewed-by: Greg Farnum <greg@inktank.com>
osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't

It is probably not a good idea to try to run the tiering agent without a
hit_set to inform its actions, but it is technically possible.  For
example, one could simply blindly evict when we reach the full point.
However, this doesn't work because the agent mode is guarded by a hit_set
check, even though agent_setup() is not.  Fix that.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/ReplicatedPG: evict blindly if there is no hit_set

If there is no hit set for a PG, blindly evict objects.  This avoids an
assert(hit_set) in agent_estimate_atime_temp().

Fixes: #8982
Signed-off-by: Sage Weil <sage@redhat.com>
vstart.sh: limit open files

Most users only get 1024 fds.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/ReplicatedPG: improve agent_choose_mode args

Signed-off-by: Sage Weil <sage@redhat.com>
mon/OSDMonitor: warn when cache pools do not have hit_sets configured

Give users a clue when cache pools are enabled but the hit_set is not
configured.  Note that technically this will work, but not well, so for
now let's just steer them away.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2179 from ceph/wip-8982

osd: fix cache pools without hit_sets configured

Reviewed-by: Samuel Just <sam.just@inktank.com>
use llrintl when converting double to micro

This avoids rounding error (noticeable on i386).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
osd: do not leak Session* ref in _send_boot()

The get_priv() call returns a ref; make sure we drop it if it exists.
This doesn't happen on every run because usually it is NULL and we take
the other path; it's only after the OSD has been marked down that we reach
the second path.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2182 from ceph/wip-round

use llrintl when converting double to micro

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #2190 from ceph/wip-osd-leaks

osd: do not leak Session* ref in _send_boot()

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'gh/next'