rgw: deprecate radosgw-admin orphans sub-commands

The orphans sub-commands have not been maintained for years and it's
unclear whether they're reliable. Additionally, they store logs on the
cluster, so if a user wants to run it to address a nearly full
cluster, it could push the user over the edge. As a result the
(currently experimental) `rgw-orphan-list` tool (separate executable
rather than a sub-command) has been created, which stores intermediate
results on the local filesystem.

Now all three orphans sub-commands produce a warning (on cerr) that
the command is being deprecated. Additionally all three now require
the --yes-i-really-mean-it command-line option to run.

This also documents the "bucket radoslist" sub-command to
`radosgw-admin` in its corresponding man page, a change that was
omitted from the prior commit that added "bucket radoslist"
documentation.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
This commit is contained in:
J. Eric Ivancich 2020-03-20 11:20:10 -04:00
parent f64de8f475
commit 75483d4086
3 changed files with 44 additions and 9 deletions

View File

@ -108,6 +108,11 @@ which are as follows:
:command:`bucket rewrite`
Rewrite all objects in the specified bucket.
:command:`bucket radoslist`
List the rados objects that contain the data for all objects is
the designated bucket, if --bucket=<bucket> is specified, or
otherwise all buckets.
:command:`bucket reshard`
Reshard a bucket.
@ -399,13 +404,16 @@ which are as follows:
Read data log status.
:command:`orphans find`
Init and run search for leaked rados objects
Init and run search for leaked rados objects.
DEPRECATED. See the "rgw-orphan-list" tool.
:command:`orphans finish`
Clean up search for leaked rados objects
Clean up search for leaked rados objects.
DEPRECATED. See the "rgw-orphan-list" tool.
:command:`orphans list-jobs`
List the current job-ids for the orphans search.
DEPRECATED. See the "rgw-orphan-list" tool.
:command:`role create`
create a new AWS role for use with STS.

View File

@ -242,9 +242,10 @@ void usage()
cout << " datalog list list data log\n";
cout << " datalog trim trim data log\n";
cout << " datalog status read data log status\n";
cout << " orphans find init and run search for leaked rados objects (use job-id, pool)\n";
cout << " orphans finish clean up search for leaked rados objects\n";
cout << " orphans list-jobs list the current job-ids for orphans search\n";
cout << " orphans find deprecated -- init and run search for leaked rados objects (use job-id, pool)\n";
cout << " orphans finish deprecated -- clean up search for leaked rados objects\n";
cout << " orphans list-jobs deprecated -- list the current job-ids for orphans search\n";
cout << " * the three 'orphans' sub-commands are now deprecated; consider using the `rgw-orphan-list` tool\n";
cout << " role create create a AWS role for use with STS\n";
cout << " role rm remove a role\n";
cout << " role get get a role\n";
@ -7264,10 +7265,14 @@ next:
if (opt_cmd == OPT::ORPHANS_FIND) {
if (!yes_i_really_mean_it) {
cerr << "accidental removal of active objects can not be reversed; "
cerr << "this command is now deprecated; please consider using the rgw-orphan-list tool; "
<< "accidental removal of active objects cannot be reversed; "
<< "do you really mean it? (requires --yes-i-really-mean-it)"
<< std::endl;
return EINVAL;
} else {
cerr << "IMPORTANT: this command is now deprecated; please consider using the rgw-orphan-list tool"
<< std::endl;
}
RGWOrphanSearch search(store, max_concurrent_ios, orphan_stale_secs);
@ -7299,6 +7304,17 @@ next:
}
if (opt_cmd == OPT::ORPHANS_FINISH) {
if (!yes_i_really_mean_it) {
cerr << "this command is now deprecated; please consider using the rgw-orphan-list tool; "
<< "accidental removal of active objects cannot be reversed; "
<< "do you really mean it? (requires --yes-i-really-mean-it)"
<< std::endl;
return EINVAL;
} else {
cerr << "IMPORTANT: this command is now deprecated; please consider using the rgw-orphan-list tool"
<< std::endl;
}
RGWOrphanSearch search(store, max_concurrent_ios, orphan_stale_secs);
if (job_id.empty()) {
@ -7319,6 +7335,16 @@ next:
}
if (opt_cmd == OPT::ORPHANS_LIST_JOBS){
if (!yes_i_really_mean_it) {
cerr << "this command is now deprecated; please consider using the rgw-orphan-list tool; "
<< "do you really mean it? (requires --yes-i-really-mean-it)"
<< std::endl;
return EINVAL;
} else {
cerr << "IMPORTANT: this command is now deprecated; please consider using the rgw-orphan-list tool"
<< std::endl;
}
RGWOrphanStore orphan_store(store);
int ret = orphan_store.init();
if (ret < 0){

View File

@ -137,9 +137,10 @@
datalog list list data log
datalog trim trim data log
datalog status read data log status
orphans find init and run search for leaked rados objects (use job-id, pool)
orphans finish clean up search for leaked rados objects
orphans list-jobs list the current job-ids for orphans search
orphans find deprecated -- init and run search for leaked rados objects (use job-id, pool)
orphans finish deprecated -- clean up search for leaked rados objects
orphans list-jobs deprecated -- list the current job-ids for orphans search
* the three 'orphans' sub-commands are now deprecated; consider using the `rgw-orphan-list` tool
role create create a AWS role for use with STS
role rm remove a role
role get get a role