Comment 2 for bug 1549110

clayg (clay-gerrard) wrote :

I was able to duplicate this bug when I have two ec storage policies and devices with not many parts

if you dirs look like this

/srv/node/sdb/objects/0/
/srv/node/sdb/objects-1/

when processing the second storage policy you can hit this bug because the device_count will be only 1 instead of 2

            total_part_count = (self.part_count *
                                self.device_count /
                                self.reconstruction_device_count)

we guard check that none of these values are 0, but if part_count * device_count < reconstruction_device_count the integer devision will make total_part_count = 0 ( 1 / 2 == 0 ) and the status output will fail.

I was able to duplicate this failure with some test changes [1]

1. https://gist.github.com/clayg/5b8505e4130f137c2189994ddec691ff