openstack-manuals/doc/common/section_objectstorage-accou...

40 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="section_objectstorage-account-reaper">
<title>Account reaper</title>
<para>In the background, the account reaper removes data from the deleted accounts.</para>
<para>A reseller marks an account for deletion by issuing a <code>DELETE</code> request on the accounts
storage URL. This action sets the <code>status</code> column of the account_stat table in the account
database and replicas to <code>DELETED</code>, marking the account's data for deletion.</para>
<para>Typically, a specific retention time or undelete are not provided. However, you can set a
<code>delay_reaping</code> value in the <code>[account-reaper]</code> section of the
account-server.conf to delay the actual deletion of data. At this time, to undelete you have
to update the account database replicas directly, setting the status column to an empty
string and updating the put_timestamp to be greater than the delete_timestamp.
<note><para>It's on the developers' to-do list to write a utility that performs this task, preferably
through a REST call.</para></note>
</para>
<para>The account reaper runs on each account server and scans the server occasionally for
account databases marked for deletion. It only fires up on the accounts for which the server
is the primary node, so that multiple account servers arent trying to do it simultaneously.
Using multiple servers to delete one account might improve the deletion speed but requires
coordination to avoid duplication. Speed really is not a big concern with data deletion, and
large accounts arent deleted often.</para>
<para>Deleting an account is simple. For each account container, all objects are deleted and
then the container is deleted. Deletion requests that fail will not stop the overall process
but will cause the overall process to fail eventually (for example, if an object delete
times out, you will not be able to delete the container or the account). The account reaper
keeps trying to delete an account until it is empty, at which point the database reclaim
process within the db_replicator will remove the database files.</para>
<para>A persistent error state may prevent the deletion of an object
or container. If this happens, you will see
a message such as <code>“Account &lt;name&gt; has not been reaped
since &lt;date&gt;</code> in the log. You can control when this is
logged with the <code>reap_warn_after</code> value in the <code>[account-reaper]</code>
section of the account-server.conf file. The default value is 30
days.</para>
</section>