Currently, the systemd daemons are not restarted on failure. This patch
adds this functionality and sets the defaults to those defined in
upstart. This resolves to 3 fails per 30 minutes for osd, mon and mds
and 5 fails per 30 seconds for radosgw.
Signed-off-by: Boris Ranto <branto@redhat.com>
RGWRealmReloader was calling rgw_log_usage_init() with the new RGWRados
instance, but never cleaned up the previous one with
rgw_log_usage_finalize()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
if RGWPeriod::reflect() is called right after a 'realm pull', it will
create the zonegroup objects but not set any as default. so the next
time RGWRados is initialized, create_defaults() will add a new 'default'
zonegroup and set it as the master. this causes a 'period update' to
find multiple master zonegroups and fail with EINVAL
reflect() now calls set_as_default(exclusive=true) on the master
zonegroup to guarantee that a default is set
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Initially lookup_fh used its cflags argument just to proxy create
flags to new objects. It's used for call path state now too, so
disambiguate it, and of course, fh->flags can't be consulted for
a call path state.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
and use '&&' instead, easier to understand.
this also fixes following error in the ubuntu gitbuilder
error: Added files:
+ cat .git/added-files
src/0
where sh points to dash.
Signed-off-by: Kefu Chai <kchai@redhat.com>
We'd better clear requeue_scrub_on_unblock flag after successfully
requeuing scrub, this is for:
1. if a newly initiated scrub is blocked by objectcontext again,
reset requeue_scrub_on_unblock to true will be satisfied enough
to meet such an appeal.
2. so we don't push pg to the scrub queue when we don't want to
by accident.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* fix general timestamp decoding (changing to a pointer notation)
* capture (std::swap) req_state->bucket_attrs in RGWLibStatBucketRequest
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
When two objects are being actively watched, it was possible for
the watch context to complete before the second watch was
associated.
Fixes: http://tracker.ceph.com/issues/15352
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
'realm pull' is defined as a 'raw storage op', so cannot use the
--remote argument to refer to endpoints from the period or local
zonegroup
refactored send_to_url() slightly to make it easier to call directly
Signed-off-by: Casey Bodley <cbodley@redhat.com>
to support 'period pull --remote', radosgw-admin needs a complete
multisite configuration to look up remote endpoints by name
however, 'period pull' will also accept a --url argument, which doesn't
require a working configuration. this patch splits the handling of these
two cases, so that 'period pull --url' can succeed when run on a cluster
that hasn't yet been fully configured
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Ops might have in-flight IO -- blocking IO after canceling the ops
will result in the in-flight IO being flushed. Shutdown also requires
an intermediate state where is still acts like it downs the lock
until after all ops are canceled and all IO is flushed.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Certain IO and maintenance ops code paths have an expectation
that the exclusive lock pointer will be valid while in-flight.
Let the exclusive lock state machine clean up the pointer after
it has flushed all IO and canceled all ops.
Fixes: http://tracker.ceph.com/issues/15471
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Avoid dereferencing unitialized top-level objects when !found and the
create option not present (when means we cannot create them).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Re-order lookup_fh, FLAG_CREATE and remote create operations,
and provide FLAG_LOCK, to get atomicity.
Other ops which need to linearize at lookup_fh still need to be
converted.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This change implements attr encode/decode glue for RGWGetObj and
RGWPutObj. Both now have attr maps as member variables.
To save copies, callers producing attrs can use emplace_attr to
move attrs into the map.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Initially, all RGWRequest logic was open coded, but it's all
moving into RGWLibFS to get better encapsulation (e.g., for atomicity).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>