)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     dparalen \u003cvetrisko@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-19 11:24:37 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fcntl.flock writing"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows multiple instances of inspector to try updating dnsmasq"},{"line_number":10,"context_line":"configuration simultaneously.  The goal is to be able to (test) run an HA"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_a6b8e229","line":7,"updated":"2017-10-06 09:18:38.000000000","message":"please provide a more meaningful summary, like \"Allow concurrect updating of dnsmasq configuration\"","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     dparalen \u003cvetrisko@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-19 11:24:37 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fcntl.flock writing"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows multiple instances of inspector to try updating dnsmasq"},{"line_number":10,"context_line":"configuration simultaneously.  The goal is to be able to (test) run an HA"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_ba5c3d19","line":7,"in_reply_to":"7f515b1d_a6b8e229","updated":"2017-10-09 15:18:17.000000000","message":"Done","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"A new config option `dnsmasq_pxe_filter.purge_dhcp_hostsdir` is introduced to"},{"line_number":14,"context_line":"be able to disable purging of the dhcp hosts directory in case multiple"},{"line_number":15,"context_line":"inspector instances are expected to run on the same node."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I2f7b8d3172f375cf65e759c9b881fcf41649c2f0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_86b3a64d","line":16,"updated":"2017-10-06 09:18:38.000000000","message":"let\u0027s have an RFE/bug to track it","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":13,"context_line":"A new config option `dnsmasq_pxe_filter.purge_dhcp_hostsdir` is introduced to"},{"line_number":14,"context_line":"be able to disable purging of the dhcp hosts directory in case multiple"},{"line_number":15,"context_line":"inspector instances are expected to run on the same node."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I2f7b8d3172f375cf65e759c9b881fcf41649c2f0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7f515b1d_9a9bc1c7","line":16,"in_reply_to":"7f515b1d_86b3a64d","updated":"2017-10-09 15:18:17.000000000","message":"Done","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"}],"ironic_inspector/conf.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                      \u0027This directory is expected to be in exclusive control \u0027"},{"line_number":215,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":216,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":217,"context_line":"                help\u003d_(\u0027Purge the hostdir upon driver initialization.\u0027)),"},{"line_number":218,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_c6a99edd","line":217,"updated":"2017-10-06 09:18:38.000000000","message":"please update example.conf with this","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                      \u0027This directory is expected to be in exclusive control \u0027"},{"line_number":215,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":216,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":217,"context_line":"                help\u003d_(\u0027Purge the hostdir upon driver initialization.\u0027)),"},{"line_number":218,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_f06e57fe","line":217,"in_reply_to":"7f515b1d_c6a99edd","updated":"2017-10-09 15:18:17.000000000","message":"Done","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db879fb9efee64a1f924233f435e793882dd9ba4","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                      \u0027This directory is expected to be in exclusive control \u0027"},{"line_number":217,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostdir upon driver initialization.\u0027)),"},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":221,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":222,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_405a214f","line":219,"updated":"2017-11-15 09:10:06.000000000","message":"Let\u0027s mention the only condition (several inspectors on the same machine without containers) when this setting makes sense. Let\u0027s also mention that the operator is responsible for purging this directory periodically.","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ecc8d608070697aeb363d8deed29a8c3945af4c5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                      \u0027This directory is expected to be in exclusive control \u0027"},{"line_number":217,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostdir upon driver initialization.\u0027)),"},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":221,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":222,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_d9096895","line":219,"in_reply_to":"1f485f77_405a214f","updated":"2017-11-15 10:38:23.000000000","message":"Ack","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"44c4c747915944cf0ebbbfda10246f53bcc3b7a0","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                      \u0027This directory is expected to be in exclusive control \u0027"},{"line_number":217,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostdir upon driver initialization.\u0027)),"},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":221,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":222,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_47c7ce65","line":219,"in_reply_to":"1f485f77_d9096895","updated":"2017-11-15 15:54:06.000000000","message":"Done","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostsdir upon driver initialization. \u0027"},{"line_number":220,"context_line":"                       \u0027Setting to false makes sense only for deployment of \u0027"},{"line_number":221,"context_line":"                       \u0027multiple (uncontainerized) inspector instances on a \u0027"},{"line_number":222,"context_line":"                       \u0027single node. In this case, the Operator is \u0027"},{"line_number":223,"context_line":"                       \u0027responsible for setting up a custom cleaning \u0027"},{"line_number":224,"context_line":"                       \u0027facility.\u0027)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_442fb0a0","line":221,"updated":"2017-11-23 13:23:12.000000000","message":"nit: s/inspector/ironic-inspector/","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostsdir upon driver initialization. \u0027"},{"line_number":220,"context_line":"                       \u0027Setting to false makes sense only for deployment of \u0027"},{"line_number":221,"context_line":"                       \u0027multiple (uncontainerized) inspector instances on a \u0027"},{"line_number":222,"context_line":"                       \u0027single node. In this case, the Operator is \u0027"},{"line_number":223,"context_line":"                       \u0027responsible for setting up a custom cleaning \u0027"},{"line_number":224,"context_line":"                       \u0027facility.\u0027)),"},{"line_number":225,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_642af490","line":222,"updated":"2017-11-23 13:23:12.000000000","message":"nit: not sure why upper-case Operator..","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7356362a76258efe59843542ea736c70964b88db","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostsdir upon driver initialization. \u0027"},{"line_number":220,"context_line":"                       \u0027Setting to false makes sense only for deployment of \u0027"},{"line_number":221,"context_line":"                       \u0027multiple (uncontainerized) inspector instances on a \u0027"},{"line_number":222,"context_line":"                       \u0027single node. In this case, the Operator is \u0027"},{"line_number":223,"context_line":"                       \u0027responsible for setting up a custom cleaning \u0027"},{"line_number":224,"context_line":"                       \u0027facility.\u0027)),"},{"line_number":225,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_4af1f9cc","line":222,"in_reply_to":"ff82abbf_642af490","updated":"2017-11-23 14:10:25.000000000","message":"cause it\u0027s the person who\u0027s suffering an headache from debugging the inspector so I thought I\u0027d show them a bit of respect if they have to read thru the configuration sample ;)","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"668a74093505cc8e6074d273e0bb36a66775ebec","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostsdir upon driver initialization. \u0027"},{"line_number":220,"context_line":"                       \u0027Setting to false makes sense only for deployment of \u0027"},{"line_number":221,"context_line":"                       \u0027multiple (uncontainerized) inspector instances on a \u0027"},{"line_number":222,"context_line":"                       \u0027single node. In this case, the Operator is \u0027"},{"line_number":223,"context_line":"                       \u0027responsible for setting up a custom cleaning \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_59fc10b4","line":220,"range":{"start_line":220,"start_character":41,"end_line":220,"end_character":52},"updated":"2017-12-11 15:46:15.000000000","message":"I think we should re-word this, perhaps something like?\n\n    Setting to false should only be performed when the deployment of inspector is such that their are multiple processes executing inside of the same host and namespace.\n\nThe reasoning is we shouldn\u0027t try to convey what makes sense, we should explicitly state the recommendation or use case.","commit_id":"4ff0213e8770de2139f3ec68e65447a9dfcfac1f"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"fb0d334b94017af3a46a4bd4866856877dfd478a","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                      \u0027of the driver.\u0027)),"},{"line_number":218,"context_line":"    cfg.BoolOpt(\u0027purge_dhcp_hostsdir\u0027, default\u003dTrue,"},{"line_number":219,"context_line":"                help\u003d_(\u0027Purge the hostsdir upon driver initialization. \u0027"},{"line_number":220,"context_line":"                       \u0027Setting to false makes sense only for deployment of \u0027"},{"line_number":221,"context_line":"                       \u0027multiple (uncontainerized) inspector instances on a \u0027"},{"line_number":222,"context_line":"                       \u0027single node. In this case, the Operator is \u0027"},{"line_number":223,"context_line":"                       \u0027responsible for setting up a custom cleaning \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"df87a7cf_fce37603","line":220,"range":{"start_line":220,"start_character":41,"end_line":220,"end_character":52},"in_reply_to":"df87a7cf_59fc10b4","updated":"2017-12-12 14:10:59.000000000","message":"makes sense; follow-up?","commit_id":"4ff0213e8770de2139f3ec68e65447a9dfcfac1f"}],"ironic_inspector/pxe_filter/dnsmasq.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    :returns: the number of bytes written."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":152,"context_line":"    # through inotify, which reacts on f.close()"},{"line_number":153,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":154,"context_line":"        try:"},{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_66842a5f","line":152,"updated":"2017-10-06 09:18:38.000000000","message":"I\u0027m not sure I get how line-buffering is related to closing.. close() will be done on exiting the \"with\" block","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    :returns: the number of bytes written."},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":152,"context_line":"    # through inotify, which reacts on f.close()"},{"line_number":153,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":154,"context_line":"        try:"},{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_9a4ce19e","line":152,"in_reply_to":"7f515b1d_66842a5f","updated":"2017-10-09 15:18:17.000000000","message":"is the content guaranteed to be in the file on the file system upon the closing?","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"612b1c1a4fcb41e1ab26d16233f87b776d4d1a2f","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"},{"line_number":156,"context_line":"            return f.write(buf)"},{"line_number":157,"context_line":"        except io.BlockingIOError:"},{"line_number":158,"context_line":"            LOG.debug(\u0027%s locked; will try again later\u0027, path)"},{"line_number":159,"context_line":"        finally:"},{"line_number":160,"context_line":"            fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_dcf1ca97","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":62},"updated":"2017-10-03 22:51:01.000000000","message":"Is it okay to return None (on failure) alongside with a number of octets written (on success)? Would it make sense to return `0` here?\n\nIf that\u0027s OK I\u0027d suggest updating the docsstring accordingly.","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"},{"line_number":156,"context_line":"            return f.write(buf)"},{"line_number":157,"context_line":"        except io.BlockingIOError:"},{"line_number":158,"context_line":"            LOG.debug(\u0027%s locked; will try again later\u0027, path)"},{"line_number":159,"context_line":"        finally:"},{"line_number":160,"context_line":"            fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_4687ee62","line":158,"updated":"2017-10-06 09:18:38.000000000","message":"let\u0027s maybe spin a few times, trying to update the file?","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"},{"line_number":156,"context_line":"            return f.write(buf)"},{"line_number":157,"context_line":"        except io.BlockingIOError:"},{"line_number":158,"context_line":"            LOG.debug(\u0027%s locked; will try again later\u0027, path)"},{"line_number":159,"context_line":"        finally:"},{"line_number":160,"context_line":"            fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_daa7f94f","line":158,"in_reply_to":"7f515b1d_4687ee62","updated":"2017-10-09 15:18:17.000000000","message":"Done","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8d15091fc22bcd1b6120077f12aa30feb9ec1e5c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            fcntl.flock(f, fcntl.LOCK_EX | fcntl.LOCK_NB)"},{"line_number":156,"context_line":"            return f.write(buf)"},{"line_number":157,"context_line":"        except io.BlockingIOError:"},{"line_number":158,"context_line":"            LOG.debug(\u0027%s locked; will try again later\u0027, path)"},{"line_number":159,"context_line":"        finally:"},{"line_number":160,"context_line":"            fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_c3543e24","line":158,"range":{"start_line":158,"start_character":8,"end_line":158,"end_character":62},"in_reply_to":"7f515b1d_dcf1ca97","updated":"2017-10-04 07:22:05.000000000","message":"makes sense; I\u0027ll update the docstring","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff549690df52fcc6c1629f21cb5c27095fc885e6","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    \"\"\""},{"line_number":170,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":171,"context_line":"    _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac)"},{"line_number":172,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_267e326b","line":172,"updated":"2017-10-06 09:18:38.000000000","message":"you should not log this, if the write failed","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0f43e9238706d60087eff6f1153bfe974a14d894","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    \"\"\""},{"line_number":170,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":171,"context_line":"    _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac)"},{"line_number":172,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_7a512536","line":172,"in_reply_to":"7f515b1d_267e326b","updated":"2017-10-09 15:18:17.000000000","message":"Done","commit_id":"a44aa607ff91a723cc346de780bbf988480bba06"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db879fb9efee64a1f924233f435e793882dd9ba4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    :param path: where to write to"},{"line_number":149,"context_line":"    :param buf: the content to write"},{"line_number":150,"context_line":"    :raises: FileNotFoundError, IOError"},{"line_number":151,"context_line":"    :returns: the number of bytes written."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":154,"context_line":"    # through inotify, which reacts on f.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_2055e51d","line":151,"updated":"2017-11-15 09:10:06.000000000","message":"the way you actually use it, it\u0027s a boolean, success or failure","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"44c4c747915944cf0ebbbfda10246f53bcc3b7a0","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    :param path: where to write to"},{"line_number":149,"context_line":"    :param buf: the content to write"},{"line_number":150,"context_line":"    :raises: FileNotFoundError, IOError"},{"line_number":151,"context_line":"    :returns: the number of bytes written."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":154,"context_line":"    # through inotify, which reacts on f.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_42c7bc65","line":151,"in_reply_to":"1f485f77_192a608f","updated":"2017-11-15 15:54:06.000000000","message":"Done","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"42434d0ef854c7c95d02dd3db8716c8424b5ab77","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    :param path: where to write to"},{"line_number":149,"context_line":"    :param buf: the content to write"},{"line_number":150,"context_line":"    :raises: FileNotFoundError, IOError"},{"line_number":151,"context_line":"    :returns: the number of bytes written."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":154,"context_line":"    # through inotify, which reacts on f.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_f431cb0c","line":151,"in_reply_to":"1f485f77_192a608f","updated":"2017-11-15 11:33:06.000000000","message":"fair enough, I\u0027ll update","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e6c77109e34209a50a78f4b0a6acd9ca542fe167","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    :param path: where to write to"},{"line_number":149,"context_line":"    :param buf: the content to write"},{"line_number":150,"context_line":"    :raises: FileNotFoundError, IOError"},{"line_number":151,"context_line":"    :returns: the number of bytes written."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":154,"context_line":"    # through inotify, which reacts on f.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_192a608f","line":151,"in_reply_to":"1f485f77_1973804f","updated":"2017-11-15 10:53:35.000000000","message":"We don\u0027t need too much flexibility for a private function, I think.","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ecc8d608070697aeb363d8deed29a8c3945af4c5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    :param path: where to write to"},{"line_number":149,"context_line":"    :param buf: the content to write"},{"line_number":150,"context_line":"    :raises: FileNotFoundError, IOError"},{"line_number":151,"context_line":"    :returns: the number of bytes written."},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":154,"context_line":"    # through inotify, which reacts on f.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_1973804f","line":151,"in_reply_to":"1f485f77_2055e51d","updated":"2017-11-15 10:38:23.000000000","message":"hmmm true; but the return of write result seemed more logical; I\u0027d say the  \"cast\" should better be done on the caller side i.e as needed (to avoid reducing flexibility)?","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e6c77109e34209a50a78f4b0a6acd9ca542fe167","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                return f.write(buf)"},{"line_number":161,"context_line":"            except io.BlockingIOError:"},{"line_number":162,"context_line":"                LOG.debug(\u0027%s locked; will try again (later)\u0027, path)"},{"line_number":163,"context_line":"                attempts -\u003d 1"},{"line_number":164,"context_line":"            finally:"},{"line_number":165,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":166,"context_line":"    # too many retries"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_790ef43b","line":163,"updated":"2017-11-15 10:53:35.000000000","message":"should we insert a small sleep here? I\u0027m not sure how much flock will block (if at all)","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"6493204c9b47c6fd909d69ef2596bdeef7e92e69","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                return f.write(buf)"},{"line_number":161,"context_line":"            except io.BlockingIOError:"},{"line_number":162,"context_line":"                LOG.debug(\u0027%s locked; will try again (later)\u0027, path)"},{"line_number":163,"context_line":"                attempts -\u003d 1"},{"line_number":164,"context_line":"            finally:"},{"line_number":165,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":166,"context_line":"    # too many retries"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_af709ea6","line":163,"in_reply_to":"1f485f77_147c67b3","updated":"2017-11-15 11:39:32.000000000","message":"I\u0027d probably do something like 10 attempts with 0.01 sec. delay to never block the sync for more than 0.1 sec, but also to allow the competing process to do its job (and to not eat CPU)\n\ndunno about random(), looks a bit overkill to me. the random() call may potentially take longer than 7.5msec :)","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"42434d0ef854c7c95d02dd3db8716c8424b5ab77","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                return f.write(buf)"},{"line_number":161,"context_line":"            except io.BlockingIOError:"},{"line_number":162,"context_line":"                LOG.debug(\u0027%s locked; will try again (later)\u0027, path)"},{"line_number":163,"context_line":"                attempts -\u003d 1"},{"line_number":164,"context_line":"            finally:"},{"line_number":165,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":166,"context_line":"    # too many retries"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_147c67b3","line":163,"in_reply_to":"1f485f77_790ef43b","updated":"2017-11-15 11:33:06.000000000","message":"good point, it won\u0027t block at at all (it\u0027s a non-blocking lock)\nthis is going to be retried so may not be as beneficial but why not; does this seem reasonable: \n\n  time.sleep(0.0075 + random.random() * 0.005)","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"44c4c747915944cf0ebbbfda10246f53bcc3b7a0","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                return f.write(buf)"},{"line_number":161,"context_line":"            except io.BlockingIOError:"},{"line_number":162,"context_line":"                LOG.debug(\u0027%s locked; will try again (later)\u0027, path)"},{"line_number":163,"context_line":"                attempts -\u003d 1"},{"line_number":164,"context_line":"            finally:"},{"line_number":165,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":166,"context_line":"    # too many retries"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_22c4c05e","line":163,"in_reply_to":"1f485f77_af709ea6","updated":"2017-11-15 15:54:06.000000000","message":"Done","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2e2c52f709d53add4266b9097d2ceb957d2f6ce4","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                return f.write(buf)"},{"line_number":161,"context_line":"            except io.BlockingIOError:"},{"line_number":162,"context_line":"                LOG.debug(\u0027%s locked; will try again (later)\u0027, path)"},{"line_number":163,"context_line":"                attempts -\u003d 1"},{"line_number":164,"context_line":"            finally:"},{"line_number":165,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":166,"context_line":"    # too many retries"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_b6da3648","line":163,"in_reply_to":"1f485f77_af709ea6","updated":"2017-11-15 13:11:17.000000000","message":"makes sense","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"db879fb9efee64a1f924233f435e793882dd9ba4","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":178,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":179,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_0032e910","line":179,"updated":"2017-11-15 09:10:06.000000000","message":"\"else\"? I think _exclusive_write should raise if it fails all attempts, no?\n\nrelated thought: what if an inspector process dies after setting up the lock?","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ecc8d608070697aeb363d8deed29a8c3945af4c5","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":178,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":179,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_f9d2e45b","line":179,"in_reply_to":"1f485f77_0032e910","updated":"2017-11-15 10:38:23.000000000","message":"\u003e \"else\"? I think _exclusive_write should raise if it fails all attempts, no?\n\nthis bets on the eventual consistency (periodic update) so I\u0027d rather not raise; i.e should this error reset the filter?\n\n\u003e related thought: what if an inspector process dies after setting up the lock?\n\nGood point; Linux resets the locks (and fds) upon process exit i.e. it\u0027s not permanent https://stackoverflow.com/questions/12651068/release-of-flock-in-case-of-errors","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"42434d0ef854c7c95d02dd3db8716c8424b5ab77","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":178,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":179,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_545bff52","line":179,"in_reply_to":"1f485f77_f91ae47a","updated":"2017-11-15 11:33:06.000000000","message":"I\u0027m explicitly using non-blocking locks, so 42 is a whatever constant :D\nbut see please my prev. answer","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e6c77109e34209a50a78f4b0a6acd9ca542fe167","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    \"\"\""},{"line_number":177,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":178,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":179,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f485f77_f91ae47a","line":179,"in_reply_to":"1f485f77_f9d2e45b","updated":"2017-11-15 10:53:35.000000000","message":"\u003e this bets on the eventual consistency (periodic update)\n\nWell, then retrying 42 times is a bit too much, I think :) Related to previous question: does flock block for any time?","commit_id":"c97c9e1bcc3108a176bea8efb21a665fe9d54911"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"_EXCLUSIVE_WRITE_ATTEMPTS \u003d 10"},{"line_number":41,"context_line":"_EXCLUSIVE_WRITE_ATTEMPTS_DELAY \u003d 0.01"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"_ROOTWRAP_COMMAND \u003d \u0027sudo ironic-inspector-rootwrap {rootwrap_config!s}\u0027"},{"line_number":44,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_041be880","line":41,"updated":"2017-11-23 13:23:12.000000000","message":"nit: I\u0027m not sure if we want to make these configurable.. probably not.","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7356362a76258efe59843542ea736c70964b88db","unresolved":false,"context_lines":[{"line_number":38,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"_EXCLUSIVE_WRITE_ATTEMPTS \u003d 10"},{"line_number":41,"context_line":"_EXCLUSIVE_WRITE_ATTEMPTS_DELAY \u003d 0.01"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"_ROOTWRAP_COMMAND \u003d \u0027sudo ironic-inspector-rootwrap {rootwrap_config!s}\u0027"},{"line_number":44,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_ca574902","line":41,"in_reply_to":"ff82abbf_041be880","updated":"2017-11-23 14:10:25.000000000","message":"I thought the same... but should be amendable readily","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":125,"context_line":"    if not CONF.dnsmasq_pxe_filter.purge_dhcp_hostsdir:"},{"line_number":126,"context_line":"        LOG.debug(\u0027Not purging %s; disabled in configuration.\u0027, dhcp_hostsdir)"},{"line_number":127,"context_line":"        return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_241e2c70","line":126,"updated":"2017-11-23 13:23:12.000000000","message":"nit: \"the configuration\"","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                time.sleep(_EXCLUSIVE_WRITE_ATTEMPTS_DELAY)"},{"line_number":173,"context_line":"            finally:"},{"line_number":174,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":175,"context_line":"    # too many retries"},{"line_number":176,"context_line":"    return 0"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_c4142051","line":175,"updated":"2017-11-23 13:23:12.000000000","message":"mmmm, LOG.warning here? it\u0027s not a completely normal situation, esp. if it happens all the time.","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7356362a76258efe59843542ea736c70964b88db","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                time.sleep(_EXCLUSIVE_WRITE_ATTEMPTS_DELAY)"},{"line_number":173,"context_line":"            finally:"},{"line_number":174,"context_line":"                fcntl.flock(f, fcntl.LOCK_UN)"},{"line_number":175,"context_line":"    # too many retries"},{"line_number":176,"context_line":"    return 0"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_ca70a9a8","line":175,"in_reply_to":"ff82abbf_c4142051","updated":"2017-11-23 14:10:25.000000000","message":"yeah, makes sense; LOG.debug I think here (something like: too many retries trying to write path, giving up)","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    \"\"\""},{"line_number":186,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":187,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":188,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_e417e450","line":188,"updated":"2017-11-23 13:23:12.000000000","message":"or maybe add warning as \"else\" clause here to make it more detailed?","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7356362a76258efe59843542ea736c70964b88db","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    \"\"\""},{"line_number":186,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":187,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s,ignore\\n\u0027 % mac):"},{"line_number":188,"context_line":"        LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_ea5d6de9","line":188,"in_reply_to":"ff82abbf_e417e450","updated":"2017-11-23 14:10:25.000000000","message":"better here I think, cause the warning is better to be about failing to blacklist something rather than to write something (the more context the better?):\n\n    LOG.warning(\u0027Failed blacklisting %s; Will try again \u0027\n                \u0027during next periodic sync\u0027, mac)","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1d5d44d200ea68be19e6c21b335c3271828bef41","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":199,"context_line":"    # remove the ,ignore directive"},{"line_number":200,"context_line":"    if _exclusive_write_or_pass(path, \u0027%s\\n\u0027 % mac):"},{"line_number":201,"context_line":"        LOG.debug(\u0027Whitelisted %s\u0027, mac)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"def _execute(cmd\u003dNone, ignore_errors\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff82abbf_840e1839","line":201,"updated":"2017-11-23 13:23:12.000000000","message":"ditto","commit_id":"ca39ef3b7ec200b158768e65606e477af61ff07e"}]}
