Activity log for bug #1075184

Date Who What changed Old value New value Message
2012-11-05 15:02:28 david bug added bug
2012-11-06 13:39:32 david description bin/swift in python-swiftclient. If you specific the segment size to be X, files smaller than X should NOT be put into the _segment container and be created in the main container as manifest files. Currently the do due to the following : if options.segment_size and \ getsize(path) < options.segment_size: two problems to my eyes - the comparison is wrong (should be greater than) and we're comparing with a string. The fix would be: if options.segment_size and \ getsize(path) > int(options.segment_size): >>> bigfile = '/path/to/file/bigger/than/1gig' >>> smallfile = '/etc/hosts' >>> segment_size = '1073741824' >>> segment_size and os.path.getsize(bigfile) < segment_size True >>> segment_size and os.path.getsize(smallfile) < segment_size True >>> segment_size and os.path.getsize(bigfile) > segment_size False >>> segment_size and os.path.getsize(smallfile) > segment_size False >>> segment_size and os.path.getsize(smallfile) > int(segment_size) False >>> segment_size and os.path.getsize(bigfile) > int(segment_size) True bin/swift in python-swiftclient. If you specify the segment size to be X, files smaller than X should NOT be put into the _segment container and should not be created in the main container as manifest files. Currently they do due to the following :     if options.segment_size and \             getsize(path) < options.segment_size: Two problems to my eyes - the comparison is wrong (should be greater than) and we're comparing with a string. The fix would be:     if options.segment_size and \             getsize(path) > int(options.segment_size): >>> bigfile = '/path/to/file/bigger/than/1gig' >>> smallfile = '/etc/hosts' >>> segment_size = '1073741824' >>> segment_size and os.path.getsize(bigfile) < segment_size True >>> segment_size and os.path.getsize(smallfile) < segment_size True >>> segment_size and os.path.getsize(bigfile) > segment_size False >>> segment_size and os.path.getsize(smallfile) > segment_size False >>> segment_size and os.path.getsize(bigfile) > int(segment_size) True >>> segment_size and os.path.getsize(smallfile) > int(segment_size) False
2012-11-26 07:23:41 OpenStack Infra python-swiftclient: status New In Progress
2012-11-26 07:23:41 OpenStack Infra python-swiftclient: assignee Zhou Yuan (yuan-zhou)
2013-06-11 06:14:34 Darrell Bishop python-swiftclient: status In Progress Fix Committed
2015-07-16 01:53:36 John Dickinson python-swiftclient: status Fix Committed Fix Released