)]}'
{"bin/swift-drive-audit":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ac15c1e9d9205e0b5c5f2d93a6010c66de72c9f7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    device_dir \u003d conf.get(\u0027device_dir\u0027, \u0027/srv/node\u0027)"},{"line_number":147,"context_line":"    minutes \u003d int(conf.get(\u0027minutes\u0027, 60))"},{"line_number":148,"context_line":"    error_limit \u003d int(conf.get(\u0027error_limit\u0027, 1))"},{"line_number":149,"context_line":"    recon_dir \u003d conf.get(\u0027recon_dir\u0027, \"None\")"},{"line_number":150,"context_line":"    unmount_action \u003d conf.get(\u0027unmount_action\u0027, \"True\")"},{"line_number":151,"context_line":"    log_file_pattern \u003d conf.get(\u0027log_file_pattern\u0027,"},{"line_number":152,"context_line":"                                \u0027/var/log/kern.*[!.][!g][!z]\u0027)"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_dba8d122","line":149,"updated":"2014-09-18 19:18:33.000000000","message":"Could you call this \"recon_cache_path\" instead? That\u0027s the name all the other Swift daemons use.\n\nAlso, the string \"None\" is not a particularly good default. I\u0027d suggest \"/var/cache/swift\", as that\u0027s what the other Swift daemons have.","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":7134,"name":"Lorcan Browne","email":"lorcan.browne@hp.com","username":"brownelo"},"change_message_id":"11aca49f37c28e4eeb39d61ba72b7b4f253606c7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    device_dir \u003d conf.get(\u0027device_dir\u0027, \u0027/srv/node\u0027)"},{"line_number":147,"context_line":"    minutes \u003d int(conf.get(\u0027minutes\u0027, 60))"},{"line_number":148,"context_line":"    error_limit \u003d int(conf.get(\u0027error_limit\u0027, 1))"},{"line_number":149,"context_line":"    recon_dir \u003d conf.get(\u0027recon_dir\u0027, \"None\")"},{"line_number":150,"context_line":"    unmount_action \u003d conf.get(\u0027unmount_action\u0027, \"True\")"},{"line_number":151,"context_line":"    log_file_pattern \u003d conf.get(\u0027log_file_pattern\u0027,"},{"line_number":152,"context_line":"                                \u0027/var/log/kern.*[!.][!g][!z]\u0027)"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_60155a48","line":149,"in_reply_to":"fa98f980_dba8d122","updated":"2014-09-19 13:24:36.000000000","message":"Done","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ac15c1e9d9205e0b5c5f2d93a6010c66de72c9f7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    minutes \u003d int(conf.get(\u0027minutes\u0027, 60))"},{"line_number":148,"context_line":"    error_limit \u003d int(conf.get(\u0027error_limit\u0027, 1))"},{"line_number":149,"context_line":"    recon_dir \u003d conf.get(\u0027recon_dir\u0027, \"None\")"},{"line_number":150,"context_line":"    unmount_action \u003d conf.get(\u0027unmount_action\u0027, \"True\")"},{"line_number":151,"context_line":"    log_file_pattern \u003d conf.get(\u0027log_file_pattern\u0027,"},{"line_number":152,"context_line":"                                \u0027/var/log/kern.*[!.][!g][!z]\u0027)"},{"line_number":153,"context_line":"    error_re \u003d []"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_fba3d540","line":150,"updated":"2014-09-18 19:18:33.000000000","message":"How do you feel about \"unmount_failed\" being the name in the config file? \"unmount_action\" feels like I should type in a verb describing how to unmount, while \"unmount_failed\" feels like it wants a boolean.","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":7134,"name":"Lorcan Browne","email":"lorcan.browne@hp.com","username":"brownelo"},"change_message_id":"11aca49f37c28e4eeb39d61ba72b7b4f253606c7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    minutes \u003d int(conf.get(\u0027minutes\u0027, 60))"},{"line_number":148,"context_line":"    error_limit \u003d int(conf.get(\u0027error_limit\u0027, 1))"},{"line_number":149,"context_line":"    recon_dir \u003d conf.get(\u0027recon_dir\u0027, \"None\")"},{"line_number":150,"context_line":"    unmount_action \u003d conf.get(\u0027unmount_action\u0027, \"True\")"},{"line_number":151,"context_line":"    log_file_pattern \u003d conf.get(\u0027log_file_pattern\u0027,"},{"line_number":152,"context_line":"                                \u0027/var/log/kern.*[!.][!g][!z]\u0027)"},{"line_number":153,"context_line":"    error_re \u003d []"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_bb33f7f4","line":150,"in_reply_to":"fa98f980_fba3d540","updated":"2014-09-19 13:24:36.000000000","message":"I think that \"unmount_failed_devices\" might be clearer. \"Unmount failed\" could potentiality be mis-interpreted as a drive unmount failing.","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ac15c1e9d9205e0b5c5f2d93a6010c66de72c9f7","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    logger.debug(\"Devices found: %s\" % str(devices))"},{"line_number":172,"context_line":"    if not devices:"},{"line_number":173,"context_line":"        logger.error(\"Error: No devices found!\")"},{"line_number":174,"context_line":"    if recon_dir !\u003d \"None\" and os.path.isdir(recon_dir):"},{"line_number":175,"context_line":"        recon_file \u003d recon_dir + \"/drive.recon\""},{"line_number":176,"context_line":"        for device in devices:"},{"line_number":177,"context_line":"            mount_point \u003d device[\u0027mount_point\u0027]"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_1b625916","line":174,"updated":"2014-09-18 19:18:33.000000000","message":"I don\u0027t know if this check is necessary. swift-drive-audit gets run on storage nodes, and those already have /var/cache/swift or else the auditors/replicators/updaters will complain.\n\nPersonally, I\u0027d rather just call dump_recon_cache and let it spew failures to the logs if the directory isn\u0027t there. That way admins get some notification that they need to go make the directory. With this check in place, the recon cache dumping will fail silently.","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":7134,"name":"Lorcan Browne","email":"lorcan.browne@hp.com","username":"brownelo"},"change_message_id":"11aca49f37c28e4eeb39d61ba72b7b4f253606c7","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    logger.debug(\"Devices found: %s\" % str(devices))"},{"line_number":172,"context_line":"    if not devices:"},{"line_number":173,"context_line":"        logger.error(\"Error: No devices found!\")"},{"line_number":174,"context_line":"    if recon_dir !\u003d \"None\" and os.path.isdir(recon_dir):"},{"line_number":175,"context_line":"        recon_file \u003d recon_dir + \"/drive.recon\""},{"line_number":176,"context_line":"        for device in devices:"},{"line_number":177,"context_line":"            mount_point \u003d device[\u0027mount_point\u0027]"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_fb4c9f78","line":174,"in_reply_to":"fa98f980_1b625916","updated":"2014-09-19 13:24:36.000000000","message":"Done","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ac15c1e9d9205e0b5c5f2d93a6010c66de72c9f7","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            if device:"},{"line_number":187,"context_line":"                mount_point \u003d device[0][\u0027mount_point\u0027]"},{"line_number":188,"context_line":"                if mount_point.startswith(device_dir):"},{"line_number":189,"context_line":"                    if unmount_action \u003d\u003d \"True\":"},{"line_number":190,"context_line":"                        logger.info(\"Unmounting %s with %d errors\" %"},{"line_number":191,"context_line":"                                    (mount_point, count))"},{"line_number":192,"context_line":"                        subprocess.call([\u0027umount\u0027, \u0027-fl\u0027, mount_point])"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_3b655d1d","line":189,"updated":"2014-09-18 19:18:33.000000000","message":"Something more like:\n\n    if config_true_value(unmount_failed):","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":7134,"name":"Lorcan Browne","email":"lorcan.browne@hp.com","username":"brownelo"},"change_message_id":"11aca49f37c28e4eeb39d61ba72b7b4f253606c7","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            if device:"},{"line_number":187,"context_line":"                mount_point \u003d device[0][\u0027mount_point\u0027]"},{"line_number":188,"context_line":"                if mount_point.startswith(device_dir):"},{"line_number":189,"context_line":"                    if unmount_action \u003d\u003d \"True\":"},{"line_number":190,"context_line":"                        logger.info(\"Unmounting %s with %d errors\" %"},{"line_number":191,"context_line":"                                    (mount_point, count))"},{"line_number":192,"context_line":"                        subprocess.call([\u0027umount\u0027, \u0027-fl\u0027, mount_point])"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_3b6e27ca","line":189,"in_reply_to":"fa98f980_3b655d1d","updated":"2014-09-19 13:24:36.000000000","message":"Thanks for pointing this out - I was not aware of this function.","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ac15c1e9d9205e0b5c5f2d93a6010c66de72c9f7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                    (mount_point))"},{"line_number":195,"context_line":"                        comment_fstab(mount_point)"},{"line_number":196,"context_line":"                        unmounts +\u003d 1"},{"line_number":197,"context_line":"                    if recon_dir !\u003d \"None\" and os.path.isdir(recon_dir):"},{"line_number":198,"context_line":"                        dump_recon_cache({str(mount_point): str(count)},"},{"line_number":199,"context_line":"                                         recon_file, logger)"},{"line_number":200,"context_line":"    if unmounts \u003d\u003d 0:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_5b6ce108","line":197,"updated":"2014-09-18 19:18:33.000000000","message":"Same as before: don\u0027t check for cache-dir existence","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":7134,"name":"Lorcan Browne","email":"lorcan.browne@hp.com","username":"brownelo"},"change_message_id":"11aca49f37c28e4eeb39d61ba72b7b4f253606c7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                    (mount_point))"},{"line_number":195,"context_line":"                        comment_fstab(mount_point)"},{"line_number":196,"context_line":"                        unmounts +\u003d 1"},{"line_number":197,"context_line":"                    if recon_dir !\u003d \"None\" and os.path.isdir(recon_dir):"},{"line_number":198,"context_line":"                        dump_recon_cache({str(mount_point): str(count)},"},{"line_number":199,"context_line":"                                         recon_file, logger)"},{"line_number":200,"context_line":"    if unmounts \u003d\u003d 0:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"fa98f980_7b67cfea","line":197,"in_reply_to":"fa98f980_5b6ce108","updated":"2014-09-19 13:24:36.000000000","message":"Done","commit_id":"bd02140ffd9ea506b77efee96abcba17490c5080"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"1be1755511f593e5cda654e1ed21a77493345c41","unresolved":false,"context_lines":[{"line_number":147,"context_line":"    device_dir \u003d conf.get(\u0027device_dir\u0027, \u0027/srv/node\u0027)"},{"line_number":148,"context_line":"    minutes \u003d int(conf.get(\u0027minutes\u0027, 60))"},{"line_number":149,"context_line":"    error_limit \u003d int(conf.get(\u0027error_limit\u0027, 1))"},{"line_number":150,"context_line":"    recon_cache_path \u003d conf.get(\u0027recon_cache_path\u0027, \"None\")"},{"line_number":151,"context_line":"    log_file_pattern \u003d conf.get(\u0027log_file_pattern\u0027,"},{"line_number":152,"context_line":"                                \u0027/var/log/kern.*[!.][!g][!z]\u0027)"},{"line_number":153,"context_line":"    error_re \u003d []"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"da9df570_3cae3886","line":150,"updated":"2014-09-23 18:19:53.000000000","message":"The default should be \"/var/cache/swift\" for consistency.\n\nIf that won\u0027t work for some reason, use the literal None instead of the string \"None\", as the latter is confusing.","commit_id":"895569ac68c707aa90a60c26f853e455eb5fa121"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"1be1755511f593e5cda654e1ed21a77493345c41","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                        unmounts +\u003d 1"},{"line_number":197,"context_line":"                    if recon_cache_path !\u003d \"None\":"},{"line_number":198,"context_line":"                        recon_errors[mount_point] \u003d count"},{"line_number":199,"context_line":"    if recon_cache_path !\u003d \"None\":"},{"line_number":200,"context_line":"        recon_file \u003d recon_cache_path + \"/drive.recon\""},{"line_number":201,"context_line":"        dump_recon_cache(recon_errors, recon_file, logger)"},{"line_number":202,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":2,"id":"da9df570_5ca93c7a","line":199,"updated":"2014-09-23 18:19:53.000000000","message":"I\u0027d like to see this guard, and all similar guards, removed. dump_recon_cache() emits helpful warnings if it can\u0027t actually write its data, but it does not raise exceptions. Having the guard clause here makes for silent failures.","commit_id":"895569ac68c707aa90a60c26f853e455eb5fa121"}]}
