)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"c8ccae14486ca6b6befceaf3dfffe1a6b5e71db7","unresolved":false,"context_lines":[{"line_number":40,"context_line":"storage policy; the relinker tool should be simply run and afterwards"},{"line_number":41,"context_line":"the partition power will be increased. This shouldn\u0027t take that much"},{"line_number":42,"context_line":"time (it\u0027s only walking the filesystem and hardlinking); impact should"},{"line_number":43,"context_line":"be low therefore."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Auditors are not quarantining objects written to a path with a different"},{"line_number":46,"context_line":"partition power and therefore working as before (though they are reading"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"bacf61ea_90012a08","line":43,"updated":"2016-07-29 22:41:35.000000000","message":"This operational detail is great. Could you also write down your thoughts about what happens when there\u0027s a failure during relinking (ie while the policy isn\u0027t being replicated)?\n\nIs the whole cluster relinked at once? Is it one drive at a time? If the latter, then I can see it working well operationally wrt failures, but it would probably take too long to be useful. What are your thoughts on this?","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":40,"context_line":"storage policy; the relinker tool should be simply run and afterwards"},{"line_number":41,"context_line":"the partition power will be increased. This shouldn\u0027t take that much"},{"line_number":42,"context_line":"time (it\u0027s only walking the filesystem and hardlinking); impact should"},{"line_number":43,"context_line":"be low therefore."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Auditors are not quarantining objects written to a path with a different"},{"line_number":46,"context_line":"partition power and therefore working as before (though they are reading"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3ac371cc_05c95726","line":43,"in_reply_to":"bacf61ea_90012a08","updated":"2016-08-17 20:40:43.000000000","message":"My plan is to add a follow up that will use one thread per disk to make relinking even faster. Right now it should be run in parallel on all nodes, I updated the commit msg. I don\u0027t see problems yet if relinking fails; I might add a follow up that can undo / abort a partpower increase and remove already created links.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":20,"context_line":"using hardlinks."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"2. The actual partition power itself will be increased. Servers will now"},{"line_number":23,"context_line":"use the new partition power to read from and write to. Now longer"},{"line_number":24,"context_line":"required hard links in the old object location have to be removed now by"},{"line_number":25,"context_line":"the relinker tool; the relinker tool reads the next_part_power setting"},{"line_number":26,"context_line":"to find object locations that need to be cleaned up."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"da6895a0_87e3f204","line":23,"updated":"2016-10-24 01:45:35.000000000","message":"\u0027Now\u0027 -\u003e \u0027No\u0027?","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":20,"context_line":"using hardlinks."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"2. The actual partition power itself will be increased. Servers will now"},{"line_number":23,"context_line":"use the new partition power to read from and write to. Now longer"},{"line_number":24,"context_line":"required hard links in the old object location have to be removed now by"},{"line_number":25,"context_line":"the relinker tool; the relinker tool reads the next_part_power setting"},{"line_number":26,"context_line":"to find object locations that need to be cleaned up."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"ba5da102_b4c4c492","line":23,"in_reply_to":"da6895a0_87e3f204","updated":"2016-12-02 17:27:48.000000000","message":"Done","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"power will be located on the same device and are hardlinked to avoid"},{"line_number":13,"context_line":"data movement."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"1. A new settings \"next_part_power\" will be added to the rings, and once"},{"line_number":16,"context_line":"the proxy server reloaded the rings it will send this value to the"},{"line_number":17,"context_line":"object servers on any write operation. Object servers will now create a"},{"line_number":18,"context_line":"hard-link in the new location to the original DiskFile object. Already"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_ce5c781b","line":15,"range":{"start_line":15,"start_character":9,"end_line":15,"end_character":17},"updated":"2017-01-31 23:44:15.000000000","message":"nit: \"setting\"","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"power will be located on the same device and are hardlinked to avoid"},{"line_number":13,"context_line":"data movement."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"1. A new settings \"next_part_power\" will be added to the rings, and once"},{"line_number":16,"context_line":"the proxy server reloaded the rings it will send this value to the"},{"line_number":17,"context_line":"object servers on any write operation. Object servers will now create a"},{"line_number":18,"context_line":"hard-link in the new location to the original DiskFile object. Already"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_bfbcaddc","line":15,"range":{"start_line":15,"start_character":9,"end_line":15,"end_character":17},"in_reply_to":"3a461143_ce5c781b","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"1. A new settings \"next_part_power\" will be added to the rings, and once"},{"line_number":16,"context_line":"the proxy server reloaded the rings it will send this value to the"},{"line_number":17,"context_line":"object servers on any write operation. Object servers will now create a"},{"line_number":18,"context_line":"hard-link in the new location to the original DiskFile object. Already"},{"line_number":19,"context_line":"existing data will be relinked using a new tool in the new locations"},{"line_number":20,"context_line":"using hardlinks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_0ea120f8","line":17,"updated":"2017-01-31 23:44:15.000000000","message":"I\u0027m confused about why this is necessary; don\u0027t the object servers have their own copies of the ring, which could be checked for a next_part_power?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"1. A new settings \"next_part_power\" will be added to the rings, and once"},{"line_number":16,"context_line":"the proxy server reloaded the rings it will send this value to the"},{"line_number":17,"context_line":"object servers on any write operation. Object servers will now create a"},{"line_number":18,"context_line":"hard-link in the new location to the original DiskFile object. Already"},{"line_number":19,"context_line":"existing data will be relinked using a new tool in the new locations"},{"line_number":20,"context_line":"using hardlinks."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_9feb71db","line":17,"in_reply_to":"3a461143_0ea120f8","updated":"2017-02-01 11:08:47.000000000","message":"The nodes have their own copy, but it is not used by the object-server process (only by the replicators). So to read this we\u0027d need to refactor quite a bit in the object-server processes, that is only used during partpower increase.\nSending a header during partpower increase looked better to me - it\u0027s a temporary thing only.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"Auditors are not quarantining objects written to a path with a different"},{"line_number":49,"context_line":"partition power and therefore working as before (though they are reading"},{"line_number":50,"context_line":"each object twice in the worst case before the no longer needed hard"},{"line_number":51,"context_line":"links are removed)."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"[1] https://specs.openstack.org/openstack/swift-specs/specs/in_progress/"},{"line_number":54,"context_line":"increasing_partition_power.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_ae548cc9","line":51,"updated":"2017-01-31 23:44:15.000000000","message":"Maybe worth calling out in the docs?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"Auditors are not quarantining objects written to a path with a different"},{"line_number":49,"context_line":"partition power and therefore working as before (though they are reading"},{"line_number":50,"context_line":"each object twice in the worst case before the no longer needed hard"},{"line_number":51,"context_line":"links are removed)."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"[1] https://specs.openstack.org/openstack/swift-specs/specs/in_progress/"},{"line_number":54,"context_line":"increasing_partition_power.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_3fcd1d66","line":51,"in_reply_to":"3a461143_ae548cc9","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"[1] https://specs.openstack.org/openstack/swift-specs/specs/in_progress/"},{"line_number":54,"context_line":"increasing_partition_power.html"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Change-Id: I7d6371a04f5c1c4adbb8733a71f3c177ee5448bb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_4eb6c8f9","line":56,"updated":"2017-01-31 23:44:15.000000000","message":"Maybe deserves an UpgradeImpact? Like, \"don\u0027t you dare use this while your cluster is in the middle of an upgrade\"?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":53,"context_line":"[1] https://specs.openstack.org/openstack/swift-specs/specs/in_progress/"},{"line_number":54,"context_line":"increasing_partition_power.html"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Change-Id: I7d6371a04f5c1c4adbb8733a71f3c177ee5448bb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"3a461143_5f24a90b","line":56,"in_reply_to":"3a461143_4eb6c8f9","updated":"2017-02-01 11:08:47.000000000","message":"I think UpgradeImpact is not the correct flag in this case? Upgrades per se are not affected by this, so this might be misleading?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"}],"bin/swift-object-relinker":[{"author":{"_account_id":13471,"name":"Brian Nelson","email":"brnelson@us.ibm.com","username":"brnelson"},"change_message_id":"4c2d150b374e35e7ff67bbadc1b7b16f33d2cda6","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser(description\u003d\u0027Process some integers.\u0027)"},{"line_number":25,"context_line":"    parser.add_argument(\u0027action\u0027, choices\u003d[\u0027relink\u0027, \u0027cleanup\u0027])"},{"line_number":26,"context_line":"    parser.add_argument(\u0027--swift-dir\u0027, default\u003d\u0027/etc/swift\u0027,"},{"line_number":27,"context_line":"                        dest\u003d\u0027swift_dir\u0027, help\u003d\u0027Path to swift directory\u0027)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"1aa78d24_78a2ed9b","line":24,"range":{"start_line":24,"start_character":49,"end_line":24,"end_character":72},"updated":"2016-07-14 21:47:44.000000000","message":"If only it was this simple.","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"4c8084d3b6ba034a03823dca092fc87ee8b8d021","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser(description\u003d\u0027Process some integers.\u0027)"},{"line_number":25,"context_line":"    parser.add_argument(\u0027action\u0027, choices\u003d[\u0027relink\u0027, \u0027cleanup\u0027])"},{"line_number":26,"context_line":"    parser.add_argument(\u0027--swift-dir\u0027, default\u003d\u0027/etc/swift\u0027,"},{"line_number":27,"context_line":"                        dest\u003d\u0027swift_dir\u0027, help\u003d\u0027Path to swift directory\u0027)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"fad55976_f151a8d9","line":24,"in_reply_to":"1aa78d24_78a2ed9b","updated":"2016-07-16 18:58:15.000000000","message":"Heh, yeah - in the beginning it looked simple like this... Fixed in next patchset.","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"1926adad65bbc9433046975047a4b72a24b05d2e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                        dest\u003d\u0027devices\u0027, help\u003d\u0027Path to swift directory\u0027)"},{"line_number":31,"context_line":"    parser.add_argument(\u0027--skip-mount-check\u0027, default\u003dFalse,"},{"line_number":32,"context_line":"                        action\u003d\"store_true\", dest\u003d\u0027skip_mount_check\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    args \u003d parser.parse_args()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    sys.exit(main(args))"}],"source_content_type":"application/octet-stream","patch_set":13,"id":"3a71b18c_5298831b","line":33,"updated":"2016-12-10 09:05:59.000000000","message":"It would be great if relinker took mount check from object-server.conf automatically. It knows the /etc/swift anyway. But I realize that with instantiated object servers and config directories this may be quite difficult, unless some ready code exists.","commit_id":"bb4cd9750d77ec2cf677049a5eac0594864ebd42"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f829bd90fe130c24c7e53e7e3ba7edde0cc612cf","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    parser.add_argument(\u0027--swift-dir\u0027, default\u003d\u0027/etc/swift\u0027,"},{"line_number":28,"context_line":"                        dest\u003d\u0027swift_dir\u0027, help\u003d\u0027Path to swift directory\u0027)"},{"line_number":29,"context_line":"    parser.add_argument(\u0027--devices\u0027, default\u003d\u0027/srv/node\u0027,"},{"line_number":30,"context_line":"                        dest\u003d\u0027devices\u0027, help\u003d\u0027Path to swift directory\u0027)"},{"line_number":31,"context_line":"    parser.add_argument(\u0027--skip-mount-check\u0027, default\u003dFalse,"},{"line_number":32,"context_line":"                        action\u003d\"store_true\", dest\u003d\u0027skip_mount_check\u0027)"},{"line_number":33,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"7a3c09a3_3a3fd626","line":30,"range":{"start_line":30,"start_character":46,"end_line":30,"end_character":69},"updated":"2017-01-13 06:31:59.000000000","message":"It isn\u0027t really the path to the Swift directory, its to patch to the devices directory.","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3711156b9352932d951908c44ea1d28cf7478815","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    parser.add_argument(\u0027--swift-dir\u0027, default\u003d\u0027/etc/swift\u0027,"},{"line_number":28,"context_line":"                        dest\u003d\u0027swift_dir\u0027, help\u003d\u0027Path to swift directory\u0027)"},{"line_number":29,"context_line":"    parser.add_argument(\u0027--devices\u0027, default\u003d\u0027/srv/node\u0027,"},{"line_number":30,"context_line":"                        dest\u003d\u0027devices\u0027, help\u003d\u0027Path to swift directory\u0027)"},{"line_number":31,"context_line":"    parser.add_argument(\u0027--skip-mount-check\u0027, default\u003dFalse,"},{"line_number":32,"context_line":"                        action\u003d\"store_true\", dest\u003d\u0027skip_mount_check\u0027)"},{"line_number":33,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"7a3c09a3_3040d256","line":30,"range":{"start_line":30,"start_character":46,"end_line":30,"end_character":69},"in_reply_to":"7a3c09a3_3a3fd626","updated":"2017-01-13 10:06:29.000000000","message":"Good catch - fixed!","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"7e796f2f198eb0134d91a4e929229e06abf8c6f8","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    args \u003d parser.parse_args()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    sys.exit(main(args))"}],"source_content_type":"application/octet-stream","patch_set":31,"id":"1a430d35_48ae02e7","line":36,"range":{"start_line":36,"start_character":13,"end_line":36,"end_character":23},"updated":"2017-02-07 21:32:35.000000000","message":"wondering if we should provide better feedback to user here:\n\nfor example, when testing on SAIO, running:\n  [vagrant@server0 sdb1]$ swift-object-relinker relink\n\ndoes nothing, but there\u0027s no error or feedback to user. Then passing the correct arguments, produces output, but I have some concern: https://da.gd/VL4x \n\nFirst is that we are printing one line for each object in the disk, this is not scalable when talking about the possibility of millions of files per disk. \n\nSecond, it prints two lines for each object that is already relinked (one being an error message, I think this will be more confusing to operators when they see possibly a ton of errors messages)\n\nsame is true for cleanup...","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"831c914f5379fcd739a66a0f5eee4a00e688a74b","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    args \u003d parser.parse_args()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    sys.exit(main(args))"}],"source_content_type":"application/octet-stream","patch_set":31,"id":"1a430d35_45e6e0b0","line":36,"range":{"start_line":36,"start_character":13,"end_line":36,"end_character":23},"in_reply_to":"1a430d35_48ae02e7","updated":"2017-02-08 07:28:43.000000000","message":"I added a new option to the relinker to specify an output logfile. This should be way more performant than logging to the console with all its overhead.\n\nAlso added a warning if no action was executed.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    args \u003d parser.parse_args()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    logging.basicConfig("},{"line_number":40,"context_line":"        format\u003d\u0027%(message)s\u0027, level\u003dlogging.DEBUG, filename\u003dargs.logfile)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    sys.exit(main(args))"}],"source_content_type":"application/octet-stream","patch_set":32,"id":"1a430d35_e08048fa","line":40,"range":{"start_line":40,"start_character":44,"end_line":40,"end_character":49},"updated":"2017-02-09 18:39:26.000000000","message":"I\u0027m beginning to wonder if we should have an option specifying at which level to log. I could totally see a user wanting to just see the failures, run in that mode until they *stop* seeing failures, then move on to the next ring builder command.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"}],"doc/source/ring_partpower.rst":[{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefor it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"da6895a0_3f518f63","line":10,"updated":"2016-10-24 01:45:35.000000000","message":"s/therefor/therefore/","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":32,"context_line":"* Due to the fact that each object will now be hard linked from two locations,"},{"line_number":33,"context_line":"  many more inodes will be used - expect around twice the amount. You need to"},{"line_number":34,"context_line":"  check the free inode count _before_ increasing the partition power."},{"line_number":35,"context_line":"* Also, due the new inodes more memory is needed to cache them, and your object"},{"line_number":36,"context_line":"  servers should have plenty of available memory to avoid running out of inode"},{"line_number":37,"context_line":"  cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"da6895a0_1f020b3f","line":35,"updated":"2016-10-24 01:45:35.000000000","message":"s/due the/due to the/","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":102,"context_line":"----------"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"An existing object that is currently located on partition X will be placed"},{"line_number":105,"context_line":"either on partition 2*X or 2*X+1 after the partition power got increased. The"},{"line_number":106,"context_line":"reason for this is the Ring.get_part() method, that does a bitwise shift to the"},{"line_number":107,"context_line":"right."},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"da6895a0_c4a9687d","line":105,"updated":"2016-10-24 01:45:35.000000000","message":"suggest changing \u0027got\u0027 to \u0027is\u0027","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"1926adad65bbc9433046975047a4b72a24b05d2e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e prepare_increase_partition_power"},{"line_number":56,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"},{"line_number":57,"context_line":"    swift-object-relinker relink"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. note::"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a71b18c_73f23308","line":57,"updated":"2016-12-10 09:05:59.000000000","message":"The step of distributing the new ring has to happen before relinker is run, right? This seems to leave too much for operator\u0027s common sense. At least put a newline between the two commands - they\u0027re run on different systems probably.","commit_id":"bb4cd9750d77ec2cf677049a5eac0594864ebd42"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"1926adad65bbc9433046975047a4b72a24b05d2e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    The cleanup must be finished within your reclaim_age period (which is by"},{"line_number":97,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":98,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"----------"},{"line_number":101,"context_line":"Background"},{"line_number":102,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a71b18c_726d7f03","line":99,"updated":"2016-12-10 09:05:59.000000000","message":"What is going to happen at this point if someone adds a device and then runs rebalance? How big is the data movement going to be?","commit_id":"bb4cd9750d77ec2cf677049a5eac0594864ebd42"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f829bd90fe130c24c7e53e7e3ba7edde0cc612cf","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e increase_partition_power"},{"line_number":80,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Object servers are now using the new, increased partition power and no longer"},{"line_number":83,"context_line":"create additional hard links."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"7a3c09a3_fa6c6e0a","line":81,"updated":"2017-01-13 06:31:59.000000000","message":"NIT: Do we need to mention again here to:\n\n  Now you need to copy the updated .ring.gz to all nodes.\n\nOr are we assuming users will understand. Maybe it\u0027s better to er on the side of caution.","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3711156b9352932d951908c44ea1d28cf7478815","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e increase_partition_power"},{"line_number":80,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Object servers are now using the new, increased partition power and no longer"},{"line_number":83,"context_line":"create additional hard links."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"7a3c09a3_902fc6a0","line":81,"in_reply_to":"7a3c09a3_fa6c6e0a","updated":"2017-01-13 10:06:29.000000000","message":"Done","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f829bd90fe130c24c7e53e7e3ba7edde0cc612cf","unresolved":false,"context_lines":[{"line_number":87,"context_line":"----------"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Existing hard links in the old locations need to be removed, and a cleanup tool"},{"line_number":90,"context_line":"is provided to do this. Afterwards it is required to update the rings one last"},{"line_number":91,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":92,"context_line":"and replicators should resume their job.::"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"7a3c09a3_7a2f9ea1","line":90,"updated":"2017-01-13 06:31:59.000000000","message":"We should probably continue holding peoples hands here and add the steps to run the clean up to be sure they actually run it before the replicator come back to life:\n\n  run the following command on each node::\n\n    swift-object-relinker cleanup\n\n  Afterwards it is required to update the rings one last time..\n\nOr have I got the steps mixed up?","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3711156b9352932d951908c44ea1d28cf7478815","unresolved":false,"context_lines":[{"line_number":87,"context_line":"----------"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Existing hard links in the old locations need to be removed, and a cleanup tool"},{"line_number":90,"context_line":"is provided to do this. Afterwards it is required to update the rings one last"},{"line_number":91,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":92,"context_line":"and replicators should resume their job.::"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"7a3c09a3_b02cc2ac","line":90,"in_reply_to":"7a3c09a3_7a2f9ea1","updated":"2017-01-13 10:06:29.000000000","message":"Done","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":99,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":102,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":103,"context_line":"and replicators should resume their job.::"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"7a3c09a3_ddf63ef8","line":101,"updated":"2017-01-17 10:34:22.000000000","message":"Actually this is only needed for the cleanup command to decide whether a policy needs a cleanup or not. But - this is not strictly required. We could simply drop the required \"finish_increase_partition_power\" command, and the cleanup tool would check all objects by default, and can be limited to a given policy. Thus an operator only needs to run the cleanup command in this step.\n\nThoughts?","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"88c8c3c0b9bfffceba040b23411b86bb8a2a6889","unresolved":false,"context_lines":[{"line_number":98,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":99,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":102,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":103,"context_line":"and replicators should resume their job.::"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"5a3905b3_d9381040","line":101,"in_reply_to":"7a3c09a3_ddf63ef8","updated":"2017-01-23 05:58:36.000000000","message":"Yeah I kinda like that idea. less steps. Really your already done and the cleanup will clean up the links. So long as you\u0027ve waiting for the linker to finish before going to the increase_part_power stage then we can cleanup as soon as the rings have been deployed (And loaded)... so yeah. nice.","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The ring partition power determines the on-disk location of data files and is"},{"line_number":6,"context_line":"selected when creating a new ring. It is a fixed value, because a different"},{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_1b8ecb2d","line":6,"range":{"start_line":6,"start_character":35,"end_line":6,"end_character":54},"updated":"2017-01-31 23:44:15.000000000","message":"This seems directly counter to the point of this patch. Maybe\n\n\u003e In normal operation, it is a fixed value. This is because...","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The ring partition power determines the on-disk location of data files and is"},{"line_number":6,"context_line":"selected when creating a new ring. It is a fixed value, because a different"},{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_ff81d5c3","line":6,"range":{"start_line":6,"start_character":35,"end_line":6,"end_character":54},"in_reply_to":"3a461143_1b8ecb2d","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":6,"context_line":"selected when creating a new ring. It is a fixed value, because a different"},{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefore it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_33080328","line":9,"range":{"start_line":9,"start_character":9,"end_line":9,"end_character":44},"updated":"2017-01-31 23:44:15.000000000","message":"Couldn\u0027t this technique be used to increase the partition power by more than one?\n\nI mean, clearly you could repeat the whole process a few times as needed, but it seems like there would be some advantage to only needing to run the relink/cleanup commands once...\n\nOr are we fairly certain that whatever hole operators have dug for themselves will probably be resolvable by just doubling the number of partitions?\n\nOr, is it just simpler to validate that it all works for one, and we *might* at some nebulous point in the future consider letting users do \u003e1, but not right now?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":6,"context_line":"selected when creating a new ring. It is a fixed value, because a different"},{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefore it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_7f2ec5a5","line":9,"range":{"start_line":9,"start_character":9,"end_line":9,"end_character":44},"in_reply_to":"3a461143_33080328","updated":"2017-02-01 11:08:47.000000000","message":"We might do this in the future. However, there is a caveat when increasing the partpower by more than 1.\n\nIf the partpower is only increased by 1, the number of inodes will temporarily roughly double (because of the hardlinking). When increasing by more than 1, it will create many more hardlinks, and this might create other problems.\n\nSimple example, you start with only 4 partitions, and each partition has some objects in it. Now you increase the partpower by 1, and you end up with 8 partitions, all of them have some hardlink in them during transition. Increase another time, 16 partitions and so on - all of them with some hardlinks. So you need many more inodes during the transition.\n\nGranted, if all partitions stay on the same disks, the final amount will be the same - but if that\u0027s the case you probably didn\u0027t need to increase the partpower at all.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":6,"context_line":"selected when creating a new ring. It is a fixed value, because a different"},{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefore it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_a2f8ff4a","line":9,"range":{"start_line":9,"start_character":9,"end_line":9,"end_character":44},"in_reply_to":"3a461143_7f2ec5a5","updated":"2017-02-01 20:37:52.000000000","message":"If we do two increases in a row, sure, there\u0027ll be a lot more hardlinks to create \u0026 clean up. But if we jump straight from part_power\u003d2 to part_power\u003d4, each object should only have two hardlinks -- the old location and the new one.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefore it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_7b298fe5","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":29},"updated":"2017-01-31 23:44:15.000000000","message":"This seems to run on a bit. Let\u0027s break up the sentence, maybe like\n\n\u003e ...on the same disk. Therefore, it is possible...\n\nCome to think of it, the repetition of \"possible\" kinda bothers me; what to you think of making it something like\n\n\u003e As a result, we can create hard-links for both the new and old locations, avoiding data movement without impacting availability.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"partition power result in a different on-disk location for all data files."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"},{"line_number":10,"context_line":"that are on the same disk and therefore it is possible to hard-link these data"},{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_7f05e511","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":29},"in_reply_to":"3a461143_7b298fe5","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To enable a partition power change without interrupting user access object"},{"line_number":15,"context_line":"servers need to be aware of it in advance. Therefore a partition power change"},{"line_number":16,"context_line":"needs to be done in multiple steps."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_7bdeefdd","line":14,"range":{"start_line":14,"start_character":67,"end_line":14,"end_character":68},"updated":"2017-01-31 23:44:15.000000000","message":"This could use a comma.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"files, making it possible to avoid data movement while providing continuous"},{"line_number":12,"context_line":"access to them."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To enable a partition power change without interrupting user access object"},{"line_number":15,"context_line":"servers need to be aware of it in advance. Therefore a partition power change"},{"line_number":16,"context_line":"needs to be done in multiple steps."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_d1040d16","line":14,"range":{"start_line":14,"start_character":67,"end_line":14,"end_character":68},"in_reply_to":"3a461143_7bdeefdd","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Caveats"},{"line_number":20,"context_line":"-------"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Before increasing the partition power, let\u0027s have a look at possible drawbacks."},{"line_number":23,"context_line":"There are a few caveats when increasing the partition power:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* All hashes.pkl files will become invalid once hard links are created, and the"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_3b9e2707","line":22,"range":{"start_line":22,"start_character":39,"end_line":22,"end_character":78},"updated":"2017-01-31 23:44:15.000000000","message":"Maybe\n\n\u003e consider the possible drawbacks.\n\n? Or if we wanted to keep the the more conversational tone rather than having quite such an explicit command,\n\n\u003e you should consider the possible drawbacks.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Caveats"},{"line_number":20,"context_line":"-------"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Before increasing the partition power, let\u0027s have a look at possible drawbacks."},{"line_number":23,"context_line":"There are a few caveats when increasing the partition power:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* All hashes.pkl files will become invalid once hard links are created, and the"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_9117e543","line":22,"range":{"start_line":22,"start_character":39,"end_line":22,"end_character":78},"in_reply_to":"3a461143_3b9e2707","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"There are a few caveats when increasing the partition power:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* All hashes.pkl files will become invalid once hard links are created, and the"},{"line_number":26,"context_line":"  replicators will need significant more time on the first run after finishing"},{"line_number":27,"context_line":"  the partition power increase."},{"line_number":28,"context_line":"* Object replicators will skip partitions during the partition power increase."},{"line_number":29,"context_line":"  Replicators are not aware of hard-links, and would simply copy the content;"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_8116cc49","line":26,"range":{"start_line":26,"start_character":24,"end_line":26,"end_character":35},"updated":"2017-01-31 23:44:15.000000000","message":"significantly","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"There are a few caveats when increasing the partition power:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"* All hashes.pkl files will become invalid once hard links are created, and the"},{"line_number":26,"context_line":"  replicators will need significant more time on the first run after finishing"},{"line_number":27,"context_line":"  the partition power increase."},{"line_number":28,"context_line":"* Object replicators will skip partitions during the partition power increase."},{"line_number":29,"context_line":"  Replicators are not aware of hard-links, and would simply copy the content;"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_45ae972e","line":26,"range":{"start_line":26,"start_character":24,"end_line":26,"end_character":35},"in_reply_to":"3a461143_8116cc49","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  data is stored twice."},{"line_number":32,"context_line":"* Due to the fact that each object will now be hard linked from two locations,"},{"line_number":33,"context_line":"  many more inodes will be used - expect around twice the amount. You need to"},{"line_number":34,"context_line":"  check the free inode count _before_ increasing the partition power."},{"line_number":35,"context_line":"* Also, due to the new inodes more memory is needed to cache them, and your"},{"line_number":36,"context_line":"  object servers should have plenty of available memory to avoid running out of"},{"line_number":37,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_21a198f8","line":34,"range":{"start_line":34,"start_character":29,"end_line":34,"end_character":37},"updated":"2017-01-31 23:44:15.000000000","message":"This doesn\u0027t render properly. I think you want\n\n *before*\n\n?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  data is stored twice."},{"line_number":32,"context_line":"* Due to the fact that each object will now be hard linked from two locations,"},{"line_number":33,"context_line":"  many more inodes will be used - expect around twice the amount. You need to"},{"line_number":34,"context_line":"  check the free inode count _before_ increasing the partition power."},{"line_number":35,"context_line":"* Also, due to the new inodes more memory is needed to cache them, and your"},{"line_number":36,"context_line":"  object servers should have plenty of available memory to avoid running out of"},{"line_number":37,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_51381dd3","line":34,"range":{"start_line":34,"start_character":29,"end_line":34,"end_character":37},"in_reply_to":"3a461143_21a198f8","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":40,"context_line":"needed, i..e. if you\u0027re running out of partitions because your cluster grew more"},{"line_number":41,"context_line":"than expected."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"-----------------------------------"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_b5713b0e","line":40,"range":{"start_line":40,"start_character":17,"end_line":40,"end_character":49},"updated":"2017-01-31 23:44:15.000000000","message":"What does it mean to \"run out of partitions\"? I\u0027ve got a general feel for it (individual partitions have gotten so large that you can\u0027t fit *that* many on any single disk, and rebalances take forever because it takes a while to move that much data), but we should\n\n* make that explicit and\n* (if possible) offer recommendations for when this rather hazardous operation may be a good idea.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":40,"context_line":"needed, i..e. if you\u0027re running out of partitions because your cluster grew more"},{"line_number":41,"context_line":"than expected."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"-----------------------------------"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_91b3654c","line":40,"range":{"start_line":40,"start_character":17,"end_line":40,"end_character":49},"in_reply_to":"3a461143_b5713b0e","updated":"2017-02-01 11:08:47.000000000","message":"So, what I meant is that disks only have a few partitions each, because one added more and more disks and partitions are now spreaded across all disks. At one point there might be only a single partition left per disk.\n\nI changed that sentenced.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"-----------------------------------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"The swift-ring-builder is used to prepare the ring for an upcoming partition"},{"line_number":48,"context_line":"power increase. It will store a new variable \u0027next_part_power\u0027 with the current"},{"line_number":49,"context_line":"partition power + 1. Object servers recognize this, and hard links to the new"},{"line_number":50,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":51,"context_line":"it possible to access newly written objects using the future partition power."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_2188b870","line":48,"range":{"start_line":48,"start_character":45,"end_line":48,"end_character":62},"updated":"2017-01-31 23:44:15.000000000","message":"Maybe better as\n\n ``next_part_power``\n\n?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"-----------------------------------"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"The swift-ring-builder is used to prepare the ring for an upcoming partition"},{"line_number":48,"context_line":"power increase. It will store a new variable \u0027next_part_power\u0027 with the current"},{"line_number":49,"context_line":"partition power + 1. Object servers recognize this, and hard links to the new"},{"line_number":50,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":51,"context_line":"it possible to access newly written objects using the future partition power."}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_d187ad5e","line":48,"range":{"start_line":48,"start_character":45,"end_line":48,"end_character":62},"in_reply_to":"3a461143_2188b870","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":51,"context_line":"it possible to access newly written objects using the future partition power."},{"line_number":52,"context_line":"Already existing data needs to be relinked too; therefore an operator has to"},{"line_number":53,"context_line":"run a relinker command on all object servers in this phase.::"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e prepare_increase_partition_power"},{"line_number":56,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_557ad7bd","line":53,"range":{"start_line":53,"start_character":53,"end_line":53,"end_character":61},"updated":"2017-01-31 23:44:15.000000000","message":"I think we just want\n\n phase::\n\n(no period)\n\nI think this sentence would be better in the next paragraph, though?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":51,"context_line":"it possible to access newly written objects using the future partition power."},{"line_number":52,"context_line":"Already existing data needs to be relinked too; therefore an operator has to"},{"line_number":53,"context_line":"run a relinker command on all object servers in this phase.::"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e prepare_increase_partition_power"},{"line_number":56,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_718fd974","line":53,"range":{"start_line":53,"start_character":53,"end_line":53,"end_character":61},"in_reply_to":"3a461143_557ad7bd","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":".. note::"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    Start relinking after the proxy server re-read the modified ring files,"},{"line_number":66,"context_line":"    which normally happens within 15 seconds after writing a modified ring."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Relinking might take some time; while there is no data copied or actually"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_b5293b9d","line":65,"range":{"start_line":65,"start_character":26,"end_line":65,"end_character":42},"updated":"2017-01-31 23:44:15.000000000","message":"*All* proxy servers, yeah?\n\nBut after that, can each object node run it as soon as it has the new ring? Or should they *also* wait a few seconds for their object-server process to reload the ring?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":".. note::"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    Start relinking after the proxy server re-read the modified ring files,"},{"line_number":66,"context_line":"    which normally happens within 15 seconds after writing a modified ring."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Relinking might take some time; while there is no data copied or actually"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_f1f10902","line":65,"range":{"start_line":65,"start_character":26,"end_line":65,"end_character":42},"in_reply_to":"3a461143_b5293b9d","updated":"2017-02-01 11:08:47.000000000","message":"They can, because the object-servers don\u0027t read the rings.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Relinking might take some time; while there is no data copied or actually"},{"line_number":69,"context_line":"moved, the tool still needs to walk the whole file system and create new hard"},{"line_number":70,"context_line":"links if required."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"---------------------------"},{"line_number":73,"context_line":"2. Increase partition power"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_586beeb6","line":70,"range":{"start_line":70,"start_character":6,"end_line":70,"end_character":8},"updated":"2017-01-31 23:44:15.000000000","message":"nit: \"as\", maybe? IDK, just seems to fit better to me.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Relinking might take some time; while there is no data copied or actually"},{"line_number":69,"context_line":"moved, the tool still needs to walk the whole file system and create new hard"},{"line_number":70,"context_line":"links if required."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"---------------------------"},{"line_number":73,"context_line":"2. Increase partition power"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_31e0f128","line":70,"range":{"start_line":70,"start_character":6,"end_line":70,"end_character":8},"in_reply_to":"3a461143_586beeb6","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"---------------------------"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Now that all existing data can be found using the new location, it\u0027s time to"},{"line_number":77,"context_line":"actually increase the partition power itself.::"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e increase_partition_power"},{"line_number":80,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_98b8f62b","line":77,"range":{"start_line":77,"start_character":38,"end_line":77,"end_character":47},"updated":"2017-01-31 23:44:15.000000000","message":"Again, we should drop the period.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":74,"context_line":"---------------------------"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Now that all existing data can be found using the new location, it\u0027s time to"},{"line_number":77,"context_line":"actually increase the partition power itself.::"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e increase_partition_power"},{"line_number":80,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_71e6f944","line":77,"range":{"start_line":77,"start_character":38,"end_line":77,"end_character":47},"in_reply_to":"3a461143_98b8f62b","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":".. note::"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    If you decide you don\u0027t want to increase the partition power, you should"},{"line_number":89,"context_line":"    cancel the operation. The object servers will create additional symlinks"},{"line_number":90,"context_line":"    for each modified or new object, and this requires more inodes. To abort"},{"line_number":91,"context_line":"    the partition power increase, execute the following commands, copy the"},{"line_number":92,"context_line":"    updated .ring.gz again to all nodes and continue with `3. Cleanup`_"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_781eea0c","line":89,"range":{"start_line":88,"start_character":66,"end_line":89,"end_character":24},"updated":"2017-01-31 23:44:15.000000000","message":"Maybe\n\n\u003e you should instead cancel the operation\n\n? Just to clarify that you won\u0027t be able to cancel it once you\u0027ve increased the partition power. Actually, we might want to be more explicit about that, anyway. Would it be worth having\n\n* 2a. Increase partition power\n* 2b. Cancel the operation\n\nsections or something, to try to make it clear that you can choose one or the other of these options, but not both?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":86,"context_line":".. note::"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    If you decide you don\u0027t want to increase the partition power, you should"},{"line_number":89,"context_line":"    cancel the operation. The object servers will create additional symlinks"},{"line_number":90,"context_line":"    for each modified or new object, and this requires more inodes. To abort"},{"line_number":91,"context_line":"    the partition power increase, execute the following commands, copy the"},{"line_number":92,"context_line":"    updated .ring.gz again to all nodes and continue with `3. Cleanup`_"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_9848f6cd","line":89,"range":{"start_line":89,"start_character":68,"end_line":89,"end_character":76},"updated":"2017-01-31 23:44:15.000000000","message":"Symlinks, or hard links?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":".. note::"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    If you decide you don\u0027t want to increase the partition power, you should"},{"line_number":89,"context_line":"    cancel the operation. The object servers will create additional symlinks"},{"line_number":90,"context_line":"    for each modified or new object, and this requires more inodes. To abort"},{"line_number":91,"context_line":"    the partition power increase, execute the following commands, copy the"},{"line_number":92,"context_line":"    updated .ring.gz again to all nodes and continue with `3. Cleanup`_"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_911445e9","line":89,"range":{"start_line":88,"start_character":66,"end_line":89,"end_character":24},"in_reply_to":"3a461143_781eea0c","updated":"2017-02-01 11:08:47.000000000","message":"I added one more sentence to the note that makes it more clear (hopefully)","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":86,"context_line":".. note::"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    If you decide you don\u0027t want to increase the partition power, you should"},{"line_number":89,"context_line":"    cancel the operation. The object servers will create additional symlinks"},{"line_number":90,"context_line":"    for each modified or new object, and this requires more inodes. To abort"},{"line_number":91,"context_line":"    the partition power increase, execute the following commands, copy the"},{"line_number":92,"context_line":"    updated .ring.gz again to all nodes and continue with `3. Cleanup`_"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_d1632daf","line":89,"range":{"start_line":89,"start_character":68,"end_line":89,"end_character":76},"in_reply_to":"3a461143_9848f6cd","updated":"2017-02-01 11:08:47.000000000","message":"Hard links of course - fixed!","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    The cleanup must be finished within your reclaim_age period (which is by"},{"line_number":111,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":112,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_f8301a58","line":112,"range":{"start_line":112,"start_character":42,"end_line":112,"end_character":69},"updated":"2017-01-31 23:44:15.000000000","message":"Can we be more explicit about what this means?\n\n* Will it persist (and be replicated) in the wrong partition, or will it eventually get moved to the right one? If it is moved, which process(es) are responsible? Auditor? Replicator / reconstructor?\n* Will it show up in container listings? (I\u0027m guessing no.)","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    The cleanup must be finished within your reclaim_age period (which is by"},{"line_number":111,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":112,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_31fb917a","line":112,"range":{"start_line":112,"start_character":42,"end_line":112,"end_character":69},"in_reply_to":"3a461143_f8301a58","updated":"2017-02-01 11:08:47.000000000","message":"Hmm, thinking how to describe this best for the docs.\n\nYes, it will persist and kept in the wrong location, but won\u0027t shop up in the container listing and is not accessible by the user.\n\nWhat happens here is this:\n1. Create an object\n2. Prepare part power increase\n3. Update object -\u003e written to two locations (the hardlinks)\n4. Delete object -\u003e removed .data and created .ts only in new location\n6. .ts is reclaimed before cleanup finished\n7. Cleanup runs - but the internal check to ensure the object is safely stored in the new location fails -\u003e cleanup skipped","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":116,"context_line":"and replicators should resume their job.::"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e finish_increase_partition_power"},{"line_number":119,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_5322efa3","line":116,"range":{"start_line":116,"start_character":36,"end_line":116,"end_character":42},"updated":"2017-01-31 23:44:15.000000000","message":"Another awkward period.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":116,"context_line":"and replicators should resume their job.::"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e finish_increase_partition_power"},{"line_number":119,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_d8f0be69","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":15},"updated":"2017-01-31 23:44:15.000000000","message":"I see a bunch of references to replicators; is it safe to assume that they all apply to reconstructors as well?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":116,"context_line":"and replicators should resume their job.::"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e finish_increase_partition_power"},{"line_number":119,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_b12dc1ff","line":116,"range":{"start_line":116,"start_character":36,"end_line":116,"end_character":42},"in_reply_to":"3a461143_5322efa3","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Afterwards it is required to update the rings one last"},{"line_number":115,"context_line":"time to inform servers that all steps to increase the partition power are done,"},{"line_number":116,"context_line":"and replicators should resume their job.::"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e finish_increase_partition_power"},{"line_number":119,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_d1308d58","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":15},"in_reply_to":"3a461143_d8f0be69","updated":"2017-02-01 11:08:47.000000000","message":"Yes, it is - and probe tests for EC should verify this.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":135,"context_line":"this, with the partition being the index and the value being the device id:"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"OLD: 0,    3,    7,    5,    2,    1,    ..."},{"line_number":138,"context_line":"NEW: 0, 0, 3, 3, 7, 7, 5, 5, 2, 2, 1, 1, ..."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"There is a helper method to compute the new path, and the following example"},{"line_number":141,"context_line":"shows the mapping between old and new location::"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_98763604","line":138,"updated":"2017-01-31 23:44:15.000000000","message":"I don\u0027t think this formatted the way you want it :-/","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":135,"context_line":"this, with the partition being the index and the value being the device id:"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"OLD: 0,    3,    7,    5,    2,    1,    ..."},{"line_number":138,"context_line":"NEW: 0, 0, 3, 3, 7, 7, 5, 5, 2, 2, 1, 1, ..."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"There is a helper method to compute the new path, and the following example"},{"line_number":141,"context_line":"shows the mapping between old and new location::"}],"source_content_type":"text/x-rst","patch_set":24,"id":"3a461143_31de31dd","line":138,"in_reply_to":"3a461143_98763604","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed uneven across disks."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"-----------------------------------"},{"line_number":46,"context_line":"1. Prepare partition power increase"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_22716fe1","line":43,"range":{"start_line":43,"start_character":46,"end_line":43,"end_character":52},"updated":"2017-02-01 20:38:23.000000000","message":"unevenly","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed uneven across disks."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"-----------------------------------"},{"line_number":46,"context_line":"1. Prepare partition power increase"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_b35e8810","line":43,"range":{"start_line":43,"start_character":46,"end_line":43,"end_character":52},"in_reply_to":"3a461143_22716fe1","updated":"2017-02-01 23:21:06.000000000","message":"Done","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":50,"context_line":"power increase. It will store a new variable ``next_part_power`` with the current"},{"line_number":51,"context_line":"partition power + 1. Object servers recognize this, and hard links to the new"},{"line_number":52,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":53,"context_line":"it possible to access newly written objects using the future partition power.::"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e prepare_increase_partition_power"},{"line_number":56,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_c248ab8d","line":53,"range":{"start_line":53,"start_character":76,"end_line":53,"end_character":77},"updated":"2017-02-01 20:38:23.000000000","message":"Awkward period.","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"power increase. It will store a new variable ``next_part_power`` with the current"},{"line_number":51,"context_line":"partition power + 1. Object servers recognize this, and hard links to the new"},{"line_number":52,"context_line":"location will be created (or deleted) on every PUT or DELETE.  This will make"},{"line_number":53,"context_line":"it possible to access newly written objects using the future partition power.::"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e prepare_increase_partition_power"},{"line_number":56,"context_line":"    swift-ring-builder \u003cbuilder-file\u003e write_ring"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_d39954d2","line":53,"range":{"start_line":53,"start_character":76,"end_line":53,"end_character":77},"in_reply_to":"3a461143_c248ab8d","updated":"2017-02-01 23:21:06.000000000","message":"Done","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Now you need to copy the updated .ring.gz to all nodes. Already existing data"},{"line_number":59,"context_line":"needs to be relinked too; therefore an operator has to run a relinker command"},{"line_number":60,"context_line":"on all object servers in this phase.::"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    swift-object-relinker relink"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_22488f87","line":60,"range":{"start_line":60,"start_character":35,"end_line":60,"end_character":36},"updated":"2017-02-01 20:38:23.000000000","message":"Awkward period.","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Now you need to copy the updated .ring.gz to all nodes. Already existing data"},{"line_number":59,"context_line":"needs to be relinked too; therefore an operator has to run a relinker command"},{"line_number":60,"context_line":"on all object servers in this phase.::"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    swift-object-relinker relink"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_f39e50b7","line":60,"range":{"start_line":60,"start_character":35,"end_line":60,"end_character":36},"in_reply_to":"3a461143_22488f87","updated":"2017-02-01 23:21:06.000000000","message":"Done","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    Start relinking after *all* the proxy server re-read the modified ring"},{"line_number":67,"context_line":"    files, which normally happens within 15 seconds after writing a modified"},{"line_number":68,"context_line":"    ring."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Relinking might take some time; while there is no data copied or actually"},{"line_number":71,"context_line":"moved, the tool still needs to walk the whole file system and create new hard"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_9d47e44a","line":68,"updated":"2017-02-01 20:38:23.000000000","message":"Still may be worth calling out that the updated ring must be on the object node that\u0027s relinking; otherwise the replicators/reconstructors may still start.","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    Start relinking after *all* the proxy server re-read the modified ring"},{"line_number":67,"context_line":"    files, which normally happens within 15 seconds after writing a modified"},{"line_number":68,"context_line":"    ring."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Relinking might take some time; while there is no data copied or actually"},{"line_number":71,"context_line":"moved, the tool still needs to walk the whole file system and create new hard"}],"source_content_type":"text/x-rst","patch_set":26,"id":"3a461143_939eec61","line":68,"in_reply_to":"3a461143_9d47e44a","updated":"2017-02-01 23:21:06.000000000","message":"Done","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Due to the new inodes more memory is needed to cache them, and your"},{"line_number":38,"context_line":"  object servers should have plenty of available memory to avoid running out of"},{"line_number":39,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed unevenly across disks."}],"source_content_type":"text/x-rst","patch_set":30,"id":"3a461143_d3c92d5c","line":40,"updated":"2017-02-02 19:02:09.000000000","message":"If we\u0027re not going to have an UpgradeImpact, it may be worth noting here that all proxy and object nodes must be running 2.13.0 or later.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":37,"context_line":"* Due to the new inodes more memory is needed to cache them, and your"},{"line_number":38,"context_line":"  object servers should have plenty of available memory to avoid running out of"},{"line_number":39,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed unevenly across disks."}],"source_content_type":"text/x-rst","patch_set":30,"id":"1a430d35_79908a96","line":40,"in_reply_to":"3a461143_d3c92d5c","updated":"2017-02-03 09:46:11.000000000","message":"Done","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed unevenly across disks."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"-----------------------------------"}],"source_content_type":"text/x-rst","patch_set":30,"id":"3a461143_d394cd45","line":42,"range":{"start_line":42,"start_character":9,"end_line":42,"end_character":11},"updated":"2017-02-02 19:02:09.000000000","message":"Doubled-up periods.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":39,"context_line":"  inode cache. Setting ``vfs_cache_pressure`` to 1 might help with that."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":42,"context_line":"needed, i..e. if the number of partitions per disk is extremely low (way less"},{"line_number":43,"context_line":"than 10 per disk) and the data is distributed unevenly across disks."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"-----------------------------------"}],"source_content_type":"text/x-rst","patch_set":30,"id":"1a430d35_d9edfe26","line":42,"range":{"start_line":42,"start_character":9,"end_line":42,"end_character":11},"in_reply_to":"3a461143_d394cd45","updated":"2017-02-03 09:46:11.000000000","message":"Done","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7143f788b52f92a18f25534795bff0f14d7c73f7","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To enable a partition power change without interrupting user access, object"},{"line_number":15,"context_line":"servers need to be aware of it in advance. Therefore a partition power change"},{"line_number":16,"context_line":"needs to be done in multiple steps."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"-------"},{"line_number":19,"context_line":"Caveats"}],"source_content_type":"text/x-rst","patch_set":31,"id":"1a430d35_68fade44","line":16,"updated":"2017-02-07 21:36:45.000000000","message":"Thiago\u0027s right; somewhere in this intro material we should be very obvious that we (currently?) *only* support increasing the part_power for object rings; trying to increase the part_power for account and container rings *will* result in unavailability, maybe even data loss.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"831c914f5379fcd739a66a0f5eee4a00e688a74b","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To enable a partition power change without interrupting user access, object"},{"line_number":15,"context_line":"servers need to be aware of it in advance. Therefore a partition power change"},{"line_number":16,"context_line":"needs to be done in multiple steps."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"-------"},{"line_number":19,"context_line":"Caveats"}],"source_content_type":"text/x-rst","patch_set":31,"id":"1a430d35_8504484a","line":16,"in_reply_to":"1a430d35_68fade44","updated":"2017-02-08 07:28:43.000000000","message":"Done","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"a8d885cd4f3d1051f15ec85e27d5d1e2a5fc1a2d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"* Due to the fact that each object will now be hard linked from two locations,"},{"line_number":33,"context_line":"  many more inodes will be used - expect around twice the amount. You need to"},{"line_number":34,"context_line":"  check the free inode count *before* increasing the partition power."},{"line_number":35,"context_line":"* Also, object auditors might read each object twice during before cleanup"},{"line_number":36,"context_line":"  removed the second hard link."},{"line_number":37,"context_line":"* Due to the new inodes more memory is needed to cache them, and your"},{"line_number":38,"context_line":"  object servers should have plenty of available memory to avoid running out of"}],"source_content_type":"text/x-rst","patch_set":31,"id":"1a430d35_2cf8f87a","line":35,"range":{"start_line":35,"start_character":53,"end_line":35,"end_character":66},"updated":"2017-02-07 19:34:29.000000000","message":"re-word?","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":"Modifying ring partition power"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The ring partition power determines the on-disk location of data files and is"},{"line_number":6,"context_line":"selected when creating a new ring. In normal operation, it is a fixed value."}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_c8362002","line":3,"updated":"2017-02-09 16:06:41.000000000","message":"This doc is excellent. thank you.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The ring partition power determines the on-disk location of data files and is"},{"line_number":6,"context_line":"selected when creating a new ring. In normal operation, it is a fixed value."},{"line_number":7,"context_line":"This is because a different partition power result in a different on-disk"},{"line_number":8,"context_line":"location for all data files."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"However, increasing the partition power by 1 can be done by choosing locations"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_759ee563","line":7,"updated":"2017-02-09 16:06:41.000000000","message":"nit: s/result/results/","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"  Replicators are not aware of hard-links, and would simply copy the content;"},{"line_number":38,"context_line":"  this would result in heavy data movement and the worst case would be that all"},{"line_number":39,"context_line":"  data is stored twice."},{"line_number":40,"context_line":"* Due to the fact that each object will now be hard linked from two locations,"},{"line_number":41,"context_line":"  many more inodes will be used - expect around twice the amount. You need to"},{"line_number":42,"context_line":"  check the free inode count *before* increasing the partition power."},{"line_number":43,"context_line":"* Also, object auditors might read each object twice before cleanup removes the"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_55f6498f","line":40,"updated":"2017-02-09 16:06:41.000000000","message":"nit: s/be hard linked/be temporarily hard linked/","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"* All nodes in the cluster *must* run at least Swift version 2.13.0 or later."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Due to these caveats you should only increase the partition power if really"},{"line_number":51,"context_line":"needed, i.e. if the number of partitions per disk is extremely low (way less"},{"line_number":52,"context_line":"than 10 per disk) and the data is distributed unevenly across disks."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"-----------------------------------"},{"line_number":55,"context_line":"1. Prepare partition power increase"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_751fc5b6","line":52,"range":{"start_line":51,"start_character":67,"end_line":52,"end_character":7},"updated":"2017-02-09 16:06:41.000000000","message":"nit: I realise we cannot be precise, but \"way less than\" is not at all scientific :) do we mean \u003c5, or simply average across cluster \u003c10?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":".. note::"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Start relinking after *all* the proxy server re-read the modified ring"},{"line_number":76,"context_line":"    files, which normally happens within 15 seconds after writing a modified"},{"line_number":77,"context_line":"    ring. Also, make sure the modified rings are pushed to all nodes running"},{"line_number":78,"context_line":"    object-replicators and reconstructors - they have to skip partitions during"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_b57bedf3","line":75,"updated":"2017-02-09 16:06:41.000000000","message":"nit: s/server/servers/","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Start relinking after *all* the proxy server re-read the modified ring"},{"line_number":76,"context_line":"    files, which normally happens within 15 seconds after writing a modified"},{"line_number":77,"context_line":"    ring. Also, make sure the modified rings are pushed to all nodes running"},{"line_number":78,"context_line":"    object-replicators and reconstructors - they have to skip partitions during"},{"line_number":79,"context_line":"    relinking."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_2bd15e23","line":77,"range":{"start_line":77,"start_character":59,"end_line":77,"end_character":68},"updated":"2017-02-09 16:06:41.000000000","message":"I think we need to include container-reconciler nodes too - reconciler uses internal client so I *think* it\u0027s ok to keep running but it\u0027s proxy would need to have the updated ring file.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Start relinking after *all* the proxy server re-read the modified ring"},{"line_number":76,"context_line":"    files, which normally happens within 15 seconds after writing a modified"},{"line_number":77,"context_line":"    ring. Also, make sure the modified rings are pushed to all nodes running"},{"line_number":78,"context_line":"    object-replicators and reconstructors - they have to skip partitions during"},{"line_number":79,"context_line":"    relinking."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Relinking might take some time; while there is no data copied or actually"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_35053d45","line":78,"range":{"start_line":77,"start_character":69,"end_line":78,"end_character":41},"updated":"2017-02-09 16:06:41.000000000","message":"nit: as per proxy, do these need to be restarted or given time to load the new ring file?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    object-replicators and reconstructors - they have to skip partitions during"},{"line_number":79,"context_line":"    relinking."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Relinking might take some time; while there is no data copied or actually"},{"line_number":82,"context_line":"moved, the tool still needs to walk the whole file system and create new hard"},{"line_number":83,"context_line":"links as required."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_75a98523","line":81,"range":{"start_line":81,"start_character":16,"end_line":81,"end_character":30},"updated":"2017-02-09 16:06:41.000000000","message":"how does an op know when relinking is complete?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    It is not possible to revert this operation once done. If you decide you"},{"line_number":102,"context_line":"    don\u0027t want to increase the partition power, you should instead cancel the"},{"line_number":103,"context_line":"    operation. Note that you can do this only before increasing it. The object"},{"line_number":104,"context_line":"    servers will create additional hard links for each modified or new object,"},{"line_number":105,"context_line":"    and this requires more inodes. To abort the partition power increase,"},{"line_number":106,"context_line":"    execute the following commands, copy the updated .ring.gz again to all"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_087e6869","line":103,"range":{"start_line":103,"start_character":4,"end_line":103,"end_character":13},"updated":"2017-02-09 16:06:41.000000000","message":"nit: I think that \"operation\" is overloaded - it\u0027s used to describe this step and also the whole process of steps.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    It is not possible to revert this operation once done. If you decide you"},{"line_number":102,"context_line":"    don\u0027t want to increase the partition power, you should instead cancel the"},{"line_number":103,"context_line":"    operation. Note that you can do this only before increasing it. The object"},{"line_number":104,"context_line":"    servers will create additional hard links for each modified or new object,"},{"line_number":105,"context_line":"    and this requires more inodes. To abort the partition power increase,"},{"line_number":106,"context_line":"    execute the following commands, copy the updated .ring.gz again to all"},{"line_number":107,"context_line":"    nodes and continue with `3. Cleanup`_ afterwards::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_a828f486","line":104,"range":{"start_line":104,"start_character":24,"end_line":104,"end_character":45},"updated":"2017-02-09 16:06:41.000000000","message":"nit: so these are additional to the ones created in the prepare phase?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":".. note::"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    The cleanup must be finished within your reclaim_age period (which is by"},{"line_number":125,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":126,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_28d404ea","line":124,"range":{"start_line":124,"start_character":45,"end_line":124,"end_character":57},"updated":"2017-02-09 16:06:41.000000000","message":"nit: it\u0027s worth clarifying that this the object-server reclaim_age - there is also a reclaim_age option for the expirer","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":122,"context_line":".. note::"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    The cleanup must be finished within your reclaim_age period (which is by"},{"line_number":125,"context_line":"    default 4 weeks). Otherwise objects that have been overwritten between step"},{"line_number":126,"context_line":"    #1 and step #2 and deleted afterwards can\u0027t be cleaned up anymore."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"Afterwards it is required to update the rings one last"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_08b2e8e4","line":125,"range":{"start_line":125,"start_character":12,"end_line":125,"end_character":19},"updated":"2017-02-09 16:06:41.000000000","message":"default is 1 week \n\nhttps://github.com/openstack/swift/blob/69f7be99a6e090a251412a6925e0f29946818c6a/etc/object-server.conf-sample#L76-L76","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"this, with the partition being the index and the value being the device id::"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    OLD: 0,    3,    7,    5,    2,    1,    ..."},{"line_number":152,"context_line":"    NEW: 0, 0, 3, 3, 7, 7, 5, 5, 2, 2, 1, 1, ..."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"There is a helper method to compute the new path, and the following example"},{"line_number":155,"context_line":"shows the mapping between old and new location::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_287a44bd","line":152,"updated":"2017-02-09 16:06:41.000000000","message":"nit: I found this hard to understand - a table with the partition number explicitly mapped to devices might be easier.\n\n     old        new\n  part  dev  part  dev\n  ----  ---  ----  ---\n   0     0    0     0\n              1     0\n   1     3    2     3\n              3     3\n   2     7    4     7\n              5     7\n   3     5    6     5\n              7     5\n   4     2    8     2\n              9     2\n   5     1   10     1\n             11     1","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    \u003e\u003e\u003e replace_partition_in_path(old, 14)"},{"line_number":160,"context_line":"    \u0027objects/16003/a38/fa0fcec07328d068e24ccbf2a62f2a38/1467658208.57179.data\u0027"},{"line_number":161,"context_line":"    \u003e\u003e\u003e replace_partition_in_path(old, 15)"},{"line_number":162,"context_line":"    \u0027objects/32007/a38/fa0fcec07328d068e24ccbf2a62f2a38/1467658208.57179.data\u0027"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Using the original partition power (14) it returned the same path; however"},{"line_number":165,"context_line":"after an increase to 15 it returns the new path, and the new partition is 2*X+1"}],"source_content_type":"text/x-rst","patch_set":32,"id":"1a430d35_485cf04a","line":162,"updated":"2017-02-09 16:06:41.000000000","message":"nice","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"31702fe0294819dc93fac29e3c7bf0f635113781","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":".. note::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    It is not possible to revert this operation once done. If you decide you"},{"line_number":102,"context_line":"    don\u0027t want to increase the partition power, you should instead cancel the"},{"line_number":103,"context_line":"    increase. Note that you can do this only before increasing it. The object"},{"line_number":104,"context_line":"    servers will create additional hard links for each modified or new object,"},{"line_number":105,"context_line":"    and this requires more inodes. To abort the partition power increase,"},{"line_number":106,"context_line":"    execute the following commands, copy the updated .ring.gz again to all"}],"source_content_type":"text/x-rst","patch_set":34,"id":"fa31d9ce_6e018e39","line":103,"range":{"start_line":101,"start_character":59,"end_line":103,"end_character":65},"updated":"2017-02-22 18:19:15.000000000","message":"maybe just a nit, but this now reads funny...basically it reads like this:\n\n\"if you dont want to increase, cancel the increase, but before increasing it\"","commit_id":"7f99808fe389f350c49ccd3d6bcf53ee1713e9b1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"53a3a3c7637bf9a0776ced4aad4cfb5ee81d8d63","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":"Modifying ring partition power"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"The ring partition power determines the on-disk location of data files and is"}],"source_content_type":"text/x-rst","patch_set":47,"id":"df140735_1319da20","line":2,"updated":"2017-06-03 00:42:57.000000000","message":"nit: This makes the link off the main docs page sentence case, unlike the other links. See http://docs-draft.openstack.org/97/337297/47/check/gate-swift-docs-ubuntu-xenial/da3b41e//doc/build/html/#overview-and-concepts","commit_id":"872e66b36485b8cc765e2373d7a2b900f9616532"}],"swift/cli/relinker.py":[{"author":{"_account_id":13471,"name":"Brian Nelson","email":"brnelson@us.ibm.com","username":"brnelson"},"change_message_id":"4c2d150b374e35e7ff67bbadc1b7b16f33d2cda6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                    os.makedirs(newdirname)"},{"line_number":43,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":44,"context_line":"                    continue"},{"line_number":45,"context_line":"                if not os.path.exists(newfname):"},{"line_number":46,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":47,"context_line":"                    os.link(fname, newfname)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_18848909","line":45,"range":{"start_line":45,"start_character":22,"end_line":45,"end_character":48},"updated":"2016-07-14 21:47:44.000000000","message":"A check might need to be made that the newfname and fname are actually linked together.  It could be that newfname exists, but may represent a different inode than fname.","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"4c8084d3b6ba034a03823dca092fc87ee8b8d021","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                    os.makedirs(newdirname)"},{"line_number":43,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":44,"context_line":"                    continue"},{"line_number":45,"context_line":"                if not os.path.exists(newfname):"},{"line_number":46,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":47,"context_line":"                    os.link(fname, newfname)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fad55976_b147301c","line":45,"in_reply_to":"1aa78d24_18848909","updated":"2016-07-16 18:58:15.000000000","message":"If newfname already exists they are linked either in BaseDiskFileWriter or here, so they must be the same? I think there is no possibility in Swift itself that newfname exists and links to a different inode - but maybe I\u0027m wrong?","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    for policy in POLICIES:"},{"line_number":59,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":60,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":61,"context_line":"        part_power \u003d 32 - policy.object_ring._part_shift"},{"line_number":62,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":63,"context_line":"        if next_part_power and next_part_power \u003d\u003d part_power:"},{"line_number":64,"context_line":"            locations \u003d audit_location_generator("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_9b6cbcd1","line":61,"updated":"2016-08-17 06:30:30.000000000","message":"I\u0027m not sure we should be reaching into a private variable, we should probably just make the part_shift a property","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    for policy in POLICIES:"},{"line_number":59,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":60,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":61,"context_line":"        part_power \u003d 32 - policy.object_ring._part_shift"},{"line_number":62,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":63,"context_line":"        if next_part_power and next_part_power \u003d\u003d part_power:"},{"line_number":64,"context_line":"            locations \u003d audit_location_generator("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_45cfcf28","line":61,"in_reply_to":"3ac371cc_9b6cbcd1","updated":"2016-08-17 20:40:43.000000000","message":"Done","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                        print(\"Removed %s\" % fname)"},{"line_number":85,"context_line":"                except DiskFileNotExist:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"                except OSError:"},{"line_number":88,"context_line":"                    continue"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_a407141b","line":87,"updated":"2016-10-24 01:45:35.000000000","message":"what happens to the file here?","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f829bd90fe130c24c7e53e7e3ba7edde0cc612cf","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"},{"line_number":44,"context_line":"                if not os.path.isdir(newdirname):"},{"line_number":45,"context_line":"                    print(\"Creating directory %s\" % newdirname)"},{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_5c72df7d","line":46,"updated":"2017-01-13 06:31:59.000000000","message":"What happens is a file (not directory) with exists at newdirname? This will still return false and then throw a file exists while trying to makedirs.\n\nI guess this is a script being run and monitored by a user so it isn\u0027t too big a deal, but something to think about if we want want to automate it some more.","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3711156b9352932d951908c44ea1d28cf7478815","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"},{"line_number":44,"context_line":"                if not os.path.isdir(newdirname):"},{"line_number":45,"context_line":"                    print(\"Creating directory %s\" % newdirname)"},{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_6b10ab4f","line":46,"in_reply_to":"7a3c09a3_5c72df7d","updated":"2017-01-13 10:06:29.000000000","message":"Good question. So I think if a file exists with the same name there is somewhere an error - it shouldn\u0027t be there? However, I don\u0027t want this tool to clean up this - maybe it\u0027s good enough to raise that exception and let the operator fix this manually?\nI never saw files with the same name, but if there is one this tool should fail and stop. And then we need to find out if the file is there because some Swift process put it there, or because of a different reason. In the former case we need a bugfix then.","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f829bd90fe130c24c7e53e7e3ba7edde0cc612cf","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                try:"},{"line_number":82,"context_line":"                    with df.open():"},{"line_number":83,"context_line":"                        os.remove(fname)"},{"line_number":84,"context_line":"                        print(\"Removed %s\" % fname)"},{"line_number":85,"context_line":"                except DiskFileNotExist:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"                except OSError:"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_9cdb671b","line":84,"updated":"2017-01-13 06:31:59.000000000","message":"We are only removing (unlinking) the file.. it\u0027s getting late here, so just want to make a note somewhere to double check we do clean up the left over now empty folders?","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3711156b9352932d951908c44ea1d28cf7478815","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                try:"},{"line_number":82,"context_line":"                    with df.open():"},{"line_number":83,"context_line":"                        os.remove(fname)"},{"line_number":84,"context_line":"                        print(\"Removed %s\" % fname)"},{"line_number":85,"context_line":"                except DiskFileNotExist:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"                except OSError:"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_11dd9842","line":84,"in_reply_to":"7a3c09a3_9cdb671b","updated":"2017-01-13 10:06:29.000000000","message":"It gets cleaned up later once the replicator/updater run - just checked this on my VM, directory gone now.","commit_id":"d5cf7005695bb944662671f070b18b0b3cb2f82f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                mount_check\u003dmount_check)"},{"line_number":38,"context_line":"            for fname, _, _ in locations:"},{"line_number":39,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":40,"context_line":"                    str(fname), next_part_power)"},{"line_number":41,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":42,"context_line":"                    continue"},{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_14aa3c19","line":40,"range":{"start_line":40,"start_character":20,"end_line":40,"end_character":23},"updated":"2017-01-31 23:44:15.000000000","message":"Is that necessary? Isn\u0027t fname already a string?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                mount_check\u003dmount_check)"},{"line_number":38,"context_line":"            for fname, _, _ in locations:"},{"line_number":39,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":40,"context_line":"                    str(fname), next_part_power)"},{"line_number":41,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":42,"context_line":"                    continue"},{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_51873db4","line":40,"range":{"start_line":40,"start_character":20,"end_line":40,"end_character":23},"in_reply_to":"3a461143_14aa3c19","updated":"2017-02-01 11:08:47.000000000","message":"No, it\u0027s an AuditLocation object.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"c07db72840846f24be2985d6bf683de4c4a385cc","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                mount_check\u003dmount_check)"},{"line_number":38,"context_line":"            for fname, _, _ in locations:"},{"line_number":39,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":40,"context_line":"                    str(fname), next_part_power)"},{"line_number":41,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":42,"context_line":"                    continue"},{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_a8f536cc","line":40,"range":{"start_line":40,"start_character":20,"end_line":40,"end_character":23},"in_reply_to":"3a461143_1d805446","updated":"2017-02-01 23:20:23.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                mount_check\u003dmount_check)"},{"line_number":38,"context_line":"            for fname, _, _ in locations:"},{"line_number":39,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":40,"context_line":"                    str(fname), next_part_power)"},{"line_number":41,"context_line":"                if fname \u003d\u003d newfname:"},{"line_number":42,"context_line":"                    continue"},{"line_number":43,"context_line":"                newdirname \u003d os.path.dirname(newfname)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_1d805446","line":40,"range":{"start_line":40,"start_character":20,"end_line":40,"end_character":23},"in_reply_to":"3a461143_51873db4","updated":"2017-02-01 20:37:52.000000000","message":"Worth using a variable name that doesn\u0027t imply it\u0027s just a name?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                if not os.path.isdir(newdirname):"},{"line_number":45,"context_line":"                    print(\"Creating directory %s\" % newdirname)"},{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_7469c0f8","line":47,"updated":"2017-01-31 23:44:15.000000000","message":"What about the else case here? Should we have some assertion that they reference the same inode, and warn if they don\u0027t?\n\nSeparately, should we do a check like we have in cleanup, and skip linking if we have a newer df in the destination directory?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                if not os.path.isdir(newdirname):"},{"line_number":45,"context_line":"                    print(\"Creating directory %s\" % newdirname)"},{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_dd924c4b","line":47,"in_reply_to":"3a461143_113db5dc","updated":"2017-02-01 20:37:52.000000000","message":"\u003e Which else case do you mean?\n\nIf newfname exists. If there *is* something at that path, we totally *expect* that it should be a hardlink to the same inode to which fname refers. But we don\u0027t do any sort of validation of that.\n\n\u003e There should never be a newer diskfile in the destination directory?\n\nSure there can. Relinking takes some (non-trivial) amount of time and proxies are still shoveling data to object servers -- it\u0027s bound to happen sometimes. There may be a race with the cleanup in the object server, but I\u0027m fairly certain we could find ourselves in this situation.\n\n\u003e If it is, it won\u0027t be overwritten because of the timestamps, and the older one will be removed by the normal processes.\n\nSure. I\u0027m fairly certain it should all work; was just thinking about whether it\u0027d help at all to skip the unnecessary relink. Probably better to be on the safe side here.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                if not os.path.isdir(newdirname):"},{"line_number":45,"context_line":"                    print(\"Creating directory %s\" % newdirname)"},{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_113db5dc","line":47,"in_reply_to":"3a461143_7469c0f8","updated":"2017-02-01 11:08:47.000000000","message":"Which else case do you mean?\n\nThere should never be a newer diskfile in the destination directory?\nIf it is, it won\u0027t be overwritten because of the timestamps, and the older one will be removed by the normal processes.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def cleanup(swift_dir\u003d\u0027/etc/swift\u0027,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_f3ebdb10","line":49,"updated":"2017-01-31 23:44:15.000000000","message":"Lines 41-49 seem an awful lot like diskfile.relink_paths; should we use that instead?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                    os.makedirs(newdirname)"},{"line_number":47,"context_line":"                if not os.path.exists(newfname):"},{"line_number":48,"context_line":"                    print(\"Linking %s to %s\" % (fname, newfname))"},{"line_number":49,"context_line":"                    os.link(fname, newfname)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def cleanup(swift_dir\u003d\u0027/etc/swift\u0027,"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_b4012f07","line":49,"in_reply_to":"3a461143_f3ebdb10","updated":"2017-02-01 11:08:47.000000000","message":"Yes, good idea - done.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                except DiskFileNotExist:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"                except OSError:"},{"line_number":88,"context_line":"                    continue"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def main(args):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_777aa289","line":88,"updated":"2017-01-31 23:44:15.000000000","message":"nit: Could simplify it to just\n\n except (DiskFileNotExist, OSError):\n     pass","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                except DiskFileNotExist:"},{"line_number":86,"context_line":"                    pass"},{"line_number":87,"context_line":"                except OSError:"},{"line_number":88,"context_line":"                    continue"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def main(args):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_5411eb50","line":88,"in_reply_to":"3a461143_777aa289","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                try:"},{"line_number":78,"context_line":"                    with df.open():"},{"line_number":79,"context_line":"                        os.remove(fname)"},{"line_number":80,"context_line":"                        print(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                except (DiskFileNotExist, OSError):"},{"line_number":82,"context_line":"                    pass"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_fd338860","line":80,"range":{"start_line":80,"start_character":24,"end_line":80,"end_character":29},"updated":"2017-02-01 20:38:23.000000000","message":"Seems awkward to just have the one print now; worth just doing logging.debug()?","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                try:"},{"line_number":78,"context_line":"                    with df.open():"},{"line_number":79,"context_line":"                        os.remove(fname)"},{"line_number":80,"context_line":"                        print(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                except (DiskFileNotExist, OSError):"},{"line_number":82,"context_line":"                    pass"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_7378a02c","line":80,"range":{"start_line":80,"start_character":24,"end_line":80,"end_character":29},"in_reply_to":"3a461143_fd338860","updated":"2017-02-01 23:21:06.000000000","message":"Does logging.info() work for you too?","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            for audit_location, _, _ in locations:"},{"line_number":43,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":44,"context_line":"                    str(audit_location), next_part_power)"},{"line_number":45,"context_line":"                diskfile.relink_paths(audit_location, newfname)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def cleanup(swift_dir\u003d\u0027/etc/swift\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_9e47d01c","line":45,"range":{"start_line":45,"start_character":38,"end_line":45,"end_character":52},"updated":"2017-02-02 01:37:52.000000000","message":"Is this cool with an audit location instead of a string?\n\nI guess so; probe tests pass (after fixing up the call to _find_objs_ondisk).\n\n---\n\nActually, I\u0027m not sure this *is* an AuditLocation. Applying\n\ndiff --git a/swift/cli/relinker.py b/swift/cli/relinker.py\nindex 6ea8cee..2ad0aa5 100644\n--- a/swift/cli/relinker.py\n+++ b/swift/cli/relinker.py\n@@ -40,6 +40,8 @@ def relink(swift_dir\u003d\u0027/etc/swift\u0027,\n                 diskfile.get_data_dir(policy),\n                 mount_check\u003dmount_check)\n             for audit_location, _, _ in locations:\n+                logging.info(type(audit_location))\n+                assert(type(audit_location) \u003d\u003d str)\n                 newfname \u003d replace_partition_in_path(\n                     str(audit_location), next_part_power)\n                 diskfile.relink_paths(audit_location, newfname)\n\neverything still works, while checking for an int (clearly wrong) fails as expected.\n\nHow certain are we that we want audit_location_generator and not object_audit_location_generator?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            for audit_location, _, _ in locations:"},{"line_number":43,"context_line":"                newfname \u003d replace_partition_in_path("},{"line_number":44,"context_line":"                    str(audit_location), next_part_power)"},{"line_number":45,"context_line":"                diskfile.relink_paths(audit_location, newfname)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def cleanup(swift_dir\u003d\u0027/etc/swift\u0027,"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_a5f710f4","line":45,"range":{"start_line":45,"start_character":38,"end_line":45,"end_character":52},"in_reply_to":"3a461143_9e47d01c","updated":"2017-02-02 13:16:41.000000000","message":"The object_audit_location_generator calls update_auditor_status at the end, that\u0027s basically the reason why I didn\u0027t choose that (IIRC).","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                try:"},{"line_number":78,"context_line":"                    with df.open():"},{"line_number":79,"context_line":"                        os.remove(fname)"},{"line_number":80,"context_line":"                        logging.info(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                except (DiskFileNotExist, OSError):"},{"line_number":82,"context_line":"                    pass"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_3e409c07","line":80,"updated":"2017-02-02 01:37:52.000000000","message":"Yeah, info\u0027s fine. I was just thinking debug to match the behavior in relink_paths.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7143f788b52f92a18f25534795bff0f14d7c73f7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":35,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":36,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":37,"context_line":"        if next_part_power:"},{"line_number":38,"context_line":"            locations \u003d audit_location_generator("},{"line_number":39,"context_line":"                devices,"},{"line_number":40,"context_line":"                diskfile.get_data_dir(policy),"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_68757ef8","line":37,"updated":"2017-02-07 21:36:45.000000000","message":"We should emit some kind of warning if we never encounter a policy with next_part_power set. That surely means the system is in some state the operator wasn\u0027t expecting -- for example, because they started increasing the part power for an account or container ring.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"831c914f5379fcd739a66a0f5eee4a00e688a74b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":35,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":36,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":37,"context_line":"        if next_part_power:"},{"line_number":38,"context_line":"            locations \u003d audit_location_generator("},{"line_number":39,"context_line":"                devices,"},{"line_number":40,"context_line":"                diskfile.get_data_dir(policy),"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_25c394ee","line":37,"in_reply_to":"1a430d35_68757ef8","updated":"2017-02-08 07:28:43.000000000","message":"Done; the warning is raised if no actual action was executed (there might be something fishy even if a policy is to be increased, but no object was linked?)","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7143f788b52f92a18f25534795bff0f14d7c73f7","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":56,"context_line":"        part_power \u003d policy.object_ring.part_power"},{"line_number":57,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":58,"context_line":"        if next_part_power and next_part_power \u003d\u003d part_power:"},{"line_number":59,"context_line":"            locations \u003d audit_location_generator("},{"line_number":60,"context_line":"                devices,"},{"line_number":61,"context_line":"                diskfile.get_data_dir(policy),"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_085dda78","line":58,"updated":"2017-02-07 21:36:45.000000000","message":"Ditto here, I think? But the potential for harm seems considerably lower. Or rather, the harm that may be done (thinking again about A/C rings) is now irreversible.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"           skip_mount_check\u003dFalse):"},{"line_number":29,"context_line":"    mount_check \u003d not skip_mount_check"},{"line_number":30,"context_line":"    run \u003d False"},{"line_number":31,"context_line":"    for policy in POLICIES:"},{"line_number":32,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":33,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":34,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_9a80d14b","line":31,"updated":"2017-02-09 16:06:41.000000000","message":"follow-up: would be useful to pass policy on the command line so that we can concurrently have one policy being increased while another is cleaning up.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    mount_check \u003d not skip_mount_check"},{"line_number":30,"context_line":"    run \u003d False"},{"line_number":31,"context_line":"    for policy in POLICIES:"},{"line_number":32,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":33,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":34,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":35,"context_line":"        if next_part_power:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_3450d65e","line":32,"updated":"2017-02-09 16:06:41.000000000","message":"nit: perhaps we should have a reload\u003dFalse optional arg on policy.load_ring()...in fact, the method name seems to be misleading.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        policy.object_ring \u003d None  # Ensure it will be reloaded"},{"line_number":33,"context_line":"        policy.load_ring(swift_dir)"},{"line_number":34,"context_line":"        next_part_power \u003d policy.object_ring.next_part_power"},{"line_number":35,"context_line":"        if next_part_power:"},{"line_number":36,"context_line":"            locations \u003d audit_location_generator("},{"line_number":37,"context_line":"                devices,"},{"line_number":38,"context_line":"                diskfile.get_data_dir(policy),"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_c0850c5a","line":35,"updated":"2017-02-09 18:39:26.000000000","message":"Worth adding\n\n ... and next_part_power !\u003d policy.object_ring.part_power:\n\n? I think Alistair\u0027s desire to be able to run relink/cleanup concurrently is already addressed either way; attempting to relink on a policy that prepared, relinked, and increased should still be a no-op when we realize that fname \u003d\u003d newfname. If we can avoid walking the whole directory, though, so much the better.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                mount_check\u003dmount_check)"},{"line_number":40,"context_line":"            for fname, _, _ in locations:"},{"line_number":41,"context_line":"                newfname \u003d replace_partition_in_path(fname, next_part_power)"},{"line_number":42,"context_line":"                diskfile.relink_paths(fname, newfname)"},{"line_number":43,"context_line":"                run \u003d True"},{"line_number":44,"context_line":"    if not run:"},{"line_number":45,"context_line":"        logging.warning(\"No policy found to increase the partition power.\")"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_348536ad","line":42,"updated":"2017-02-09 16:06:41.000000000","message":"should we not log at least a warning if relinking failed? how do we know it is safe to move from prepare to increase phase?\n\nI wonder if relink_paths could return a boolean to indicate whether the relink was *required* (or had already been done) and raise exception if it fails, then we could gather stats for failed and required, and when relinker completes with both failed\u003d0 and required\u003d0 then we know relinking has been completed.\n\nHmmm, I guess we\u0027d need to have the relinking detect when a newer diskfile is in the new target path and treat that case as \"not required\".","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"                mount_check\u003dmount_check)"},{"line_number":40,"context_line":"            for fname, _, _ in locations:"},{"line_number":41,"context_line":"                newfname \u003d replace_partition_in_path(fname, next_part_power)"},{"line_number":42,"context_line":"                diskfile.relink_paths(fname, newfname)"},{"line_number":43,"context_line":"                run \u003d True"},{"line_number":44,"context_line":"    if not run:"},{"line_number":45,"context_line":"        logging.warning(\"No policy found to increase the partition power.\")"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_0013940e","line":42,"in_reply_to":"1a430d35_348536ad","updated":"2017-02-09 18:39:26.000000000","message":"\u003e we\u0027d need to have the relinking detect when a newer diskfile is in the new target path\n\nYeah, that\n\n if target_path !\u003d new_target_path:\n\nat the start of diskfile.relink_paths, right?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ec8cc142fb5e4b743406a9a08fa98d2c3a927c8d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                diskfile_mgr \u003d diskfile_router[policy]"},{"line_number":76,"context_line":"                df \u003d diskfile_mgr.get_diskfile_from_audit_location(loc)"},{"line_number":77,"context_line":"                try:"},{"line_number":78,"context_line":"                    with df.open():"},{"line_number":79,"context_line":"                        os.remove(fname)"},{"line_number":80,"context_line":"                        logging.info(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                        run \u003d True"}],"source_content_type":"text/x-python","patch_set":32,"id":"fa31d9ce_b016a0a5","line":78,"updated":"2017-02-10 07:00:57.000000000","message":"Oh, fun! Some of my bad testing data resulted in\n\nTraceback (most recent call last):\n  File \"/usr/local/bin/swift-object-relinker\", line 6, in \u003cmodule\u003e\n    exec(compile(open(__file__).read(), __file__, \u0027exec\u0027))\n  File \"/vagrant/swift/bin/swift-object-relinker\", line 45, in \u003cmodule\u003e\n    sys.exit(main(args))\n  File \"/vagrant/swift/swift/cli/relinker.py\", line 97, in main\n    return cleanup(args.swift_dir, args.devices, args.skip_mount_check)\n  File \"/vagrant/swift/swift/cli/relinker.py\", line 82, in cleanup\n    with df.open():\n  File \"/vagrant/swift/swift/obj/diskfile.py\", line 2143, in open\n    self._fp \u003d self._construct_from_data_file(**file_info)\n  File \"/vagrant/swift/swift/obj/diskfile.py\", line 2365, in _construct_from_data_file\n    self._datafile_metadata \u003d self._failsafe_read_metadata(fp, data_file)\n  File \"/vagrant/swift/swift/obj/diskfile.py\", line 2328, in _failsafe_read_metadata\n    \"Exception reading metadata: %s\" % err)\nswift.common.exceptions.DiskFileQuarantined: Exception reading metadata:\n\nI guess we should catch more types of errors below? And definitely log.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                try:"},{"line_number":78,"context_line":"                    with df.open():"},{"line_number":79,"context_line":"                        os.remove(fname)"},{"line_number":80,"context_line":"                        logging.info(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                        run \u003d True"},{"line_number":82,"context_line":"                except (DiskFileNotExist, OSError):"},{"line_number":83,"context_line":"                    pass"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_c0634c40","line":80,"range":{"start_line":80,"start_character":32,"end_line":80,"end_character":36},"updated":"2017-02-09 18:39:26.000000000","message":"I think I prefer this to be DEBUG, to be consistent with the diskfile.relink_paths logging -- especially if we start making the output level configurable.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                        logging.info(\"Removed %s\" % fname)"},{"line_number":81,"context_line":"                        run \u003d True"},{"line_number":82,"context_line":"                except (DiskFileNotExist, OSError):"},{"line_number":83,"context_line":"                    pass"},{"line_number":84,"context_line":"    if not run:"},{"line_number":85,"context_line":"        logging.warning(\"No policy found to increase the partition power.\")"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_c07c2cee","line":83,"range":{"start_line":83,"start_character":20,"end_line":83,"end_character":24},"updated":"2017-02-09 18:39:26.000000000","message":"Should we be logging a warning here? Something went wrong and we still have data that needs to be cleaned up, right?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9233bbab129179ac3481bb01d5c12c9878f03190","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            diskfile_mgr \u003d diskfile_router[policy]"},{"line_number":94,"context_line":"            df \u003d diskfile_mgr.get_diskfile_from_audit_location(loc)"},{"line_number":95,"context_line":"            try:"},{"line_number":96,"context_line":"                with df.open():"},{"line_number":97,"context_line":"                    os.remove(fname)"},{"line_number":98,"context_line":"                    logging.debug(\"Removed %s\", fname)"},{"line_number":99,"context_line":"                    cleaned_up +\u003d 1"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa31d9ce_ed7c0fb7","line":96,"updated":"2017-02-22 18:25:34.000000000","message":"This can still throw other errors besides DiskFileNotFound (notably DiskFileQuarantined) -- I\u0027m not sure our current behavior of allowing the exception to bubble up is right. Seems like it\u0027d be better to tolerate them, log the error, and continue.","commit_id":"7f99808fe389f350c49ccd3d6bcf53ee1713e9b1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6d8657518370d0418b4562a7cd114654646640b1","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":108,"context_line":"                logging.error(_(\u0027ERROR Object %(obj)s failed audit and was\u0027"},{"line_number":109,"context_line":"                                \u0027 quarantined: %(err)s\u0027),"},{"line_number":110,"context_line":"                              {\u0027obj\u0027: loc, \u0027err\u0027: exc})"},{"line_number":111,"context_line":"                try:"},{"line_number":112,"context_line":"                    os.remove(fname)"},{"line_number":113,"context_line":"                except OSError as subexc:"}],"source_content_type":"text/x-python","patch_set":36,"id":"da36d5c6_787ac878","line":110,"updated":"2017-02-22 21:38:05.000000000","message":"Matches auditor; I like it. Should it be translated, though? Nothing else in this patch is...","commit_id":"43278998cc10a03e5ffa94a431773b27fa37a0f5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2f6de798f4619fd37fab33a0a55ef1552f6fb8cc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                with df.open():"},{"line_number":102,"context_line":"                    pass"},{"line_number":103,"context_line":"            except DiskFileNotExist as exc:"},{"line_number":104,"context_line":"                logging.warning(\u0027Error cleaning up %s: %s\u0027, fname, exc)"},{"line_number":105,"context_line":"                errors +\u003d 1"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            except DiskFileQuarantined as exc:"}],"source_content_type":"text/x-python","patch_set":38,"id":"da36d5c6_8e560404","line":104,"updated":"2017-02-24 21:23:37.000000000","message":"This doesn\u0027t actually give us much information:\n\n Cleaning up files for policy default under /mnt/swift-disk/\n Error cleaning up /mnt/swift-disk/.../1487888938.75697#5#d.data: \n Cleaned up 0 diskfiles (1 errors)\n\nMaybe a repr would be better?\n\n Error cleaning up /mnt/swift-disk/.../1487888938.75697#5#d.data: DiskFileNotExist()\n\nI feel like we should mention the path for the new file name, too, though.","commit_id":"7cb8734f01220e822c98bf39d24e3aa1d223d4f2"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2f6de798f4619fd37fab33a0a55ef1552f6fb8cc","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                              {\u0027obj\u0027: loc, \u0027err\u0027: exc})"},{"line_number":111,"context_line":"                errors +\u003d 1"},{"line_number":112,"context_line":"                continue"},{"line_number":113,"context_line":"            except DiskFileDeleted:"},{"line_number":114,"context_line":"                pass"},{"line_number":115,"context_line":"            try:"},{"line_number":116,"context_line":"                os.remove(fname)"}],"source_content_type":"text/x-python","patch_set":38,"id":"da36d5c6_9b3ac8e5","line":113,"updated":"2017-02-24 21:23:37.000000000","message":"We want this moved up, above\n\n except DiskFileNotExist as exc:\n\nOtherwise we report a whole bunch of errors for tombstones.","commit_id":"7cb8734f01220e822c98bf39d24e3aa1d223d4f2"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"7b5fb1ea04f68b9af4e1a458c6d9e4674fa1445b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            diskfile_mgr \u003d diskfile_router[policy]"},{"line_number":101,"context_line":"            df \u003d diskfile_mgr.get_diskfile_from_audit_location(loc)"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                with df.open():"},{"line_number":104,"context_line":"                    pass"},{"line_number":105,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":106,"context_line":"                logger.warning(\u0027ERROR Object %(obj)s failed audit and was\u0027"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_1743ed13","line":103,"range":{"start_line":103,"start_character":28,"end_line":103,"end_character":31},"updated":"2017-02-27 09:36:31.000000000","message":"For EC objects, this probably should check if there is a durable and non-durable file and try to make it durable if required. However, that requires to execute the check in line 92 later, after the df.open","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f3b6dba4b9aed69e261da4d32c76c638c290ca5f","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            except DiskFileDeleted:"},{"line_number":112,"context_line":"                pass"},{"line_number":113,"context_line":"            except DiskFileNotExist as exc:"},{"line_number":114,"context_line":"                logger.warning(\u0027Error cleaning up %s: %s\u0027, fname, exc)"},{"line_number":115,"context_line":"                errors +\u003d 1"},{"line_number":116,"context_line":"                continue"},{"line_number":117,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_d170a10d","line":114,"updated":"2017-02-24 22:26:20.000000000","message":"Yeah, we still aren\u0027t going to get much info out of these:\n\n \u003e\u003e\u003e import swift.common.exceptions\n \u003e\u003e\u003e str(swift.common.exceptions.DiskFileQuarantined())\n \u0027\u0027\n \u003e\u003e\u003e str(swift.common.exceptions.DiskFileDeleted())\n \u0027\u0027\n \u003e\u003e\u003e str(swift.common.exceptions.DiskFileNotExist())\n \u0027\u0027","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"679fea773f4ec78a0182bc4a040f13ae578b20b3","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            diskfile_mgr \u003d diskfile_router[policy]"},{"line_number":101,"context_line":"            df \u003d diskfile_mgr.get_diskfile_from_audit_location(loc)"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                with df.open():"},{"line_number":104,"context_line":"                    pass"},{"line_number":105,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":106,"context_line":"                logger.warning(\u0027ERROR Object %(obj)s failed audit and was\u0027"}],"source_content_type":"text/x-python","patch_set":42,"id":"da36d5c6_48fe9239","line":103,"updated":"2017-02-28 23:06:55.000000000","message":"So how does this behave when there\u0027s been a non-durable overwrite of a durable frag? Am I right to think there\u0027s no error and we just return the durable one?","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"28c5defa40a64a86b31f459d2e9bce2c83616f72","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            diskfile_mgr \u003d diskfile_router[policy]"},{"line_number":101,"context_line":"            df \u003d diskfile_mgr.get_diskfile_from_audit_location(loc)"},{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                with df.open():"},{"line_number":104,"context_line":"                    pass"},{"line_number":105,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":106,"context_line":"                logger.warning(\u0027ERROR Object %(obj)s failed audit and was\u0027"}],"source_content_type":"text/x-python","patch_set":42,"id":"ba2be162_ee04cd15","line":103,"in_reply_to":"da36d5c6_48fe9239","updated":"2017-03-06 10:35:02.000000000","message":"You mean sth like this?\n\nObj X gets written, and finally a commit() creates the durable frag. Now object X gets another write sometime later, but that doesn\u0027t get a commit (for whatever reason), and thus there are only non-durable frags.\n\nYou\u0027re right, in that case it will return the durable, older version - which makes sense to me, because we can\u0027t ensure the newer, non-durable will ever become durable. Or do I miss sth here?\n\nOut of curiosity I did the following: http://paste.openstack.org/show/601509/\n\nWhich confirms your assumption.","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"679fea773f4ec78a0182bc4a040f13ae578b20b3","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":106,"context_line":"                logger.warning(\u0027ERROR Object %(obj)s failed audit and was\u0027"},{"line_number":107,"context_line":"                               \u0027 quarantined: %(err)s\u0027,"},{"line_number":108,"context_line":"                               {\u0027obj\u0027: loc, \u0027err\u0027: exc})"},{"line_number":109,"context_line":"                errors +\u003d 1"},{"line_number":110,"context_line":"                continue"},{"line_number":111,"context_line":"            except DiskFileDeleted:"}],"source_content_type":"text/x-python","patch_set":42,"id":"da36d5c6_08ebbab1","line":108,"range":{"start_line":108,"start_character":44,"end_line":108,"end_character":54},"updated":"2017-02-28 23:06:55.000000000","message":"This one also str()s as \u0027\u0027.","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"28c5defa40a64a86b31f459d2e9bce2c83616f72","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            except DiskFileQuarantined as exc:"},{"line_number":106,"context_line":"                logger.warning(\u0027ERROR Object %(obj)s failed audit and was\u0027"},{"line_number":107,"context_line":"                               \u0027 quarantined: %(err)s\u0027,"},{"line_number":108,"context_line":"                               {\u0027obj\u0027: loc, \u0027err\u0027: exc})"},{"line_number":109,"context_line":"                errors +\u003d 1"},{"line_number":110,"context_line":"                continue"},{"line_number":111,"context_line":"            except DiskFileDeleted:"}],"source_content_type":"text/x-python","patch_set":42,"id":"ba2be162_b2195924","line":108,"range":{"start_line":108,"start_character":44,"end_line":108,"end_character":54},"in_reply_to":"da36d5c6_08ebbab1","updated":"2017-03-06 10:35:02.000000000","message":"Done","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"679fea773f4ec78a0182bc4a040f13ae578b20b3","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                    err \u003d True"},{"line_number":123,"context_line":"                if err:"},{"line_number":124,"context_line":"                    logger.warning("},{"line_number":125,"context_line":"                        \u0027Error cleaning up %s: %s\u0027, fname, repr(exc))"},{"line_number":126,"context_line":"                    errors +\u003d 1"},{"line_number":127,"context_line":"                    continue"},{"line_number":128,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":42,"id":"da36d5c6_28f79e8d","line":125,"range":{"start_line":125,"start_character":59,"end_line":125,"end_character":63},"updated":"2017-02-28 23:06:55.000000000","message":"nit: Could just use %r in the format string.","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"28c5defa40a64a86b31f459d2e9bce2c83616f72","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                    err \u003d True"},{"line_number":123,"context_line":"                if err:"},{"line_number":124,"context_line":"                    logger.warning("},{"line_number":125,"context_line":"                        \u0027Error cleaning up %s: %s\u0027, fname, repr(exc))"},{"line_number":126,"context_line":"                    errors +\u003d 1"},{"line_number":127,"context_line":"                    continue"},{"line_number":128,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":42,"id":"ba2be162_b275d932","line":125,"range":{"start_line":125,"start_character":59,"end_line":125,"end_character":63},"in_reply_to":"da36d5c6_28f79e8d","updated":"2017-03-06 10:35:02.000000000","message":"Done","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"679fea773f4ec78a0182bc4a040f13ae578b20b3","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                cleaned_up +\u003d 1"},{"line_number":131,"context_line":"                logging.debug(\"Removed %s\", fname)"},{"line_number":132,"context_line":"            except OSError as exc:"},{"line_number":133,"context_line":"                logger.warning(\u0027Error cleaning up %s: %s\u0027, fname, repr(exc))"},{"line_number":134,"context_line":"                errors +\u003d 1"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    if not run:"}],"source_content_type":"text/x-python","patch_set":42,"id":"da36d5c6_c8636240","line":133,"updated":"2017-02-28 23:06:55.000000000","message":"I think OSErrors actually tend to str() well? Maybe the real problem is that we need a __str__ method on DiskFileErrors (or even more generally, SwiftExceptions).","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"28c5defa40a64a86b31f459d2e9bce2c83616f72","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                cleaned_up +\u003d 1"},{"line_number":131,"context_line":"                logging.debug(\"Removed %s\", fname)"},{"line_number":132,"context_line":"            except OSError as exc:"},{"line_number":133,"context_line":"                logger.warning(\u0027Error cleaning up %s: %s\u0027, fname, repr(exc))"},{"line_number":134,"context_line":"                errors +\u003d 1"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    if not run:"}],"source_content_type":"text/x-python","patch_set":42,"id":"ba2be162_1231455a","line":133,"in_reply_to":"da36d5c6_c8636240","updated":"2017-03-06 10:35:02.000000000","message":"Unfortunately OSError doesn\u0027t. Need to call repr() (or use %r) as well.\n\nA __str__ method in the SwiftExceptions sounds like a good idea, but I\u0027d like to keep that out of this patch if possible. Maybe as a followup?","commit_id":"d0432673f17fb87bdb6b5c72b373fa3752f0e45c"}],"swift/cli/ringbuilder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a8de8812f04aff1b65b70cfa5b9aaead698c8e3d","unresolved":false,"context_lines":[{"line_number":1259,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"    @staticmethod"},{"line_number":1262,"context_line":"    def finish_increase_partition_power():"},{"line_number":1263,"context_line":"        \"\"\""},{"line_number":1264,"context_line":"swift-ring-builder \u003cbuilder_file\u003e increase_partition_power"},{"line_number":1265,"context_line":"    Increases the partition power by one. This needs to be done when the"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_3d28e432","line":1262,"updated":"2016-07-12 15:40:40.000000000","message":"what is the difference exactly between \"finish_increase_partition_power\" and \"increase_partition_power\" - the docstring is the same, but the implementation looks different?","commit_id":"40b446aaaa0895e0dd0f1f069ce9abafb7fbd3c6"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1256,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1257,"context_line":""},{"line_number":1258,"context_line":"        builder.increase_partition_power()"},{"line_number":1259,"context_line":"        print(\u0027The partition power is now %.6f.\u0027 % builder.part_power)"},{"line_number":1260,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1261,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_beaec6e3","line":1258,"updated":"2016-08-17 06:30:30.000000000","message":"The builder.increase_partition_power() method will check the state and return True if successful:\n\n def increase_partition_power(self):            \n    ...                                              \n    if not self.next_part_power:               \n        return False                           \n                                               \n    if self.next_part_power \u003d\u003d self.part_power:\n        return False                           \n    ...\n\nHowever below you print the change will take effect after the next write_ring.. but in the case that a False was returned there was no change. This can be misleading.\n\nWe really should check the return if we\u0027re going to the effort of returning success.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1256,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1257,"context_line":""},{"line_number":1258,"context_line":"        builder.increase_partition_power()"},{"line_number":1259,"context_line":"        print(\u0027The partition power is now %.6f.\u0027 % builder.part_power)"},{"line_number":1260,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1261,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_85dd47e2","line":1258,"in_reply_to":"3ac371cc_beaec6e3","updated":"2016-08-17 20:40:43.000000000","message":"Done","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1249,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1250,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1251,"context_line":"        print(\u0027relink your existing data before the partition power increase\u0027)"},{"line_number":1252,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_8485b0ae","line":1251,"updated":"2016-10-24 01:45:35.000000000","message":"maybe add \u0027(using swift-object-relinker)\u0027 after \u0027relink\u0027","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1249,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1250,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1251,"context_line":"        print(\u0027relink your existing data before the partition power increase\u0027)"},{"line_number":1252,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_64087d2e","line":1251,"in_reply_to":"da6895a0_8485b0ae","updated":"2016-12-02 17:27:48.000000000","message":"Done","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            balance \u003d builder.get_balance()"},{"line_number":482,"context_line":"        dispersion_trailer \u003d \u0027\u0027 if builder.dispersion is None else ("},{"line_number":483,"context_line":"            \u0027, %.02f dispersion\u0027 % (builder.dispersion))"},{"line_number":484,"context_line":"        print(\u0027%d partitions, %.6f replicas, %d regions, %d zones, \u0027"},{"line_number":485,"context_line":"              \u0027%d devices, %.02f balance%s\u0027 % ("},{"line_number":486,"context_line":"                  builder.parts, builder.replicas, regions, zones, dev_count,"},{"line_number":487,"context_line":"                  balance, dispersion_trailer))"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_59eb5413","line":484,"range":{"start_line":484,"start_character":15,"end_line":484,"end_character":29},"updated":"2017-01-17 00:46:13.000000000","message":"Now what we can change the part_power, we should display what the current value is. We print it out when we change it, so users should have access to seeing it all the time.. maybe something like:\n\n  $ swift-ring-builder /etc/swift/object.builder\n  /etc/swift/object.builder, build version 8\n  2048 partitions (11), 3.000000 replicas, 1 regions, 4 zones, 4 devices, 0.00   balance, 0.00 dispersion\n  The minimum number of hours before a partition can be reassigned is 1 (0:14:04 remaining)\n  The overload factor is 0.00% (0.000000)\n  Ring file /etc/swift/object.ring.gz is up-to-date\n  Devices:   id region zone ip address:port replication ip:port  name weight   partitions balance flags meta\n              0      1    1  127.0.0.1:6010      127.0.0.1:6010  sdb1   1.00       1536    0.00\n              1      1    2  127.0.0.1:6020      127.0.0.1:6020  sdb2   1.00       1536    0.00\n              2      1    3  127.0.0.1:6030      127.0.0.1:6030  sdb3   1.00       1536    0.00\n              3      1    4  127.0.0.1:6040      127.0.0.1:6040  sdb4   1.00       1536    0.00\n\n  $ swift-ring-builder /etc/swift/object.builder prepare_increase_partition_power\n\n  $ swift-ring-builder /etc/swift/object.builder\n  /etc/swift/object.builder, build version 9\n  2048 partitions (11 -\u003e 12), 3.000000 replicas, 1 regions, 4 zones, 4 devices, 0.00 balance, 0.00 dispersion\n  The minimum number of hours before a partition can be reassigned is 1  (0:13:12 remaining)\n  The overload factor is 0.00% (0.000000)\n  Ring file /etc/swift/object.ring.gz is obsolete\n  Devices:   id region zone ip address:port replication ip:port  name weight  partitions balance flags meta\n              0      1    1  127.0.0.1:6010      127.0.0.1:6010  sdb1   1.00       1536    0.00\n              1      1    2  127.0.0.1:6020      127.0.0.1:6020  sdb2   1.00       1536    0.00\n              2      1    3  127.0.0.1:6030      127.0.0.1:6030  sdb3   1.00       1536    0.00\n              3      1    4  127.0.0.1:6040      127.0.0.1:6040  sdb4   1.00       1536    0.00\n\n  Step 1/3 of partition power increase in progress.\n  Run \"swift-object-relinker relink\" on all nodes now.\n\nHere is the patch for ^^ http://paste.openstack.org/show/595114/","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            balance \u003d builder.get_balance()"},{"line_number":482,"context_line":"        dispersion_trailer \u003d \u0027\u0027 if builder.dispersion is None else ("},{"line_number":483,"context_line":"            \u0027, %.02f dispersion\u0027 % (builder.dispersion))"},{"line_number":484,"context_line":"        print(\u0027%d partitions, %.6f replicas, %d regions, %d zones, \u0027"},{"line_number":485,"context_line":"              \u0027%d devices, %.02f balance%s\u0027 % ("},{"line_number":486,"context_line":"                  builder.parts, builder.replicas, regions, zones, dev_count,"},{"line_number":487,"context_line":"                  balance, dispersion_trailer))"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_7d9d4abb","line":484,"range":{"start_line":484,"start_character":15,"end_line":484,"end_character":29},"in_reply_to":"7a3c09a3_59eb5413","updated":"2017-01-17 10:34:22.000000000","message":"I was thinking about modifying that line earlier, but didn\u0027t do that because it might be that the line is actually parsed by some tools - and that would break them and requires case-switching to interpret that line.\n\nI just added the info to the new lines at the bottom. What do you think about this?","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"88c8c3c0b9bfffceba040b23411b86bb8a2a6889","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            balance \u003d builder.get_balance()"},{"line_number":482,"context_line":"        dispersion_trailer \u003d \u0027\u0027 if builder.dispersion is None else ("},{"line_number":483,"context_line":"            \u0027, %.02f dispersion\u0027 % (builder.dispersion))"},{"line_number":484,"context_line":"        print(\u0027%d partitions, %.6f replicas, %d regions, %d zones, \u0027"},{"line_number":485,"context_line":"              \u0027%d devices, %.02f balance%s\u0027 % ("},{"line_number":486,"context_line":"                  builder.parts, builder.replicas, regions, zones, dev_count,"},{"line_number":487,"context_line":"                  balance, dispersion_trailer))"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a3905b3_99ce882c","line":484,"range":{"start_line":484,"start_character":15,"end_line":484,"end_character":29},"in_reply_to":"7a3c09a3_7d9d4abb","updated":"2017-01-23 05:58:36.000000000","message":"Yeah that makes sense. We asked at the last op feedback session if anyone actually parsed the ring_builder output to which everyone said no. But your right, there could (and we should assume) there are others out there that may.\n\nSo sure, so long as the information is somewhere. I think its important now that people will be able to change it.","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"    @staticmethod"},{"line_number":1238,"context_line":"    def prepare_increase_partition_power():"},{"line_number":1239,"context_line":"        \"\"\""},{"line_number":1240,"context_line":"swift-ring-builder \u003cbuilder_file\u003e prepare_increase_partition_power"},{"line_number":1241,"context_line":"    Prepare the ring to increase the partition power by one."},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"    A write_ring command is needed to make the change take effect."}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_790c90ed","line":1240,"range":{"start_line":1240,"start_character":34,"end_line":1240,"end_character":66},"updated":"2017-01-17 00:46:13.000000000","message":"One problem I see is that if a user gets this far.. ie runs prepare, then we will be linking all new objects, and if they decide its a mistake they can\u0027t undo it. So they\u0027d either need to get the old ring from backup.\n\nWe either need to really document and warn them that there is no going back, and you\u0027ll be using more inodes from now on or until increase is complete. Or allow a backout. \n\nSeeing as at phase 1, we haven\u0027t actually done something maybe roll back from only this point is worth while.  Do do that however, we\u0027d need a way to cancel the ring state and cleanup to clean up the new links not the old.","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"88c8c3c0b9bfffceba040b23411b86bb8a2a6889","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"    @staticmethod"},{"line_number":1238,"context_line":"    def prepare_increase_partition_power():"},{"line_number":1239,"context_line":"        \"\"\""},{"line_number":1240,"context_line":"swift-ring-builder \u003cbuilder_file\u003e prepare_increase_partition_power"},{"line_number":1241,"context_line":"    Prepare the ring to increase the partition power by one."},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"    A write_ring command is needed to make the change take effect."}],"source_content_type":"text/x-python","patch_set":18,"id":"5a3905b3_d98650da","line":1240,"range":{"start_line":1240,"start_character":34,"end_line":1240,"end_character":66},"in_reply_to":"7a3c09a3_67a69754","updated":"2017-01-23 05:58:36.000000000","message":"yeah i like it.","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"    @staticmethod"},{"line_number":1238,"context_line":"    def prepare_increase_partition_power():"},{"line_number":1239,"context_line":"        \"\"\""},{"line_number":1240,"context_line":"swift-ring-builder \u003cbuilder_file\u003e prepare_increase_partition_power"},{"line_number":1241,"context_line":"    Prepare the ring to increase the partition power by one."},{"line_number":1242,"context_line":""},{"line_number":1243,"context_line":"    A write_ring command is needed to make the change take effect."}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_67a69754","line":1240,"range":{"start_line":1240,"start_character":34,"end_line":1240,"end_character":66},"in_reply_to":"7a3c09a3_790c90ed","updated":"2017-01-17 10:34:22.000000000","message":"You\u0027re right.\n\nI think this needs only some documentation and a minor change to the cleanup tool. An operator can simply skip the step \"increase_partition_power\" and just do a \"finish_part_power_increase\". This clears the next_part_power value and disables the creation of more symlinks. The cleanup command can take care of the unneeded symlinks and remove them.\n\nLooking at this we might want to change the workflow itself a bit - the finish_increase_partition_power could become needless (and could be renamed to cancel_increase_partition_power). See my comments in the doc .rst\n\nDoes that sound like an option?","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":1263,"context_line":""},{"line_number":1264,"context_line":"        builder.save(builder_file)"},{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1267,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1268,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1269,"context_line":"        print(\u0027relink (using swift-object-relinker) your existing data\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_deaf2a28","line":1266,"updated":"2017-01-17 00:46:13.000000000","message":"Here we are printing the next part power as an integer (which makes sense)  however below it\u0027s printed as a float.","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        if builder.increase_partition_power():"},{"line_number":1299,"context_line":"            print(\u0027The partition power is now %.6f.\u0027 % builder.part_power)"},{"line_number":1300,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"            builder._update_last_part_moves()"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_9e7042de","line":1299,"range":{"start_line":1299,"start_character":48,"end_line":1299,"end_character":50},"updated":"2017-01-17 00:46:13.000000000","message":"Here part_power is a float. This should be an int (like above).","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":1296,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        if builder.increase_partition_power():"},{"line_number":1299,"context_line":"            print(\u0027The partition power is now %.6f.\u0027 % builder.part_power)"},{"line_number":1300,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"            builder._update_last_part_moves()"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_074eb33a","line":1299,"range":{"start_line":1299,"start_character":48,"end_line":1299,"end_character":50},"in_reply_to":"7a3c09a3_9e7042de","updated":"2017-01-17 10:34:22.000000000","message":"Ouch, yes, this is so wrong. Fixed!","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"195e4ff2164336b0cf62c7e5c10b5cc579ab6bb7","unresolved":false,"context_lines":[{"line_number":536,"context_line":"                print(\u0027\\nStep 3/3 of partition power increase (%d -\u003e %d) in \u0027"},{"line_number":537,"context_line":"                      \u0027progress.\u0027 % (builder.part_power,"},{"line_number":538,"context_line":"                                     builder.next_part_power))"},{"line_number":539,"context_line":"                print(\u0027Run \"swift-object-relinker cleanup\" on every node now.\u0027)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":542,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_e25ab582","line":539,"updated":"2017-01-27 06:18:34.000000000","message":"We could assume that write_ring and pushing your rings are assumed. And the dev documentation already mentions this, so I\u0027d hope someone would be following if they are doing this for the first time. So we could remove the reference to write_ring and then make it:\n\n  Step 1/2 of partition power increase (%d -\u003e %d) in progress\n  Run \"swift-object-relinker relink\" on all nodes\n\n  Step 2/2 of partition power increase (..) in progress\n  \u0027Run \"swift-object-relinker cleanup\" on all nodes\n\nOr we could get rid of steps all together and use the state:\n\n  Preparing increase of partition power (%d -\u003e %d)\n  Run \u0027swift-object-relinker relink\u0027 on all nodes before moving on to increase_partition_power.\n  \n  (To cancel move to cancel_increase_partition_power state and run \u0027swift-object-relinker cleanup\u0027 on all nodes before moving to finish_increase_partition_power.)\n\n  \n  Increased partition power (%d -\u003e %d)\n  Run \u0027swift-object-relinker cleanup\u0027 on all nodes before moving on to finish_increase_partition_power\n\nI added the cancel part, but not convinced by it, so that can be removed, I guess it depends how hand-holdy we want to be. That\u0027s kinda stealing from git status ;)","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":536,"context_line":"                print(\u0027\\nStep 3/3 of partition power increase (%d -\u003e %d) in \u0027"},{"line_number":537,"context_line":"                      \u0027progress.\u0027 % (builder.part_power,"},{"line_number":538,"context_line":"                                     builder.next_part_power))"},{"line_number":539,"context_line":"                print(\u0027Run \"swift-object-relinker cleanup\" on every node now.\u0027)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":542,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_948a7362","line":539,"in_reply_to":"3a461143_e25ab582","updated":"2017-02-01 11:08:47.000000000","message":"Hmm, need to think about this more. I think we might want to keep the note about write_ring, at least if we don\u0027t include the write_ring automatically?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"    *****************************"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1258,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    \"\"\""},{"line_number":1261,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d798b67a","line":1258,"updated":"2017-01-31 23:44:15.000000000","message":"Wait, really? Didn\u0027t we *just tell them* to write_ring (presumably changing them) and deploy the new rings? I thought this was supposed to *eliminate* the downtime.\n\nI mean, I still think we should warn very loudly, especially here at the first step, but we should be sure to warn *accurately*.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1255,"context_line":"    *****************************"},{"line_number":1256,"context_line":""},{"line_number":1257,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1258,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1259,"context_line":""},{"line_number":1260,"context_line":"    \"\"\""},{"line_number":1261,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_f43f3784","line":1258,"in_reply_to":"3a461143_d798b67a","updated":"2017-02-01 11:08:47.000000000","message":"I prefer to warn operators rather too loud...\n\nBut granted, it might be a bit misleading, at least for this step. However, pushing a ring with an increased part power without doing the intermediate steps might have consequences, ie data unavailability. So we need some strong warning...\n\nI will change all of these warnings, but will keep a strong warning per se.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"    USE THIS WITH EXTREME CAUTION"},{"line_number":1293,"context_line":"    *****************************"},{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1296,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d7ea76da","line":1295,"range":{"start_line":1295,"start_character":4,"end_line":1295,"end_character":52},"updated":"2017-01-31 23:44:15.000000000","message":"...before running the relinker, right? Assuming the relinker has run, we should be good, yeah?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"    USE THIS WITH EXTREME CAUTION"},{"line_number":1293,"context_line":"    *****************************"},{"line_number":1294,"context_line":""},{"line_number":1295,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1296,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d4631baf","line":1295,"range":{"start_line":1295,"start_character":4,"end_line":1295,"end_character":52},"in_reply_to":"3a461143_d7ea76da","updated":"2017-02-01 11:08:47.000000000","message":"Yes, exactly (if you run the relinker with the prepared rings in effect)","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1301,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"        if builder.increase_partition_power():"},{"line_number":1304,"context_line":"            print(\u0027The partition power is now %d.\u0027 % builder.part_power)"},{"line_number":1305,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_572e86fb","line":1303,"updated":"2017-01-31 23:44:15.000000000","message":"...else?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"c07db72840846f24be2985d6bf683de4c4a385cc","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1301,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"        if builder.increase_partition_power():"},{"line_number":1304,"context_line":"            print(\u0027The partition power is now %d.\u0027 % builder.part_power)"},{"line_number":1305,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_e89bbe70","line":1303,"in_reply_to":"3a461143_1d7134e1","updated":"2017-02-01 23:20:23.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1301,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"        if builder.increase_partition_power():"},{"line_number":1304,"context_line":"            print(\u0027The partition power is now %d.\u0027 % builder.part_power)"},{"line_number":1305,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_1d7134e1","line":1303,"in_reply_to":"3a461143_54f72bd2","updated":"2017-02-01 20:37:52.000000000","message":"Seems like it deserves some sort of message? Or at least an\n\n exit(EXIT_ERROR)","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"            print(Commands.increase_partition_power.__doc__.strip())"},{"line_number":1301,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"        if builder.increase_partition_power():"},{"line_number":1304,"context_line":"            print(\u0027The partition power is now %d.\u0027 % builder.part_power)"},{"line_number":1305,"context_line":"            print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1306,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_54f72bd2","line":1303,"in_reply_to":"3a461143_572e86fb","updated":"2017-02-01 11:08:47.000000000","message":"... else the increase was skipped, either because the ring was not prepared yet, or this operation already run before.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"    *****************************"},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1328,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    \"\"\""},{"line_number":1331,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_b79b2a65","line":1328,"updated":"2017-01-31 23:44:15.000000000","message":"Still? I thought this was supposed to get us *out* of trouble!\n\nIn which states is this *safe* to run?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"    *****************************"},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1328,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    \"\"\""},{"line_number":1331,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_f481f7c3","line":1328,"in_reply_to":"3a461143_b79b2a65","updated":"2017-02-01 11:08:47.000000000","message":"If you do all steps in their intended order, it is safe to run at any time.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"    *****************************"},{"line_number":1326,"context_line":""},{"line_number":1327,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1328,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1329,"context_line":""},{"line_number":1330,"context_line":"    \"\"\""},{"line_number":1331,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_9830d2ea","line":1328,"in_reply_to":"3a461143_f481f7c3","updated":"2017-02-01 20:37:52.000000000","message":"\u003e it is safe to run at any time.\n\nThis seems right. even if you do things in a crazy order, cancel_increase_partition_power should never *hurt*, right? At worst, it won\u0027t succeed (because you\u0027ve not started a part power increase, or you\u0027ve already committed to the new part power), but it shouldn\u0027t impact availability, right?\n\nDoes this command deserve the warning at all? I agree that we want very loud messaging warning people away from using this when they don\u0027t need it, but it seems unnecessary for a *cancel* operation.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1334,"context_line":""},{"line_number":1335,"context_line":"        if not builder.cancel_increase_partition_power():"},{"line_number":1336,"context_line":"            print(\u0027Ring is already prepared for partition power increase.\u0027)"},{"line_number":1337,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1338,"context_line":""},{"line_number":1339,"context_line":"        builder.save(builder_file)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_f7705274","line":1336,"updated":"2017-01-31 23:44:15.000000000","message":"\u003e Ring is not prepared for partition power increase.\n\nor\n\n\u003e Ring is not in the process of increasing partition power.\n\nor even just\n\n\u003e Ring partition power increase cannot be canceled.\n\nsurely? Might be nice to distinguish between the no-next_part_power and next_part_power-is-part_power cases.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1333,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1334,"context_line":""},{"line_number":1335,"context_line":"        if not builder.cancel_increase_partition_power():"},{"line_number":1336,"context_line":"            print(\u0027Ring is already prepared for partition power increase.\u0027)"},{"line_number":1337,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1338,"context_line":""},{"line_number":1339,"context_line":"        builder.save(builder_file)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_94c27351","line":1336,"in_reply_to":"3a461143_f7705274","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1342,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1343,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1344,"context_line":"        print(\u0027cleanup (using swift-object-relinker) the symlinks\u0027)"},{"line_number":1345,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":1346,"context_line":""},{"line_number":1347,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_7732a2a8","line":1344,"range":{"start_line":1344,"start_character":57,"end_line":1344,"end_character":65},"updated":"2017-01-31 23:44:15.000000000","message":"Hardlinks, no?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1341,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1342,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1343,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1344,"context_line":"        print(\u0027cleanup (using swift-object-relinker) the symlinks\u0027)"},{"line_number":1345,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":1346,"context_line":""},{"line_number":1347,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_b48a0f19","line":1344,"range":{"start_line":1344,"start_character":57,"end_line":1344,"end_character":65},"in_reply_to":"3a461143_7732a2a8","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"    *****************************"},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1361,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"    \"\"\""},{"line_number":1364,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_17db1e1c","line":1361,"updated":"2017-01-31 23:44:15.000000000","message":"Similar to above, in which states should this be *safe* to run?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"    *****************************"},{"line_number":1359,"context_line":""},{"line_number":1360,"context_line":"    If you run this command and deploy changed rings, you may introduce"},{"line_number":1361,"context_line":"    unavailability in your cluster. This has an end-user impact."},{"line_number":1362,"context_line":""},{"line_number":1363,"context_line":"    \"\"\""},{"line_number":1364,"context_line":"        if len(argv) \u003c 3:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d4307b58","line":1361,"in_reply_to":"3a461143_17db1e1c","updated":"2017-02-01 11:08:47.000000000","message":"It should be safe (it won\u0027t introduce unavailability) at any step (though I just discovered and fixed a bug in the ringbuilder), but if you do this without finishing the cleanup you can\u0027t cleanup any longer afterwards.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":843,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    @staticmethod"},{"line_number":846,"context_line":"    def rebalance():"},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"swift-ring-builder \u003cbuilder_file\u003e rebalance [options]"},{"line_number":849,"context_line":"    Attempts to rebalance the ring by reassigning partitions that haven\u0027t been"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_7d4dd8c3","line":846,"updated":"2017-02-01 20:38:23.000000000","message":"What happens if we rebalance mid-increase? It seems like that may ruin our keep-both-parts-on-the-same-disk plan. Should we prevent that from happening?","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":843,"context_line":"        exit(EXIT_SUCCESS)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    @staticmethod"},{"line_number":846,"context_line":"    def rebalance():"},{"line_number":847,"context_line":"        \"\"\""},{"line_number":848,"context_line":"swift-ring-builder \u003cbuilder_file\u003e rebalance [options]"},{"line_number":849,"context_line":"    Attempts to rebalance the ring by reassigning partitions that haven\u0027t been"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_d3b4f4d5","line":846,"in_reply_to":"3a461143_7d4dd8c3","updated":"2017-02-01 23:21:06.000000000","message":"Bah, good catch! Indeed, we should prevent that. Done.","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"        print(\u0027The next partition power is now %d.\u0027 % builder.next_part_power)"},{"line_number":1276,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1277,"context_line":"        print(\u0027Ensure your object-servers are using the changed rings and\u0027)"},{"line_number":1278,"context_line":"        print(\u0027relink (using swift-object-relinker) your existing data\u0027)"},{"line_number":1279,"context_line":"        print(\u0027before the partition power increase\u0027)"},{"line_number":1280,"context_line":"        exit(EXIT_SUCCESS)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_9de1a49d","line":1277,"updated":"2017-02-01 20:38:23.000000000","message":"...and proxy-servers...","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"            print(Commands.finish_increase_partition_power.__doc__.strip())"},{"line_number":1376,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"        builder.finish_increase_partition_power()"},{"line_number":1379,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1380,"context_line":"        builder.save(builder_file)"},{"line_number":1381,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_d885fa59","line":1378,"updated":"2017-02-01 20:38:23.000000000","message":"No if?","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"            print(Commands.finish_increase_partition_power.__doc__.strip())"},{"line_number":1376,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":"        builder.finish_increase_partition_power()"},{"line_number":1379,"context_line":"        print(\u0027The change will take effect after the next write_ring.\u0027)"},{"line_number":1380,"context_line":"        builder.save(builder_file)"},{"line_number":1381,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_f32e50f9","line":1378,"in_reply_to":"3a461143_d885fa59","updated":"2017-02-01 23:21:06.000000000","message":"Done","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"235b61ad99fec3b8f46322487cbc7d85fe304678","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        if (builder.next_part_power and"},{"line_number":529,"context_line":"                builder.part_power \u003d\u003d builder.next_part_power):"},{"line_number":530,"context_line":"            if builder_dict !\u003d ring_dict:"},{"line_number":531,"context_line":"                print(\u0027\\nStep 2/3 of partition power increase (%d -\u003e %d) in \u0027"},{"line_number":532,"context_line":"                      \u0027progress.\u0027 % (builder.part_power,"},{"line_number":533,"context_line":"                                     builder.next_part_power))"},{"line_number":534,"context_line":"                print(\u0027Run \"swift-ring-builder \u003cbuilderfile\u003e write_ring\" \u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_20dc2f45","line":531,"range":{"start_line":531,"start_character":25,"end_line":531,"end_character":33},"updated":"2017-02-09 05:52:40.000000000","message":"You still mention steps, but there isn\u0027t a step 1. If we are to keep the steps, then step 1/3 should be re-added. Or remove the steps all together:\n\n  Preparing increase of partition power (%d -\u003e %d)\n  Run \u0027swift-object-relinker relink\u0027 on all nodes before moving on to increase_partition_power.\n\n\n  Increased partition power (%d -\u003e %d)\n  First Run \"swift-ring-builder \u003cbuilderfile\u003e write_ring now and copy the updated .ring.gz file to all nodes.\n  Run \u0027swift-object-relinker cleanup\u0027 on all nodes before moving on to finish_increase_partition_power\n\n\n  Increased partition power (%d -\u003e %d)\n  Run \u0027swift-object-relinker cleanup\u0027 on all nodes before moving on to finish_increase_partition_power\n\nOr add the step 1/3 back.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"31702fe0294819dc93fac29e3c7bf0f635113781","unresolved":false,"context_lines":[{"line_number":1280,"context_line":"            print(\u0027Ring is already prepared for partition power increase.\u0027)"},{"line_number":1281,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"        if \"object\" not in basename(builder_file):"},{"line_number":1284,"context_line":"            print("},{"line_number":1285,"context_line":"                \u0027Partition power increase is only supported for object rings.\u0027)"},{"line_number":1286,"context_line":"            exit(EXIT_ERROR)"}],"source_content_type":"text/x-python","patch_set":34,"id":"da36d5c6_69a926df","line":1283,"updated":"2017-02-22 18:19:15.000000000","message":"line 1283 should be before 1279","commit_id":"7f99808fe389f350c49ccd3d6bcf53ee1713e9b1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f3b6dba4b9aed69e261da4d32c76c638c290ca5f","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"            exit(EXIT_SUCCESS)"},{"line_number":1333,"context_line":"        else:"},{"line_number":1334,"context_line":"            print(\u0027Ring partition power cannot be increased. Either the \u0027)"},{"line_number":1335,"context_line":"            print(\u0027ring was not prepared yet, or this operation already run.\u0027)"},{"line_number":1336,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1337,"context_line":""},{"line_number":1338,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_51075181","line":1335,"range":{"start_line":1335,"start_character":49,"end_line":1335,"end_character":75},"updated":"2017-02-24 22:26:20.000000000","message":"nit: \"this operation has already run\"","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a284a2290178caa017195aa7c2ac701005a05339","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"            exit(EXIT_SUCCESS)"},{"line_number":1333,"context_line":"        else:"},{"line_number":1334,"context_line":"            print(\u0027Ring partition power cannot be increased. Either the \u0027)"},{"line_number":1335,"context_line":"            print(\u0027ring was not prepared yet, or this operation already run.\u0027)"},{"line_number":1336,"context_line":"            exit(EXIT_ERROR)"},{"line_number":1337,"context_line":""},{"line_number":1338,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_62956131","line":1335,"range":{"start_line":1335,"start_character":49,"end_line":1335,"end_character":75},"in_reply_to":"da36d5c6_51075181","updated":"2017-02-25 02:16:16.000000000","message":"Done","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"53a3a3c7637bf9a0776ced4aad4cfb5ee81d8d63","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                  \u0027moving on to increase_partition_power.\u0027)"},{"line_number":533,"context_line":"        if (builder.next_part_power and"},{"line_number":534,"context_line":"                builder.part_power \u003d\u003d builder.next_part_power):"},{"line_number":535,"context_line":"            print(\u0027\\nIncreased partition power (%d -\u003e %d)\u0027 % ("},{"line_number":536,"context_line":"                  builder.part_power, builder.next_part_power))"},{"line_number":537,"context_line":"            if builder_dict !\u003d ring_dict:"},{"line_number":538,"context_line":"                print(\u0027First run \"swift-ring-builder \u003cbuilderfile\u003e write_ring\"\u0027"}],"source_content_type":"text/x-python","patch_set":47,"id":"df140735_39db9d7c","line":535,"updated":"2017-06-03 00:42:57.000000000","message":"We also get in this state after cancelling a partition power increase...","commit_id":"872e66b36485b8cc765e2373d7a2b900f9616532"}],"swift/common/ring/builder.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a8de8812f04aff1b65b70cfa5b9aaead698c8e3d","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"        \"\"\""},{"line_number":1769,"context_line":"        if self.prev_part_power:"},{"line_number":1770,"context_line":"            self.prev_part_power \u003d None"},{"line_number":1771,"context_line":"            self.version +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_9da478a6","line":1771,"updated":"2016-07-12 15:40:40.000000000","message":"it seems like \"increase_part_power\" already moves the \"next_part_power\" into \"part_power\" - why do we keep \"prev_part_power\" around?  There\u0027s no revert?  maybe it\u0027s a dream of decrease part power support?","commit_id":"40b446aaaa0895e0dd0f1f069ce9abafb7fbd3c6"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":1697,"context_line":"                matched_devs.append(dev)"},{"line_number":1698,"context_line":"        return matched_devs"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"    def prepare_increase_partition_power(self):"},{"line_number":1701,"context_line":"        \"\"\" Prepares a ring for partition power increase."},{"line_number":1702,"context_line":""},{"line_number":1703,"context_line":"        This makes it possible to compute the future location of any object"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_240dc490","line":1700,"updated":"2016-10-24 01:45:35.000000000","message":"Maybe add description of returned boolean in docstring","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":1697,"context_line":"                matched_devs.append(dev)"},{"line_number":1698,"context_line":"        return matched_devs"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"    def prepare_increase_partition_power(self):"},{"line_number":1701,"context_line":"        \"\"\" Prepares a ring for partition power increase."},{"line_number":1702,"context_line":""},{"line_number":1703,"context_line":"        This makes it possible to compute the future location of any object"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_5f36eae7","line":1700,"in_reply_to":"da6895a0_240dc490","updated":"2016-12-02 17:27:48.000000000","message":"Done","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"        self.version +\u003d 1"},{"line_number":1716,"context_line":"        return True"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def increase_partition_power(self):"},{"line_number":1719,"context_line":"        \"\"\" Increases ring partition power by one."},{"line_number":1720,"context_line":""},{"line_number":1721,"context_line":"        Devices will be assigned to partitions like this:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_047d20e7","line":1718,"updated":"2016-10-24 01:45:35.000000000","message":"Maybe add description of returned boolean in docstring","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":1715,"context_line":"        self.version +\u003d 1"},{"line_number":1716,"context_line":"        return True"},{"line_number":1717,"context_line":""},{"line_number":1718,"context_line":"    def increase_partition_power(self):"},{"line_number":1719,"context_line":"        \"\"\" Increases ring partition power by one."},{"line_number":1720,"context_line":""},{"line_number":1721,"context_line":"        Devices will be assigned to partitions like this:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_9f3082ea","line":1718,"in_reply_to":"da6895a0_047d20e7","updated":"2016-12-02 17:27:48.000000000","message":"Done","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"1926adad65bbc9433046975047a4b72a24b05d2e","unresolved":false,"context_lines":[{"line_number":1731,"context_line":"        if not self.next_part_power:"},{"line_number":1732,"context_line":"            return False"},{"line_number":1733,"context_line":""},{"line_number":1734,"context_line":"        if self.next_part_power \u003d\u003d self.part_power:"},{"line_number":1735,"context_line":"            return False"},{"line_number":1736,"context_line":""},{"line_number":1737,"context_line":"        new_replica2part2dev \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a71b18c_fa9cf66b","line":1734,"updated":"2016-12-10 09:05:59.000000000","message":"Why not test for  next_part_power !\u003d part_power + 1?  What if it\u0027s +2 or something?","commit_id":"bb4cd9750d77ec2cf677049a5eac0594864ebd42"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":445,"context_line":"                \"than %(num_devices)s devices\" % {"},{"line_number":446,"context_line":"                    \u0027replicas\u0027: self.replicas,"},{"line_number":447,"context_line":"                    \u0027num_devices\u0027: num_devices,"},{"line_number":448,"context_line":"                })"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        if seed is not None:"},{"line_number":451,"context_line":"            random.seed(seed)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_1845c216","line":448,"updated":"2017-02-01 20:38:23.000000000","message":"Should we raise a validation error around here if there\u0027s a next_part_power set?","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":445,"context_line":"                \"than %(num_devices)s devices\" % {"},{"line_number":446,"context_line":"                    \u0027replicas\u0027: self.replicas,"},{"line_number":447,"context_line":"                    \u0027num_devices\u0027: num_devices,"},{"line_number":448,"context_line":"                })"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        if seed is not None:"},{"line_number":451,"context_line":"            random.seed(seed)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_b345a8b4","line":448,"in_reply_to":"3a461143_1845c216","updated":"2017-02-01 23:21:06.000000000","message":"I think that\u0027s a good idea. Since rebalancing will be impossible, it won\u0027t harm to reject adding devices at this point. But then I\u0027m wondering if we should do this here or in the swift/cli/ringbuilder? Same for removing a device, and rebalancing. For now I added checks into the CLI","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":1803,"context_line":""},{"line_number":1804,"context_line":"        The hard links from the old object locations should be removed by now."},{"line_number":1805,"context_line":"        \"\"\""},{"line_number":1806,"context_line":"        if self.next_part_power and self.next_part_power \u003d\u003d self.part_power:"},{"line_number":1807,"context_line":"            self.next_part_power \u003d None"},{"line_number":1808,"context_line":"            self.version +\u003d 1"},{"line_number":1809,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_788fa675","line":1806,"updated":"2017-02-01 20:38:23.000000000","message":"Good catch!","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"}],"swift/common/ring/ring.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            self._num_regions \u003d len(regions)"},{"line_number":232,"context_line":"            self._num_zones \u003d len(zones)"},{"line_number":233,"context_line":"            self._num_ips \u003d len(ips)"},{"line_number":234,"context_line":"            self.next_part_power \u003d ring_data.next_part_power"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def _rebuild_tier_data(self):"},{"line_number":237,"context_line":"        self.tier2devs \u003d defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_de04624b","line":234,"updated":"2016-08-17 06:30:30.000000000","message":"I wonder if this should be something like: http://paste.openstack.org/show/558827/\n\nThat way we don\u0027t reach into a ring and grab a private variable. And the properties are only readonly.\n\nWe could even go one better now that you need to grab the part power from the ring and:\n\n  @property\n  def part_power(self):\n      return 32 - self.part_shift\n\nAnd then we don\u0027t have to calculate in the linker at all.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            self._num_regions \u003d len(regions)"},{"line_number":232,"context_line":"            self._num_zones \u003d len(zones)"},{"line_number":233,"context_line":"            self._num_ips \u003d len(ips)"},{"line_number":234,"context_line":"            self.next_part_power \u003d ring_data.next_part_power"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def _rebuild_tier_data(self):"},{"line_number":237,"context_line":"        self.tier2devs \u003d defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_05f03766","line":234,"in_reply_to":"3ac371cc_de04624b","updated":"2016-08-17 20:40:43.000000000","message":"Good idea - done!","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"}],"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":4238,"context_line":"    digest \u003d binascii.unhexlify(path_components[-2])"},{"line_number":4239,"context_line":""},{"line_number":4240,"context_line":"    part_shift \u003d 32 - int(part_power)"},{"line_number":4241,"context_line":"    part \u003d struct.unpack_from(\u0027\u003eI\u0027, digest)[0] \u003e\u003e part_shift"},{"line_number":4242,"context_line":""},{"line_number":4243,"context_line":"    path_components[-4] \u003d \"%d\" % part"},{"line_number":4244,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_b746ca78","line":4241,"updated":"2017-01-31 23:44:15.000000000","message":"I\u0027m kinda sad we can\u0027t use Ring.get_part for more of this.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"}],"swift/obj/diskfile.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a8de8812f04aff1b65b70cfa5b9aaead698c8e3d","unresolved":false,"context_lines":[{"line_number":1447,"context_line":"            logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"},{"line_number":1448,"context_line":"                          target_path, new_target_path)"},{"line_number":1449,"context_line":"            new_target_dir \u003d os.path.dirname(new_target_path)"},{"line_number":1450,"context_line":"            if not os.path.isdir(new_target_dir):"},{"line_number":1451,"context_line":"                os.makedirs(new_target_dir)"},{"line_number":1452,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":1453,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_9dd2b8fe","line":1450,"updated":"2016-07-12 15:40:40.000000000","message":"So the idea is that if we have the object-server create these links after a PUT we know once the relinker has finished all objects should have links.","commit_id":"40b446aaaa0895e0dd0f1f069ce9abafb7fbd3c6"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3702416dc1bfab352074414985a40891fc851f27","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"        # requests to reference."},{"line_number":1442,"context_line":"        renamer(self._tmppath, target_path)"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"        if self.next_part_power:"},{"line_number":1445,"context_line":"            new_target_path \u003d replace_partition_in_path("},{"line_number":1446,"context_line":"                target_path, self.next_part_power)"},{"line_number":1447,"context_line":"            logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_80c20433","line":1444,"updated":"2016-07-13 20:00:14.000000000","message":"should be probably something like\n\n if self.next_part_power and self.next_part_power !\u003d current_part_power:","commit_id":"865a0422532671cc826b7dbb5869df4cae5fece0"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3702416dc1bfab352074414985a40891fc851f27","unresolved":false,"context_lines":[{"line_number":1461,"context_line":"            except OSError:"},{"line_number":1462,"context_line":"                logging.exception(_(\u0027Problem cleaning up %s\u0027), self._datadir)"},{"line_number":1463,"context_line":""},{"line_number":1464,"context_line":"            if self.next_part_power:"},{"line_number":1465,"context_line":"                try:"},{"line_number":1466,"context_line":"                    self.manager.cleanup_ondisk_files(new_target_dir)[\u0027files\u0027]"},{"line_number":1467,"context_line":"                except OSError:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_a0df400b","line":1464,"updated":"2016-07-13 20:00:14.000000000","message":"Maybe better to use:\n if self.next_part_power and self.next_part_power !\u003d current_part_power:\n\nAlso, I think we need to cleanup the (non-existent) self.prev_part_power too.\n\nWill propose some more tests soon.","commit_id":"865a0422532671cc826b7dbb5869df4cae5fece0"},{"author":{"_account_id":13471,"name":"Brian Nelson","email":"brnelson@us.ibm.com","username":"brnelson"},"change_message_id":"4c2d150b374e35e7ff67bbadc1b7b16f33d2cda6","unresolved":false,"context_lines":[{"line_number":1451,"context_line":"            new_target_dir \u003d os.path.dirname(new_target_path)"},{"line_number":1452,"context_line":"            if not os.path.isdir(new_target_dir):"},{"line_number":1453,"context_line":"                os.makedirs(new_target_dir)"},{"line_number":1454,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"        # If rename is successful, flag put as succeeded. This is done to avoid"},{"line_number":1457,"context_line":"        # unnecessary os.unlink() of tempfile later. As renamer() has"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_12f58aec","line":1454,"range":{"start_line":1454,"start_character":12,"end_line":1454,"end_character":49},"updated":"2016-07-14 21:47:44.000000000","message":"Should the new_target_path be removed before calling os.link?  I think the link() will fail if the target path exists.  In the case where there was a second PUT to the same object, would the link already exist from the first PUT?\n(also for the link in ECDiskFileWriter)","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"4c8084d3b6ba034a03823dca092fc87ee8b8d021","unresolved":false,"context_lines":[{"line_number":1451,"context_line":"            new_target_dir \u003d os.path.dirname(new_target_path)"},{"line_number":1452,"context_line":"            if not os.path.isdir(new_target_dir):"},{"line_number":1453,"context_line":"                os.makedirs(new_target_dir)"},{"line_number":1454,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":1455,"context_line":""},{"line_number":1456,"context_line":"        # If rename is successful, flag put as succeeded. This is done to avoid"},{"line_number":1457,"context_line":"        # unnecessary os.unlink() of tempfile later. As renamer() has"}],"source_content_type":"text/x-python","patch_set":6,"id":"fad55976_51d19456","line":1454,"in_reply_to":"1aa78d24_12f58aec","updated":"2016-07-16 18:58:15.000000000","message":"It could be only the same name if the PUT happens exact at the same time (with a precision of 100 microseconds), because the names include the timestamp. And in this case we can\u0027t make a distinction which one is the correct one - and this call will fail. I think we should prefer to raise a warning then, instead of removing an object? I\u0027ll add that to the next patchset (also applies to os.makedirs; a possible exception should be catched as well to ensure the following code will be executed).","commit_id":"0851b6febc09d475ef645ce047dee29309ba5ec3"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":1585,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), new_target_dir)"},{"line_number":1586,"context_line":""},{"line_number":1587,"context_line":"        # Partition power has been increased, cleanup not yet finished"},{"line_number":1588,"context_line":"        if new_path \u003d\u003d cur_path:"},{"line_number":1589,"context_line":"            prev_part_power \u003d int(self.next_part_power) - 1"},{"line_number":1590,"context_line":"            old_target_path \u003d replace_partition_in_path("},{"line_number":1591,"context_line":"                cur_path, prev_part_power)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_e7e90e1c","line":1588,"updated":"2016-10-24 01:45:35.000000000","message":"why not make this the \u0027else\u0027 clause of new_path !\u003d cur_path? i think it would help clarity.","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":1585,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), new_target_dir)"},{"line_number":1586,"context_line":""},{"line_number":1587,"context_line":"        # Partition power has been increased, cleanup not yet finished"},{"line_number":1588,"context_line":"        if new_path \u003d\u003d cur_path:"},{"line_number":1589,"context_line":"            prev_part_power \u003d int(self.next_part_power) - 1"},{"line_number":1590,"context_line":"            old_target_path \u003d replace_partition_in_path("},{"line_number":1591,"context_line":"                cur_path, prev_part_power)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_3fb04e43","line":1588,"in_reply_to":"da6895a0_e7e90e1c","updated":"2016-12-02 17:27:48.000000000","message":"Done","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":2692,"context_line":"            raise exc"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"        if self.next_part_power:"},{"line_number":2695,"context_line":"            if durable_data_file_path !\u003d new_target_path:"},{"line_number":2696,"context_line":"                logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"},{"line_number":2697,"context_line":"                              durable_data_file_path, new_target_path)"},{"line_number":2698,"context_line":"                if not os.path.isdir(new_target_dir):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_87c0527e","line":2695,"updated":"2016-10-24 01:45:35.000000000","message":"this block of code is repeated from _finalize_put. could it be refactored to new method?","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":2692,"context_line":"            raise exc"},{"line_number":2693,"context_line":""},{"line_number":2694,"context_line":"        if self.next_part_power:"},{"line_number":2695,"context_line":"            if durable_data_file_path !\u003d new_target_path:"},{"line_number":2696,"context_line":"                logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"},{"line_number":2697,"context_line":"                              durable_data_file_path, new_target_path)"},{"line_number":2698,"context_line":"                if not os.path.isdir(new_target_dir):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_ff35f645","line":2695,"in_reply_to":"da6895a0_87c0527e","updated":"2016-12-02 17:27:48.000000000","message":"Great idea, done!","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1589,"context_line":"        if new_path !\u003d cur_path:"},{"line_number":1590,"context_line":"            new_target_dir \u003d os.path.dirname(new_path)"},{"line_number":1591,"context_line":"            try:"},{"line_number":1592,"context_line":"                self.manager.cleanup_ondisk_files(new_target_dir)[\u0027files\u0027]"},{"line_number":1593,"context_line":"            except OSError:"},{"line_number":1594,"context_line":"                logging.exception("},{"line_number":1595,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), new_target_dir)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_133227a7","line":1592,"range":{"start_line":1592,"start_character":65,"end_line":1592,"end_character":74},"updated":"2017-01-31 23:44:15.000000000","message":"What does this __get__ do for us?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1589,"context_line":"        if new_path !\u003d cur_path:"},{"line_number":1590,"context_line":"            new_target_dir \u003d os.path.dirname(new_path)"},{"line_number":1591,"context_line":"            try:"},{"line_number":1592,"context_line":"                self.manager.cleanup_ondisk_files(new_target_dir)[\u0027files\u0027]"},{"line_number":1593,"context_line":"            except OSError:"},{"line_number":1594,"context_line":"                logging.exception("},{"line_number":1595,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), new_target_dir)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_7457c725","line":1592,"range":{"start_line":1592,"start_character":65,"end_line":1592,"end_character":74},"in_reply_to":"3a461143_133227a7","updated":"2017-02-01 11:08:47.000000000","message":"Hmm, nothing - it\u0027s a left over from a former patchset. Removing.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":1601,"context_line":"                cur_path, prev_part_power)"},{"line_number":1602,"context_line":"            old_target_dir \u003d os.path.dirname(old_target_path)"},{"line_number":1603,"context_line":"            try:"},{"line_number":1604,"context_line":"                self.manager.cleanup_ondisk_files(old_target_dir)[\u0027files\u0027]"},{"line_number":1605,"context_line":"            except OSError:"},{"line_number":1606,"context_line":"                logging.exception("},{"line_number":1607,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), old_target_dir)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_13c0674f","line":1604,"range":{"start_line":1604,"start_character":65,"end_line":1604,"end_character":74},"updated":"2017-01-31 23:44:15.000000000","message":"Ditto.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":1601,"context_line":"                cur_path, prev_part_power)"},{"line_number":1602,"context_line":"            old_target_dir \u003d os.path.dirname(old_target_path)"},{"line_number":1603,"context_line":"            try:"},{"line_number":1604,"context_line":"                self.manager.cleanup_ondisk_files(old_target_dir)[\u0027files\u0027]"},{"line_number":1605,"context_line":"            except OSError:"},{"line_number":1606,"context_line":"                logging.exception("},{"line_number":1607,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), old_target_dir)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_b433ef12","line":1604,"range":{"start_line":1604,"start_character":65,"end_line":1604,"end_character":74},"in_reply_to":"3a461143_13c0674f","updated":"2017-02-01 11:08:47.000000000","message":"Same","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":2778,"context_line":"            raise exc"},{"line_number":2779,"context_line":""},{"line_number":2780,"context_line":"        if self.next_part_power:"},{"line_number":2781,"context_line":"            relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2782,"context_line":""},{"line_number":2783,"context_line":"    def commit(self, timestamp):"},{"line_number":2784,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d3d5ffe4","line":2781,"updated":"2017-01-31 23:44:15.000000000","message":"In the replicator, we relink then clean up; here we clean up then relink. Why the difference? Is the _part_power_cleanup at the end of the else fully effective if we haven\u0027t relinked yet?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":2778,"context_line":"            raise exc"},{"line_number":2779,"context_line":""},{"line_number":2780,"context_line":"        if self.next_part_power:"},{"line_number":2781,"context_line":"            relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2782,"context_line":""},{"line_number":2783,"context_line":"    def commit(self, timestamp):"},{"line_number":2784,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_65fb9347","line":2781,"in_reply_to":"3a461143_d3d5ffe4","updated":"2017-02-01 11:08:47.000000000","message":"Note to myself: check this.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"624cb783a98d6b725d9423d2770399bbe2d003e0","unresolved":false,"context_lines":[{"line_number":2778,"context_line":"            raise exc"},{"line_number":2779,"context_line":""},{"line_number":2780,"context_line":"        if self.next_part_power:"},{"line_number":2781,"context_line":"            relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2782,"context_line":""},{"line_number":2783,"context_line":"    def commit(self, timestamp):"},{"line_number":2784,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d68b111d","line":2781,"in_reply_to":"3a461143_d3d5ffe4","updated":"2017-02-01 16:20:13.000000000","message":"So, in fact this is wrong. I think this needs to be executed after line 2749; if the exception is triggered the file won\u0027t exist and this call will fail. Changing that, and then it will be in the same order as the replicator too.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"def relink_paths(target_path, new_target_path):"},{"line_number":319,"context_line":"    if target_path !\u003d new_target_path:"},{"line_number":320,"context_line":"        logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"},{"line_number":321,"context_line":"                      target_path, new_target_path)"},{"line_number":322,"context_line":"        new_target_dir \u003d os.path.dirname(new_target_path)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_3908b628","line":319,"range":{"start_line":319,"start_character":19,"end_line":319,"end_character":21},"updated":"2017-02-02 01:37:52.000000000","message":"...do audit locations do something sensible when comparing against strings? I don\u0027t see where/how...\n\nThis probably deserves a docstring, if only to explain what sorts of types we accept.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":316,"context_line":""},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"def relink_paths(target_path, new_target_path):"},{"line_number":319,"context_line":"    if target_path !\u003d new_target_path:"},{"line_number":320,"context_line":"        logging.debug(\u0027Relinking %s to %s due to next_part_power set\u0027,"},{"line_number":321,"context_line":"                      target_path, new_target_path)"},{"line_number":322,"context_line":"        new_target_dir \u003d os.path.dirname(new_target_path)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_8a3a23e6","line":319,"range":{"start_line":319,"start_character":19,"end_line":319,"end_character":21},"in_reply_to":"3a461143_3908b628","updated":"2017-02-02 13:16:41.000000000","message":"No, but because we only compare strings this should be fine.\n\nAdded a docstring.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                        continue"},{"line_number":429,"context_line":"                    for hsh in hashes:"},{"line_number":430,"context_line":"                        hsh_path \u003d os.path.join(suff_path, hsh)"},{"line_number":431,"context_line":"                        yield AuditLocation(hsh_path, device, partition,"},{"line_number":432,"context_line":"                                            policy)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"            update_auditor_status(datadir_path, logger, [], auditor_type)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_b9b8262c","line":431,"updated":"2017-02-02 01:37:52.000000000","message":"OK, *this* uses AuditLocation... but swift.common.utils.audit_location_generator doesn\u0027t, apparently?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                        continue"},{"line_number":429,"context_line":"                    for hsh in hashes:"},{"line_number":430,"context_line":"                        hsh_path \u003d os.path.join(suff_path, hsh)"},{"line_number":431,"context_line":"                        yield AuditLocation(hsh_path, device, partition,"},{"line_number":432,"context_line":"                                            policy)"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"            update_auditor_status(datadir_path, logger, [], auditor_type)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_4a175b54","line":431,"in_reply_to":"3a461143_b9b8262c","updated":"2017-02-02 13:16:41.000000000","message":"Right; sorry, mixed that up. IIRC I used object_audit_loc somewhere in the past, and therefore needed the str(). However, as mentioned elsewhere that calls update_auditor_status and that\u0027s not wanted.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            try:"},{"line_number":333,"context_line":"                os.makedirs(new_target_dir)"},{"line_number":334,"context_line":"            except OSError as exc:"},{"line_number":335,"context_line":"                logging.info(\u0027Makedir %s failed: %s\u0027,"},{"line_number":336,"context_line":"                             new_target_dir, exc)"},{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_465ce14a","line":335,"range":{"start_line":335,"start_character":24,"end_line":335,"end_character":28},"updated":"2017-02-09 16:06:41.000000000","message":"should this be warning level?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                os.makedirs(new_target_dir)"},{"line_number":334,"context_line":"            except OSError as exc:"},{"line_number":335,"context_line":"                logging.info(\u0027Makedir %s failed: %s\u0027,"},{"line_number":336,"context_line":"                             new_target_dir, exc)"},{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":339,"context_line":"        except OSError as exc:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_e6422d67","line":336,"updated":"2017-02-09 16:06:41.000000000","message":"could return here - the subsequent link will always fail?\n\nBut if returning then add some reference to \"relinker\" in the log message.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":339,"context_line":"        except OSError as exc:"},{"line_number":340,"context_line":"            logging.info(\u0027Relinking %s to %s failed: %s\u0027,"},{"line_number":341,"context_line":"                         target_path, new_target_path, exc)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_c61d3174","line":340,"range":{"start_line":340,"start_character":20,"end_line":340,"end_character":24},"updated":"2017-02-09 16:06:41.000000000","message":"Should this be warning level? If this fails then the op needs to NOT proceed with part power increase - otherwise data could be lost when the relinker cleans-up??","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":339,"context_line":"        except OSError as exc:"},{"line_number":340,"context_line":"            logging.info(\u0027Relinking %s to %s failed: %s\u0027,"},{"line_number":341,"context_line":"                         target_path, new_target_path, exc)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_80c0642c","line":340,"range":{"start_line":340,"start_character":20,"end_line":340,"end_character":24},"in_reply_to":"1a430d35_c61d3174","updated":"2017-02-09 18:39:26.000000000","message":"I\u0027m increasingly certain that both of these should be warnings.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":339,"context_line":"        except OSError as exc:"},{"line_number":340,"context_line":"            logging.info(\u0027Relinking %s to %s failed: %s\u0027,"},{"line_number":341,"context_line":"                         target_path, new_target_path, exc)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"class AuditLocation(object):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_86008903","line":341,"updated":"2017-02-09 16:06:41.000000000","message":"So what is the strategy for recovering from these failed relink attempts? When is it safe to cleanup old links?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            os.link(target_path, new_target_path)"},{"line_number":339,"context_line":"        except OSError as exc:"},{"line_number":340,"context_line":"            logging.info(\u0027Relinking %s to %s failed: %s\u0027,"},{"line_number":341,"context_line":"                         target_path, new_target_path, exc)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"class AuditLocation(object):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_c04d0c9b","line":341,"in_reply_to":"1a430d35_86008903","updated":"2017-02-09 18:39:26.000000000","message":"Run it again? So we should make sure it\u0027s idempotent, and doesn\u0027t just spam failures the second time around :-/","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"    :param tmppath: full path name of the opened file descriptor"},{"line_number":1432,"context_line":"    :param bytes_per_sync: number bytes written between sync calls"},{"line_number":1433,"context_line":"    :param diskfile: the diskfile creating this DiskFileWriter instance"},{"line_number":1434,"context_line":"    :param next_part_power: the next partition power to be used"},{"line_number":1435,"context_line":"    \"\"\""},{"line_number":1436,"context_line":""},{"line_number":1437,"context_line":"    def __init__(self, name, datadir, fd, tmppath, bytes_per_sync, diskfile,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_abec692a","line":1434,"updated":"2017-02-09 16:06:41.000000000","message":"this could just be accessed from diskfile","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1508,"context_line":"            link_fd_to_path(self._fd, target_path,"},{"line_number":1509,"context_line":"                            self._diskfile._dirs_created)"},{"line_number":1510,"context_line":""},{"line_number":1511,"context_line":"        # Check if the partition power will/has been increased"},{"line_number":1512,"context_line":"        new_target_path \u003d None"},{"line_number":1513,"context_line":"        if self.next_part_power:"},{"line_number":1514,"context_line":"            new_target_path \u003d replace_partition_in_path("}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_ab08e9da","line":1511,"range":{"start_line":1511,"start_character":44,"end_line":1511,"end_character":47},"updated":"2017-02-09 16:06:41.000000000","message":"nit: not sure I understand the \"has\"...don\u0027t we do this in the prepare phase, but not unlinking in the cleanup?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1513,"context_line":"        if self.next_part_power:"},{"line_number":1514,"context_line":"            new_target_path \u003d replace_partition_in_path("},{"line_number":1515,"context_line":"                target_path, self.next_part_power)"},{"line_number":1516,"context_line":"            relink_paths(target_path, new_target_path)"},{"line_number":1517,"context_line":""},{"line_number":1518,"context_line":"        # If rename is successful, flag put as succeeded. This is done to avoid"},{"line_number":1519,"context_line":"        # unnecessary os.unlink() of tempfile later. As renamer() has"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_4b4865cd","line":1516,"updated":"2017-02-09 16:06:41.000000000","message":"don\u0027t we need to fsync_dir here? renamer does do fsync_dir by default, so that the new name is persisted in the data dir inode, so by same logic the new datadir should also be fsync\u0027d. It could be argued that the prepare phase is slow and it is therefore safe to assume that the kernel will have sync\u0027d all new data dir inodes to disk before we need to use them, BUT if we are assuming that the relinking has succeeded then we need to be sure we are fsync\u0027ing as we go.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"                logging.exception("},{"line_number":1599,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), new_target_dir)"},{"line_number":1600,"context_line":""},{"line_number":1601,"context_line":"        # Partition power has been increased, cleanup not yet finished"},{"line_number":1602,"context_line":"        else:"},{"line_number":1603,"context_line":"            prev_part_power \u003d int(self.next_part_power) - 1"},{"line_number":1604,"context_line":"            old_target_path \u003d replace_partition_in_path("}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_5a1ca96a","line":1601,"updated":"2017-02-09 16:06:41.000000000","message":"or this object was in partition 0 and still is?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1600,"context_line":""},{"line_number":1601,"context_line":"        # Partition power has been increased, cleanup not yet finished"},{"line_number":1602,"context_line":"        else:"},{"line_number":1603,"context_line":"            prev_part_power \u003d int(self.next_part_power) - 1"},{"line_number":1604,"context_line":"            old_target_path \u003d replace_partition_in_path("},{"line_number":1605,"context_line":"                cur_path, prev_part_power)"},{"line_number":1606,"context_line":"            old_target_dir \u003d os.path.dirname(old_target_path)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_b1ca1819","line":1603,"updated":"2017-02-09 16:06:41.000000000","message":"could this condition be due to a \"cancel\" operation? if so, prev_part_power never existed. Is that ok? I *think* everything that follows becomes no-ops.\n\nnit: mention \"cancel\" in the comment at line 1601","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"070f0c2acd64af135637fbef3b869dedb21380f9","unresolved":false,"context_lines":[{"line_number":1600,"context_line":""},{"line_number":1601,"context_line":"        # Partition power has been increased, cleanup not yet finished"},{"line_number":1602,"context_line":"        else:"},{"line_number":1603,"context_line":"            prev_part_power \u003d int(self.next_part_power) - 1"},{"line_number":1604,"context_line":"            old_target_path \u003d replace_partition_in_path("},{"line_number":1605,"context_line":"                cur_path, prev_part_power)"},{"line_number":1606,"context_line":"            old_target_dir \u003d os.path.dirname(old_target_path)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_14f755f6","line":1603,"in_reply_to":"1a430d35_b1ca1819","updated":"2017-02-09 18:39:26.000000000","message":"Following a cancel, next_part_power will be None, so new_target_path is None and we bail at L1590.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":1608,"context_line":"                self.manager.cleanup_ondisk_files(old_target_dir)"},{"line_number":1609,"context_line":"            except OSError:"},{"line_number":1610,"context_line":"                logging.exception("},{"line_number":1611,"context_line":"                    _(\u0027Problem cleaning up %s\u0027), old_target_dir)"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":""},{"line_number":1614,"context_line":"class BaseDiskFileReader(object):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_6b2b6195","line":1611,"updated":"2017-02-09 16:06:41.000000000","message":"for debugging, it might be helpful to distinguish the two error messages (here and line 1599)","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":2522,"context_line":"            dfw \u003d self.writer_cls(self._name, self._datadir, fd, tmppath,"},{"line_number":2523,"context_line":"                                  bytes_per_sync\u003dself._bytes_per_sync,"},{"line_number":2524,"context_line":"                                  diskfile\u003dself,"},{"line_number":2525,"context_line":"                                  next_part_power\u003dself.next_part_power)"},{"line_number":2526,"context_line":"            yield dfw"},{"line_number":2527,"context_line":"        finally:"},{"line_number":2528,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_264275ae","line":2525,"updated":"2017-02-09 16:06:41.000000000","message":"since we are passing a reference to diskfile to the writer it isn\u0027t necessary to also pass next_part_power - the write can just access diskfile.next_part_power\n\n(there is some legacy inconsistency here - the same applies to _name, _datadir etc., then at some point diskfile has been added to the args)","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":2750,"context_line":"        try:"},{"line_number":2751,"context_line":"            try:"},{"line_number":2752,"context_line":"                os.rename(data_file_path, durable_data_file_path)"},{"line_number":2753,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2754,"context_line":"                if self.next_part_power:"},{"line_number":2755,"context_line":"                    relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2756,"context_line":"            except (OSError, IOError) as err:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_31caa86f","line":2753,"range":{"start_line":2753,"start_character":16,"end_line":2753,"end_character":25},"updated":"2017-02-09 16:06:41.000000000","message":"(see comment in _finalize_put) - I think we probably need to also fsync_dir the new target path data dir once the durable file has been relinked (or renamed) there.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":2752,"context_line":"                os.rename(data_file_path, durable_data_file_path)"},{"line_number":2753,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2754,"context_line":"                if self.next_part_power:"},{"line_number":2755,"context_line":"                    relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2756,"context_line":"            except (OSError, IOError) as err:"},{"line_number":2757,"context_line":"                if err.errno not in (errno.ENOSPC, errno.EDQUOT):"},{"line_number":2758,"context_line":"                    # re-raise to catch all handler"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_914b5c5f","line":2755,"range":{"start_line":2755,"start_character":20,"end_line":2755,"end_character":33},"updated":"2017-02-09 16:06:41.000000000","message":"If this fails then the old datadir is durable but the new is not. Would it be better to reverse the order and make the new durable first?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":2752,"context_line":"                os.rename(data_file_path, durable_data_file_path)"},{"line_number":2753,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2754,"context_line":"                if self.next_part_power:"},{"line_number":2755,"context_line":"                    relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2756,"context_line":"            except (OSError, IOError) as err:"},{"line_number":2757,"context_line":"                if err.errno not in (errno.ENOSPC, errno.EDQUOT):"},{"line_number":2758,"context_line":"                    # re-raise to catch all handler"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_8e489b8c","line":2755,"updated":"2017-02-09 16:06:41.000000000","message":"if this succeeds and then the process fails, we will be left with a durable data file and a \"plain\" data file in the next_part_power datadir. I\u0027m not sure if we have a code path that would ever clean that up (I didn\u0027t see it yet, but haven\u0027t written a test).\n\ninstead of relinking here, could we rename (similar to line 2752) which would be \"atomic\"?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f5d151efe398ced0653964f0756d3c6a88fa57a","unresolved":false,"context_lines":[{"line_number":2765,"context_line":"                    \u0027No space left on device for %(file)s (%(err)s)\u0027 % params)"},{"line_number":2766,"context_line":"            else:"},{"line_number":2767,"context_line":"                try:"},{"line_number":2768,"context_line":"                    self.manager.cleanup_ondisk_files(self._datadir)[\u0027files\u0027]"},{"line_number":2769,"context_line":"                except OSError as os_err:"},{"line_number":2770,"context_line":"                    self.manager.logger.exception("},{"line_number":2771,"context_line":"                        _(\u0027Problem cleaning up %(datadir)s (%(err)s)\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_5161f4d2","line":2768,"updated":"2017-02-09 16:06:41.000000000","message":"if the relink fails then we don\u0027t cleanup the old data dir.\n\nMaybe we need each of the operations (old datadir and new datadir) to have separate exception handling, e.g. have a helper method to perform the durable rename/exception handling/cleanup, call it for each of the old and new paths??","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9233bbab129179ac3481bb01d5c12c9878f03190","unresolved":false,"context_lines":[{"line_number":350,"context_line":"    :param check_existing: if True, check whether the link is already present"},{"line_number":351,"context_line":"                           before attempting to create a new one"},{"line_number":352,"context_line":"    :returns: True if there was an error, False otherwise"},{"line_number":353,"context_line":"    :raises OSError: if the relinking itself failed"},{"line_number":354,"context_line":"    \"\"\""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    if target_path !\u003d new_target_path:"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa31d9ce_38c827a8","line":353,"updated":"2017-02-22 18:25:34.000000000","message":"Seems like we need a good bit more error handling in the CLI relinker now.","commit_id":"7f99808fe389f350c49ccd3d6bcf53ee1713e9b1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9233bbab129179ac3481bb01d5c12c9878f03190","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        return True"},{"line_number":374,"context_line":"    else:"},{"line_number":375,"context_line":"        return False"},{"line_number":376,"context_line":"        link_exists \u003d False"},{"line_number":377,"context_line":"        if check_existing:"},{"line_number":378,"context_line":"            try:"},{"line_number":379,"context_line":"                new_stat \u003d os.stat(new_target_path)"}],"source_content_type":"text/x-python","patch_set":34,"id":"fa31d9ce_d8b46b36","line":376,"updated":"2017-02-22 18:25:34.000000000","message":"With the return above, this is dead code.","commit_id":"7f99808fe389f350c49ccd3d6bcf53ee1713e9b1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6d8657518370d0418b4562a7cd114654646640b1","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    :param new_target_path: new absolute filename for the hardlink"},{"line_number":350,"context_line":"    :param check_existing: if True, check whether the link is already present"},{"line_number":351,"context_line":"                           before attempting to create a new one"},{"line_number":352,"context_line":"    :returns: True if there was an error, False otherwise"},{"line_number":353,"context_line":"    \"\"\""},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    if target_path !\u003d new_target_path:"}],"source_content_type":"text/x-python","patch_set":36,"id":"da36d5c6_d8c3b487","line":352,"updated":"2017-02-22 21:38:05.000000000","message":"I think we can remove this now.","commit_id":"43278998cc10a03e5ffa94a431773b27fa37a0f5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6d8657518370d0418b4562a7cd114654646640b1","unresolved":false,"context_lines":[{"line_number":1546,"context_line":"            new_target_path \u003d replace_partition_in_path("},{"line_number":1547,"context_line":"                target_path, self.next_part_power)"},{"line_number":1548,"context_line":"            try:"},{"line_number":1549,"context_line":"                relink_paths(target_path, new_target_path)"},{"line_number":1550,"context_line":"            except OSError as exc:"},{"line_number":1551,"context_line":"                self.manager.logger.exception("},{"line_number":1552,"context_line":"                    \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"da36d5c6_9844dc1b","line":1549,"updated":"2017-02-22 21:38:05.000000000","message":"Alistair had some concerns about needing to fsync_dir before... did we ever sort that out?","commit_id":"43278998cc10a03e5ffa94a431773b27fa37a0f5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f3b6dba4b9aed69e261da4d32c76c638c290ca5f","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_f1f6858d","line":2793,"updated":"2017-02-24 22:26:20.000000000","message":"Oh, right! Did we want to think about Alistair\u0027s rename idea?","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a40114056eecfeb556c9654ded89f547b51991af","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_8d17ca43","line":2793,"in_reply_to":"da36d5c6_00f2c605","updated":"2017-02-27 11:48:13.000000000","message":"So, the only problem was a non-durable file in the old location - that raised a DiskFileNotExist in the relinker. and therefore wasn\u0027t properly linked. Cleanup failed therefore too on that fragment. Fixed that.\n\nIf there is a non-durable file in the new location, it will be fixed by the reconstructor.\n\nSimulated that locally and after all the processes run and partpower increase was done, everything was fixed as expected.","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"7b5fb1ea04f68b9af4e1a458c6d9e4674fa1445b","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_00f2c605","line":2793,"in_reply_to":"da36d5c6_20052010","updated":"2017-02-27 09:36:31.000000000","message":"Ah, ok - thx for remembering that!\n\nIndeed, I was able to simulate this. I did a manual \"cp -a\" of an durable file to a \"normal\" data file, and that one persisted relinking and cleanup. It was also not fixed by the auditor or reconstructor.\n\nUnfortunately, simply doing a rename won\u0027t work. We need the file in both locations before finishing the increase. Otherwise the object won\u0027t be available for the object-server, because the object-server expects the object still in the old partition.\n\nI think we need to check EC diskfiles in the new location when doing the cleanup, wdyt?\n\nOr, we could relink first, and then do the rename. If the relinking fails then, it will be fixed by the reconstructor later on.","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a3bda43acf09f1a05251f8f22a93d0e10e40c6a","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_20052010","line":2793,"in_reply_to":"da36d5c6_e27a3123","updated":"2017-02-25 06:38:52.000000000","message":"From ps32:\n\n\u003e if this succeeds and then the process fails, we will be left with a durable data file and a \"plain\" data file in the next_part_power datadir. I\u0027m not sure if we have a code path that would ever clean that up (I didn\u0027t see it yet, but haven\u0027t written a test).\n\n\u003e instead of relinking here, could we rename (similar to line 2752) which would be \"atomic\"?\n\nThe concern (as I understand it) was that we could have a flow like\n\n (start PUT)\n \n    old#N.data\n \n (relink)\n \n    old#N.data\n    new#N.data\n \n (commit)\n \n    old#N#d.data\n    new#N.data\n \n (relink)\n \n    old#N#d.data\n    new#N.data\n    new#N#d.data\n\nIf the server then dies before getting to self._part_power_cleanup (completely unrelated to the code -- someone tripped over the power cord or something), we would have three links to the same file and it\u0027s not entirely obvious when that non-durable .data would get cleaned up.\n\nCertainly, it wouldn\u0027t happen when we run cleanup; both the durable and non-durable data are in the right directory. Maybe it would happen when we open the diskfile?\n\nOr, instead of relinking old#N#d.data to new#N#d.data, we could move new#N.data to new#N#d.data and only ever have the two links.","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"a284a2290178caa017195aa7c2ac701005a05339","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"da36d5c6_e27a3123","line":2793,"in_reply_to":"da36d5c6_f1f6858d","updated":"2017-02-25 02:16:16.000000000","message":"Hmm, I think I miss sth here - what kind of rename thing that is related to EC? Pls let me know what you have in mind","commit_id":"1129deb38e3ef5a832f22d82516d0e899f80c22f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9ba98833b8a4974e968d8eb824be57e608fe9d1","unresolved":false,"context_lines":[{"line_number":1545,"context_line":"            new_target_path \u003d replace_partition_in_path("},{"line_number":1546,"context_line":"                target_path, self.next_part_power)"},{"line_number":1547,"context_line":"            try:"},{"line_number":1548,"context_line":"                fsync_dir(target_path)"},{"line_number":1549,"context_line":"                relink_paths(target_path, new_target_path)"},{"line_number":1550,"context_line":"            except OSError as exc:"},{"line_number":1551,"context_line":"                self.manager.logger.exception("}],"source_content_type":"text/x-python","patch_set":43,"id":"1a1ced50_872d4f00","line":1548,"updated":"2017-03-21 17:29:06.000000000","message":"Currently we\u0027ll do the fsync_dir even if target_path \u003d\u003d new_target_path.\n\nShould we maybe do it inside relink_paths? Or would that mean we do it twice down when we\u0027re dealing with durables? Might be better to just reproduce the\n\n if target_path !\u003d new_target_path:\n\nlogic. Also, should that be\n\n fsync_dir(os.path.dirname(target_path))\n\n? Otherwise, it seems to always fail with \"OSError: [Errno 20] Not a directory\"","commit_id":"8f3ebaf6d6df35d35460f266f5d60ab05a1714fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9ba98833b8a4974e968d8eb824be57e608fe9d1","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"                fsync_dir(self._datadir)"},{"line_number":2791,"context_line":"                if self.next_part_power:"},{"line_number":2792,"context_line":"                    try:"},{"line_number":2793,"context_line":"                        relink_paths(durable_data_file_path, new_target_path)"},{"line_number":2794,"context_line":"                    except OSError as exc:"},{"line_number":2795,"context_line":"                        self.manager.logger.exception("},{"line_number":2796,"context_line":"                            \u0027Relinking %s to %s failed: %s\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a1ced50_bde6d8ad","line":2793,"updated":"2017-03-21 17:29:06.000000000","message":"Still maybe better to do a rename? I\u0027m a little concerned that we can have three links to the same inode if the server falls over between this relink and the _part_power_cleanup below... Something like what happens in http://paste.openstack.org/show/603641/\n\nAlso, while I was trying to POC that, I noticed that while the old partition dir has a .lock and hashes.invalid, the new one doesn\u0027t... is that intentional? Would anything bad happen if two proxies tried to service PUTs for the same object at about the same time, one with next_part_power \u003d\u003d part_power + 1 and the other with next_part_power \u003d\u003d part_power?","commit_id":"8f3ebaf6d6df35d35460f266f5d60ab05a1714fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"53a3a3c7637bf9a0776ced4aad4cfb5ee81d8d63","unresolved":false,"context_lines":[{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    :param target_path: current absolute filename"},{"line_number":354,"context_line":"    :param new_target_path: new absolute filename for the hardlink"},{"line_number":355,"context_line":"    :param check_existing: if True, check whether the link is already present"},{"line_number":356,"context_line":"                           before attempting to create a new one"},{"line_number":357,"context_line":"    \"\"\""},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"df140735_d6b910cc","line":355,"range":{"start_line":355,"start_character":11,"end_line":355,"end_character":25},"updated":"2017-06-03 00:42:57.000000000","message":"I think we stopped using this param in a rebase. Or maybe we never merged that suggestion in properly? I think we just need something like\n\n diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py\n index b8efae4f..7f622a2c 100644\n --- a/swift/obj/diskfile.py\n +++ b/swift/obj/diskfile.py\n @@ -362,7 +362,18 @@ def relink_paths(target_path, new_target_path, check_existing\u003dFalse):\n          new_target_dir \u003d os.path.dirname(new_target_path)\n          if not os.path.isdir(new_target_dir):\n              os.makedirs(new_target_dir)\n -        os.link(target_path, new_target_path)\n +\n +        link_exists \u003d False\n +        if check_existing:\n +            try:\n +                new_stat \u003d os.stat(new_target_path)\n +                orig_stat \u003d os.stat(target_path)\n +                link_exists \u003d (new_stat.st_ino \u003d\u003d orig_stat.st_ino)\n +            except OSError as exc:\n +                pass  # if anything goes wrong, try anyway\n +\n +        if not link_exists:\n +            os.link(target_path, new_target_path)\n  \n  \n  def get_part_path(dev_path, policy, partition):\n\nOtherwise, we\u0027ll see errors like\n\n ...\n Relinking /srv/node1/sdb5/objects/107/bfe/6b98df18a91b8e75d794ae9d68a17bfe/1496446639.78014#5#d.data to /srv/node1/sdb5/objects/215/bfe/6b98df18a91b8e75d794ae9d68a17bfe/1496446639.78014#5#d.data failed: [Errno 17] File exists\n Relinking /srv/node1/sdb5/objects/118/02b/76018bfb45e10f7e1ceefe9ce80b902b/1496446640.22980#3#d.data to /srv/node1/sdb5/objects/236/02b/76018bfb45e10f7e1ceefe9ce80b902b/1496446640.22980#3#d.data failed: [Errno 17] File exists\n Relinking /srv/node1/sdb5/objects/166/5a9/a68e15650c23633b83ccdd269e5555a9/1496446640.44133#3#d.data to /srv/node1/sdb5/objects/333/5a9/a68e15650c23633b83ccdd269e5555a9/1496446640.44133#3#d.data failed: [Errno 17] File exists\n Relinked 295 diskfiles (295 errors)\n\nwhen relinking objects that are PUT after the proxy loads the prepared ring.","commit_id":"872e66b36485b8cc765e2373d7a2b900f9616532"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                    # and stored data"},{"line_number":940,"context_line":"                    if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":941,"context_line":"                        self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":942,"context_line":"                        return"},{"line_number":943,"context_line":"                    self.run_pool.spawn(self.process_job, job)"},{"line_number":944,"context_line":"            with Timeout(self.lockup_timeout):"},{"line_number":945,"context_line":"                self.run_pool.waitall()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_be9bb771","line":942,"updated":"2017-02-01 20:38:23.000000000","message":"Similar to the replicator, it seems like we could pull this out of the loop, to around line 914 (or even 910).","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                    # and stored data"},{"line_number":940,"context_line":"                    if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":941,"context_line":"                        self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":942,"context_line":"                        return"},{"line_number":943,"context_line":"                    self.run_pool.spawn(self.process_job, job)"},{"line_number":944,"context_line":"            with Timeout(self.lockup_timeout):"},{"line_number":945,"context_line":"                self.run_pool.waitall()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_b3f8484b","line":942,"in_reply_to":"3a461143_be9bb771","updated":"2017-02-01 23:21:06.000000000","message":"Done; moved to line 921/922","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                    part_info[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":932,"context_line":"                    return"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":935,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_5ee1e8fd","line":932,"updated":"2017-02-02 01:37:52.000000000","message":"All the way out! We\u0027re still checking this for every part_info, but it\u0027ll never change.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                    part_info[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":932,"context_line":"                    return"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":935,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_455d8ceb","line":932,"in_reply_to":"3a461143_5ee1e8fd","updated":"2017-02-02 13:16:41.000000000","message":"Mhh, if you have multiple policies it will change? So if there is a policy with a partpower increase and another without, we don\u0027t want to skip the latter one?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        try:"},{"line_number":916,"context_line":"            self.run_pool \u003d GreenPool(size\u003dself.concurrency)"},{"line_number":917,"context_line":"            for part_info in self.collect_parts(**kwargs):"},{"line_number":918,"context_line":"                if not self.check_ring(part_info[\u0027policy\u0027].object_ring):"},{"line_number":919,"context_line":"                    self.logger.info(_(\"Ring change detected. Aborting \""},{"line_number":920,"context_line":"                                       \"current reconstruction pass.\"))"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a461143_f8c60848","line":917,"updated":"2017-02-02 19:02:09.000000000","message":"So if\n\n* we have multiple EC policies,\n* at least one is increasing its part_power, and\n* at least one is *not*\n\nthen some random sampling of parts (possibly including an empty sample) will get reconstructed, until the result of collect_parts spits out a part for a ring that\u0027s increasing its part_power.\n\nI guess that\u0027s probably OK? Just seems a little weird; like, we should either reconstruct *all* of the parts for the unaffected policies, or we should check all policies for increases at the outset and bomb out if *any* of them are increasing.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":914,"context_line":""},{"line_number":915,"context_line":"        try:"},{"line_number":916,"context_line":"            self.run_pool \u003d GreenPool(size\u003dself.concurrency)"},{"line_number":917,"context_line":"            for part_info in self.collect_parts(**kwargs):"},{"line_number":918,"context_line":"                if not self.check_ring(part_info[\u0027policy\u0027].object_ring):"},{"line_number":919,"context_line":"                    self.logger.info(_(\"Ring change detected. Aborting \""},{"line_number":920,"context_line":"                                       \"current reconstruction pass.\"))"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_192b0632","line":917,"in_reply_to":"3a461143_f8c60848","updated":"2017-02-03 09:46:11.000000000","message":"Ah, now I got it.\n\nYes, absolutely, this is not correct. Actually the \"return\" below should be a \"continue\" IMO.\n\nI changed that; that skips only the current job and continues with the other jobs. So if one has a mix of rings with increasing partpower and some without, it will still continue the job for the non-increasing ones.\n\nIt actually logs one entry for every job; this is a bit of spam if there is only a single ring, but better log this too often than missing out. We could move the logging before the try.. starts, but again - if there is a very-long running replication pass, this might get missed.\n\nIn fact this logging should only appear for some hours, during the transition - so I think this is ok as it is.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                next_part_power \u003d getattr("},{"line_number":929,"context_line":"                    part_info[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":932,"context_line":"                    return"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"                self.reconstruction_part_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a461143_38c1702f","line":931,"updated":"2017-02-02 19:02:09.000000000","message":"Is it worth mentioning which policy tripped this?","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                next_part_power \u003d getattr("},{"line_number":929,"context_line":"                    part_info[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":932,"context_line":"                    return"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"                self.reconstruction_part_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_19ece6c6","line":931,"in_reply_to":"3a461143_38c1702f","updated":"2017-02-03 09:46:11.000000000","message":"It does - done","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"843f43fa747ffef4d384e013406855c6f36ba30a","unresolved":false,"context_lines":[{"line_number":928,"context_line":"                next_part_power \u003d getattr("},{"line_number":929,"context_line":"                    part_info[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning("},{"line_number":932,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\")"},{"line_number":933,"context_line":"                        % part_info[\u0027policy\u0027].name)"},{"line_number":934,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_75b6bc8b","line":931,"updated":"2017-02-03 20:45:51.000000000","message":"I was going to ask at which log level we expect this to be run, and then start complaining about how noisy it\u0027s going to be -- I even got as far as writing up http://paste.openstack.org/show/597623/ -- but then I remembered: the whole *point* of all of this is that we\u0027re down to a handful of parts per disk! We should be *very* surprised if we ever get more than 10 or 20 warnings per run.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"843f43fa747ffef4d384e013406855c6f36ba30a","unresolved":false,"context_lines":[{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning("},{"line_number":932,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\")"},{"line_number":933,"context_line":"                        % part_info[\u0027policy\u0027].name)"},{"line_number":934,"context_line":"                    continue"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"                self.reconstruction_part_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_f52f0c9f","line":933,"range":{"start_line":933,"start_character":24,"end_line":933,"end_character":25},"updated":"2017-02-03 20:45:51.000000000","message":"nit: might be worth letting logging handle the interpolation.","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"831c914f5379fcd739a66a0f5eee4a00e688a74b","unresolved":false,"context_lines":[{"line_number":930,"context_line":"                if next_part_power is not None:"},{"line_number":931,"context_line":"                    self.logger.warning("},{"line_number":932,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\")"},{"line_number":933,"context_line":"                        % part_info[\u0027policy\u0027].name)"},{"line_number":934,"context_line":"                    continue"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":"                self.reconstruction_part_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":31,"id":"1a430d35_a5af8428","line":933,"range":{"start_line":933,"start_character":24,"end_line":933,"end_character":25},"in_reply_to":"1a430d35_f52f0c9f","updated":"2017-02-08 07:28:43.000000000","message":"Done","commit_id":"bf1694f83d89177f323adc36e71d967ddfdd59bd"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aaa879771ccc229dada183febfd4b4dc00d448cd","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                    self.logger.warning("},{"line_number":1031,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\"),"},{"line_number":1032,"context_line":"                        part_info[\u0027policy\u0027].name)"},{"line_number":1033,"context_line":"                    continue"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":1036,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":44,"id":"1f013ff3_e753ede1","line":1033,"updated":"2017-05-13 06:09:45.000000000","message":"I don\u0027t see how this can be a good idea. The code appears to check a ring in a policy for every partition. This is likely to produce a flood of identical warnings. Needs to do something else than just continue.","commit_id":"7d495d0aafd1b0f535f96a55b5a4f800fcc391be"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e1d2836bebe2eb1f33acd5efae65697ef00f29f4","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                    self.logger.warning("},{"line_number":1031,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\"),"},{"line_number":1032,"context_line":"                        part_info[\u0027policy\u0027].name)"},{"line_number":1033,"context_line":"                    continue"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":1036,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":44,"id":"1f013ff3_747640a7","line":1033,"in_reply_to":"1f013ff3_2f9e3a63","updated":"2017-05-16 01:00:36.000000000","message":"I would be okay with taking the change above verbatim and relocating it to collect_parts(), where it walks ec_policies.\n\nI don\u0027t agree with trying to out-shout possible other messages, as per \" if there are other partitions on the same node that aren\u0027t affected and take some time to replicate, a single message might be overseen very easily.\"","commit_id":"7d495d0aafd1b0f535f96a55b5a4f800fcc391be"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8c308e7cb8e0d076d3441879ee7d10154072f0a5","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                    self.logger.warning("},{"line_number":1031,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\"),"},{"line_number":1032,"context_line":"                        part_info[\u0027policy\u0027].name)"},{"line_number":1033,"context_line":"                    continue"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":1036,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":44,"id":"1f013ff3_797e276c","line":1033,"in_reply_to":"1f013ff3_747640a7","updated":"2017-05-16 13:36:46.000000000","message":"Alright, in that case I will move this and do the same for the replicator.","commit_id":"7d495d0aafd1b0f535f96a55b5a4f800fcc391be"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"3534e84a8a6a5d923b26f37c38d0c68dad37090c","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                    self.logger.warning("},{"line_number":1031,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\"),"},{"line_number":1032,"context_line":"                        part_info[\u0027policy\u0027].name)"},{"line_number":1033,"context_line":"                    continue"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"                self.reconstruction_part_count +\u003d 1"},{"line_number":1036,"context_line":"                jobs \u003d self.build_reconstruction_jobs(part_info)"}],"source_content_type":"text/x-python","patch_set":44,"id":"1f013ff3_2f9e3a63","line":1033,"in_reply_to":"1f013ff3_e753ede1","updated":"2017-05-15 10:41:39.000000000","message":"Well, this was intended - better log too much, and by doing so raising the awareness of the operator.\n\nGiven that there are only so many partitions per server (and that number will be rather low if one wants to increase partition power) and it takes some time to iterate over all of them, I prefer to warn more often than not.\n\nIf all partitions belong to a policy that increases its partpower, this might be a lot (probably in the range of 2000 or so? Like 100 parts per disk times 20?). However, if there are other partitions on the same node that aren\u0027t affected and take some time to replicate, a single message might be overseen very easily.\n\nWhat else should be done here?","commit_id":"7d495d0aafd1b0f535f96a55b5a4f800fcc391be"}],"swift/obj/replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a8de8812f04aff1b65b70cfa5b9aaead698c8e3d","unresolved":false,"context_lines":[{"line_number":739,"context_line":"                # and stored data"},{"line_number":740,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":741,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":742,"context_line":"                    return"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"                try:"},{"line_number":745,"context_line":"                    if isfile(job[\u0027path\u0027]):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_1d640820","line":742,"updated":"2016-07-12 15:40:40.000000000","message":"ok, disable replication wholesale while a next_part_power is set.","commit_id":"40b446aaaa0895e0dd0f1f069ce9abafb7fbd3c6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3a461143_5314af4b","updated":"2017-01-31 23:44:15.000000000","message":"No corresponding change to the reconstructor?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"624cb783a98d6b725d9423d2770399bbe2d003e0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3a461143_5369f324","in_reply_to":"3a461143_5314af4b","updated":"2017-02-01 16:20:13.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"3a461143_056f2ffc","in_reply_to":"3a461143_5314af4b","updated":"2017-02-01 11:08:47.000000000","message":"Good catch, I think this is missing.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":748,"context_line":"                # detect them and would create a second copy of the file if not"},{"line_number":749,"context_line":"                # yet existing - and this might double the actual transferred"},{"line_number":750,"context_line":"                # and stored data"},{"line_number":751,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":752,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":753,"context_line":"                    return"},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_535caf7c","line":751,"updated":"2017-01-31 23:44:15.000000000","message":"I know it shouldn\u0027t ever be an issue, but I\u0027d just feel better if there were a\n\n ...is not None:\n\non the end of this.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"c07db72840846f24be2985d6bf683de4c4a385cc","unresolved":false,"context_lines":[{"line_number":748,"context_line":"                # detect them and would create a second copy of the file if not"},{"line_number":749,"context_line":"                # yet existing - and this might double the actual transferred"},{"line_number":750,"context_line":"                # and stored data"},{"line_number":751,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":752,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":753,"context_line":"                    return"},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_88f79a8b","line":751,"in_reply_to":"3a461143_07647e47","updated":"2017-02-01 23:20:23.000000000","message":"Done, also for the reconstructor.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":748,"context_line":"                # detect them and would create a second copy of the file if not"},{"line_number":749,"context_line":"                # yet existing - and this might double the actual transferred"},{"line_number":750,"context_line":"                # and stored data"},{"line_number":751,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":752,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":753,"context_line":"                    return"},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_c7a0cff6","line":751,"in_reply_to":"3a461143_535caf7c","updated":"2017-02-01 11:08:47.000000000","message":"You want sth like this?\n\n next_part_power \u003d getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027)\n if next_part_power is not None:","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":748,"context_line":"                # detect them and would create a second copy of the file if not"},{"line_number":749,"context_line":"                # yet existing - and this might double the actual transferred"},{"line_number":750,"context_line":"                # and stored data"},{"line_number":751,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":752,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":753,"context_line":"                    return"},{"line_number":754,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_07647e47","line":751,"in_reply_to":"3a461143_c7a0cff6","updated":"2017-02-01 20:37:52.000000000","message":"I think you might still need the\n\n ..., None)\n\nin getattr, but yeah. Just vaguely worried about the falsiness of zero -- I feel like we may as well be explicit.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":750,"context_line":"                # and stored data"},{"line_number":751,"context_line":"                if getattr(job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None):"},{"line_number":752,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":753,"context_line":"                    return"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"                try:"},{"line_number":756,"context_line":"                    if isfile(job[\u0027path\u0027]):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_139b0719","line":753,"updated":"2017-01-31 23:44:15.000000000","message":"Should this all get hoisted up, out of the for loop? We already abort the run when we detect a ring change, so that getattr call should never change inside the loop, right?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                    job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":753,"context_line":"                if next_part_power is not None:"},{"line_number":754,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":755,"context_line":"                    return"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"                try:"},{"line_number":758,"context_line":"                    if isfile(job[\u0027path\u0027]):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_feb8d4ea","line":755,"updated":"2017-02-02 01:37:52.000000000","message":"Up \u0026 out! Let\u0027s get it up around line 707 or 711!","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                    job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":753,"context_line":"                if next_part_power is not None:"},{"line_number":754,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":755,"context_line":"                    return"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"                try:"},{"line_number":758,"context_line":"                    if isfile(job[\u0027path\u0027]):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_4504acc5","line":755,"in_reply_to":"3a461143_feb8d4ea","updated":"2017-02-02 13:16:41.000000000","message":"This will then skip also policies without a partpower increase. I think we don\u0027t want that?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            jobs \u003d self.collect_jobs(override_devices\u003doverride_devices,"},{"line_number":716,"context_line":"                                     override_partitions\u003doverride_partitions,"},{"line_number":717,"context_line":"                                     override_policies\u003doverride_policies)"},{"line_number":718,"context_line":"            for job in jobs:"},{"line_number":719,"context_line":"                current_nodes \u003d job[\u0027nodes\u0027]"},{"line_number":720,"context_line":"                if override_devices and job[\u0027device\u0027] not in override_devices:"},{"line_number":721,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a461143_b802c06d","line":718,"updated":"2017-02-02 19:02:09.000000000","message":"Similar to the EC case: multiple replicated policies with some increasing and some not will have some random sample of parts get replicated.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            jobs \u003d self.collect_jobs(override_devices\u003doverride_devices,"},{"line_number":716,"context_line":"                                     override_partitions\u003doverride_partitions,"},{"line_number":717,"context_line":"                                     override_policies\u003doverride_policies)"},{"line_number":718,"context_line":"            for job in jobs:"},{"line_number":719,"context_line":"                current_nodes \u003d job[\u0027nodes\u0027]"},{"line_number":720,"context_line":"                if override_devices and job[\u0027device\u0027] not in override_devices:"},{"line_number":721,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_195f8673","line":718,"in_reply_to":"3a461143_b802c06d","updated":"2017-02-03 09:46:11.000000000","message":"Done","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7806bb19a374040375e040a994b4e9fad6f36a7f","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                next_part_power \u003d getattr("},{"line_number":752,"context_line":"                    job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":753,"context_line":"                if next_part_power is not None:"},{"line_number":754,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":755,"context_line":"                    return"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a461143_9834244b","line":754,"updated":"2017-02-02 19:02:09.000000000","message":"Again, might be worth mentioning which policy.","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e0ed8c18dfa3cc6798e0eceaa1b50d3f0000b759","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                next_part_power \u003d getattr("},{"line_number":752,"context_line":"                    job[\u0027policy\u0027].object_ring, \u0027next_part_power\u0027, None)"},{"line_number":753,"context_line":"                if next_part_power is not None:"},{"line_number":754,"context_line":"                    self.logger.warning(_(\"next_part_power set. Skipping\"))"},{"line_number":755,"context_line":"                    return"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a430d35_f959da8f","line":754,"in_reply_to":"3a461143_9834244b","updated":"2017-02-03 09:46:11.000000000","message":"Done","commit_id":"8ac6961eb4ce3209b9e5f883c5a99bc207f7b8d9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"192bd2f93670b98f01d1d3f02cb6eb2b60f480fa","unresolved":false,"context_lines":[{"line_number":753,"context_line":"                if next_part_power is not None:"},{"line_number":754,"context_line":"                    self.logger.warning("},{"line_number":755,"context_line":"                        _(\"next_part_power set in policy \u0027%s\u0027. Skipping\")"},{"line_number":756,"context_line":"                        % job[\u0027policy\u0027].name)"},{"line_number":757,"context_line":"                    continue"},{"line_number":758,"context_line":""},{"line_number":759,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_ee5ce84c","line":756,"range":{"start_line":756,"start_character":24,"end_line":756,"end_character":25},"updated":"2017-02-08 18:27:05.000000000","message":"Similar thing with interpolation, but it seems low priority.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"}],"swift/obj/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ffb46ecd27c11ef6973af468ac97a7d12b841c9b","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        try:"},{"line_number":515,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":516,"context_line":"                device, partition, account, container, obj,"},{"line_number":517,"context_line":"                policy\u003dpolicy, next_part_power\u003dnext_part_power)"},{"line_number":518,"context_line":"        except DiskFileDeviceUnavailable:"},{"line_number":519,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":520,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_935c574c","line":517,"updated":"2017-01-31 23:44:15.000000000","message":"Wait, this is coming as a header from the proxy? Why can\u0027t we just trust the ring that\u0027s backing our policy?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        try:"},{"line_number":515,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":516,"context_line":"                device, partition, account, container, obj,"},{"line_number":517,"context_line":"                policy\u003dpolicy, next_part_power\u003dnext_part_power)"},{"line_number":518,"context_line":"        except DiskFileDeviceUnavailable:"},{"line_number":519,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":520,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_a7ebc311","line":517,"in_reply_to":"3a461143_935c574c","updated":"2017-02-01 11:08:47.000000000","message":"Rings are not used in the object server, and therefore using them would require quite some refactoring, and would be useful only during partition power increasing. That seemed to be quite some overhead for \u003e 99% of the uptime of clusters; only a small fraction of cluster will use that, and then only temporarily.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"}],"test/probe/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4d294f1949474496bcc2b95bb8625018088936e0","unresolved":false,"context_lines":[{"line_number":5,"context_line":"VALIDATE_RSYNC \u003d config_true_value(config.get(\u0027validate_rsync\u0027, False))"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"default_devices_saio \u003d \u0027/srv/1/node,/srv/2/node,/srv/3/node,/srv/4/node\u0027"},{"line_number":8,"context_line":"DEVICES \u003d list_from_csv(config.get(\u0027devices\u0027, default_devices_saio))"}],"source_content_type":"text/x-python","patch_set":47,"id":"df140735_f53d538f","line":8,"updated":"2017-06-01 23:32:19.000000000","message":"Are we sure we can\u0027t get this out of self.device_dir in the test? I wasted more time than I\u0027d like to admit figuring out (er, remembering; apparently I ran probe tests successfully months ago) that I needed a\n\n devices \u003d /srv/node1, /srv/node2, /srv/node3, /srv/node4\n\nin my test.conf... Something like\n\n diff --git a/test/probe/__init__.py b/test/probe/__init__.py\n index e4df62e3..61e438e3 100644\n --- a/test/probe/__init__.py\n +++ b/test/probe/__init__.py\n @@ -3,6 +3,3 @@ from swift.common.utils import config_true_value, list_from_csv\n  config \u003d get_config(\u0027probe_test\u0027)\n  CHECK_SERVER_TIMEOUT \u003d int(config.get(\u0027check_server_timeout\u0027, 30))\n  VALIDATE_RSYNC \u003d config_true_value(config.get(\u0027validate_rsync\u0027, False))\n -\n -default_devices_saio \u003d \u0027/srv/1/node,/srv/2/node,/srv/3/node,/srv/4/node\u0027\n -DEVICES \u003d list_from_csv(config.get(\u0027devices\u0027, default_devices_saio))\n diff --git a/test/probe/test_object_partpower_increase.py b/test/probe/test_object_partpower_increase.py\n index cf2cd483..e0eb5499 100755\n --- a/test/probe/test_object_partpower_increase.py\n +++ b/test/probe/test_object_partpower_increase.py\n @@ -30,7 +30,6 @@ from swift.common.ring import RingBuilder\n  from swift.common.utils import replace_partition_in_path\n  from swift.obj.diskfile import get_data_dir\n  from test.probe.common import ECProbeTest, ProbeTest, ReplProbeTest\n -from test.probe import DEVICES\n  \n  \n  class TestPartPowerIncrease(ProbeTest):\n @@ -50,6 +49,11 @@ class TestPartPowerIncrease(ProbeTest):\n          # Ensure the test object will be erasure coded\n          self.data \u003d \u0027 \u0027 * getattr(self.policy, \u0027ec_segment_size\u0027, 1)\n  \n +        self.devices \u003d [\n +            self.device_dir(\u0027object\u0027, {\u0027ip\u0027: ip, \u0027port\u0027: port, \u0027device\u0027: \u0027\u0027})\n +            for ip, port in set((dev[\u0027ip\u0027], dev[\u0027port\u0027])\n +                                for dev in self.object_ring.devs)]\n +\n      def tearDown(self):\n          # Keep a backup copy of the modified .builder file\n          backup_dir \u003d os.path.join(\n @@ -112,8 +116,8 @@ class TestPartPowerIncrease(ProbeTest):\n          client.head_object(self.url, self.token, container, obj)\n  \n          # Relink existing objects\n -        for device in DEVICES:\n -            relink(skip_mount_check\u003dTrue, devices\u003ddevice)\n +        for device in self.devices:\n +            self.assertEqual(0, relink(skip_mount_check\u003dTrue, devices\u003ddevice))\n  \n          # Create second object after relinking and ensure it is accessible\n          client.put_object(self.url, self.token, container, obj2, self.data)\n @@ -159,8 +163,8 @@ class TestPartPowerIncrease(ProbeTest):\n          client.put_object(self.url, self.token, container, obj, self.data)\n  \n          # Cleanup old objects in the wrong location\n -        for device in DEVICES:\n -            cleanup(skip_mount_check\u003dTrue, devices\u003ddevice)\n +        for device in self.devices:\n +            self.assertEqual(0, cleanup(skip_mount_check\u003dTrue, devices\u003ddevice))\n  \n          # Ensure objects are still accessible\n          client.head_object(self.url, self.token, container, obj)\n\nseems to work.","commit_id":"872e66b36485b8cc765e2373d7a2b900f9616532"}],"test/probe/test_object_partpower_increase.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a8de8812f04aff1b65b70cfa5b9aaead698c8e3d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def setUp(self):"},{"line_number":32,"context_line":"        super(TestPartPowerIncrease, self).setUp()"},{"line_number":33,"context_line":"        _, self.ring_file_backup \u003d mkstemp()"},{"line_number":34,"context_line":"        _, self.builder_file_backup \u003d mkstemp()"},{"line_number":35,"context_line":"        self.ring_file \u003d self.object_ring.serialized_path"},{"line_number":36,"context_line":"        self.builder_file \u003d self.ring_file.replace(\u0027ring.gz\u0027, \u0027builder\u0027)"},{"line_number":37,"context_line":"        # Make them writable for the test run"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_dd7e00ae","line":34,"updated":"2016-07-12 15:40:40.000000000","message":"YES!  I\u0027ve always wanted a probe test that was able to play with rings!?!?","commit_id":"40b446aaaa0895e0dd0f1f069ce9abafb7fbd3c6"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        client.head_object(self.url, self.token, container, obj2)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Relink existing objects"},{"line_number":114,"context_line":"        relink(skip_mount_check\u003dTrue, devices\u003d\"/mnt/swift-disk\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # Overwrite existing object - to ensure that older timestamp files"},{"line_number":117,"context_line":"        # will be cleaned up properly later"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_a58e83cd","line":114,"updated":"2016-08-17 20:40:43.000000000","message":"Also changed this: relinking should be done before obj2 is created, to ensure an object that is uploaded after relinking run is really available using the old and new partition power.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        # Ensure data in old object locations is removed"},{"line_number":146,"context_line":"        for fn in org_locations:"},{"line_number":147,"context_line":"            self.assertFalse(os.path.exists(fn))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"class TestReplPartPowerIncrease(TestPartPowerIncrease, ReplProbeTest):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_11754b31","line":147,"updated":"2016-08-17 06:30:30.000000000","message":"obj2 is added after you org_locations, but put during a prepare, so it should exist in both places.. but it wont be checked here to see if it exists. I guess that\u0027s fine but just saying.\n\nAlso, what happens when obj gets placed in partition 0? isn\u0027t there a chance this test will fail.. though I agree it would be extremely rare.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        # Ensure data in old object locations is removed"},{"line_number":146,"context_line":"        for fn in org_locations:"},{"line_number":147,"context_line":"            self.assertFalse(os.path.exists(fn))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"class TestReplPartPowerIncrease(TestPartPowerIncrease, ReplProbeTest):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_45b4ef80","line":147,"in_reply_to":"3ac371cc_11754b31","updated":"2016-08-17 20:40:43.000000000","message":"Good catch! I changed the code a bit to also check obj2.\n\nI don\u0027t see a problem with partition 0? The locations are full pathnames, that should be fine? Or maybe I\u0027m missing something here?","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"8369a0116d5b182d48a8ae5b55f637d8063bcc39","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # In case the test user is not allowed to write rings"},{"line_number":44,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift\u0027)"},{"line_number":45,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift/backups\u0027)"},{"line_number":46,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift/object*\u0027)"},{"line_number":47,"context_line":"        # Ensure the test object will be erasure coded"},{"line_number":48,"context_line":"        self.data \u003d \u0027 \u0027 * getattr(self.policy, \u0027ec_segment_size\u0027, 1)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da6895a0_a70476c0","line":46,"updated":"2016-10-24 01:45:35.000000000","message":"these permission changes worry me if the probe tests get run on a non-throwaway system (e.g., just prior to initial deployment/commissioning of a production server)","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"06c9043f789ed9e1fe2faebe921359392e3de719","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # In case the test user is not allowed to write rings"},{"line_number":44,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift\u0027)"},{"line_number":45,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift/backups\u0027)"},{"line_number":46,"context_line":"        os.system(\u0027sudo chmod 777 /etc/swift/object*\u0027)"},{"line_number":47,"context_line":"        # Ensure the test object will be erasure coded"},{"line_number":48,"context_line":"        self.data \u003d \u0027 \u0027 * getattr(self.policy, \u0027ec_segment_size\u0027, 1)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a71b18c_ff441675","line":46,"in_reply_to":"da6895a0_a70476c0","updated":"2016-12-02 17:27:48.000000000","message":"Yeah - I changed that, it\u0027s now a failing tests if permissions are not ok and no longer changing them.","commit_id":"a7f8875a52d1d9f76ac5214de5b5e02407e489ed"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b4b0b54326b836030c72db5f8e736f1a8f1a0fd4","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # Ensure data in old object locations is removed"},{"line_number":153,"context_line":"        for fn in org_locations:"},{"line_number":154,"context_line":"            self.assertFalse(os.path.exists(fn))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class TestReplPartPowerIncrease(TestPartPowerIncrease, ReplProbeTest):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a3905b3_d38f91ca","line":154,"updated":"2017-01-25 07:10:29.000000000","message":"Hmm, don\u0027t know if I\u0027m being too pedantic, but should be have a probe to make sure backing out (cancel) works. Because I\u0027d hate for something to creep in and stop any roll backs OPs may want to take? Thoughts?","commit_id":"e696d3c7a153b84c520114d0fc6697404929c6f8"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"126c2f5685ae4f8cd4daab79f27c5b5612e5fbc7","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        # Ensure data in old object locations is removed"},{"line_number":153,"context_line":"        for fn in org_locations:"},{"line_number":154,"context_line":"            self.assertFalse(os.path.exists(fn))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"class TestReplPartPowerIncrease(TestPartPowerIncrease, ReplProbeTest):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a3905b3_5082a9c9","line":154,"in_reply_to":"5a3905b3_d38f91ca","updated":"2017-01-25 12:03:29.000000000","message":"Good idea - I refactored the test a bit, now there is another run that is canceled inbetween and ensured that either old locations or relinked locations are properly cleaned up.","commit_id":"e696d3c7a153b84c520114d0fc6697404929c6f8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from test.probe.common import ECProbeTest, ProbeTest, ReplProbeTest"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class TestPartPowerIncrease(ProbeTest):"},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(TestPartPowerIncrease, self).setUp()"},{"line_number":39,"context_line":"        _, self.ring_file_backup \u003d mkstemp()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_0a0bc97d","line":36,"range":{"start_line":36,"start_character":28,"end_line":36,"end_character":37},"updated":"2017-02-01 02:02:00.000000000","message":"Maybe better as a mixin that doesn\u0027t inherit from TestCase? Then you could define test_main/test_canceled here, rather than defining it (identically) for each of the subclasses. Eh, either way.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                        locations.append(os.path.join(root, filename))"},{"line_number":90,"context_line":"        return locations"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _test_main(self, cancel\u003dFalse):"},{"line_number":93,"context_line":"        container \u003d \u0027container-%s\u0027 % uuid4()"},{"line_number":94,"context_line":"        obj \u003d \u0027object-%s\u0027 % uuid4()"},{"line_number":95,"context_line":"        obj2 \u003d \u0027object-%s\u0027 % uuid4()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_c9f6325c","line":92,"updated":"2017-02-01 02:02:00.000000000","message":"Worth adding a test somewhere in here that the replicator refuses to do anything mid-increase?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                        locations.append(os.path.join(root, filename))"},{"line_number":90,"context_line":"        return locations"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def _test_main(self, cancel\u003dFalse):"},{"line_number":93,"context_line":"        container \u003d \u0027container-%s\u0027 % uuid4()"},{"line_number":94,"context_line":"        obj \u003d \u0027object-%s\u0027 % uuid4()"},{"line_number":95,"context_line":"        obj2 \u003d \u0027object-%s\u0027 % uuid4()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_c54fe78f","line":92,"in_reply_to":"3a461143_c9f6325c","updated":"2017-02-01 11:08:47.000000000","message":"Yes, definetely - good catch.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        client.head_object(self.url, self.token, container, obj2)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        # Overwrite existing object - to ensure that older timestamp files"},{"line_number":163,"context_line":"        # will be cleaned up properly later"},{"line_number":164,"context_line":"        client.put_object(self.url, self.token, container, obj, self.data)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # Cleanup old objects in the wrong location"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_ea303d58","line":163,"updated":"2017-02-01 02:02:00.000000000","message":"Do we ever make that assertion? I didn\u0027t see it...","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"481a62bb1d63e5ae83ae085f7f3adae44c896a57","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        client.head_object(self.url, self.token, container, obj2)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        # Overwrite existing object - to ensure that older timestamp files"},{"line_number":163,"context_line":"        # will be cleaned up properly later"},{"line_number":164,"context_line":"        client.put_object(self.url, self.token, container, obj, self.data)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # Cleanup old objects in the wrong location"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_410d9636","line":163,"in_reply_to":"3a461143_e73f8b84","updated":"2017-02-01 20:37:52.000000000","message":"OK, so we\u0027ve got\n\n* old part_power, obj.t1\n* new part_power, obj.t1\n* old part_power, obj2.t2\n* new part_power, obj2.t2\n\nwith the old part_power items in org_locations. We overwrite at line 139 and get\n\n* old part_power, obj.t3\n* new part_power, obj.t3\n\nWe then increase_partition_power and overwrite again just below to get just\n\n* new part_power, obj.t4 (or old part_power, if cancelling)\n\nWhen we go make our assertions below, we never check those t3 locations.\n\nThen there was also the issue that we didn\u0027t make any assertions about org_locations when cancelling, but I guess we got rid of that in the latest patchset?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        client.head_object(self.url, self.token, container, obj2)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        # Overwrite existing object - to ensure that older timestamp files"},{"line_number":163,"context_line":"        # will be cleaned up properly later"},{"line_number":164,"context_line":"        client.put_object(self.url, self.token, container, obj, self.data)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # Cleanup old objects in the wrong location"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_e73f8b84","line":163,"in_reply_to":"3a461143_ea303d58","updated":"2017-02-01 11:08:47.000000000","message":"Just a few lines below? The assertFalse for org_locations should catch any old object","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                        locations.append(os.path.join(root, filename))"},{"line_number":84,"context_line":"        return locations"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _test_main(self):"},{"line_number":87,"context_line":"        container \u003d \u0027container-%s\u0027 % uuid4()"},{"line_number":88,"context_line":"        obj \u003d \u0027object-%s\u0027 % uuid4()"},{"line_number":89,"context_line":"        obj2 \u003d \u0027object-%s\u0027 % uuid4()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_fe07ff7e","line":86,"updated":"2017-02-01 20:38:23.000000000","message":"No more cancel? I like the cancel :-(","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8db27b8f5565a9161d7e5bcc012d275796f754e1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                        locations.append(os.path.join(root, filename))"},{"line_number":84,"context_line":"        return locations"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _test_main(self):"},{"line_number":87,"context_line":"        container \u003d \u0027container-%s\u0027 % uuid4()"},{"line_number":88,"context_line":"        obj \u003d \u0027object-%s\u0027 % uuid4()"},{"line_number":89,"context_line":"        obj2 \u003d \u0027object-%s\u0027 % uuid4()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_53af242b","line":86,"in_reply_to":"3a461143_fe07ff7e","updated":"2017-02-01 23:21:06.000000000","message":"Bummer, I messed up the rebase. I\u0027ll revive the cancel for you!","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        # Remember the original object locations"},{"line_number":121,"context_line":"        org_locations \u003d self._find_objs_ondisk("},{"line_number":122,"context_line":"            container, obj, self.object_ring.part_power)"},{"line_number":123,"context_line":"        org_locations +\u003d self._find_objs_ondisk("},{"line_number":124,"context_line":"            container, obj2, self.object_ring.part_power)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_9eac3037","line":122,"updated":"2017-02-02 01:37:52.000000000","message":"_find_objs_ondisk only takes two args now.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0754c1df0a53022c660004ac4a287ea804b2d9d6","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        # Remember the original object locations"},{"line_number":121,"context_line":"        org_locations \u003d self._find_objs_ondisk("},{"line_number":122,"context_line":"            container, obj, self.object_ring.part_power)"},{"line_number":123,"context_line":"        org_locations +\u003d self._find_objs_ondisk("},{"line_number":124,"context_line":"            container, obj2, self.object_ring.part_power)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_250080aa","line":122,"in_reply_to":"3a461143_9eac3037","updated":"2017-02-02 13:16:41.000000000","message":"Yeah - it was late, sorry...","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        new_locations \u003d []"},{"line_number":128,"context_line":"        for loc in org_locations:"},{"line_number":129,"context_line":"            new_locations.append(replace_partition_in_path("},{"line_number":130,"context_line":"                str(loc), self.object_ring.part_power + 1))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        # Overwrite existing object - to ensure that older timestamp files"},{"line_number":133,"context_line":"        # will be cleaned up properly later"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_bec72c63","line":130,"range":{"start_line":130,"start_character":43,"end_line":130,"end_character":57},"updated":"2017-02-02 01:37:52.000000000","message":"nit: maybe just go ahead and use new_part_power?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                self.assertFalse(os.path.exists(fn))"},{"line_number":172,"context_line":"        else:"},{"line_number":173,"context_line":"            for fn in new_locations:"},{"line_number":174,"context_line":"                self.assertFalse(os.path.exists(fn))"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"class TestReplPartPowerIncrease(TestPartPowerIncrease, ReplProbeTest):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_be756c33","line":174,"updated":"2017-02-02 01:37:52.000000000","message":"We still never check for the cleanup of the objects we PUT at line 134. Nor the cleanup of the old locations from the PUTs at lines 97/117 when cancelling, nor the new location from the relink at line 114 when *not* cancelling.","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"7547eec18305ddce9ce9e2d9216bd8def7eabbf9","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        client.head_object(self.url, self.token, container, obj)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Relink existing objects"},{"line_number":114,"context_line":"        relink(skip_mount_check\u003dTrue, devices\u003d\"/mnt/swift-disk\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # Create second object after relinking and ensure it is accessible"},{"line_number":117,"context_line":"        client.put_object(self.url, self.token, container, obj2, self.data)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_271533e4","line":114,"updated":"2017-02-08 21:52:34.000000000","message":"is /mnt/swift-disk the default value? i\u0027m not sure it is defined in SAIO docs\n\nI changed it to /mnt/sdb1 but that did not solve the test errors i\u0027m seeing:\n\nhttp://paste.openstack.org/show/598147/","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"235b61ad99fec3b8f46322487cbc7d85fe304678","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        client.head_object(self.url, self.token, container, obj)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Relink existing objects"},{"line_number":114,"context_line":"        relink(skip_mount_check\u003dTrue, devices\u003d\"/mnt/swift-disk\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # Create second object after relinking and ensure it is accessible"},{"line_number":117,"context_line":"        client.put_object(self.url, self.token, container, obj2, self.data)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_2fc978ac","line":114,"in_reply_to":"1a430d35_271533e4","updated":"2017-02-09 05:52:40.000000000","message":"No it isn\u0027t, so this is the main reason it fails on my SAIO.\n\nbut it gets worse. the relinker requires the use of audit_location_generator, so we need to give an SAIO path to a node ie \u0027/mnt/sdb1/{1,2,3,4}/node/\u0027 or \u0027/srv/{1,2,3,4}/node/\u0027. So we can\u0027t just put in /mnt/sdb1.\n\nMy first hack was http://paste.openstack.org/show/598170/\n\nBut because of needing the full path to each node this failed.\n\nThis is as far as I\u0027ve got so far. And have run out of time for the day.. other work items got in the way. Will continue looking first thing the morning.","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ec8cc142fb5e4b743406a9a08fa98d2c3a927c8d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        client.head_object(self.url, self.token, container, obj)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Relink existing objects"},{"line_number":114,"context_line":"        relink(skip_mount_check\u003dTrue, devices\u003d\"/mnt/swift-disk\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # Create second object after relinking and ensure it is accessible"},{"line_number":117,"context_line":"        client.put_object(self.url, self.token, container, obj2, self.data)"}],"source_content_type":"text/x-python","patch_set":32,"id":"fa31d9ce_d9e7bfaa","line":114,"in_reply_to":"1a430d35_2fc978ac","updated":"2017-02-10 07:00:57.000000000","message":"This is all very whitebox testing -- surely there\u0027s a reasonable way for us to go grab the devices from each object server conf?","commit_id":"fa961952bfd9b97dea27f5261537fa9713984850"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4d294f1949474496bcc2b95bb8625018088936e0","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        # Relink existing objects"},{"line_number":115,"context_line":"        for device in DEVICES:"},{"line_number":116,"context_line":"            relink(skip_mount_check\u003dTrue, devices\u003ddevice)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Create second object after relinking and ensure it is accessible"},{"line_number":119,"context_line":"        client.put_object(self.url, self.token, container, obj2, self.data)"}],"source_content_type":"text/x-python","patch_set":47,"id":"df140735_9523b756","line":116,"updated":"2017-06-01 23:32:19.000000000","message":"Might be good to do something like\n\n diff --git a/test/probe/test_object_partpower_increase.py b/test/probe/test_object_partpower_increase.py\n index cf2cd483..9fd5a81b 100755\n --- a/test/probe/test_object_partpower_increase.py\n +++ b/test/probe/test_object_partpower_increase.py\n @@ -113,7 +113,7 @@ class TestPartPowerIncrease(ProbeTest):\n  \n          # Relink existing objects\n          for device in DEVICES:\n -            relink(skip_mount_check\u003dTrue, devices\u003ddevice)\n +            self.assertEqual(0, relink(skip_mount_check\u003dTrue, devices\u003ddevice))\n  \n          # Create second object after relinking and ensure it is accessible\n          client.put_object(self.url, self.token, container, obj2, self.data)\n @@ -160,7 +160,7 @@ class TestPartPowerIncrease(ProbeTest):\n  \n          # Cleanup old objects in the wrong location\n          for device in DEVICES:\n -            cleanup(skip_mount_check\u003dTrue, devices\u003ddevice)\n +            self.assertEqual(0, cleanup(skip_mount_check\u003dTrue, devices\u003ddevice))\n  \n          # Ensure objects are still accessible\n          client.head_object(self.url, self.token, container, obj)\n\n...though that still wouldn\u0027t have saved me my other comment :-/","commit_id":"872e66b36485b8cc765e2373d7a2b900f9616532"}],"test/unit/cli/test_relinker.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d38780e1b24827ad04b86c03426e64f71823f2f4","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        self.assertTrue(os.path.isdir(expected_dir))"},{"line_number":112,"context_line":"        self.assertTrue(os.path.isfile(expected_file))"},{"line_number":113,"context_line":"        self.assertFalse(os.path.isfile("},{"line_number":114,"context_line":"            os.path.join(self.objdir, self.object_fname)))"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_cad7d2eb","line":114,"updated":"2017-02-02 04:34:57.000000000","message":"I get a failure here locally; I think it has to do with my policy 0 being an EC policy? Why aren\u0027t we doing anything to mock out POLICIES?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"}],"test/unit/common/ring/test_builder.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":2542,"context_line":"        rb.rebalance(seed\u003d1)"},{"line_number":2543,"context_line":""},{"line_number":2544,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2545,"context_line":"        rb.increase_partition_power()"},{"line_number":2546,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2547,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2548,"context_line":"        self.assertEqual(rb.next_part_power, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_b4c38588","line":2545,"updated":"2016-08-17 06:30:30.000000000","message":"Seeing as prepare_increase_partition_power and increase_partition_power return a bool on success, we should test the cases when they return False. Not here specifically but at least cover those cases in tests.","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f5e5998da9deb9fe5d16fb743910a1f4abf539f6","unresolved":false,"context_lines":[{"line_number":2542,"context_line":"        rb.rebalance(seed\u003d1)"},{"line_number":2543,"context_line":""},{"line_number":2544,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2545,"context_line":"        rb.increase_partition_power()"},{"line_number":2546,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2547,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2548,"context_line":"        self.assertEqual(rb.next_part_power, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_cbe57409","line":2545,"in_reply_to":"3ac371cc_a57cc3b5","updated":"2016-08-18 08:57:41.000000000","message":"Done - now with additional tests!","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":2542,"context_line":"        rb.rebalance(seed\u003d1)"},{"line_number":2543,"context_line":""},{"line_number":2544,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2545,"context_line":"        rb.increase_partition_power()"},{"line_number":2546,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2547,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2548,"context_line":"        self.assertEqual(rb.next_part_power, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_a57cc3b5","line":2545,"in_reply_to":"3ac371cc_b4c38588","updated":"2016-08-17 20:40:43.000000000","message":"Yeah, I still have to add that - maybe in a follow up? Or in the next patchset after the next reviews...","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"        rb.increase_partition_power()"},{"line_number":2576,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2577,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2578,"context_line":"        self.assertEqual(rb.next_part_power, None)"},{"line_number":2579,"context_line":""},{"line_number":2580,"context_line":"        # Save .ring.gz, and load ring from it to ensure prev/next is set"},{"line_number":2581,"context_line":"        rd \u003d rb.get_ring()"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_79bd70b6","line":2578,"updated":"2017-01-17 00:46:13.000000000","message":"this should be assertIsNone( ..)","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":2575,"context_line":"        rb.increase_partition_power()"},{"line_number":2576,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2577,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2578,"context_line":"        self.assertEqual(rb.next_part_power, None)"},{"line_number":2579,"context_line":""},{"line_number":2580,"context_line":"        # Save .ring.gz, and load ring from it to ensure prev/next is set"},{"line_number":2581,"context_line":"        rd \u003d rb.get_ring()"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_872e2341","line":2578,"in_reply_to":"7a3c09a3_79bd70b6","updated":"2017-01-17 10:34:22.000000000","message":"Done","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"daab0489901b148cf63c14e080de20e6716cce90","unresolved":false,"context_lines":[{"line_number":2584,"context_line":"        r \u003d ring.Ring(ring_file)"},{"line_number":2585,"context_line":"        expected_part_shift \u003d 32 - 9"},{"line_number":2586,"context_line":"        self.assertEqual(expected_part_shift, r._part_shift)"},{"line_number":2587,"context_line":"        self.assertEqual(None, r.next_part_power)"},{"line_number":2588,"context_line":""},{"line_number":2589,"context_line":"    def test_prepare_increase_partition_power_failed(self):"},{"line_number":2590,"context_line":"        rb \u003d ring.RingBuilder(8, 3.0, 1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_3972084a","line":2587,"range":{"start_line":2587,"start_character":13,"end_line":2587,"end_character":24},"updated":"2017-01-17 00:46:13.000000000","message":"this should be AssertIsNone(r.next_part_power)","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"d12417bb304d14945cb609a653aa9b2ede87d96b","unresolved":false,"context_lines":[{"line_number":2584,"context_line":"        r \u003d ring.Ring(ring_file)"},{"line_number":2585,"context_line":"        expected_part_shift \u003d 32 - 9"},{"line_number":2586,"context_line":"        self.assertEqual(expected_part_shift, r._part_shift)"},{"line_number":2587,"context_line":"        self.assertEqual(None, r.next_part_power)"},{"line_number":2588,"context_line":""},{"line_number":2589,"context_line":"    def test_prepare_increase_partition_power_failed(self):"},{"line_number":2590,"context_line":"        rb \u003d ring.RingBuilder(8, 3.0, 1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a3c09a3_c724ab61","line":2587,"range":{"start_line":2587,"start_character":13,"end_line":2587,"end_character":24},"in_reply_to":"7a3c09a3_3972084a","updated":"2017-01-17 10:34:22.000000000","message":"Done","commit_id":"1c8e68bdac4a9ba6eaf16d4661fd9f191aeafb0e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":2554,"context_line":""},{"line_number":2555,"context_line":"        # sanity checks"},{"line_number":2556,"context_line":"        self.assertEqual(9, rb.part_power)"},{"line_number":2557,"context_line":"        self.assertEqual(9, r.next_part_power)"},{"line_number":2558,"context_line":"        self.assertEqual(rb.version, old_version + 3)"},{"line_number":2559,"context_line":""},{"line_number":2560,"context_line":"        # make sure there is always the same device assigned to every pair of"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_6ad9adf2","line":2557,"range":{"start_line":2557,"start_character":28,"end_line":2557,"end_character":29},"updated":"2017-02-01 02:02:00.000000000","message":"r, or rb? Or both?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":2554,"context_line":""},{"line_number":2555,"context_line":"        # sanity checks"},{"line_number":2556,"context_line":"        self.assertEqual(9, rb.part_power)"},{"line_number":2557,"context_line":"        self.assertEqual(9, r.next_part_power)"},{"line_number":2558,"context_line":"        self.assertEqual(rb.version, old_version + 3)"},{"line_number":2559,"context_line":""},{"line_number":2560,"context_line":"        # make sure there is always the same device assigned to every pair of"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_4a3dc629","line":2557,"range":{"start_line":2557,"start_character":28,"end_line":2557,"end_character":29},"in_reply_to":"3a461143_6ad9adf2","updated":"2017-02-01 11:08:47.000000000","message":"rb. Well, in fact r is the saved ring from rb.","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":2602,"context_line":""},{"line_number":2603,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2604,"context_line":"        rb.increase_partition_power()"},{"line_number":2605,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2606,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2607,"context_line":"        self.assertIsNone(rb.next_part_power)"},{"line_number":2608,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_2aea4574","line":2605,"updated":"2017-02-01 02:02:00.000000000","message":"assertTrue, maybe?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":2602,"context_line":""},{"line_number":2603,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2604,"context_line":"        rb.increase_partition_power()"},{"line_number":2605,"context_line":"        rb.finish_increase_partition_power()"},{"line_number":2606,"context_line":"        self.assertEqual(rb.part_power, 9)"},{"line_number":2607,"context_line":"        self.assertIsNone(rb.next_part_power)"},{"line_number":2608,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_8545df43","line":2605,"in_reply_to":"3a461143_2aea4574","updated":"2017-02-01 11:08:47.000000000","message":"Done","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":2624,"context_line":""},{"line_number":2625,"context_line":"        # next_part_power is still set, do not increase again"},{"line_number":2626,"context_line":"        self.assertFalse(rb.prepare_increase_partition_power())"},{"line_number":2627,"context_line":"        self.assertEqual(rb.next_part_power, 9)"},{"line_number":2628,"context_line":""},{"line_number":2629,"context_line":"    def test_increase_partition_power_failed(self):"},{"line_number":2630,"context_line":"        rb \u003d ring.RingBuilder(8, 3.0, 1)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_8a9259f4","line":2627,"updated":"2017-02-01 02:02:00.000000000","message":"Should we have a check for when we\u0027re in the increased-but-not-yet-finalized state?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":2624,"context_line":""},{"line_number":2625,"context_line":"        # next_part_power is still set, do not increase again"},{"line_number":2626,"context_line":"        self.assertFalse(rb.prepare_increase_partition_power())"},{"line_number":2627,"context_line":"        self.assertEqual(rb.next_part_power, 9)"},{"line_number":2628,"context_line":""},{"line_number":2629,"context_line":"    def test_increase_partition_power_failed(self):"},{"line_number":2630,"context_line":"        rb \u003d ring.RingBuilder(8, 3.0, 1)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_c5a0c7f6","line":2627,"in_reply_to":"3a461143_8a9259f4","updated":"2017-02-01 11:08:47.000000000","message":"What kind of check do you have in mind?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":2675,"context_line":"        self.assertEqual(8, rb.part_power)"},{"line_number":2676,"context_line":"        self.assertEqual(8, rb.next_part_power)"},{"line_number":2677,"context_line":"        self.assertEqual(rb.version, old_version + 2)"},{"line_number":2678,"context_line":""},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"class TestGetRequiredOverload(unittest.TestCase):"},{"line_number":2681,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_2aa16546","line":2678,"updated":"2017-02-01 02:02:00.000000000","message":"No test_finalize_increase_partition_power_failed?\n\nNo test_cancel_increase_partition_power_failed?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":2675,"context_line":"        self.assertEqual(8, rb.part_power)"},{"line_number":2676,"context_line":"        self.assertEqual(8, rb.next_part_power)"},{"line_number":2677,"context_line":"        self.assertEqual(rb.version, old_version + 2)"},{"line_number":2678,"context_line":""},{"line_number":2679,"context_line":""},{"line_number":2680,"context_line":"class TestGetRequiredOverload(unittest.TestCase):"},{"line_number":2681,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_c5a607c0","line":2678,"in_reply_to":"3a461143_2aa16546","updated":"2017-02-01 11:08:47.000000000","message":"Done - I added a sanity checks in test_finalize_increase_partition_power and test_increase_partition_power instead of separate tests. These would have duplicated most of the code","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":2609,"context_line":"        # Make sure this doesn\u0027t do any harm before actually increasing the"},{"line_number":2610,"context_line":"        # partition power"},{"line_number":2611,"context_line":"        self.assertIsNone(rb.finish_increase_partition_power())"},{"line_number":2612,"context_line":"        self.assertEqual(rb.next_part_power, 9)"},{"line_number":2613,"context_line":""},{"line_number":2614,"context_line":"        self.assertTrue(rb.increase_partition_power())"},{"line_number":2615,"context_line":"        self.assertTrue(rb.finish_increase_partition_power())"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_21408a07","line":2612,"updated":"2017-02-01 20:38:23.000000000","message":"Should we do something similar before preparing the increase?\n\n self.assertIsNone(rb.finish_increase_partition_power())\n self.assertEqual(rb.part_power, 8)\n self.assertIsNone(getattr(rb, \u0027next_part_power\u0027, None))","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"3a461143_3e597c8f","updated":"2017-02-02 01:37:52.000000000","message":"So I think we\u0027re still missing some failure cases worth validating:\n\n* cancel when there\u0027s no next_part_power\n* finalize when there\u0027s no next_part_power\n* prepare when part_power \u003d\u003d next_part_power\n\nYay state machines!","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":2506,"context_line":"                        \u0027ip\u0027: \u0027127.0.0.1\u0027, \u0027port\u0027: 10000, \u0027device\u0027: dev})"},{"line_number":2507,"context_line":"        rb.rebalance(seed\u003d1)"},{"line_number":2508,"context_line":""},{"line_number":2509,"context_line":"        rb.prepare_increase_partition_power()"},{"line_number":2510,"context_line":"        self.assertEqual(rb.part_power, 8)"},{"line_number":2511,"context_line":"        self.assertEqual(rb.next_part_power, 9)"},{"line_number":2512,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_9e3b5038","line":2509,"updated":"2017-02-02 01:37:52.000000000","message":"assertTrue?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":2608,"context_line":""},{"line_number":2609,"context_line":"        # Make sure this doesn\u0027t do any harm before actually increasing the"},{"line_number":2610,"context_line":"        # partition power"},{"line_number":2611,"context_line":"        self.assertIsNone(rb.finish_increase_partition_power())"},{"line_number":2612,"context_line":"        self.assertEqual(rb.next_part_power, 9)"},{"line_number":2613,"context_line":""},{"line_number":2614,"context_line":"        self.assertTrue(rb.increase_partition_power())"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_7e25c408","line":2611,"updated":"2017-02-02 01:37:52.000000000","message":"Seems a little awkward; should we have it return False instead?","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cd55cf8d3f4e6e124d0773511f1273494ec3e83e","unresolved":false,"context_lines":[{"line_number":3455,"context_line":"        old \u003d \u0027/s/n/d/o/700/c77/af088baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3456,"context_line":"        ref \u003d \u0027/s/n/d/o/1400/c77/af088baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3457,"context_line":"        new \u003d utils.replace_partition_in_path(old, 11)"},{"line_number":3458,"context_line":"        self.assertEqual(ref, new)"},{"line_number":3459,"context_line":""},{"line_number":3460,"context_line":""},{"line_number":3461,"context_line":"class ResellerConfReader(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_941e495d","line":3458,"updated":"2016-08-17 06:30:30.000000000","message":"You should also test the other possibilities in case we change something in the future, and you at least assume the latter one in the code:\n\n  self.assertEqual(utils.replace_partition_in_path(old, 10), old)\n  self.assertEqual(utils.replace_partition_in_path(new, 11), new)","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f4ffe59f19ac179b3c9130dc14c40b43a64c3a81","unresolved":false,"context_lines":[{"line_number":3455,"context_line":"        old \u003d \u0027/s/n/d/o/700/c77/af088baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3456,"context_line":"        ref \u003d \u0027/s/n/d/o/1400/c77/af088baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3457,"context_line":"        new \u003d utils.replace_partition_in_path(old, 11)"},{"line_number":3458,"context_line":"        self.assertEqual(ref, new)"},{"line_number":3459,"context_line":""},{"line_number":3460,"context_line":""},{"line_number":3461,"context_line":"class ResellerConfReader(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_05331715","line":3458,"in_reply_to":"3ac371cc_941e495d","updated":"2016-08-17 20:40:43.000000000","message":"Done","commit_id":"1170db4debc77ff17ecfff65c8e5faabe2f729df"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2b20ca679ae5a5a0a3241f2e17bd75d1aeb19f0d","unresolved":false,"context_lines":[{"line_number":3727,"context_line":""},{"line_number":3728,"context_line":"        # Make sure there is no change if the part power didn\u0027t change"},{"line_number":3729,"context_line":"        self.assertEqual(utils.replace_partition_in_path(old, 10), old)"},{"line_number":3730,"context_line":"        self.assertEqual(utils.replace_partition_in_path(new, 11), new)"},{"line_number":3731,"context_line":""},{"line_number":3732,"context_line":""},{"line_number":3733,"context_line":"class ResellerConfReader(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_8a57b924","line":3730,"updated":"2017-02-01 02:02:00.000000000","message":"Worth also having an old/new combination that leads to 2*X+1 instead of 2*X?","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"8b68da32af3bfd81a872bd31129c6a23d9457db8","unresolved":false,"context_lines":[{"line_number":3727,"context_line":""},{"line_number":3728,"context_line":"        # Make sure there is no change if the part power didn\u0027t change"},{"line_number":3729,"context_line":"        self.assertEqual(utils.replace_partition_in_path(old, 10), old)"},{"line_number":3730,"context_line":"        self.assertEqual(utils.replace_partition_in_path(new, 11), new)"},{"line_number":3731,"context_line":""},{"line_number":3732,"context_line":""},{"line_number":3733,"context_line":"class ResellerConfReader(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_87fde7b2","line":3730,"in_reply_to":"3a461143_8a57b924","updated":"2017-02-01 11:08:47.000000000","message":"Yes, good idea!","commit_id":"b600fd450ec46ae5b1c2f440312b6758c8eaf5b3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d54157106e3d4e6ccecd770b64de5e93f9ab265b","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"        self.assertEqual(utils.replace_partition_in_path(old, 10), old)"},{"line_number":3731,"context_line":"        self.assertEqual(utils.replace_partition_in_path(new, 11), new)"},{"line_number":3732,"context_line":""},{"line_number":3733,"context_line":"        # Check for new part \u003d part * 2"},{"line_number":3734,"context_line":"        old \u003d \u0027/s/n/d/o/693/c77/ad708baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3735,"context_line":"        new \u003d \u0027/s/n/d/o/1387/c77/ad708baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3736,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"3a461143_017d4ee7","line":3733,"range":{"start_line":3733,"start_character":31,"end_line":3733,"end_character":39},"updated":"2017-02-01 20:38:23.000000000","message":"... + 1","commit_id":"f9c83503fdecf2f46511451bb3bb2552c36c1f50"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"df74ddcfee53e64a3474e9cfc300785f04203f67","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"        self.assertEqual(utils.replace_partition_in_path(old, 10), old)"},{"line_number":3731,"context_line":"        self.assertEqual(utils.replace_partition_in_path(new, 11), new)"},{"line_number":3732,"context_line":""},{"line_number":3733,"context_line":"        # Check for new part \u003d part * 2"},{"line_number":3734,"context_line":"        old \u003d \u0027/s/n/d/o/693/c77/ad708baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3735,"context_line":"        new \u003d \u0027/s/n/d/o/1387/c77/ad708baea4806dcaba30bf07d9e64c77/f\u0027"},{"line_number":3736,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_bef1ec97","line":3733,"updated":"2017-02-02 01:37:52.000000000","message":"Comment still needs fixing","commit_id":"63f657ca5153ac80e165b469f9dd67f13cc9dd96"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9ba98833b8a4974e968d8eb824be57e608fe9d1","unresolved":false,"context_lines":[{"line_number":3798,"context_line":"                diskfile.write_metadata, \u0027n/a\u0027, metadata)"},{"line_number":3799,"context_line":""},{"line_number":3800,"context_line":"    def _create_diskfile_dir(self, timestamp, policy, legacy_durable\u003dFalse,"},{"line_number":3801,"context_line":"                             partition\u003d0, next_part_power\u003dNone):"},{"line_number":3802,"context_line":"        timestamp \u003d Timestamp(timestamp)"},{"line_number":3803,"context_line":"        df \u003d self._simple_get_diskfile(account\u003d\u0027a\u0027, container\u003d\u0027c\u0027,"},{"line_number":3804,"context_line":"                                       obj\u003d\u0027o_%s\u0027 % policy,"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a1ced50_07987f77","line":3801,"range":{"start_line":3801,"start_character":29,"end_line":3801,"end_character":38},"updated":"2017-03-21 17:29:06.000000000","message":"Wait, isn\u0027t this determined by the account, container, and obj that we\u0027re hard-coding below? (+/- the hash prefix/suffix)\n\nEven if it weren\u0027t, it seems like 0 might be a bad choice of default; wouldn\u0027t that have a 50/50 shot of mapping back to the same place when we\u0027re increasing part-power?","commit_id":"8f3ebaf6d6df35d35460f266f5d60ab05a1714fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9ba98833b8a4974e968d8eb824be57e608fe9d1","unresolved":false,"context_lines":[{"line_number":3857,"context_line":"    def test_write_cleanup_part_power_increase(self, mock_cleanup):"},{"line_number":3858,"context_line":"        # Without next_part_power set we expect only one cleanup per DiskFile"},{"line_number":3859,"context_line":"        for policy in POLICIES:"},{"line_number":3860,"context_line":"            os.link \u003d mock.MagicMock()"},{"line_number":3861,"context_line":"            timestamp \u003d Timestamp(time()).internal"},{"line_number":3862,"context_line":"            df_dir \u003d self._create_diskfile_dir(timestamp, policy)"},{"line_number":3863,"context_line":"            self.assertEqual(1, mock_cleanup.call_count)"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a1ced50_479ef763","line":3860,"updated":"2017-03-21 17:29:06.000000000","message":"We never reset this. Having\n\n @mock.patch.object(os, \u0027link\u0027)\n\non the function might be better?","commit_id":"8f3ebaf6d6df35d35460f266f5d60ab05a1714fc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9ba98833b8a4974e968d8eb824be57e608fe9d1","unresolved":false,"context_lines":[{"line_number":3905,"context_line":"            expected_dir \u003d os.path.dirname(expected_fname)"},{"line_number":3906,"context_line":"            mock_cleanup.assert_any_call(expected_dir)"},{"line_number":3907,"context_line":""},{"line_number":3908,"context_line":"            mock_cleanup.reset_mock()"},{"line_number":3909,"context_line":""},{"line_number":3910,"context_line":"    def test_commit_fsync(self):"},{"line_number":3911,"context_line":"        for policy in POLICIES:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a1ced50_c78027fa","line":3908,"updated":"2017-03-21 17:29:06.000000000","message":"Dropping a\n\n self.fail()\n\nat the end here, I see a whole bunch of errors in the captured stdout like\n\n test-TestECDiskFile ERROR: Relinking /tmp/tmpKIROhq/tmp_test_obj_server_DiskFile/sda1/objects-1/840/9d2/d205667a43b97162e59bc8bd421549d2/1490112242.71299.data to /tmp/tmpKIROhq/tmp_test_obj_server_DiskFile/sda1/objects-1/840/9d2/d205667a43b97162e59bc8bd421549d2/1490112242.71299.data failed: [Errno 20] Not a directory: \u0027/tmp/tmpKIROhq/tmp_test_obj_server_DiskFile/sda1/objects-1/840/9d2/d205667a43b97162e59bc8bd421549d2/1490112242.71299.data\u0027:\n Traceback (most recent call last):\n   File \"/vagrant/swift/swift/obj/diskfile.py\", line 1548, in _finalize_put\n     fsync_dir(target_path)\n   File \"/vagrant/swift/swift/common/utils.py\", line 784, in fsync_dir\n     dirfd \u003d os.open(dirpath, os.O_DIRECTORY | os.O_RDONLY)\n OSError: [Errno 20] Not a directory: \u0027/tmp/tmpKIROhq/tmp_test_obj_server_DiskFile/sda1/objects-1/840/9d2/d205667a43b97162e59bc8bd421549d2/1490112242.71299.data\u0027\n\nWere those... expected?","commit_id":"8f3ebaf6d6df35d35460f266f5d60ab05a1714fc"}]}
