Once Unix attributes were materialized as RGW object/bucket
attributes, it became possible to verify the serialized bucket and
object hashes with the expected values (based on the file-type
invariant path to the object).
Prior to this change, we saved the serialized hash values with the
rest of the Unix attrs, in RGW_ATTR_UNIX1. Unfortunately, these
values were invalidated by rename operations. To address this problem,
and to faciliate future operations on objects by their hashed ids,
the id hashes have been moved into their own RGW attr
RGW_ATTR_UNIX_KEY1. This should allow more efficient search by, but
more importantly to the invalidation problem, allows us to use the
ATTRSMOD_MERGE behavior in RGWCopyObj to get copy offload while still
fixing up the object id.
The code at this commit doesn't use the serialized unix_mode value as
the outgoing st.st_mode result for rgw_getattr operations, pending a
bugfix for Ganesha's expected value range.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
It's possible to process a watch reconnect op, setting Watch::conn, before
the ms_handle_reset path tries to disconnect the old one. Since reset()
was blindly disconnecting the "current" connection, we could race and
disconnect the new con instead of the old one.
Fix this by specifying which con to disconnect.
Fixes: http://tracker.ceph.com/issues/15441
Signed-off-by: Sage Weil <sage@redhat.com>
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>