Shilpa Jagannath [Wed, 19 Jun 2019 09:34:03 +0000 (15:04 +0530)]
This commit deals with renaming user. Under the hood, the attributes of an
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=<>"
Marcus Watts [Fri, 7 Dec 2018 09:42:37 +0000 (04:42 -0500)]
rgw: bucket link: master rebase adaptions.
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>
Marcus Watts [Mon, 27 Aug 2018 23:30:28 +0000 (19:30 -0400)]
rgw: bucket link: base "bucket move" (tenant id only)
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>
Marcus Watts [Mon, 27 Aug 2018 20:39:37 +0000 (16:39 -0400)]
rearrange / simplify RGWBucket::link logic - start bucket move support
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>
Marcus Watts [Sat, 25 Aug 2018 09:48:41 +0000 (05:48 -0400)]
rgw: bucket link: use data from bucket_info to rewrite bucket_endpoint.
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>
Marcus Watts [Thu, 23 Aug 2018 17:03:15 +0000 (13:03 -0400)]
rgw: bucket link: simplify use of get bucket info.
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>
Marcus Watts [Tue, 21 Aug 2018 22:09:33 +0000 (18:09 -0400)]
rgw: bucket link: Add ability to name bucket w/ different tenant.
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>
Marcus Watts [Fri, 3 Aug 2018 03:49:30 +0000 (23:49 -0400)]
Add several types to ceph-dencoder.
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>
Marcus Watts [Wed, 30 May 2018 20:37:31 +0000 (16:37 -0400)]
rgw: making implicit_tenants backwards compatible.
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>
Sebastian Wagner [Tue, 30 Jul 2019 07:31:34 +0000 (09:31 +0200)]
Merge pull request #28915 from sebastian-philipp/python-common-package-2
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>
Andrew Schoen [Mon, 29 Jul 2019 20:25:19 +0000 (15:25 -0500)]
ceph-volume: when testing disable the dashboard
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.
Patrick Donnelly [Mon, 29 Jul 2019 17:37:15 +0000 (10:37 -0700)]
Merge PR #29374 into master
* refs/pull/29374/head:
cephfs-shell: Fix flake8 line too long error
cephfs-shell: Fix flake8 line break after binary operator error
cephfs-shell: Fix flake8 continuation line over-indented for hanging indent error
cephfs-shell: Fix flake8 missing whitespace around arithmetic operator error
cephfs-shell: Fix multiple spaces after ':' flake8 error
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
test/librados: avoid residual crush rule after test case execution Fixes: http://tracker.ceph.com/issues/40970 Signed-off-by: Bingyi Zhang <zhangbingyi@umcloud.com>
Sage Weil [Sat, 27 Jul 2019 12:59:30 +0000 (07:59 -0500)]
Merge PR #29316 into master
* refs/pull/29316/head:
common,tools: make sure the destination buffer can handle the size of the string
src/tools: initialize variables before the goto statement
src/mount: check before dereference buf
src/crush: check before dereference out2
src/test: s/strcpy/strncpy
Patrick Donnelly [Fri, 26 Jul 2019 22:18:13 +0000 (15:18 -0700)]
Merge PR #28685 into master
* refs/pull/28685/head:
client: more precise CEPH_CLIENT_CAPS_PENDING_CAPSNAP
client: unify kicking cap flushes and kicking snapcap flushes
client: define helper function that sends flushsnap message
client: cleanup tracking of early kicked flushing caps
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Patrick Donnelly [Fri, 26 Jul 2019 22:15:19 +0000 (15:15 -0700)]
Merge PR #28793 into master
* refs/pull/28793/head:
qa/cephfs: make run_shell() accept args as str too
qa/vstart_runner.py: ignores when source and destination are same
test_cephfs_shell: add a test for cd with arguments
test_cephfs_shell: add a test for cd with no arguments
test_cephfs_shell: group test methods
test_cephfs_shell: add a new method to return script output
test_cephfs_shell: allow running CephFS shell script
cephfs-shell: cd with no args shouldn't print an error message
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Fri, 26 Jul 2019 15:17:22 +0000 (10:17 -0500)]
mgr/telemetry: salt osd ids too
Better to fully obfuscate here.
This has a nice side-effect of assigning entity names that are *globally*
unique across the full telemetry data set, since the salts are unique and
sha1 is (sufficiently) collision-free.
rpm: fdupes in SUSE builds to conform with packaging guidelines
Quoting from https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
"%fdupes is generally safe for use on /bin, /lib*, /usr (= %_prefix) and /sbin.
Do note however that files with same content but different ownership, when
hardlinked, will get the ownership of any of its content siblings."
cmake/modules/Distutils: do not add ${name}-clone if already added
if `distutils_install_module("foo" ...)` is called mutiple times with
different python version, `foo-clone` will be added multiple times as a
custom target. which is not allowed:
add_custom_target cannot create target "foo-clone" because another
target with the same name already exists.
Jeff Layton [Thu, 25 Jul 2019 19:54:58 +0000 (15:54 -0400)]
client: don't report any vxattrs to listxattr
The convention with kernel filesystems is to not report vxattrs when
listxattr is called. Doing this can throw a wrench to archiving tools
that will attempt to restore files with xattrs intact, only to find
that some of them can't be stored.
Remove the code that prints out vxattrs in listxattr. With this we
also don't need the "hidden" flag in the vxattr definitions.
Also fix up the existing testcases to account for the change in
behavior.
Fixes: https://tracker.ceph.com/issues/40965 Signed-off-by: Jeff Layton <jlayton@redhat.com>