Show each policy's information on quarantined files in recon
After the release of Swift ver. 2.0.0, some recon responses do not
show each policy's information yet. To make things worse, some recon
results only count on policy-0's score, therefore the total is not
shown in the recon results.
This patch makes the count of quarantined files policy-aware for recon
requests. Suppose a number of quarantined objects for policy-0 is 2
and a number for policy-1 is 3, recon sums up every policy's amount
and shows information for each policy as follows.
Reviewed: https:/ /review. openstack. org/137769 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=f8fa1a9234c d0c1d7466dd51d8 528e2abd859c2b
Committed: https:/
Submitter: Jenkins
Branch: master
commit f8fa1a9234cd0c1 d7466dd51d8528e 2abd859c2b
Author: Daisuke Morita <email address hidden>
Date: Fri Nov 28 20:19:02 2014 +0900
Show each policy's information on quarantined files in recon
After the release of Swift ver. 2.0.0, some recon responses do not
show each policy's information yet. To make things worse, some recon
results only count on policy-0's score, therefore the total is not
shown in the recon results.
This patch makes the count of quarantined files policy-aware for recon
requests. Suppose a number of quarantined objects for policy-0 is 2
and a number for policy-1 is 3, recon sums up every policy's amount
and shows information for each policy as follows.
$ curl http://<host>: <port>/ recon/quarantin ed
{"accounts": 0, "containers": 0, "objects": 5, "policies": {"0":
{"objects": 2}, "1": {"objects": 3}}}
Moreover, this patch adds stats for each policy in CLI output.
Change-Id: I07217c635f6fc4 ea809ddbc3d859c 4e81c4fde37
Related-Bug: 1375327
Related-Bug: 1375332