swift/test
Tim Burke a4cf508a38 Identify deleted shards as shards
When a DB gets deleted, we clear out its metadata. This included sysmeta
such as that used to tell shards the name of their root DB.

Previously, this would cause deleted shards to pop back to life as roots
that claimed to have objects still sitting in whatever container they
sharnk into.

Now, use the metadata if it's available, but when it's not, go by the
state of the DB's "own shard range" -- deleted shards should be marked
deleted, while roots never are.

This allows us to actually clean up the database files; you can test
this by doing something like

 * Run `nosetests test/probe/test_sharder.py:TestContainerSharding.test_shrinking`
 * Run `find /srv/*/*/containers -name '*.db'` to see how many databases
   are left on disk. There should be 15: 3 for the root container, 6 for
   the two shards on the first pass, and another 6 for the two shards on
   the second pass.
 * Edit container configs to decrease reclaim_age -- even 1 should be
   fine.
 * Run `swift-init main start` to restart the servers.
 * Run `swift-init container-sharder once` to have the shards get marked
   deleted.
 * Run `swift-init container-updater once` to ensure all containers have
   reported.
 * Run `swift-init container-replicator once` to clean up the
   containers.
 * Run `find /srv/*/*/containers -name '*.db'` again to verify no
   containers remain on disk.

Change-Id: Icba98f1c9e17e8ade3f0e1b9a23360cf5ab8c86b
2020-07-07 16:06:28 -07:00
..
functional Merge "s3api: Allow CompleteMultipartUpload requests to be retried" 2020-06-25 20:47:29 +00:00
probe proxy: Stop killing memcache entries on 5xx responses 2020-06-15 11:05:58 -07:00
s3api s3api: Implement object versioning API 2020-01-28 14:00:08 -08:00
unit Identify deleted shards as shards 2020-07-07 16:06:28 -07:00
__init__.py Refactoring, test infrastructure changes and cleanup 2018-05-15 18:18:25 +01:00
sample.conf fix s3api functional tests 2020-05-15 22:38:04 -07:00