src/script/check_commands.sh: fix grep regex class range
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Sebastian Krah <skrah@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This adds a parameterized fixture as input to the tests. Should make
writing new tests easier since only fixture parameters need to be added.
In the future we should be able to reuse the fixtures to build other
fixtures and reuse the parametrization.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
existing user are moved under the new user namespace specified by "--new-uid".
It calls bucket link and bucket chown to link the buckets and objects to the new
user namespace. Access and secret keys of the user(and the subusers) are preserved.
Usage: "radosgw-admin user rename --uid=<> --new-uid=<>"
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
Provides command line tool to update the acl on object
of a bucket after bucket unlink/link.
"radosgw-admin bucket chown --bucket <bucket>"
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
The previous few commits for rgw_bucket.cc could originally be applied
one at a time resulting in a complete buildable copy of ceph at each step.
Recent independent changes to rgw_bucket.cc have affected the same logic,
so the original commits no longer build. This commit resyncs things
with master such that the result will build.
I'm preserving the intermediate commits for now, since that's what was
originally backported to jewel, If this causes problems, these commits
should be squashed together; except for backport purposes the intermediate
versions have no other value.
One other change here: omit logic that copied "VERSION_ATTR" to the
new container object. This should already be provided for elsewhere.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
Improve and add to documentation for "bucket move" functionality;
including use moving to multi-tenancy and further deprecating bucket-id
which is no longer necessary.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
This is the remainder of bucket move function. Implement bucket "rename"
- use string passed in via '--bucket-new-name' to optinally override
the resultant bucket name when doing bucket link. This is basically
a slight generalization of changing the tenant of a bucket; the same
operations are required for either.
Further refinements included here are minor improvements to associated
error messages.
This does not change any "tail placement" information in any objects
contained in the bucket. The bucket name is encoded there, along with
the bucket id, but neither appears to be used, and the existing reshard
logic which changes bucket ids also does not appear to alter that.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
This is the base or primitive "bucket move" function. It handles rewriting
the endpoint and info rados objects for the rgw bucket, plus deleting
the original rados objects that are no longer correct. It doesn't
handle changing the bucket name; that's in a future commit. Some of
the changes here will get overwritten by that commit.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
The existing RGWBucket::link logic changed things incrementally in
order to relink a bucket. When doing a "bucket move", this is no longer
a good idea - bucket objects must be written to new names which don't
exist, so it is better to create then wholly out of in-memory data.
Also, add != for rgw_bucket - inverse of existing of ==, provides
another option to arrange code to make it more readable.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
The bucket link command was doing a fetch of the entrypoint late
in the link process. This makes it harder to do "bucket move"
functionality, because then it would need to know the old
bucket late in the process. The bucketinfo structure has
all the data elements necessary to recreate the endpoint,
so the changes here arrange to just use that data.
In order to write the object it's also necessary to propagate
xattrs. The only xattr that seems to be present on the endpoint
is "ceph.objclass.version", so that's what this copies out.
It appears that attribute may be set set separately by cls,
so I'm not sure this is actually necessary. However, the
old code would have written it, so this code preserves
that behavior.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
The bucket link command was doing an extra bucket
get info call because it needed attributes. Revised
::init so that attributes could optionally be requested,
and eliminate now unnecessary call.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
This is not a complete fix; but it makes it possible for the
bucket link command to correctly find and attempt to link a bucket
to a user with a different tenant. The reason this is not a complete
fix is that with just this change, the resulting bucket is "broken";
a duplicate endpoint but 0 length contents is created, and
the info entry is not correctly moved.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
This just adds the command line option and related bits.
Underlying functionality will be a later commit.
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
Add types: RGWBucketEntryPoint obj_version rgw_user
These are structures that are visible as data at rest
inside of rados when a bucket is made via radosgw.
RGWBucketEntryPoint is the contents of a rados
object with names that may be either "<bucket-name>"
or "<tenant>/<bucket-name>"
rgw_user is a structure contained inside of RGWBucketEntryPoint
and other structures.
obj_version is visible as the xattr "ceph.objclass.version"
on rados objects in ".rgw.meta" that contain ".bucket.meta."
Fixes: http://tracker.ceph.com/issues/35885
Signed-off-by: Marcus Watts <mwatts@redhat.com>
In jewel, "rgw keystone implicit tenants" only applied to swift. As of
luminous), this option applies to s3 also.
Sites that used this feature with jewel now have outstanding data that
depends on the old behavior.
The fix here is to expand "rgw keystone implicit tenants" so that it
can be set to any of "none", "all", "s3" or "swift" (also 0=false=none,
1=true=all). When set to "s3" or "swift", the actual id lookup
is also partitioned.
Formerly "rgw keystone implicit tenants" was a legacy opt.
This change converts it to the new style of option,
including support for dynamically changing it.
Fixes: http://tracker.ceph.com/issues/24348
Signed-off-by: Marcus Watts <mwatts@redhat.com>
python-common: Python common package
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Choosing not to include this in the docs so that the user is more likely
to see this interactively. (That is...probably good?)
Choose sharing-1-0.
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/28804/head:
mds: delay exporting directory whose pin value exceeds max rank id
Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/29339/head:
client: don't report any vxattrs to listxattr
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
ceph-ansible has started enabling the dashboard by
default as of https://github.com/ceph/ceph-ansible/pull/4268
Disabling the dashboard gets us around needing to run
the grafana_server role which is required for the dashboard
and not needed for ceph-volume functional tests.
Signed-off-by: Andrew Schoen <aschoen@redhat.com>