user quota should rely on cached info if it says that we're at the
limit, since backend info might not be up to date.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
User quota operations require that we know who the actual user we do the
operation on is. Pass that info when creating new object and when
removing objects.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
If a bucket was created prior to the new accounting, we can't substract
the old values, as the header stats didn't account for them.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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>
This reverts commit 08327fed82, except
for the hashpspool bit. We switched back to an integer argument in
commit 337195f046.
Signed-off-by: Sage Weil <sage@inktank.com>
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>
Fixes: #6829
Backport: dumpling, emperor
We didn't init this member variable, which might cause that when
modifying user info that has this flag set the 'system' flag might
inadvertently reset.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Code would assume a formatter would always be defined. If a 'plain'
formatter or even an invalid formatter were to be supplied, the monitor
would crash and burn in poor style.
Fixes: 6820
Backport: emperor
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This partially reverts 2fe0d0d9 in order to allow Emperor monitors to
forward mon command messages to Dumpling monitors without breaking a
cluster.
The need for this patch became obvious after issue #6796 was triggered.
Basically, in a mixed cluster of Emperor/Dumpling monitors, if a client
happens to obtain the command descriptions from an Emperor monitor and
then issue an 'osd pool set' this can turn out in one of two ways:
1. client msg gets forwarded to an Emperor leader and everything's a-okay;
2. client msg gets forwarded to a Dumpling leader and the string fails to
be interpreted without the monitor noticing, thus leaving the monitor with
an uninitialized variable leading to trouble.
If 2 is triggered, a multitude of bad things can happen, such as thousands
of pg splits, due to a simple 'osd set pool foo pg_num 128' turning out
to be interpreted as 109120394 or some other random number.
This patch is such that we make sure the client sends an integer instead
of a string. We also make sure to interpret anything the client sends as
possibly being a string, or an integer.
Fixes: 6796
Backport: emperor
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
We don't ever use any value as a float, so just drop obtaining it. This
makes it easier to partially revert 2fe0d0d9 in an upcoming patch.
Backport: emperor
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Basic testing by forcing each monitor out of quorum at a time and making
sure they still reply to ping requests.
Fixes: #6705
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
setUp and tearDown require nosetests 0.11, but 0.10.4 is the latest on
centos. Rename to use the older aliases, which still work with newer
versions of nosetests as well.
Fixes: #6368
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
The command was declared to take 'size' in dumpling, but was trying to
read 'bsize' instead, so it always used the default of 4MiB. Change
the bench command to read 'size', so it matches what existing clients
are sending.
Fixes: #6795
Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>