rgw: don't error out on empty owner when setting acls

Fixes: #6892
Backport: dumpling, emperor
s3cmd specifies empty owner field when trying to set acls on object
/ bucket. We errored out as it didn't match the current owner name, but
with this change we ignore it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
workunits: use integers instead of true/false for hashpspool command

Backport: emperor

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com
Merge pull request #877 from ceph/wip-6892

rgw: don't error out on empty owner when setting acls

Reviewed-by: Sage Weil <sage@inktank.com>
init, upstart: prevent daemons being started by both

There can be only one init system starting a daemon. If there is a
host entry in ceph.conf for a daemon, sysvinit would try to start it
even if the daemon's directory did not include a sysvinit file. This
preserves backwards compatibility with older installs using sysvinit,
but if an upstart file is present in the daemon's directory, upstart
will try to start them, regardless of host entries in ceph.conf.

If there's an upstart file in a daemon's directory and a host entry
for that daemon in ceph.conf, both sysvinit and upstart would attempt
to manage it.

Fix this by only starting daemons if the marker file for the other
init system is not present. This maintains backwards compatibility
with older installs using neither sysvinit or upstart marker files,
and does not break any valid configurations. The only configuration
that would break is one with both sysvinit and upstart files present
for the same daemon.

Backport: emperor, dumpling
Reported-by: Tim Spriggs <tims@uahirise.org>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #893 from jdurgin/wip-init-highlander

init, upstart: prevent daemons being started by both

Reviewed-by: Sage Weil <sage@inktank.com>
mon: MDSMonitor: remove reference to no-longer-used encode_trim()

We weren't using it and it's no longer used by anyone anyway.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MDSMonitor: consider 'debug level' parameter on 'print_map()'

The parameter was there, just not used.  It does default to 7, so
existing callers are okay.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MDSMonitor: print map on encode_pending() iff debug mon = 30+

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MDSMonitor: implement 'get_trim_to()' to let the mon trim mdsmaps

This commit also adds two options to the MDSMonitor:

  - mon_max_mdsmap_epochs: the maximum amount of maps we'll keep (def: 500)
  - mon_mds_force_trim: the version we want to trim to

This results in 'get_trim_to()' returning the possible values:

  - if we have set mon_mds_force_trim, and this value is greater than the
    last committed version, trim to mon_mds_force_trim
  - if we hold more than the max number of maps, trim to last - max
  - if we have set mon_mds_force_trim and if we hold more than the max
    number of maps, and mon_mds_force_trim is lower than last - max,
    then trim to last - max

Backport: dumpling
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MDSMonitor: let PaxosService decide on whether to propose

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Have 'ceph report' print last committed versions

Only for those services that weren't doing it.

Backport: dumpling
Backport: emperor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
tools: ceph-kvstore-tool: output value contents to file on 'get'

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: ceph-kvstore-tool: get size of value for prefix/key

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge pull request #900 from ceph/wip-mon-mds-trim

mon: MDSMonitor: trim versions and let PaxosService decide whether to propose

We were not trimming mdsmap versions and were generating a new map every time
we modified the pending value.

Now we not only make sure that MDSMonitor will trim old maps (configurable
option allowing us to set the maximum number of maps to keep, defaulting to 500,
much like other services do) but we also delegate to PaxosService the decision on
whether to propose our pending value.

We also perform several modifications to 'ceph-kvstore-tool', allowing one to obtain
the contents of a given prefix:key and have them outputted to a file instead of stdout,
and also add support for getting the size of a given prefix:key's value.

'ceph report' was also modified so that we always output the first and last
committed versions for all services; up until this point, we would only output the
first committed version on all services, and only a few were also outputting the
last committed version.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'origin/next'