When trying to kill a daemon, keep its pid in a variable instead of
retrieving it from the pidfile multiple times. It prevents the following
race condition:
* try to kill ceph-mon
* ceph-mon is in the process of dying and removed its pidfile
* try to kill ceph-mon fails because the pidfile is not found
* another ceph-mon is spawned and fails to bind the port
because the previous ceph-mon is still holding it
Signed-off-by: Loic Dachary <loic@dachary.org>
Remove the = from the goodchars of the erasure_code_profile argument of
osd pool create so that it is consistent with the goodchars of osd
erasure-code-profile set / rm.
Signed-off-by: Loic Dachary <loic@dachary.org>
If it is not, the non const version of OSDMap::get_erasure_code_profile
is called and a profile is created as a side effect, which is not
intended.
http://tracker.ceph.com/issues/8307 refs: #8307
Signed-off-by: Loic Dachary <loic@dachary.org>
If a non existent profile is provided as an argument to osd pool create,
it must exit on error and not create the profile as a side effect.
http://tracker.ceph.com/issues/8307 refs: #8307
Signed-off-by: Loic Dachary <loic@dachary.org>
Just because an EC pool exists in the cluster does not mean tha tthe client
has to support the feature:
1) The way client IO is initiated is no different for EC pools than for
replicated pools.
2) People may add an EC pool to an existing cluster with old clients and
locking those old clients out is very rude when they are not using the
new pool.
3) The only direct client user of EC pools right now is rgw, and the new
versions already need to support various other features like CRUSH_V2
in order to work. These features are present in new kernels.
Fixes: #8556
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
Make the helper that returns what features are required of the OSDMap take
an entity type argument, as the required features may vary between
components in the cluster.
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes: #8585
Have a default name for the data extra pool, otherwise it would be empty
which means that it'd default to the data pool name (which is a problem
with ec backends).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This sort of awareness belongs at a higher level in the stack -- as
evidenced by nobody using the option at this level. Remove it from the
implementations and the interface
Signed-off-by: Greg Farnum <greg@inktank.com>
There's no particular reason why any of the callers of collection_getattrs
want to avoid looking at Ceph's internal xattrs.
It looks like this flag (set in 1862ddd885) was
set this way by mistake.
And finally, we don't actually set xattrs on collections anymore, anyway.
Signed-off-by: Greg Farnum <greg@inktank.com>
Previously we were not doing so, and that resulted in unpredictable loss
of xattrs from the client's perspective.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Add xattr synthetic test to test ObjectStore xattr related interfaces.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
This ensures that chained cache entries that depend on more than one raw
cache entry (bucket info cache depends on both the bucket entry point
and on the bucket info object), are chained and created atomically.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Extend the RGWCache so that we can chain other caches to it so that when
data is invalidated it notifies them.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The const spg_t member is been insantiated from constructor
and now get_pgid() can reference this to return a spg_t instance
without the need of pg_info (thus not requiring to acquire pg_lock).
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>