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
This commit is contained in:
Thomas Leaman 2013-06-28 08:51:24 +00:00
parent c6e53721e0
commit 5449155fb0
6 changed files with 6 additions and 7 deletions

View File

@ -87,7 +87,7 @@ if __name__ == '__main__':
exit('Unable to read config file: %s' % conffile) exit('Unable to read config file: %s' % conffile)
conf = dict(c.items('dispersion')) conf = dict(c.items('dispersion'))
swift_dir = conf.get('swift_dir', '/etc/swift') 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)) retries = int(conf.get('retries', 5))
concurrency = int(conf.get('concurrency', 25)) concurrency = int(conf.get('concurrency', 25))
endpoint_type = str(conf.get('endpoint_type', 'publicURL')) endpoint_type = str(conf.get('endpoint_type', 'publicURL'))

View File

@ -324,7 +324,6 @@ Usage: %%prog [options] [conf_file]
exit('Unable to read config file: %s' % conffile) exit('Unable to read config file: %s' % conffile)
conf = dict(c.items('dispersion')) conf = dict(c.items('dispersion'))
swift_dir = conf.get('swift_dir', '/etc/swift') swift_dir = conf.get('swift_dir', '/etc/swift')
dispersion_coverage = int(conf.get('dispersion_coverage', 1))
retries = int(conf.get('retries', 5)) retries = int(conf.get('retries', 5))
concurrency = int(conf.get('concurrency', 25)) concurrency = int(conf.get('concurrency', 25))
endpoint_type = str(conf.get('endpoint_type', 'publicURL')) endpoint_type = str(conf.get('endpoint_type', 'publicURL'))

View File

@ -47,7 +47,7 @@ Authentication system account/user password
.IP "\fBswift_dir\fR" .IP "\fBswift_dir\fR"
Location of openstack-swift configuration and ring files Location of openstack-swift configuration and ring files
.IP "\fBdispersion_coverage\fR" .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" .IP "\fBretries\fR"
Maximum number of attempts Maximum number of attempts
.IP "\fBconcurrency\fR" .IP "\fBconcurrency\fR"
@ -69,7 +69,7 @@ Whether to run the object report. The default is yes.
.IP "auth_user = dpstats:dpstats" .IP "auth_user = dpstats:dpstats"
.IP "auth_key = dpstats" .IP "auth_key = dpstats"
.IP "swift_dir = /etc/swift" .IP "swift_dir = /etc/swift"
.IP "# dispersion_coverage = 1" .IP "# dispersion_coverage = 1.0"
.IP "# retries = 5" .IP "# retries = 5"
.IP "# concurrency = 25" .IP "# concurrency = 25"
.IP "# dump_json = no" .IP "# dump_json = no"

View File

@ -66,7 +66,7 @@ Example \fI/etc/swift/dispersion.conf\fR:
.IP "auth_user = dpstats:dpstats" .IP "auth_user = dpstats:dpstats"
.IP "auth_key = dpstats" .IP "auth_key = dpstats"
.IP "swift_dir = /etc/swift" .IP "swift_dir = /etc/swift"
.IP "# dispersion_coverage = 1" .IP "# dispersion_coverage = 1.0"
.IP "# retries = 5" .IP "# retries = 5"
.IP "# concurrency = 25" .IP "# concurrency = 25"
.IP "# endpoint_type = publicURL" .IP "# endpoint_type = publicURL"

View File

@ -94,7 +94,7 @@ Example \fI/etc/swift/dispersion.conf\fR:
.IP "auth_user = dpstats:dpstats" .IP "auth_user = dpstats:dpstats"
.IP "auth_key = dpstats" .IP "auth_key = dpstats"
.IP "swift_dir = /etc/swift" .IP "swift_dir = /etc/swift"
.IP "# dispersion_coverage = 1" .IP "# dispersion_coverage = 1.0"
.IP "# retries = 5" .IP "# retries = 5"
.IP "# concurrency = 25" .IP "# concurrency = 25"
.IP "# dump_json = no" .IP "# dump_json = no"

View File

@ -9,7 +9,7 @@ auth_key = testing
# endpoint_type = publicURL # endpoint_type = publicURL
# #
# swift_dir = /etc/swift # swift_dir = /etc/swift
# dispersion_coverage = 1 # dispersion_coverage = 1.0
# retries = 5 # retries = 5
# concurrency = 25 # concurrency = 25
# container_report = yes # container_report = yes