]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd trash: replace cli delay option, add rbd trash purge command
authorTheofilos Mouratidis <t.mour@cern.ch>
Wed, 6 Dec 2017 12:39:18 +0000 (13:39 +0100)
committerTheofilos Mouratidis <t.mour@cern.ch>
Tue, 23 Jan 2018 10:41:54 +0000 (11:41 +0100)
commitb9e4aa94b77ab9fca803df330a8e5f31e8de0f00
tree43740c9877c93411594cf81b5c55954986239300
parentcd70aa2cf3714ef172384abbb08fc70b5cc87808
rbd trash: replace cli delay option, add rbd trash purge command

Replaced the delay argument for the trash move
command with a string acceptable by /bin/date, e.g.:

$ rbd trash move --pool foo --image bar --expires-in "2 weeks"

Added a "rbd trash purge" command that deletes any expired
image from the trash, has also a command to alter the current
expiration date with the "--older-than" argument which accepts
again a valid argument for /bin/date, e.g.:

$rbd trash purge mypool --older-than "2017-08-20"

There is also the "threshold" argument which tries to remove the
oldest trashed images (by deferment end time) until the pool space
is freed up to a percentage point, e.g.:

$ rbd trash purge mypool --threshold 0.9

If mypool uses 1GB it will try to remove trashed images until the
pool usage becomes equal to or lower than 900MB.

Signed-off-by: Theofilos Mouratidis <t.mour@cern.ch>
qa/workunits/rbd/cli_generic.sh
src/include/utime.h
src/test/cli/rbd/help.t
src/tools/rbd/ArgumentTypes.h
src/tools/rbd/action/Trash.cc