From 89439b5be37b37bd64ab4b74c12d279159739f29 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 11 Aug 2018 12:26:22 -0500 Subject: [PATCH] librados: mark all auid calls deprecated Signed-off-by: Sage Weil --- src/include/rados/librados.h | 28 ++++++++++++++++++++-------- src/include/rados/librados.hpp | 21 ++++++++++++++------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h index fb9989014ed..2c02ad7e022 100644 --- a/src/include/rados/librados.h +++ b/src/include/rados/librados.h @@ -817,7 +817,6 @@ CEPH_RADOS_API int rados_pool_reverse_lookup(rados_t cluster, int64_t id, /** * Create a pool with default settings * - * The default owner is the admin user (auid 0). * The default crush rule is rule 0. * * @param cluster the cluster in which the pool will be created @@ -827,10 +826,10 @@ CEPH_RADOS_API int rados_pool_reverse_lookup(rados_t cluster, int64_t id, CEPH_RADOS_API int rados_pool_create(rados_t cluster, const char *pool_name); /** - * Create a pool owned by a specific auid + * Create a pool owned by a specific auid. * - * The auid is the authenticated user id to give ownership of the pool. - * TODO: document auid and the rest of the auth system + * DEPRECATED: auid support has been removed, and this call will be removed in a future + * release. * * @param cluster the cluster in which the pool will be created * @param pool_name the name of the new pool @@ -839,7 +838,8 @@ CEPH_RADOS_API int rados_pool_create(rados_t cluster, const char *pool_name); */ CEPH_RADOS_API int rados_pool_create_with_auid(rados_t cluster, const char *pool_name, - uint64_t auid); + uint64_t auid) + __attribute__((deprecated)); /** * Create a pool with a specific CRUSH rule @@ -856,6 +856,9 @@ CEPH_RADOS_API int rados_pool_create_with_crush_rule(rados_t cluster, /** * Create a pool with a specific CRUSH rule and auid * + * DEPRECATED: auid support has been removed and this call will be removed + * in a future release. + * * This is a combination of rados_pool_create_with_crush_rule() and * rados_pool_create_with_auid(). * @@ -868,7 +871,8 @@ CEPH_RADOS_API int rados_pool_create_with_crush_rule(rados_t cluster, CEPH_RADOS_API int rados_pool_create_with_all(rados_t cluster, const char *pool_name, uint64_t auid, - uint8_t crush_rule_num); + uint8_t crush_rule_num) + __attribute__((deprecated)); /** * Returns the pool that is the base tier for this pool. @@ -899,6 +903,8 @@ CEPH_RADOS_API int rados_pool_delete(rados_t cluster, const char *pool_name); /** * Attempt to change an io context's associated auid "owner" * + * DEPRECATED: auid support has been removed and this call has no effect. + * * Requires that you have write permission on both the current and new * auid. * @@ -906,16 +912,22 @@ CEPH_RADOS_API int rados_pool_delete(rados_t cluster, const char *pool_name); * @param auid the auid you wish the io to have. * @returns 0 on success, negative error code on failure */ -CEPH_RADOS_API int rados_ioctx_pool_set_auid(rados_ioctx_t io, uint64_t auid); +CEPH_RADOS_API int rados_ioctx_pool_set_auid(rados_ioctx_t io, uint64_t auid) + __attribute__((deprecated)); + /** * Get the auid of a pool * + * DEPRECATED: auid support has been removed and this call always reports + * CEPH_AUTH_UID_DEFAULT (-1). + * @param io pool to query * @param auid where to store the auid * @returns 0 on success, negative error code on failure */ -CEPH_RADOS_API int rados_ioctx_pool_get_auid(rados_ioctx_t io, uint64_t *auid); +CEPH_RADOS_API int rados_ioctx_pool_get_auid(rados_ioctx_t io, uint64_t *auid) + __attribute__((deprecated)); /* deprecated, use rados_ioctx_pool_requires_alignment2 instead */ CEPH_RADOS_API int rados_ioctx_pool_requires_alignment(rados_ioctx_t io) diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp index 3355e0c4c03..b14154eff4c 100644 --- a/src/include/rados/librados.hpp +++ b/src/include/rados/librados.hpp @@ -719,13 +719,16 @@ namespace librados void dup(const IoCtx& rhs); // set pool auid - int set_auid(uint64_t auid_); + int set_auid(uint64_t auid_) + __attribute__ ((deprecated)); // set pool auid - int set_auid_async(uint64_t auid_, PoolAsyncCompletion *c); + int set_auid_async(uint64_t auid_, PoolAsyncCompletion *c) + __attribute__ ((deprecated)); // get pool auid - int get_auid(uint64_t *auid_); + int get_auid(uint64_t *auid_) + __attribute__ ((deprecated)); uint64_t get_instance_id() const; @@ -1330,11 +1333,15 @@ namespace librados std::map&& status); int pool_create(const char *name); - int pool_create(const char *name, uint64_t auid); - int pool_create(const char *name, uint64_t auid, uint8_t crush_rule); + int pool_create(const char *name, uint64_t auid) + __attribute__ ((deprecated)); + int pool_create(const char *name, uint64_t auid, uint8_t crush_rule) + __attribute__ ((deprecated)); int pool_create_async(const char *name, PoolAsyncCompletion *c); - int pool_create_async(const char *name, uint64_t auid, PoolAsyncCompletion *c); - int pool_create_async(const char *name, uint64_t auid, uint8_t crush_rule, PoolAsyncCompletion *c); + int pool_create_async(const char *name, uint64_t auid, PoolAsyncCompletion *c) + __attribute__ ((deprecated)); + int pool_create_async(const char *name, uint64_t auid, uint8_t crush_rule, PoolAsyncCompletion *c) + __attribute__ ((deprecated)); int pool_get_base_tier(int64_t pool, int64_t* base_tier); int pool_delete(const char *name); int pool_delete_async(const char *name, PoolAsyncCompletion *c); -- 2.39.5