In an environment >= 2 *EC* policies deployed, object-reconstructor can get an unhandled "ZeroDivisionError" shown in the log.
This seems to be triggered due to count mismatch among device_count, part_count and reconstuction_device_count.
Both part_count and reconstruction_device_count seems calculated as total number of devices in all policies but device_count looks to be set as the number of devices for the last policy while collecting reconstruction parts. And then, if Swift has many EC policies and few partitions are in the policies, the code[1] will be under 1 and python integer will truncate/round it as 0.
Traceback:
"/usr/local/bin/swift-object-reconstructor", line 31, in <module>#012 run_daemon(ObjectReconstructor, conf_file, **options)#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/daemon.py", line 110, in run_daemon#012 klass(conf).run(once=once, **kwargs)#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/daemon.py", line 55, in run#012 self.run_once(**kwargs)#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/reconstructor.py", line 943, in run_once#012 override_partitions=override_partitions)#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/reconstructor.py", line 933, in reconstruct#012 self.stats_line()#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/reconstructor.py", line 371, in stats_line#012 total_part_count)})#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/utils.py", line 1946, in compute_eta#012 completion = (float(current_value) / final_value) or 0.00001#012ZeroDivisionError: float division by zero
In an environment >= 2 *EC* policies deployed, object- reconstructor can get an unhandled "ZeroDivisionError" shown in the log.
This seems to be triggered due to count mismatch among device_count, part_count and reconstuction_ device_ count.
Both part_count and reconstruction_ device_ count seems calculated as total number of devices in all policies but device_count looks to be set as the number of devices for the last policy while collecting reconstruction parts. And then, if Swift has many EC policies and few partitions are in the policies, the code[1] will be under 1 and python integer will truncate/round it as 0.
1: https:/ /github. com/openstack/ swift/blob/ master/ swift/obj/ reconstructor. py#L351- L353
Traceback: bin/swift- object- reconstructor" , line 31, in <module>#012 run_daemon( ObjectReconstru ctor, conf_file, **options)#012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/common/ daemon. py", line 110, in run_daemon#012 klass(conf) .run(once= once, **kwargs)#012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/common/ daemon. py", line 55, in run#012 self.run_ once(** kwargs) #012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/obj/ reconstructor. py", line 943, in run_once#012 override_ partitions= override_ partitions) #012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/obj/ reconstructor. py", line 933, in reconstruct#012 self.stats_ line()# 012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/obj/ reconstructor. py", line 371, in stats_line#012 total_part_ count)} )#012 File "/usr/local/ lib/python2. 7/dist- packages/ swift/common/ utils.py" , line 1946, in compute_eta#012 completion = (float( current_ value) / final_value) or 0.00001# 012ZeroDivision Error: float division by zero
"/usr/local/
Affected: since Liberty