From 5449155fb0225fbd2747188c31318ce1b1de067e Mon Sep 17 00:00:00 2001 From: Thomas Leaman Date: Fri, 28 Jun 2013 08:51:24 +0000 Subject: [PATCH] Allow floating point value for dispersion_coverage For systems with very large numbers of partitions, 1% dispersion coverage may simply be too much/take too long. This fix allows <1 values to be used for dispersion_coverage. DocImpact Change-Id: I5ed35b69754d55a410e66e658b3854de57c7666b --- bin/swift-dispersion-populate | 2 +- bin/swift-dispersion-report | 1 - doc/manpages/dispersion.conf.5 | 4 ++-- doc/manpages/swift-dispersion-populate.1 | 2 +- doc/manpages/swift-dispersion-report.1 | 2 +- etc/dispersion.conf-sample | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/swift-dispersion-populate b/bin/swift-dispersion-populate index 324c6442df..020c77d89f 100755 --- a/bin/swift-dispersion-populate +++ b/bin/swift-dispersion-populate @@ -87,7 +87,7 @@ if __name__ == '__main__': exit('Unable to read config file: %s' % conffile) conf = dict(c.items('dispersion')) swift_dir = conf.get('swift_dir', '/etc/swift') - dispersion_coverage = int(conf.get('dispersion_coverage', 1)) + dispersion_coverage = float(conf.get('dispersion_coverage', 1)) retries = int(conf.get('retries', 5)) concurrency = int(conf.get('concurrency', 25)) endpoint_type = str(conf.get('endpoint_type', 'publicURL')) diff --git a/bin/swift-dispersion-report b/bin/swift-dispersion-report index f96baab935..31c1fdafcb 100755 --- a/bin/swift-dispersion-report +++ b/bin/swift-dispersion-report @@ -324,7 +324,6 @@ Usage: %%prog [options] [conf_file] exit('Unable to read config file: %s' % conffile) conf = dict(c.items('dispersion')) swift_dir = conf.get('swift_dir', '/etc/swift') - dispersion_coverage = int(conf.get('dispersion_coverage', 1)) retries = int(conf.get('retries', 5)) concurrency = int(conf.get('concurrency', 25)) endpoint_type = str(conf.get('endpoint_type', 'publicURL')) diff --git a/doc/manpages/dispersion.conf.5 b/doc/manpages/dispersion.conf.5 index ec6029a62e..9f0511f7de 100644 --- a/doc/manpages/dispersion.conf.5 +++ b/doc/manpages/dispersion.conf.5 @@ -47,7 +47,7 @@ Authentication system account/user password .IP "\fBswift_dir\fR" Location of openstack-swift configuration and ring files .IP "\fBdispersion_coverage\fR" -Percentage of partition coverage to use. The default is 1. +Percentage of partition coverage to use. The default is 1.0. .IP "\fBretries\fR" Maximum number of attempts .IP "\fBconcurrency\fR" @@ -69,7 +69,7 @@ Whether to run the object report. The default is yes. .IP "auth_user = dpstats:dpstats" .IP "auth_key = dpstats" .IP "swift_dir = /etc/swift" -.IP "# dispersion_coverage = 1" +.IP "# dispersion_coverage = 1.0" .IP "# retries = 5" .IP "# concurrency = 25" .IP "# dump_json = no" diff --git a/doc/manpages/swift-dispersion-populate.1 b/doc/manpages/swift-dispersion-populate.1 index 63fd36eb38..7cebdc0439 100644 --- a/doc/manpages/swift-dispersion-populate.1 +++ b/doc/manpages/swift-dispersion-populate.1 @@ -66,7 +66,7 @@ Example \fI/etc/swift/dispersion.conf\fR: .IP "auth_user = dpstats:dpstats" .IP "auth_key = dpstats" .IP "swift_dir = /etc/swift" -.IP "# dispersion_coverage = 1" +.IP "# dispersion_coverage = 1.0" .IP "# retries = 5" .IP "# concurrency = 25" .IP "# endpoint_type = publicURL" diff --git a/doc/manpages/swift-dispersion-report.1 b/doc/manpages/swift-dispersion-report.1 index 6f19b34d06..ebdea83ea5 100644 --- a/doc/manpages/swift-dispersion-report.1 +++ b/doc/manpages/swift-dispersion-report.1 @@ -94,7 +94,7 @@ Example \fI/etc/swift/dispersion.conf\fR: .IP "auth_user = dpstats:dpstats" .IP "auth_key = dpstats" .IP "swift_dir = /etc/swift" -.IP "# dispersion_coverage = 1" +.IP "# dispersion_coverage = 1.0" .IP "# retries = 5" .IP "# concurrency = 25" .IP "# dump_json = no" diff --git a/etc/dispersion.conf-sample b/etc/dispersion.conf-sample index fb62b866ba..9eb5c0316b 100644 --- a/etc/dispersion.conf-sample +++ b/etc/dispersion.conf-sample @@ -9,7 +9,7 @@ auth_key = testing # endpoint_type = publicURL # # swift_dir = /etc/swift -# dispersion_coverage = 1 +# dispersion_coverage = 1.0 # retries = 5 # concurrency = 25 # container_report = yes