)]}'
{"doc/source/deployment_guide.rst":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"7cd928828188ac3289a560a4788483e3f37578ab","unresolved":false,"context_lines":[{"line_number":489,"context_line":"log_statsd_metric_prefix"},{"line_number":490,"context_line":"eventlet_debug                   false       If true, turn on debug logging for"},{"line_number":491,"context_line":"                                             eventlet"},{"line_number":492,"context_line":"fallocate_reserve                5%          You can set fallocate_reserve to the"},{"line_number":493,"context_line":"                                             number of bytes or percentage of disk"},{"line_number":494,"context_line":"                                             space you\u0027d like fallocate to reserve,"},{"line_number":495,"context_line":"                                             whether there is space for the given"},{"line_number":496,"context_line":"                                             file size or not. Percentage will be used"},{"line_number":497,"context_line":"                                             if the value ends with a \u0027%\u0027. This is"},{"line_number":498,"context_line":"                                             useful for systems that behave badly when"},{"line_number":499,"context_line":"                                             they completely run out of space; you can"},{"line_number":500,"context_line":"                                             make the services pretend they\u0027re out of"},{"line_number":501,"context_line":"                                             space early."},{"line_number":502,"context_line":"conn_timeout                     0.5         Time to wait while attempting to connect"},{"line_number":503,"context_line":"                                             to another backend node."},{"line_number":504,"context_line":"node_timeout                     3           Time to wait while sending each chunk of"}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa0719c6_af5b622d","line":501,"range":{"start_line":492,"start_character":45,"end_line":501,"end_character":57},"updated":"2016-03-22 18:36:06.000000000","message":"I think we should add:\n\n    5% is the lowest recommended value. If you do not actively\n    and regularly monitor disk usage, a value as high as 30%\n    may be appropriate.\n\nand repeat below","commit_id":"559fe326fd34250eddb900bd3150a52c0d75096d"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"c35ab5f6e38face7e6bee740cce1d48317c6ee97","unresolved":false,"context_lines":[{"line_number":489,"context_line":"log_statsd_metric_prefix"},{"line_number":490,"context_line":"eventlet_debug                   false       If true, turn on debug logging for"},{"line_number":491,"context_line":"                                             eventlet"},{"line_number":492,"context_line":"fallocate_reserve                5%          You can set fallocate_reserve to the"},{"line_number":493,"context_line":"                                             number of bytes or percentage of disk"},{"line_number":494,"context_line":"                                             space you\u0027d like fallocate to reserve,"},{"line_number":495,"context_line":"                                             whether there is space for the given"},{"line_number":496,"context_line":"                                             file size or not. Percentage will be used"},{"line_number":497,"context_line":"                                             if the value ends with a \u0027%\u0027. This is"},{"line_number":498,"context_line":"                                             useful for systems that behave badly when"},{"line_number":499,"context_line":"                                             they completely run out of space; you can"},{"line_number":500,"context_line":"                                             make the services pretend they\u0027re out of"},{"line_number":501,"context_line":"                                             space early."},{"line_number":502,"context_line":"conn_timeout                     0.5         Time to wait while attempting to connect"},{"line_number":503,"context_line":"                                             to another backend node."},{"line_number":504,"context_line":"node_timeout                     3           Time to wait while sending each chunk of"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a061dce_87ecd2c8","line":501,"range":{"start_line":492,"start_character":45,"end_line":501,"end_character":57},"in_reply_to":"fa0719c6_af5b622d","updated":"2016-04-04 18:33:51.000000000","message":"I\u0027d agree with other reviewers who commented about 5% being somewhat high and 30% as a place to warn, but not limit.\n\nA default of 1% with a note about it being used to reject large writes but still allow for DELETEs to happen might cover the bases and make things more clear. What do you think?","commit_id":"559fe326fd34250eddb900bd3150a52c0d75096d"}],"swift/common/daemon.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2c3a076f8cd2f84a618d81db68b902f086aadf9d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        reserve \u003d float(reserve[:-1])"},{"line_number":100,"context_line":"        utils.FALLOCATE_PERCENT \u003d True"},{"line_number":101,"context_line":"    if reserve \u003e 0:"},{"line_number":102,"context_line":"        utils.FALLOCATE_RESERVE \u003d reserve"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    # By default, disable eventlet printing stacktraces"},{"line_number":105,"context_line":"    eventlet_debug \u003d utils.config_true_value(conf.get(\u0027eventlet_debug\u0027, \u0027no\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_585f3e75","line":102,"updated":"2016-03-07 00:58:36.000000000","message":"We should probably deal with a ValueError here, in case someone enters a non int/float value.\n\nSomething like:\n\n    reserve \u003d str(conf.get(\u0027fallocate_reserve\u0027, \u00275%\u0027))\n    try:\n        if reserve[-1:] !\u003d \u0027%\u0027:\n            reserve \u003d int(reserve)\n        else:\n            reserve \u003d float(reserve[:-1])\n            utils.FALLOCATE_PERCENT \u003d True\n    except ValueError:\n        reserve \u003d 5\n        utils.FALLOCATE_PERCENT \u003d True\n    if reserve \u003e 0:\n        utils.FALLOCATE_RESERVE \u003d reserve","commit_id":"d7725fdbaad34d4d7d1e709f5ea4f59b534a545c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1749f3a1fd9a06f84fb9481dbafaea62941dc8e2","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        logger.error(\u0027Error: %s is not a valid value for fallocate_reserve. \u0027"},{"line_number":104,"context_line":"                     \u0027Defaulting to 5%%\u0027 % (reserve))"},{"line_number":105,"context_line":"        reserve \u003d 5"},{"line_number":106,"context_line":"        utils.FALLOCATE_IS_PERCENT \u003d True"},{"line_number":107,"context_line":"    if reserve \u003e 0:"},{"line_number":108,"context_line":"        utils.FALLOCATE_RESERVE \u003d reserve"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_381f9460","line":106,"updated":"2016-03-08 21:58:24.000000000","message":"this looks duplicated with the code in wsgi","commit_id":"3a787042b05ba71405c3d288d02bcf2b3f4a0bbd"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"341513940adadcc61ebd5831ce37df4ff0b0d2fb","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    if utils.config_true_value(conf.get(\u0027disable_fallocate\u0027, \u0027no\u0027)):"},{"line_number":93,"context_line":"        utils.disable_fallocate()"},{"line_number":94,"context_line":"    # set utils.FALLOCATE_RESERVE if desired"},{"line_number":95,"context_line":"    utils.FALLOCATE_RESERVE \u003d conf.get(\u0027fallocate_reserve\u0027, \u00275%\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    # By default, disable eventlet printing stacktraces"},{"line_number":98,"context_line":"    eventlet_debug \u003d utils.config_true_value(conf.get(\u0027eventlet_debug\u0027, \u0027no\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_2d748566","line":95,"range":{"start_line":95,"start_character":30,"end_line":95,"end_character":65},"updated":"2016-03-22 17:18:36.000000000","message":"I think when Clay recommended a function in utils, he meant that utils contain a function such as config_fallocate_value() ... and in there do the parsing and validation there.\n\nIt was that context that I was recommending that you could raise ValueError -- which would stop the daemon\u0027s startup if the config value was bogus.","commit_id":"559fe326fd34250eddb900bd3150a52c0d75096d"}],"swift/common/utils.py":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"9a13f6b369ed96e9cb1c65aeb4b68b63624ebadf","unresolved":false,"context_lines":[{"line_number":96,"context_line":"# If set to non-zero, fallocate routines will fail based on free space"},{"line_number":97,"context_line":"# available being at or below this amount, in bytes."},{"line_number":98,"context_line":"FALLOCATE_RESERVE \u003d 0"},{"line_number":99,"context_line":"# Can be set to true to use a percentage of free space as opposed to a"},{"line_number":100,"context_line":"# byte count."},{"line_number":101,"context_line":"FALLOCATE_PERCENT \u003d False"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"# Used by hash_path to offer a bit more security when generating hashes for"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_fcf740f3","line":100,"range":{"start_line":99,"start_character":2,"end_line":100,"end_character":13},"updated":"2016-03-07 10:53:24.000000000","message":"A better comment for this would be:\n\n    Indicates if FALLOCATE_RESERVE is the percentage of free space (True) or\n    the number of bytes (False).","commit_id":"d7725fdbaad34d4d7d1e709f5ea4f59b534a545c"},{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"28abc59d66f15fd22d605d1bafb08eeb8306a832","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                reserve \u003d int(FALLOCATE_RESERVE)"},{"line_number":601,"context_line":"                fallocate_is_percent \u003d False"},{"line_number":602,"context_line":"        except ValueError:"},{"line_number":603,"context_line":"            logging.error(\u0027Error: %s is an invalid value for fallocate_reserve\u0027"},{"line_number":604,"context_line":"                          \u0027. Defaulting to 5%%\u0027 % (FALLOCATE_RESERVE))"},{"line_number":605,"context_line":"            reserve \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_2f51e836","line":602,"range":{"start_line":602,"start_character":15,"end_line":602,"end_character":25},"updated":"2016-03-09 12:14:00.000000000","message":"The existing pattern seems to be to *not* check parameters but accept the backtrace. However, there *is* a better example -- see config_auto_int_value() in common/utils.py. This suggest that instead of logging, it would be better to raise ValueError instead of defaulting\n\n(Repasting from Donagh\u0027s updated on last patchset as a reminder)","commit_id":"4a2d99ea3f7725bb7bab50ab862761c9793b396e"},{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"b5cd5ec1278e7ba9f2455b61a74e9f37fc357d64","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                reserve \u003d int(FALLOCATE_RESERVE)"},{"line_number":601,"context_line":"                fallocate_is_percent \u003d False"},{"line_number":602,"context_line":"        except ValueError:"},{"line_number":603,"context_line":"            logging.error(\u0027Error: %s is an invalid value for fallocate_reserve\u0027"},{"line_number":604,"context_line":"                          \u0027. Defaulting to 5%%\u0027 % (FALLOCATE_RESERVE))"},{"line_number":605,"context_line":"            reserve \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_e25a9b4f","line":602,"range":{"start_line":602,"start_character":15,"end_line":602,"end_character":25},"in_reply_to":"5aef4532_05516dd8","updated":"2016-03-14 17:41:58.000000000","message":"I agree that it\u0027d be preferable to get a hard failure.","commit_id":"4a2d99ea3f7725bb7bab50ab862761c9793b396e"},{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"2b978f0affc3cf87dd5622f1ec26efc15470b96f","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                reserve \u003d int(FALLOCATE_RESERVE)"},{"line_number":601,"context_line":"                fallocate_is_percent \u003d False"},{"line_number":602,"context_line":"        except ValueError:"},{"line_number":603,"context_line":"            logging.error(\u0027Error: %s is an invalid value for fallocate_reserve\u0027"},{"line_number":604,"context_line":"                          \u0027. Defaulting to 5%%\u0027 % (FALLOCATE_RESERVE))"},{"line_number":605,"context_line":"            reserve \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_05516dd8","line":602,"range":{"start_line":602,"start_character":15,"end_line":602,"end_character":25},"in_reply_to":"5aef4532_2f51e836","updated":"2016-03-09 12:36:19.000000000","message":"The trade off seems to be that you either fail out (e.g. your server doesn\u0027t start because you\u0027ve set an invalid value) - which seems fair - or you warn in the logs and allow the services to start with a default (which is how it is now).\n\nI\u0027m happy to change it to fail out entirely - e.g. just raise the error, and allow the services to not start properly if thats the consensus.","commit_id":"4a2d99ea3f7725bb7bab50ab862761c9793b396e"},{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"b5cd5ec1278e7ba9f2455b61a74e9f37fc357d64","unresolved":false,"context_lines":[{"line_number":601,"context_line":"                fallocate_is_percent \u003d False"},{"line_number":602,"context_line":"        except ValueError:"},{"line_number":603,"context_line":"            logging.error(\u0027Error: %s is an invalid value for fallocate_reserve\u0027"},{"line_number":604,"context_line":"                          \u0027. Defaulting to 5%%\u0027 % (FALLOCATE_RESERVE))"},{"line_number":605,"context_line":"            reserve \u003d 5"},{"line_number":606,"context_line":"            fallocate_is_percent \u003d True"},{"line_number":607,"context_line":"        if FALLOCATE_RESERVE \u003e 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_15525fdd","line":604,"updated":"2016-03-14 17:41:58.000000000","message":"Does this string need to be enclosed in a `_()`?\n\nMinor nit: no need to wrap FALLOCATE_RESERVE in parens here.\n\nIt\u0027s usually better to pass your vars as additional arguments to the logging method you\u0027re calling rather than always forcing the expansion with `%`, but it\u0027s not a realistic perf concern in this case. And practically someone should always have an error-inclusive log level set... so extremely minor nit.","commit_id":"4a2d99ea3f7725bb7bab50ab862761c9793b396e"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"341513940adadcc61ebd5831ce37df4ff0b0d2fb","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            else:"},{"line_number":600,"context_line":"                reserve \u003d int(FALLOCATE_RESERVE)"},{"line_number":601,"context_line":"                fallocate_is_percent \u003d False"},{"line_number":602,"context_line":"        except ValueError:"},{"line_number":603,"context_line":"            raise ValueError(\u0027Error: %s is an invalid value for fallocate\u0027"},{"line_number":604,"context_line":"                             \u0027_reserve.\u0027 % FALLOCATE_RESERVE)"},{"line_number":605,"context_line":"        if FALLOCATE_RESERVE \u003e 0:"},{"line_number":606,"context_line":"            st \u003d os.fstatvfs(fd)"},{"line_number":607,"context_line":"            free \u003d st.f_frsize * st.f_bavail - length.value"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_78e91d14","line":604,"range":{"start_line":602,"start_character":8,"end_line":604,"end_character":60},"updated":"2016-03-22 17:18:36.000000000","message":"If you take on my sugestion about config_fallocate_value() in utils, you won\u0027t need to catch ValueError here (since we get a backtrace anyway at the point where ValueError is raised)","commit_id":"559fe326fd34250eddb900bd3150a52c0d75096d"}],"swift/common/wsgi.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"2c3a076f8cd2f84a618d81db68b902f086aadf9d","unresolved":false,"context_lines":[{"line_number":898,"context_line":"        reserve \u003d int(reserve)"},{"line_number":899,"context_line":"    else:"},{"line_number":900,"context_line":"        reserve \u003d float(reserve[:-1])"},{"line_number":901,"context_line":"        utils.FALLOCATE_PERCENT \u003d True"},{"line_number":902,"context_line":"    if reserve \u003e 0:"},{"line_number":903,"context_line":"        utils.FALLOCATE_RESERVE \u003d reserve"},{"line_number":904,"context_line":"    # redirect errors to logger and close stdio"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_d876aed7","line":901,"updated":"2016-03-07 00:58:36.000000000","message":"Handle ValueError here too.","commit_id":"d7725fdbaad34d4d7d1e709f5ea4f59b534a545c"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"6309e87550558d60303d927bf146fedb2be2d62e","unresolved":false,"context_lines":[{"line_number":900,"context_line":"        else:"},{"line_number":901,"context_line":"            reserve \u003d float(reserve[:-1])"},{"line_number":902,"context_line":"            utils.FALLOCATE_IS_PERCENT \u003d True"},{"line_number":903,"context_line":"    except ValueError:"},{"line_number":904,"context_line":"        logger.error(\u0027Error: %s is not a valid value for fallocate_reserve. \u0027"},{"line_number":905,"context_line":"                     \u0027Defaulting to 5%%\u0027 % (reserve))"},{"line_number":906,"context_line":"        reserve \u003d 5"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_d94136ab","line":903,"range":{"start_line":903,"start_character":11,"end_line":903,"end_character":22},"updated":"2016-03-09 11:51:34.000000000","message":"The existing pattern seems to be to *not* check parameters but accept the backtrace. However, there *is* a better example -- see config_auto_int_value() in common/utils.py. This suggest that instead of logging, it would be better to raise ValueError instead of defaulting","commit_id":"3a787042b05ba71405c3d288d02bcf2b3f4a0bbd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1749f3a1fd9a06f84fb9481dbafaea62941dc8e2","unresolved":false,"context_lines":[{"line_number":904,"context_line":"        logger.error(\u0027Error: %s is not a valid value for fallocate_reserve. \u0027"},{"line_number":905,"context_line":"                     \u0027Defaulting to 5%%\u0027 % (reserve))"},{"line_number":906,"context_line":"        reserve \u003d 5"},{"line_number":907,"context_line":"        utils.FALLOCATE_IS_PERCENT \u003d True"},{"line_number":908,"context_line":"    if reserve \u003e 0:"},{"line_number":909,"context_line":"        utils.FALLOCATE_RESERVE \u003d reserve"},{"line_number":910,"context_line":"    # redirect errors to logger and close stdio"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_b80a841f","line":907,"updated":"2016-03-08 21:58:24.000000000","message":"extract both of these to a single implementation in utils to avoid the duplication","commit_id":"3a787042b05ba71405c3d288d02bcf2b3f4a0bbd"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"f466ba55382d33351bc10fc58bdcc0fc4f3d4279","unresolved":false,"context_lines":[{"line_number":2663,"context_line":"            # Want 1% reserved, have 100 bytes * 2/100 free, and file size is"},{"line_number":2664,"context_line":"            # 99, so succeeds"},{"line_number":2665,"context_line":"            utils.FALLOCATE_IS_PERCENT \u003d True"},{"line_number":2666,"context_line":"            utils.FALLOCATE_RESERVE \u003d \"1\""},{"line_number":2667,"context_line":"            StatVFS.f_frsize \u003d 100"},{"line_number":2668,"context_line":"            StatVFS.f_bavail \u003d 2"},{"line_number":2669,"context_line":"            StatVFS.f_blocks \u003d 100"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a122d0e_f49aa4c4","line":2666,"range":{"start_line":2666,"start_character":37,"end_line":2666,"end_character":41},"updated":"2016-04-15 16:11:08.000000000","message":"This should be\n\n    utils.FALLOCATE_RESERVE \u003d 1.00\n\n...and later the assert should be\n\n    FALLOCATE_RESERVE fail 100.0 \u003c\u003d 100.0\n\n(note the \".0\" at end of message)","commit_id":"379783f7a71182f330362912dd1ce609ad79340b"},{"author":{"_account_id":860,"name":"Donagh McCabe","email":"donagh.mccabe@gmail.com","username":"donagh-mccabe"},"change_message_id":"ad08ec700eecd583e0c8cdb49540a94ffbe735eb","unresolved":false,"context_lines":[{"line_number":2826,"context_line":"            fallocate_value, is_percent \u003d utils.config_fallocate_value(\u0027ab%\u0027)"},{"line_number":2827,"context_line":"        except ValueError as err:"},{"line_number":2828,"context_line":"            exc \u003d err"},{"line_number":2829,"context_line":"        self.assertEqual(str(exc), \u0027Error: ab% is an invalid value for \u0027"},{"line_number":2830,"context_line":"                                   \u0027fallocate_reserve.\u0027)"},{"line_number":2831,"context_line":"        try:"},{"line_number":2832,"context_line":"            fallocate_value, is_percent \u003d utils.config_fallocate_value(\u0027ab\u0027)"},{"line_number":2833,"context_line":"        except ValueError as err:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_8f159b4a","line":2830,"range":{"start_line":2829,"start_character":8,"end_line":2830,"end_character":56},"updated":"2016-04-19 17:43:11.000000000","message":"FWI: I would have been happy with a simple assertRaises(). However, extra marks for being thorough.","commit_id":"710315f1f5916c9509ecacc976e14c19600d33b0"}]}
