)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A PXE filter driver is introduced that works by configuring and controlling"},{"line_number":10,"context_line":"the dnsmasq service."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I63fe91ee4f9ac3021bcfd9a4a378af56af800fac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ff0f0b1f_5426ab18","line":11,"updated":"2017-05-26 11:42:12.000000000","message":"do we have bug for this?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A PXE filter driver is introduced that works by configuring and controlling"},{"line_number":10,"context_line":"the dnsmasq service."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I63fe91ee4f9ac3021bcfd9a4a378af56af800fac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"ff0f0b1f_8a3c17c0","line":11,"in_reply_to":"ff0f0b1f_5426ab18","updated":"2017-05-26 14:36:05.000000000","message":"we had just the generic multiple backends, just created a new RFE: 1693813","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"}],"doc/source/admin/dnsmasq-pxe-filter.rst":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3ffe632305c7d23297392ceb5d32155d57032a63","unresolved":false,"context_lines":[{"line_number":3,"context_line":"The **dnsmasq** PXE filter"},{"line_number":4,"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"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP/TFTP stack is implemented by the **dnsmasq**"},{"line_number":7,"context_line":"service. This PXE filter implementation relies on directly configuring the"},{"line_number":8,"context_line":"**dnsmasq** DHCP service to provide a caching PXE-traffic filter of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-rst","patch_set":46,"id":"bf3e73b7_88453d73","line":7,"range":{"start_line":6,"start_character":0,"end_line":7,"end_character":8},"updated":"2017-08-07 03:40:22.000000000","message":"Not accurate yet, TFTP service is not provided by dnsmasq, but I know what you mean.","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"abaff44f1a5ac42c507f1b925f738088cdee3dde","unresolved":false,"context_lines":[{"line_number":3,"context_line":"The **dnsmasq** PXE filter"},{"line_number":4,"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"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP/TFTP stack is implemented by the **dnsmasq**"},{"line_number":7,"context_line":"service. This PXE filter implementation relies on directly configuring the"},{"line_number":8,"context_line":"**dnsmasq** DHCP service to provide a caching PXE-traffic filter of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-rst","patch_set":46,"id":"9f436f4f_7e770ad6","line":7,"range":{"start_line":6,"start_character":0,"end_line":7,"end_character":8},"in_reply_to":"9f436f4f_646d6b31","updated":"2017-08-11 13:27:59.000000000","message":"Done","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3cef3b4c51501b0e6f6efaefb444a6f473badbf3","unresolved":false,"context_lines":[{"line_number":3,"context_line":"The **dnsmasq** PXE filter"},{"line_number":4,"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"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP/TFTP stack is implemented by the **dnsmasq**"},{"line_number":7,"context_line":"service. This PXE filter implementation relies on directly configuring the"},{"line_number":8,"context_line":"**dnsmasq** DHCP service to provide a caching PXE-traffic filter of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-rst","patch_set":46,"id":"9f436f4f_646d6b31","line":7,"range":{"start_line":6,"start_character":0,"end_line":7,"end_character":8},"in_reply_to":"bf3e73b7_88453d73","updated":"2017-08-10 08:36:51.000000000","message":"dnsmasq can be configured to serve TFTP requests[1] I guess you\u0027re right in the sense of this might not be the \"Often\" case. Would this satisfy your concern:\n\n   Often an inspection PXE DHCP stack is implemented by the **dnsmasq**\nservice.\n\nAnyways, I\u0027d say this is a nit, isn\u0027t it?\n\n[1] http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"430fe2ea112b7c793703fc7cde7a3b240eaf8d2f","unresolved":false,"context_lines":[{"line_number":35,"context_line":".. note::"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  The **dnsmasq** inotify facility implementation doesn\u0027t react on a file being"},{"line_number":38,"context_line":"  removed or truncated."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Configuration"},{"line_number":41,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":47,"id":"9f436f4f_85a8db8b","line":38,"updated":"2017-08-15 09:05:28.000000000","message":"Is the truncation different from the modification? My thought is that to truncate a file you need to open it for writing (not appending) and close without any followup writes.\n\nLooking at [1], it seems that dnsmasq would only notice:\n\n* when a file opened for writing is *closed*\n* when a new file is moved into the directory being watched\n\nSo may be it would be a bit clearer to the reader if we tell them the exact inotify conditions we know dnsmasq is using at the time we work on this project? Even referring to the dnsmasq version we rely upon?\n\n1. https://github.com/aa65535/dnsmasq/blob/master/src/inotify.c#L121","commit_id":"610709f86eb6cb5e9eeca90a95ac7f5777165c9f"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8966241d79a85b9ee7e066bad381deca096b21ca","unresolved":false,"context_lines":[{"line_number":35,"context_line":".. note::"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  The **dnsmasq** inotify facility implementation doesn\u0027t react on a file being"},{"line_number":38,"context_line":"  removed or truncated."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Configuration"},{"line_number":41,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":47,"id":"9f436f4f_00596f33","line":38,"in_reply_to":"9f436f4f_85a8db8b","updated":"2017-08-15 15:34:51.000000000","message":"Valid concerns.\n\n\u003e Is the truncation different from the modification? My thought is that \n\u003e to truncate a file you need to open it for writing (not appending) and\n\u003e close without any followup writes.\n\nA \"truncated-file\" event is ignored due to an explicit size check[2]. Could well be a dnsmasq bug ;)\n\n\u003e So may be it would be a bit clearer to the reader if we tell them the \n\u003e exact inotify conditions we know dnsmasq is using at the time we work \n\u003e on this project?\n\nThose conditions are mentioned on the lines #23 and #24. I added this Note to inform about conditions someone might feel reasonable dnsmasq reacting upon although it doesn\u0027t.\n\n\u003e Even referring to the dnsmasq version we rely upon?\n\nI guess once these condition don\u0027t hold anymore, we\u0027d fix a bug or implement an enhancement.\nI\u0027d avoid referring to particular version but stating range of versions known to work with this driver is IMO a great idea! Thanks!\n\n[2] https://github.com/aa65535/dnsmasq/blob/master/src/inotify.c#L237","commit_id":"610709f86eb6cb5e9eeca90a95ac7f5777165c9f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  removed or truncated."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Configuration"},{"line_number":41,"context_line":"-------------"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"To enable the **dnsmasq** PXE filter, update the PXE filter driver name::"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rst","patch_set":57,"id":"7f515b1d_267072a5","line":41,"updated":"2017-10-06 09:16:32.000000000","message":"let\u0027s move this to install guide and link from here","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":38,"context_line":"  removed or truncated."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Configuration"},{"line_number":41,"context_line":"-------------"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"To enable the **dnsmasq** PXE filter, update the PXE filter driver name::"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rst","patch_set":57,"id":"7f515b1d_8bdedcd7","line":41,"in_reply_to":"7f515b1d_267072a5","updated":"2017-10-09 13:38:47.000000000","message":"I\u0027d like to keep the driver config together with the driver description as it would reduce the readability the other way. How about I link the install guide here?","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"  These commands are being executed through the ``rootwrap`` facility thus"},{"line_number":73,"context_line":"  overriding will require a filter file to be created in the ``rootwrap.d``"},{"line_number":74,"context_line":"  directory."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Supported dnsmasq versions"},{"line_number":77,"context_line":"--------------------------"}],"source_content_type":"text/x-rst","patch_set":57,"id":"7f515b1d_067336b3","line":74,"updated":"2017-10-06 09:16:32.000000000","message":"let\u0027s provide an example, otherwise it\u0027s not obvious at all how to do it","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"  These commands are being executed through the ``rootwrap`` facility thus"},{"line_number":73,"context_line":"  overriding will require a filter file to be created in the ``rootwrap.d``"},{"line_number":74,"context_line":"  directory."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Supported dnsmasq versions"},{"line_number":77,"context_line":"--------------------------"}],"source_content_type":"text/x-rst","patch_set":57,"id":"7f515b1d_2be7e8ae","line":74,"in_reply_to":"7f515b1d_067336b3","updated":"2017-10-09 13:38:47.000000000","message":"sure thing","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9ba35d9f7568533316585a9a47fa692acda34da4","unresolved":false,"context_lines":[{"line_number":21,"context_line":"file parsing. The content of the file determines the MAC address access policy."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"*new* file is created or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-rst","patch_set":60,"id":"3f4b6375_f26a8a7e","line":24,"range":{"start_line":24,"start_character":14,"end_line":24,"end_character":21},"updated":"2017-11-07 18:22:24.000000000","message":"super nit - makes more sense to make this word italic instead of new","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"df1e88a52a177f30b1c81c70e985cc89bcda6737","unresolved":false,"context_lines":[{"line_number":21,"context_line":"file parsing. The content of the file determines the MAC address access policy."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"*new* file is created or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-rst","patch_set":60,"id":"3f4b6375_0d24d9ae","line":24,"range":{"start_line":24,"start_character":14,"end_line":24,"end_character":21},"in_reply_to":"3f4b6375_f26a8a7e","updated":"2017-11-08 11:43:04.000000000","message":"lol :) but you\u0027re right... Will update if needed or push a tiny follow-up ;)","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9ba35d9f7568533316585a9a47fa692acda34da4","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The filter design relies on the hosts directory being in exclusive"},{"line_number":54,"context_line":"**inspector** control. The hosts directory should be considered a *private"},{"line_number":55,"context_line":"cache* directory of **inspector** that **dnsmasq** polls updates from through"},{"line_number":56,"context_line":"the ``inotify`` facility."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":60,"id":"3f4b6375_72a8da8a","line":55,"range":{"start_line":55,"start_character":57,"end_line":55,"end_character":64},"updated":"2017-11-07 18:22:24.000000000","message":"nit - update","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"df1e88a52a177f30b1c81c70e985cc89bcda6737","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The filter design relies on the hosts directory being in exclusive"},{"line_number":54,"context_line":"**inspector** control. The hosts directory should be considered a *private"},{"line_number":55,"context_line":"cache* directory of **inspector** that **dnsmasq** polls updates from through"},{"line_number":56,"context_line":"the ``inotify`` facility."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":60,"id":"3f4b6375_cd3a41c3","line":55,"range":{"start_line":55,"start_character":57,"end_line":55,"end_character":64},"in_reply_to":"3f4b6375_72a8da8a","updated":"2017-11-08 11:43:04.000000000","message":"ditto","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"How it works"},{"line_number":11,"context_line":"------------"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Using a configuration *file per MAC* address allows one to implement a"},{"line_number":14,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_8056d95b","line":13,"updated":"2017-11-15 09:04:38.000000000","message":"nit: it seems weird to not include \"address\" inside of **","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":10,"context_line":"How it works"},{"line_number":11,"context_line":"------------"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Using a configuration *file per MAC* address allows one to implement a"},{"line_number":14,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_36aac670","line":13,"in_reply_to":"1f485f77_8056d95b","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"new file is *created* or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_60519d62","line":25,"updated":"2017-11-15 09:04:38.000000000","message":"nit: IIRC comma after \"Thus\"","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"new file is *created* or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_16a7caa9","line":25,"in_reply_to":"1f485f77_60519d62","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    [pxe_filter]"},{"line_number":46,"context_line":"    driver \u003d dnsmasq"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"The DHCP hosts directory can be specified to override the default::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":51,"context_line":"    # dhcp_hostsdir \u003d /var/lib/ironic-inspector/dhcp-hostsdir"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_4050e15d","line":48,"updated":"2017-11-15 09:04:38.000000000","message":"Let\u0027s mention this default explicitly (and use a different directory in the example)","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    [pxe_filter]"},{"line_number":46,"context_line":"    driver \u003d dnsmasq"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"The DHCP hosts directory can be specified to override the default::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":51,"context_line":"    # dhcp_hostsdir \u003d /var/lib/ironic-inspector/dhcp-hostsdir"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_f62c2e03","line":48,"in_reply_to":"1f485f77_4050e15d","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"The DHCP hosts directory can be specified to override the default::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":51,"context_line":"    # dhcp_hostsdir \u003d /var/lib/ironic-inspector/dhcp-hostsdir"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The filter design relies on the hosts directory being in exclusive"},{"line_number":54,"context_line":"**inspector** control. The hosts directory should be considered a *private"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_204ba5b0","line":51,"updated":"2017-11-15 09:04:38.000000000","message":"please remove #, I\u0027m pretty sure somebody will try to copy it :)","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":48,"context_line":"The DHCP hosts directory can be specified to override the default::"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":51,"context_line":"    # dhcp_hostsdir \u003d /var/lib/ironic-inspector/dhcp-hostsdir"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The filter design relies on the hosts directory being in exclusive"},{"line_number":54,"context_line":"**inspector** control. The hosts directory should be considered a *private"}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_d631325c","line":51,"in_reply_to":"1f485f77_204ba5b0","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"cache* directory of **inspector** that **dnsmasq** polls configuration updates"},{"line_number":56,"context_line":"from, through the ``inotify`` facility."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"  The directory has to be writable by **inspector** and readable by"},{"line_number":61,"context_line":"  **dnsmasq**."}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_00c8a91f","line":58,"updated":"2017-11-15 09:04:38.000000000","message":"this is not even a note. it may be a warning, but I\u0027d just merge it with the text above.","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":55,"context_line":"cache* directory of **inspector** that **dnsmasq** polls configuration updates"},{"line_number":56,"context_line":"from, through the ``inotify`` facility."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"  The directory has to be writable by **inspector** and readable by"},{"line_number":61,"context_line":"  **dnsmasq**."}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_364646c2","line":58,"in_reply_to":"1f485f77_00c8a91f","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":67,"context_line":"    # dnsmasq_start_command \u003d systemctl restart devstack@ironic-inspector-dhcp"},{"line_number":68,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop devstack@ironic-inspector-dhcp"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":".. note::"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_e0ca2d18","line":68,"updated":"2017-11-15 09:04:38.000000000","message":"ditto about #","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":67,"context_line":"    # dnsmasq_start_command \u003d systemctl restart devstack@ironic-inspector-dhcp"},{"line_number":68,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop devstack@ironic-inspector-dhcp"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":".. note::"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_b6ceb62a","line":68,"in_reply_to":"1f485f77_e0ca2d18","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":76,"context_line":"    dnsmasq_start_command \u003d dnsmasq --conf-file /etc/ironic-inspector/dnsmasq.conf"},{"line_number":77,"context_line":"    dnsmasq_stop_command \u003d kill $(cat /var/run/dnsmasq.pid)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":".. note::"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_c0d171cf","line":77,"updated":"2017-11-15 09:04:38.000000000","message":"let\u0027s merge it with the example above, and leave only the note itself","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":76,"context_line":"    dnsmasq_start_command \u003d dnsmasq --conf-file /etc/ironic-inspector/dnsmasq.conf"},{"line_number":77,"context_line":"    dnsmasq_stop_command \u003d kill $(cat /var/run/dnsmasq.pid)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":".. note::"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_76dcbee3","line":77,"in_reply_to":"1f485f77_c0d171cf","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":".. note::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"  These commands are being executed through the ``rootwrap`` facility thus"},{"line_number":82,"context_line":"  overriding will require a filter file to be created in the ``rootwrap.d``"},{"line_number":83,"context_line":"  directory. A sample configuration for **devstack** use might be:"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_a0d435be","line":81,"updated":"2017-11-15 09:04:38.000000000","message":"nit: s/being//, s/thus/, so/","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":".. note::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"  These commands are being executed through the ``rootwrap`` facility thus"},{"line_number":82,"context_line":"  overriding will require a filter file to be created in the ``rootwrap.d``"},{"line_number":83,"context_line":"  directory. A sample configuration for **devstack** use might be:"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":63,"id":"1f485f77_96ecda8f","line":81,"in_reply_to":"1f485f77_a0d435be","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":3,"context_line":"**dnsmasq** PXE filter"},{"line_number":4,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP stack is implemented by the **dnsmasq** service."},{"line_number":7,"context_line":"This PXE filter implementation relies on directly configuring the **dnsmasq**"},{"line_number":8,"context_line":"DHCP service to provide a caching PXE-traffic filter of node MAC addresses."},{"line_number":9,"context_line":""}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_04c8c81f","line":6,"updated":"2017-11-23 13:19:25.000000000","message":"nit: I\u0027d move \"often\" after \"is\"","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP stack is implemented by the **dnsmasq** service."},{"line_number":7,"context_line":"This PXE filter implementation relies on directly configuring the **dnsmasq**"},{"line_number":8,"context_line":"DHCP service to provide a caching PXE-traffic filter of node MAC addresses."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"How it works"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_24cb8c1e","line":7,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/This/The **dnsmasq**/, otherwise \"This\" is a bit unclear.","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP stack is implemented by the **dnsmasq** service."},{"line_number":7,"context_line":"This PXE filter implementation relies on directly configuring the **dnsmasq**"},{"line_number":8,"context_line":"DHCP service to provide a caching PXE-traffic filter of node MAC addresses."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"How it works"},{"line_number":11,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_c4d180cf","line":8,"updated":"2017-11-23 13:19:25.000000000","message":"nit: no dash after PXE","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"------------"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Using a configuration *file per MAC address* allows one to implement a"},{"line_number":14,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":17,"context_line":"    de:ad:be:ef:de:ad,ignore"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_e4d4c4bf","line":14,"updated":"2017-11-23 13:19:25.000000000","message":"nit: The filter works by populating the **dnsmasq** DHCP hosts directory with configuration files per each MAC address. Each file is either enabling or disabling DHCP for the MAC.","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"The filename is used to keep track of all MAC addresses in the cache, avoiding"},{"line_number":21,"context_line":"file parsing. The content of the file determines the MAC address access policy."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"new file is *created* or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus, to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_84db78eb","line":23,"updated":"2017-11-23 13:19:25.000000000","message":"s/instantly//","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":24,"context_line":"new file is *created* or an existing file is *modified* in the"},{"line_number":25,"context_line":"DHCP hosts directory. Thus, to white-list a MAC address, one has to"},{"line_number":26,"context_line":"remove the ``ignore`` directive::"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_a4d6bcc2","line":25,"updated":"2017-11-23 13:19:25.000000000","message":"s/one has to remove/the filter removes/","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":".. note::"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  The **dnsmasq** inotify facility implementation doesn\u0027t react on a file being"},{"line_number":38,"context_line":"  removed or truncated."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Configuration"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_44e570a7","line":37,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/on/to/","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"Configuration"},{"line_number":41,"context_line":"-------------"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"To enable the **dnsmasq** PXE filter, update the PXE filter driver name::"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    [pxe_filter]"},{"line_number":46,"context_line":"    driver \u003d dnsmasq"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_64e0b497","line":43,"updated":"2017-11-23 13:19:25.000000000","message":"nit: .. in the ironic-inspector configuration file::","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    dhcp_hostsdir \u003d /etc/ironic-inspector/dhcp-hostsdir"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"The filter design relies on the hosts directory being in exclusive"},{"line_number":55,"context_line":"**inspector** control. The hosts directory should be considered a *private"},{"line_number":56,"context_line":"cache* directory of **inspector** that **dnsmasq** polls configuration updates"},{"line_number":57,"context_line":"from, through the ``inotify`` facility. The directory has to be writable by"},{"line_number":58,"context_line":"**inspector** and readable by **dnsmasq**."}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_04f1a86b","line":55,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/inspector/ironic-inspector/ here and below (\"inspector\" is a very unofficial name)","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"from, through the ``inotify`` facility. The directory has to be writable by"},{"line_number":58,"context_line":"**inspector** and readable by **dnsmasq**."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"One can also override the default start and stop commands to control the"},{"line_number":61,"context_line":"**dnsmasq** service::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    [dnsmasq_pxe_filter]"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_24f4ec5a","line":60,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/One can also/It is possible to/","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"da2a562b13313b6d0fcf7a789896023e0bf7d1ec","unresolved":false,"context_lines":[{"line_number":61,"context_line":"**dnsmasq** service::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":64,"context_line":"    dnsmasq_start_command \u003d dnsmasq --conf-file /etc/ironic-inspector/dnsmasq.conf"},{"line_number":65,"context_line":"    dnsmasq_stop_command \u003d kill $(cat /var/run/dnsmasq.pid)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_3c874312","line":64,"updated":"2017-11-22 15:47:42.000000000","message":"I guess this works when highly isolated, any advice for parallel operations?","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ab4aff793bfd970b3f8538941a4c06c43b10c78e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"**dnsmasq** service::"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":64,"context_line":"    dnsmasq_start_command \u003d dnsmasq --conf-file /etc/ironic-inspector/dnsmasq.conf"},{"line_number":65,"context_line":"    dnsmasq_stop_command \u003d kill $(cat /var/run/dnsmasq.pid)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_bd16edf0","line":64,"in_reply_to":"ff82abbf_3c874312","updated":"2017-11-22 16:58:45.000000000","message":"Since this is a dnsmasq-specific driver, I want to make it possible/easy to ship\u0026schedule dnsmasq and inspector together as a logical unit of inspection (in a single kolla container, a VM or BM) and let inspector control the dnsmasq, esp. considering inspector active-active HA model: couple of containers running happily on separate hosts, with disjoint discovery dnsmasq dhcp ip pools. So preferably the parallelism would stem from the parallel execution of those containers.\n\nSince the filtering works by tight interaction between dnsmasq and inspector it doesn\u0027t make much sense to remotely execute dnsmasq on a node different from inspector\u0027s (modulo some nfs?? file sharing options).\n\nIf absolutely necessary, one could run an ssh command here or if a real queue was an option, with a subscriber configured to control a dnsmasq instance, a shell command might be used to trigger start/stop remotely: http://zeromq.org/bindings:bash.\n\nOne would have to be careful about the mapping of a single dnsmasq instance onto a single inspector anyway because if shared, any failing inspector might shut down the shared dnsmasq.\n\nBut better implement a different driver than to bend this one I guess","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  It is also possible to set an empty/none string or to use shell expansion in"},{"line_number":70,"context_line":"  place of the commands. An empty start command means the **dnsmasq** service"},{"line_number":71,"context_line":"  won\u0027t be started upon the filter initialization, an empty stop command means"},{"line_number":72,"context_line":"  the service won\u0027t be stopped upon an (error) exit."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_c4eae073","line":72,"updated":"2017-11-23 13:19:25.000000000","message":"nit: let\u0027s mention the default value","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":".. note::"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  These commands are executed through the ``rootwrap`` facility, so overriding"},{"line_number":78,"context_line":"  may require a filter file to be created in the ``rootwrap.d`` directory. A"},{"line_number":79,"context_line":"  sample configuration for **devstack** use might be:"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_e4eda48b","line":77,"updated":"2017-11-23 13:19:25.000000000","message":"nit: I\u0027d make \"rootwrap\" a link, if we have a useful URL for it.","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"da2a562b13313b6d0fcf7a789896023e0bf7d1ec","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  These commands are executed through the ``rootwrap`` facility, so overriding"},{"line_number":78,"context_line":"  may require a filter file to be created in the ``rootwrap.d`` directory. A"},{"line_number":79,"context_line":"  sample configuration for **devstack** use might be:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"  .. code-block:: console"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_fc8f9b2b","line":79,"updated":"2017-11-22 15:47:42.000000000","message":"Nit: I\u0027d prefer to see non-devstack as so many users of ironic and its product are packaging on their own and not using devstack at all.","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ab4aff793bfd970b3f8538941a4c06c43b10c78e","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"  These commands are executed through the ``rootwrap`` facility, so overriding"},{"line_number":78,"context_line":"  may require a filter file to be created in the ``rootwrap.d`` directory. A"},{"line_number":79,"context_line":"  sample configuration for **devstack** use might be:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"  .. code-block:: console"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_fdc6b549","line":79,"in_reply_to":"ff82abbf_fc8f9b2b","updated":"2017-11-22 16:58:45.000000000","message":"A sample of systemctl would look very similar I guess. My devstack motivation is it\u0027s (almost % systemctl) \"vendor neutral\".","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"This filter driver has been checked by **inspector** CI with **dnsmasq**"},{"line_number":94,"context_line":"versions `\u003e\u003d2.76`. The ``inotify`` facility was introduced_ to **dnsmasq** in"},{"line_number":95,"context_line":"the version `2.73`."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":".. _introduced: http://www.thekelleys.org.uk/dnsmasq/CHANGELOG"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_8404d84b","line":95,"updated":"2017-11-23 13:19:25.000000000","message":"I\u0027d move this whole section to the beginning of \"Configuration\"","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"-------"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"The initial synchronization will put some load on the **dnsmasq** service"},{"line_number":103,"context_line":"starting based on the amount of ports **ironic** keeps. This can take up to a"},{"line_number":104,"context_line":"minute of full CPU load for huge amounts of MACs (tens of thousands)."},{"line_number":105,"context_line":"Subsequent filter synchronizations will only cause the **dnsmasq** to parse"},{"line_number":106,"context_line":"the modified files. Typically those are the bare metal nodes being added or"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_a4ff9c32","line":103,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/This/The start-up/","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8480c6231fc26bf2893f43fa558838842879c50e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"upon (unexpected) **inspector** exit."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"To avoid accumulating stale DHCP host files over time, the driver cleans up"},{"line_number":118,"context_line":"the DHCP hosts directory during the ``init_filter`` call."},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"Although the filter driver tries its best to always stop the **dnsmasq**"},{"line_number":121,"context_line":"service, it is recommended that the operator configures the **dnsmasq**"}],"source_content_type":"text/x-rst","patch_set":65,"id":"ff82abbf_44fed037","line":118,"updated":"2017-11-23 13:19:25.000000000","message":"nit: s/during ... call/during start-up/","commit_id":"8ddfacdf341670c923f7e41e7c3bb1986dc3bcaf"}],"doc/source/admin/index.rst":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"4fdb964b72ef76fb0245a1508a7cc8707fadf240","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"  upgrade"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Dnsmasq PXE filter drive"},{"line_number":13,"context_line":"------------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":".. toctree::"}],"source_content_type":"text/x-rst","patch_set":42,"id":"df3967d1_0c3c8fbd","line":12,"range":{"start_line":12,"start_character":19,"end_line":12,"end_character":24},"updated":"2017-08-01 05:16:05.000000000","message":"s/drive/driver/","commit_id":"04d1d2bca1ee44b5bb12a9760b8a2cf1428cac17"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"  upgrade"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Dnsmasq PXE filter drive"},{"line_number":13,"context_line":"------------------------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":".. toctree::"}],"source_content_type":"text/x-rst","patch_set":42,"id":"df3967d1_5f019b05","line":12,"range":{"start_line":12,"start_character":19,"end_line":12,"end_character":24},"in_reply_to":"df3967d1_0c3c8fbd","updated":"2017-10-09 13:38:47.000000000","message":"Done","commit_id":"04d1d2bca1ee44b5bb12a9760b8a2cf1428cac17"}],"doc/source/dnsmasq-pxe-filter.rst":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"In-band node introspection PXE-boots a \"live\" image, the IPA, to inspect the"},{"line_number":10,"context_line":"node hardware. **ironic** PXE-boots IPA to, besides other tasks, deploy tenant"},{"line_number":11,"context_line":"images on a node. Because of **neutron** not allowing an unknown MAC address to"},{"line_number":12,"context_line":"boot, the former case uses its own PXE stack."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To prevent DHCP collisions between node in-band introspection and deployment of"},{"line_number":15,"context_line":"nodes, **inspector** has to limit or filter the DHCP leases to only allow nodes"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_83b664dc","line":12,"range":{"start_line":12,"start_character":10,"end_line":12,"end_character":44},"updated":"2017-05-26 14:40:54.000000000","message":"Not really sure what this means. \"former\" as in-band node introspection? also could you clarify \"own PXE stack\"?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"In-band node introspection PXE-boots a \"live\" image, the IPA, to inspect the"},{"line_number":10,"context_line":"node hardware. **ironic** PXE-boots IPA to, besides other tasks, deploy tenant"},{"line_number":11,"context_line":"images on a node. Because of **neutron** not allowing an unknown MAC address to"},{"line_number":12,"context_line":"boot, the former case uses its own PXE stack."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"To prevent DHCP collisions between node in-band introspection and deployment of"},{"line_number":15,"context_line":"nodes, **inspector** has to limit or filter the DHCP leases to only allow nodes"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_2e9f4ab5","line":12,"range":{"start_line":12,"start_character":10,"end_line":12,"end_character":44},"in_reply_to":"ff0f0b1f_83b664dc","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":37,"context_line":"    $"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"This establishes a simple MAC addresses *filter cache*::"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    blacklist \u003d set(address for address in os.listdir(\u0027/etc/dnsmasq.d\u0027)"},{"line_number":42,"context_line":"                    if os.stat(\u0027/etc/dnsmasq.d/%s\u0027 % address\u0027).st_size \u003e 0)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"which allows **inspector** to synchronize easily with **ironic**::"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    ironic_macs \u003d set(port.address for port in ironic.port.list())"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    # white-list ports either removed from ironic or being inspected"},{"line_number":49,"context_line":"    for mac in  (blacklist - ironic_macs) | \u003cinspected nodes MACs\u003e:"},{"line_number":50,"context_line":"        whitelist_mac(mac)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # blacklist \"new\" ports that aren\u0027t being inspected"},{"line_number":53,"context_line":"    for address in to_blacklist \u003d existing - blacklist:"},{"line_number":54,"context_line":"        blacklist_mac(mac)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Configuration"},{"line_number":57,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_d4887b23","line":54,"range":{"start_line":39,"start_character":0,"end_line":54,"end_character":26},"updated":"2017-05-26 11:42:12.000000000","message":"do we need source code in docs? It seems not so useful for users and could be found in filter impl anyway.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":37,"context_line":"    $"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"This establishes a simple MAC addresses *filter cache*::"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    blacklist \u003d set(address for address in os.listdir(\u0027/etc/dnsmasq.d\u0027)"},{"line_number":42,"context_line":"                    if os.stat(\u0027/etc/dnsmasq.d/%s\u0027 % address\u0027).st_size \u003e 0)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"which allows **inspector** to synchronize easily with **ironic**::"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    ironic_macs \u003d set(port.address for port in ironic.port.list())"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    # white-list ports either removed from ironic or being inspected"},{"line_number":49,"context_line":"    for mac in  (blacklist - ironic_macs) | \u003cinspected nodes MACs\u003e:"},{"line_number":50,"context_line":"        whitelist_mac(mac)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    # blacklist \"new\" ports that aren\u0027t being inspected"},{"line_number":53,"context_line":"    for address in to_blacklist \u003d existing - blacklist:"},{"line_number":54,"context_line":"        blacklist_mac(mac)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Configuration"},{"line_number":57,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_4a8ddf79","line":54,"range":{"start_line":39,"start_character":0,"end_line":54,"end_character":26},"in_reply_to":"ff0f0b1f_d4887b23","updated":"2017-05-26 14:36:05.000000000","message":"I hoped it might enlighten the way the filter operates without having to check the source code details.\n\nI think it needn\u0027t scare the people too much so I\u0027d like to keep it ;) but if the opinions are strong against, no prob removing","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"**dnsmasq** service and the timeout guarding the commands finishing::"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":73,"context_line":"    # dnsmasq_start_command \u003d /bin/systemctl start dnsmasq"},{"line_number":74,"context_line":"    # dnsmasq_stop_command \u003d /bin/systemctl stop dnsmasq"},{"line_number":75,"context_line":"    # dnsmasq_command_timeout \u003d 60"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_c319fc22","line":74,"range":{"start_line":73,"start_character":4,"end_line":74,"end_character":56},"updated":"2017-05-26 14:40:54.000000000","message":"Might want to document why this override is necessary.  Any changes here would also require changes to rootwrap.d to allow the commands, correct?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"**dnsmasq** service and the timeout guarding the commands finishing::"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":73,"context_line":"    # dnsmasq_start_command \u003d /bin/systemctl start dnsmasq"},{"line_number":74,"context_line":"    # dnsmasq_stop_command \u003d /bin/systemctl stop dnsmasq"},{"line_number":75,"context_line":"    # dnsmasq_command_timeout \u003d 60"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_6e18a274","line":74,"range":{"start_line":73,"start_character":4,"end_line":74,"end_character":56},"in_reply_to":"ff0f0b1f_501d90bb","updated":"2017-05-27 19:19:19.000000000","message":"No worries :)","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"adfadc569fc0a71fcc694807f4da80afdfe12d32","unresolved":false,"context_lines":[{"line_number":70,"context_line":"**dnsmasq** service and the timeout guarding the commands finishing::"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":73,"context_line":"    # dnsmasq_start_command \u003d /bin/systemctl start dnsmasq"},{"line_number":74,"context_line":"    # dnsmasq_stop_command \u003d /bin/systemctl stop dnsmasq"},{"line_number":75,"context_line":"    # dnsmasq_command_timeout \u003d 60"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_501d90bb","line":74,"range":{"start_line":73,"start_character":4,"end_line":74,"end_character":56},"in_reply_to":"ff0f0b1f_c319fc22","updated":"2017-05-26 15:33:42.000000000","message":"Whoops I see you\u0027ve noted that below, sorry about that.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":81,"context_line":"  directory."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Caveats"},{"line_number":84,"context_line":"-----------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"The initial synchronization will put some load on the **dnsmasq** service as"},{"line_number":87,"context_line":"the ``inotify`` facility will interrupt the service to parse each newly created"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_7e175053","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":11},"updated":"2017-05-26 11:42:12.000000000","message":"s/----/","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":81,"context_line":"  directory."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Caveats"},{"line_number":84,"context_line":"-----------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"The initial synchronization will put some load on the **dnsmasq** service as"},{"line_number":87,"context_line":"the ``inotify`` facility will interrupt the service to parse each newly created"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_4e271eb8","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":11},"in_reply_to":"ff0f0b1f_7e175053","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"To enable the **dnsmasq** PXE filter, update the PXE filter driver name::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    [pxe_filter]"},{"line_number":62,"context_line":"    driver_name \u003d dnsmasq"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"The DHCP hosts directory can be specified to override the default::"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"df140735_6e3213aa","line":62,"range":{"start_line":62,"start_character":4,"end_line":62,"end_character":15},"updated":"2017-10-09 13:38:47.000000000","message":"s/driver_name/driver","commit_id":"f4b1fb00b87cc577a946512399876d3fdfc4cc7f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"df140735_ca1341b8","updated":"2017-05-29 08:50:36.000000000","message":"I think this file should be split into different locations - see below","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"df140735_a46cb908","in_reply_to":"df140735_ca1341b8","updated":"2017-05-31 11:32:23.000000000","message":"So I moved the generic bits into the contributing.rst file.\nThe thing is the admin guide would have to have a subsection inside of the configuration subsection.\n\nSo I moved this under the admin guide as this file also has the caveats and description sections which IMO may have some added value for the administrators.\n\nLet\u0027s discuss further?","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _dnsmasq_pxe_filter:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"The **dnsmasq** PXE filter"},{"line_number":4,"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"}],"source_content_type":"text/x-rst","patch_set":15,"id":"df140735_aa180dd3","line":1,"updated":"2017-05-29 08:50:36.000000000","message":"this is not needed, please use :ref:`dnsmasq-pxe-filter`","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":1,"context_line":".. _dnsmasq_pxe_filter:"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"The **dnsmasq** PXE filter"},{"line_number":4,"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"}],"source_content_type":"text/x-rst","patch_set":15,"id":"df140735_44f6fd91","line":1,"in_reply_to":"df140735_aa180dd3","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        blacklist_mac(mac)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"Configuration"},{"line_number":58,"context_line":"-------------"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"To enable the **dnsmasq** PXE filter, update the PXE filter driver name::"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"df140735_8a0d4992","line":58,"updated":"2017-05-29 08:50:36.000000000","message":"this should probably go to installation guide","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"This establishes a simple MAC addresses *filter cache*::"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    blacklist \u003d set(address for address in os.listdir(\u0027/etc/dnsmasq.d\u0027)"},{"line_number":33,"context_line":"                    if os.stat(\u0027/etc/dnsmasq.d/%s\u0027 % address\u0027).st_size \u003e 18)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"which allows **inspector** to synchronize easily with **ironic**::"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":21,"id":"df140735_faeafca9","line":33,"range":{"start_line":33,"start_character":71,"end_line":33,"end_character":75},"updated":"2017-10-09 13:38:47.000000000","message":"\u003d\u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027) \u003d\u003d 25","commit_id":"6b303efe7b62c82b7445aa1700accd1aca271af4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cf5cc0c1772dc880780113808b7d5aecdbfb06f7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":39,"id":"1f1a1f67_ae981d1b","updated":"2017-07-20 14:22:15.000000000","message":"nit: we\u0027ll have to move this to the admin guide","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":39,"id":"1f1a1f67_d109b595","in_reply_to":"1f1a1f67_ae981d1b","updated":"2017-07-20 16:48:06.000000000","message":"agreed","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"aa21cb376af8beb24c95cfb0ebfc8a87493e135a","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP/TFTP stack is implemented by the **dnsmasq**"},{"line_number":7,"context_line":"service. This PXE filter implementation relies on directly configuring the"},{"line_number":8,"context_line":"**dnsmasq** DHCP service to implement a caching white-/black-list of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Description"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_91ea1daa","line":8,"updated":"2017-07-20 17:14:22.000000000","message":"nit: may be a slight rewording?\n\n...relies on directly configuring the **dnsmasq** DHCP service  by maintaining a cache of white-/black-lists of nodes MACs...","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Often an inspection PXE DHCP/TFTP stack is implemented by the **dnsmasq**"},{"line_number":7,"context_line":"service. This PXE filter implementation relies on directly configuring the"},{"line_number":8,"context_line":"**dnsmasq** DHCP service to implement a caching white-/black-list of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Description"}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_356333df","line":8,"in_reply_to":"1f1a1f67_91ea1daa","updated":"2017-07-24 15:59:10.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cf5cc0c1772dc880780113808b7d5aecdbfb06f7","unresolved":false,"context_lines":[{"line_number":8,"context_line":"**dnsmasq** DHCP service to implement a caching white-/black-list of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Description"},{"line_number":12,"context_line":"-----------"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Using a configuration *file per MAC* address allows one to implement a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_8e9d610c","line":11,"updated":"2017-07-20 14:22:15.000000000","message":"\"How it works\" to make it clear these are NOT the manual steps an admin has to take","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":8,"context_line":"**dnsmasq** DHCP service to implement a caching white-/black-list of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Description"},{"line_number":12,"context_line":"-----------"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Using a configuration *file per MAC* address allows one to implement a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_15602fce","line":11,"in_reply_to":"1f1a1f67_8e9d610c","updated":"2017-07-24 15:59:10.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":8,"context_line":"**dnsmasq** DHCP service to implement a caching white-/black-list of node MAC"},{"line_number":9,"context_line":"addresses."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Description"},{"line_number":12,"context_line":"-----------"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Using a configuration *file per MAC* address allows one to implement a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_91b57dd0","line":11,"in_reply_to":"1f1a1f67_8e9d610c","updated":"2017-07-20 16:48:06.000000000","message":"makes sense","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cf5cc0c1772dc880780113808b7d5aecdbfb06f7","unresolved":false,"context_lines":[{"line_number":15,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":18,"context_line":"    de:ad:be:ef:de:ad,ignore"},{"line_number":19,"context_line":"    $"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_6ea2054e","line":18,"updated":"2017-07-20 14:22:15.000000000","message":"nit: it may be useful to explain the the MAC address inside of the file is for dnsmasq and the file name contains the MAC address for our convenience","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":15,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":18,"context_line":"    de:ad:be:ef:de:ad,ignore"},{"line_number":19,"context_line":"    $"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_35bfb3fc","line":18,"in_reply_to":"1f1a1f67_6ea2054e","updated":"2017-07-24 15:59:10.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":15,"context_line":"filtering mechanism based on the ``ignore`` directive::"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"},{"line_number":18,"context_line":"    de:ad:be:ef:de:ad,ignore"},{"line_number":19,"context_line":"    $"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_31c46940","line":18,"in_reply_to":"1f1a1f67_6ea2054e","updated":"2017-07-20 16:48:06.000000000","message":"totally, will do","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"aa21cb376af8beb24c95cfb0ebfc8a87493e135a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    de:ad:be:ef:de:ad,ignore"},{"line_number":19,"context_line":"    $"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":22,"context_line":"*new* file is created or an existing file is *modified* in the"},{"line_number":23,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":24,"context_line":"remove the ``ignore`` directive::"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_71266119","line":23,"range":{"start_line":21,"start_character":36,"end_line":23,"end_character":32},"updated":"2017-07-20 17:14:22.000000000","message":"nit: may be also note that dnsmasq does not notice these files being removed -- that may explain the further design choices","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    de:ad:be:ef:de:ad,ignore"},{"line_number":19,"context_line":"    $"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Thanks to the ``inotify`` facility, **dnsmasq** is notified instantly once a"},{"line_number":22,"context_line":"*new* file is created or an existing file is *modified* in the"},{"line_number":23,"context_line":"DHCP hosts directory. Thus to white-list a MAC address, one has to"},{"line_number":24,"context_line":"remove the ``ignore`` directive::"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    $ cat /etc/dnsmasq.d/de-ad-be-ef-de-ad"}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_158f0fcd","line":23,"range":{"start_line":21,"start_character":36,"end_line":23,"end_character":32},"in_reply_to":"1f1a1f67_71266119","updated":"2017-07-24 15:59:10.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cf5cc0c1772dc880780113808b7d5aecdbfb06f7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    $"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This establishes a simple MAC addresses *filter cache* which allows"},{"line_number":31,"context_line":"**inspector** to synchronize easily with **ironic**."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Configuration"},{"line_number":34,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_4e8749b8","line":31,"updated":"2017-07-20 14:22:15.000000000","message":"nit: the reference to Ironic may not be clear, as this sentence skips a few steps.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    $"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This establishes a simple MAC addresses *filter cache* which allows"},{"line_number":31,"context_line":"**inspector** to synchronize easily with **ironic**."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Configuration"},{"line_number":34,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_51cc8560","line":31,"in_reply_to":"1f1a1f67_4e8749b8","updated":"2017-07-20 16:48:06.000000000","message":"yup, used to have a (pseudo) code here explaining the cache, will rephrase somehow or just kill.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    $"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This establishes a simple MAC addresses *filter cache* which allows"},{"line_number":31,"context_line":"**inspector** to synchronize easily with **ironic**."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Configuration"},{"line_number":34,"context_line":"-------------"}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_359213f8","line":31,"in_reply_to":"1f1a1f67_51cc8560","updated":"2017-07-24 15:59:10.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2844d1494b382ba8bed047f48a0f2cefcf42eda1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"**dnsmasq** service::"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":55,"context_line":"    # dnsmasq_start_command \u003d systemctl restart ironic-inspector-dhcp"},{"line_number":56,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop ironic-inspector-dhcp"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":39,"id":"3f1d235d_70444974","line":55,"range":{"start_line":55,"start_character":6,"end_line":55,"end_character":27},"updated":"2017-07-06 23:23:58.000000000","message":"Not 100 sure, but is there a need of these optional commands? Is there some extra thing that is achieved by these?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"285af70cd337cab3e6d2bb13cb9f20b7df236a92","unresolved":false,"context_lines":[{"line_number":52,"context_line":"**dnsmasq** service::"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":55,"context_line":"    # dnsmasq_start_command \u003d systemctl restart ironic-inspector-dhcp"},{"line_number":56,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop ironic-inspector-dhcp"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"}],"source_content_type":"text/x-rst","patch_set":39,"id":"3f1d235d_3891daf2","line":55,"range":{"start_line":55,"start_character":6,"end_line":55,"end_character":27},"in_reply_to":"3f1d235d_70444974","updated":"2017-07-10 09:47:14.000000000","message":"in a systemctl environments the defaults make sense. Devstack though uses a custom service name prefixed with devstack@... TripleO (will) use containers so the command will change to supervisord ...","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cf5cc0c1772dc880780113808b7d5aecdbfb06f7","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":55,"context_line":"    # dnsmasq_start_command \u003d systemctl restart ironic-inspector-dhcp"},{"line_number":56,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop ironic-inspector-dhcp"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_2e840db1","line":56,"updated":"2017-07-20 14:22:15.000000000","message":"I don\u0027t think this is really needed. We will anyway have to configure systemd/hypervisord/anything in a way that will stop dnsmasq when ironic-inspector halts. I suggest we provide example systemd units instead in the documentation.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":55,"context_line":"    # dnsmasq_start_command \u003d systemctl restart ironic-inspector-dhcp"},{"line_number":56,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop ironic-inspector-dhcp"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_d163f5b0","line":56,"in_reply_to":"1f1a1f67_2e840db1","updated":"2017-07-20 16:48:06.000000000","message":"Makes sense. Currently I do explicitly enable the dnsmasq service only after having synced it during the init_filter phase[1] to avoid running dnsmasq without the blacklist in place. So I have to figure out different way I guess. I\u0027m biased towards keeping it this way though O:-) but lemme see.\n\n[1] https://review.openstack.org/#/c/466448/39/ironic_inspector/pxe_filter/dnsmasq.py@88","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"96c237e4510bb7536e00fcc08e275808549da953","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    [dnsmasq_pxe_filter]"},{"line_number":55,"context_line":"    # dnsmasq_start_command \u003d systemctl restart ironic-inspector-dhcp"},{"line_number":56,"context_line":"    # dnsmasq_stop_command \u003d systemctl stop ironic-inspector-dhcp"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":".. note::"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":39,"id":"ff346bd7_980d7639","line":56,"in_reply_to":"1f1a1f67_d163f5b0","updated":"2017-07-24 15:59:10.000000000","message":"The start--stop mechanism allows for a consistent blacklist upon the filter_init() finish. I\u0027m adding a caveat suggesting the operator to configure their systems such that either of the inspector or dnsmasq service (unexpected) exiting causes the other service to exit too.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"bd4a0eda4d89ae010fcc0e0232a50581325675bb","unresolved":false,"context_lines":[{"line_number":72,"context_line":"compute service, meaning dozens of file updates per sync call."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The **inspector** takes over the control of the DHCP hosts directory to"},{"line_number":75,"context_line":"implement its filter cache. No content is therefore safe in that directory. To"},{"line_number":76,"context_line":"minimize the interference between the deployment and introspection,"},{"line_number":77,"context_line":"**inspector** has to start the **dnsmasq** service only after the initial"},{"line_number":78,"context_line":"synchronization. Conversely, the **dnsmasq** service is stopped upon"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_87059b13","line":75,"range":{"start_line":75,"start_character":28,"end_line":75,"end_character":74},"updated":"2017-07-18 14:36:06.000000000","message":"Not sure if this will confuse anyone, but \"No content is therefore safe in that directory\" sounds pretty scary. I assume that this means that the files in that directory are generated dynamically, so files shouldn\u0027t be edited by hand. Maybe just say something like \"Files are generated dynamically, so should not be edited by hand.\"","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":72,"context_line":"compute service, meaning dozens of file updates per sync call."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"The **inspector** takes over the control of the DHCP hosts directory to"},{"line_number":75,"context_line":"implement its filter cache. No content is therefore safe in that directory. To"},{"line_number":76,"context_line":"minimize the interference between the deployment and introspection,"},{"line_number":77,"context_line":"**inspector** has to start the **dnsmasq** service only after the initial"},{"line_number":78,"context_line":"synchronization. Conversely, the **dnsmasq** service is stopped upon"}],"source_content_type":"text/x-rst","patch_set":39,"id":"1f1a1f67_71f781d6","line":75,"range":{"start_line":75,"start_character":28,"end_line":75,"end_character":74},"in_reply_to":"1f1a1f67_87059b13","updated":"2017-07-20 16:48:06.000000000","message":"Honestly, I wanted it to sound a bit scary ;) will do ofcourse, thanks!","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"the initial synchronization. Conversely, the **dnsmasq** service is stopped"},{"line_number":88,"context_line":"upon (unexpected) **inspector** exit."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"To avoid accumulating stale DHCP host files over time, the driver cleans up"},{"line_number":91,"context_line":"the DHCP hosts directory during the ``init_filter`` call."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"Although the filter driver tries its best to always stop the **dnsmasq**"},{"line_number":94,"context_line":"service, it is recommended that the operator configures the **dnsmasq**"}],"source_content_type":"text/x-rst","patch_set":40,"id":"ff346bd7_99c1dfe7","line":91,"range":{"start_line":90,"start_character":55,"end_line":91,"end_character":57},"updated":"2017-07-25 05:27:29.000000000","message":"When will this init_filter be called? If it\u0027s the stage of inspector service startup, it may not be the best solution. Can we use periodic tasks to do this clean up job? And we need a clean up rule. I see there is a periodic task for sync, it\u0027s a good place to cleanup outdated mac files, WDT?","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":87,"context_line":"the initial synchronization. Conversely, the **dnsmasq** service is stopped"},{"line_number":88,"context_line":"upon (unexpected) **inspector** exit."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"To avoid accumulating stale DHCP host files over time, the driver cleans up"},{"line_number":91,"context_line":"the DHCP hosts directory during the ``init_filter`` call."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"Although the filter driver tries its best to always stop the **dnsmasq**"},{"line_number":94,"context_line":"service, it is recommended that the operator configures the **dnsmasq**"}],"source_content_type":"text/x-rst","patch_set":40,"id":"ff346bd7_b4bb85c2","line":91,"range":{"start_line":90,"start_character":55,"end_line":91,"end_character":57},"in_reply_to":"ff346bd7_99c1dfe7","updated":"2017-07-25 07:38:32.000000000","message":"One can\u0027t remove out of date mac addresses just so unless ironic removes those. In that case we just whitelist those, which allows for a simple design: mind please dnsmasq doesn\u0027t respond to file removal only content update.\n\nBut the amount of MACs is finite so it\u0027s not a disaster; the accumulation won\u0027t grow out of boundaries because that will happen with hardware phasing out.\n\nInit_filter is indeed called on inspector startup.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"}],"doc/source/index.rst":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_f945ba44","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":41},"updated":"2017-05-26 11:42:12.000000000","message":"what about general `PXE filter` section where we could add filter interface description, iptables filter","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_ae0eba2f","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":41},"in_reply_to":"ff0f0b1f_0aeda724","updated":"2017-05-27 19:19:19.000000000","message":"will update after a rebase on the patch chain base...","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":10,"id":"ff0f0b1f_0aeda724","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":41},"in_reply_to":"ff0f0b1f_f945ba44","updated":"2017-05-26 14:36:05.000000000","message":"Makes sense","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":15,"id":"df140735_6a8795d9","line":13,"updated":"2017-05-29 08:50:36.000000000","message":"this document should go to developers guide, except for the installation bits","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":15,"id":"df140735_e6d2b934","line":13,"in_reply_to":"df140735_6a8795d9","updated":"2017-05-31 11:32:23.000000000","message":"Done, but see further","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"562e50eb8d04c23596c9d03b66acc7240e81239c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":17,"id":"df140735_4f682420","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":41},"updated":"2017-05-31 11:43:15.000000000","message":"ouch, my rebase skills suck; bumping to Admin Guide...","commit_id":"fe4bd48fb1b5f7be94190ead0491616d09f36706"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  Usage \u003cusage\u003e"},{"line_number":11,"context_line":"  HTTP API \u003chttp-api\u003e"},{"line_number":12,"context_line":"  Troubleshooting \u003ctroubleshooting\u003e"},{"line_number":13,"context_line":"  Dnsmasq PXE filter \u003cdnsmasq-pxe-filter\u003e"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Admin Guide"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":21,"id":"df140735_7ad6ecf3","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":41},"updated":"2017-10-09 13:38:47.000000000","message":"Oops, redundant","commit_id":"6b303efe7b62c82b7445aa1700accd1aca271af4"}],"example.conf":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":378,"context_line":"# From ironic_inspector"},{"line_number":379,"context_line":"#"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"# The MAC address cache directory, exposed to dnsmasq.This directory"},{"line_number":382,"context_line":"# is completely in control of the driver, no content is safe. (string"},{"line_number":383,"context_line":"# value)"},{"line_number":384,"context_line":"#dhcp_hostsdir \u003d /var/lib/ironic-inspector/dhcp-hostsdir"}],"source_content_type":"text/plain","patch_set":25,"id":"bf091321_2abce403","line":381,"range":{"start_line":381,"start_character":54,"end_line":381,"end_character":55},"updated":"2017-06-08 20:37:49.000000000","message":"nit - add space","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"}],"ironic_inspector/conf.py":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcphosts_dir\u0027, default\u003d\u0027/etc/dnsmasq.d/\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_43fe0c6c","line":221,"range":{"start_line":221,"start_character":38,"end_line":221,"end_character":39},"updated":"2017-05-26 14:40:54.000000000","message":"s/_/-/ to match option name.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcphosts_dir\u0027, default\u003d\u0027/etc/dnsmasq.d/\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_8b2d28aa","line":221,"range":{"start_line":221,"start_character":38,"end_line":221,"end_character":39},"in_reply_to":"ff0f0b1f_43fe0c6c","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcphosts_dir\u0027, default\u003d\u0027/etc/dnsmasq.d/\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"},{"line_number":225,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_83042480","line":222,"range":{"start_line":222,"start_character":23,"end_line":222,"end_character":33},"updated":"2017-05-26 14:40:54.000000000","message":"Maybe \"This directory is completely...\" ?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcphosts_dir\u0027, default\u003d\u0027/etc/dnsmasq.d/\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"},{"line_number":225,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_03f8147a","line":222,"range":{"start_line":222,"start_character":74,"end_line":222,"end_character":75},"updated":"2017-05-26 14:40:54.000000000","message":"missing space at end of line","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcphosts_dir\u0027, default\u003d\u0027/etc/dnsmasq.d/\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"},{"line_number":225,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_ab20ecb1","line":222,"range":{"start_line":222,"start_character":23,"end_line":222,"end_character":33},"in_reply_to":"ff0f0b1f_83042480","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"},{"line_number":225,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":226,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027, default\u003d\u0027/bin/systemctl stop dnsmasq\u0027,"},{"line_number":227,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":228,"context_line":"    cfg.IntOpt(\u0027dnsmasq_command_timeout\u0027, default\u003d60,"},{"line_number":229,"context_line":"               help\u003d_(\u0027How long to wait for the start/stop commands to finish \u0027"},{"line_number":230,"context_line":"                      \u0027before timing out.\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_ca5d6fea","line":227,"range":{"start_line":224,"start_character":4,"end_line":227,"end_character":68},"updated":"2017-05-26 14:40:54.000000000","message":"Again, I wonder why these command options are needed.  Won\u0027t any changes here also require changes to rootwrap.d to allow the commands?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":221,"context_line":"               help\u003d_(\u0027The --dhcphosts-dir to use for blacklisting node MACs. \u0027"},{"line_number":222,"context_line":"                      \u0027Completely in control of this driver, no content is\u0027"},{"line_number":223,"context_line":"                      \u0027safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027, default\u003d\u0027/bin/systemctl start dnsmasq\u0027,"},{"line_number":225,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":226,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027, default\u003d\u0027/bin/systemctl stop dnsmasq\u0027,"},{"line_number":227,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":228,"context_line":"    cfg.IntOpt(\u0027dnsmasq_command_timeout\u0027, default\u003d60,"},{"line_number":229,"context_line":"               help\u003d_(\u0027How long to wait for the start/stop commands to finish \u0027"},{"line_number":230,"context_line":"                      \u0027before timing out.\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_4b195086","line":227,"range":{"start_line":224,"start_character":4,"end_line":227,"end_character":68},"in_reply_to":"ff0f0b1f_ca5d6fea","updated":"2017-05-27 19:19:19.000000000","message":"I guess it\u0027s OK having documented that ;)","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027, default\u003d\u0027/bin/systemctl stop dnsmasq\u0027,"},{"line_number":227,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":228,"context_line":"    cfg.IntOpt(\u0027dnsmasq_command_timeout\u0027, default\u003d60,"},{"line_number":229,"context_line":"               help\u003d_(\u0027How long to wait for the start/stop commands to finish \u0027"},{"line_number":230,"context_line":"                      \u0027before timing out.\u0027))"},{"line_number":231,"context_line":"]"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_280e4932","line":229,"range":{"start_line":229,"start_character":23,"end_line":229,"end_character":39},"updated":"2017-05-26 14:40:54.000000000","message":"Should indicate time in seconds","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027, default\u003d\u0027/bin/systemctl stop dnsmasq\u0027,"},{"line_number":227,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":228,"context_line":"    cfg.IntOpt(\u0027dnsmasq_command_timeout\u0027, default\u003d60,"},{"line_number":229,"context_line":"               help\u003d_(\u0027How long to wait for the start/stop commands to finish \u0027"},{"line_number":230,"context_line":"                      \u0027before timing out.\u0027))"},{"line_number":231,"context_line":"]"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_2b1e1c70","line":229,"range":{"start_line":229,"start_character":23,"end_line":229,"end_character":39},"in_reply_to":"ff0f0b1f_280e4932","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":217,"context_line":"]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcp_hostsdir\u0027, default\u003d\u0027/etc/ironic-inspector/dhcp-hostsdir\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The MAC address cache directory, exposed to dnsmasq.\u0027"},{"line_number":222,"context_line":"                      \u0027This directory is completely in control of the driver, \u0027"},{"line_number":223,"context_line":"                      \u0027no content is safe.\u0027)),"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_aa7dade8","line":220,"updated":"2017-05-29 08:50:36.000000000","message":"mutable runtime directories should go under /var/lib","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":217,"context_line":"]"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dhcp_hostsdir\u0027, default\u003d\u0027/etc/ironic-inspector/dhcp-hostsdir\u0027,"},{"line_number":221,"context_line":"               help\u003d_(\u0027The MAC address cache directory, exposed to dnsmasq.\u0027"},{"line_number":222,"context_line":"                      \u0027This directory is completely in control of the driver, \u0027"},{"line_number":223,"context_line":"                      \u0027no content is safe.\u0027)),"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_fcfc8f3f","line":220,"in_reply_to":"df140735_aa7dade8","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                      \u0027This directory is completely in control of the driver, \u0027"},{"line_number":223,"context_line":"                      \u0027no content is safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":225,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":226,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":227,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":228,"context_line":"               default\u003d\u0027systemctl stop ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_8a82e9c7","line":225,"updated":"2017-05-29 08:50:36.000000000","message":"I think if we own a service, we should start it directly, not via systemd. also this default value won\u0027t work on Red Hat systems (we prefix services with openstack-)","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                      \u0027This directory is completely in control of the driver, \u0027"},{"line_number":223,"context_line":"                      \u0027no content is safe.\u0027)),"},{"line_number":224,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":225,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":226,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":227,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":228,"context_line":"               default\u003d\u0027systemctl stop ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_3cf9e77f","line":225,"in_reply_to":"df140735_8a82e9c7","updated":"2017-05-31 11:32:23.000000000","message":"I originally thought the same but now I think we\u0027d have to reinvent the service life-cycle stuff that way, micro-managing the dnsmasq daemon (logs, restarts, configuration). Currently we delegate that to some other facility as the filter really needs just to start/stop some dnsmasq service, promoting loose coupling.\n\nFor the downstream I guess we could just override the default config file settings (as I do with the devstack@ prefix in the CI test patch) and use e.g supervisord[1] to keep track of the services.\n\nI\u0027d like to get more opinions on this; @Anton, wdyt?\n\n[1] http://supervisord.org/","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"DNSMASQ_PXE_FILTER_OPTS \u003d ["},{"line_number":215,"context_line":"    cfg.StrOpt(\u0027dhcp_hostsdir\u0027,"},{"line_number":216,"context_line":"               default\u003d\u0027/var/lib/ironic-inspector/dhcp-hostsdir\u0027,"},{"line_number":217,"context_line":"               help\u003d_(\u0027The MAC address cache directory, exposed to dnsmasq.\u0027"},{"line_number":218,"context_line":"                      \u0027This directory is completely in control of the driver, \u0027"},{"line_number":219,"context_line":"                      \u0027no content is safe.\u0027)),"},{"line_number":220,"context_line":"    cfg.StrOpt(\u0027dnsmasq_start_command\u0027,"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_aa459419","line":217,"range":{"start_line":217,"start_character":75,"end_line":217,"end_character":76},"updated":"2017-06-08 20:37:49.000000000","message":"nit - add space","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","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.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":217,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":218,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":219,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":220,"context_line":"               default\u003d\u0027systemctl stop ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_c63bdec5","line":217,"updated":"2017-10-06 09:16:32.000000000","message":"are you aware of at least a single distribution using this unit name? if not, let us use anything real. e.g. RDO/RHOSP uses openstack-ironic-inspector-dnsmasq","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","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.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":217,"context_line":"               default\u003d\u0027systemctl restart ironic-inspector-dhcp\u0027,"},{"line_number":218,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":219,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":220,"context_line":"               default\u003d\u0027systemctl stop ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_eb89d0c9","line":217,"in_reply_to":"7f515b1d_c63bdec5","updated":"2017-10-09 13:38:47.000000000","message":"frankly, I\u0027d avoid any distribution-specific service names. How about I use the Devstack default: `devstack@ironic-inspector-dhcp`?","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","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.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":221,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":222,"context_line":"               default\u003d\u0027systemctl stop devstack@ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_c05cd17f","line":219,"updated":"2017-11-15 09:04:38.000000000","message":"Let\u0027s not use devstack as a default, these have to be set in our devstack plugin. If we can\u0027t think of a good production default, then we can leave it empty and make it mandatory for the dnsmasq filter plugin.","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","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.StrOpt(\u0027dnsmasq_start_command\u0027,"},{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":221,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":222,"context_line":"               default\u003d\u0027systemctl stop devstack@ironic-inspector-dhcp\u0027,"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_59f8d379","line":219,"in_reply_to":"1f485f77_c05cd17f","updated":"2017-11-15 15:53:55.000000000","message":"Done. Documentation enhanced: empty cmd possible and explained.","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":221,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":222,"context_line":"               default\u003d\u0027systemctl stop devstack@ironic-inspector-dhcp\u0027,"},{"line_number":223,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":224,"context_line":"]"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_a05f9570","line":222,"updated":"2017-11-15 09:04:38.000000000","message":"and this can be empty by default with no stop command run","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":219,"context_line":"               default\u003d\u0027systemctl restart devstack@ironic-inspector-dhcp\u0027,"},{"line_number":220,"context_line":"               help\u003d_(\u0027Command line to start the dnsmasq service.\u0027)),"},{"line_number":221,"context_line":"    cfg.StrOpt(\u0027dnsmasq_stop_command\u0027,"},{"line_number":222,"context_line":"               default\u003d\u0027systemctl stop devstack@ironic-inspector-dhcp\u0027,"},{"line_number":223,"context_line":"               help\u003d_(\u0027Command line to stop the dnsmasq service.\u0027)),"},{"line_number":224,"context_line":"]"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_19eedbb3","line":222,"in_reply_to":"1f485f77_a05f9570","updated":"2017-11-15 15:53:55.000000000","message":"Done. Ditto.","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"}],"ironic_inspector/pxe_filter/dnsmasq.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f2dfc3201f5051c5012a147dfa9c5c7a357b564f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                        LOG.debug(\u0027Whitelisted %s.\u0027, port.address)"},{"line_number":96,"context_line":"            except Exception as e:"},{"line_number":97,"context_line":"                LOG.error(\u0027Worker encountered an exception: %s\u0027, e)"},{"line_number":98,"context_line":"                # propagate the error condition to the driver"},{"line_number":99,"context_line":"                _idempotent_send(error_event, e)"},{"line_number":100,"context_line":"                # \"continue\" to empty the queue, finally processing the"},{"line_number":101,"context_line":"                # \u0027DONE\u0027 signal"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_925be252","line":98,"range":{"start_line":98,"start_character":0,"end_line":98,"end_character":61},"updated":"2017-05-21 19:10:10.000000000","message":"add a comment like:\n\n  # imagine a disk full or permission denied error","commit_id":"52610b75bb450ae82a6f50804199e290b7560469"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"871e207b5018fd9b7270cd1f11d3ae62e6e00bd8","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        active_macs \u003d node_cache.active_macs()"},{"line_number":116,"context_line":"        for port in ironic.port.list(limit\u003d0, fields\u003d[\u0027address\u0027]):"},{"line_number":117,"context_line":"            port.active \u003d port.address in active_macs"},{"line_number":118,"context_line":"            self._queue.put(port)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def __init__(self):"},{"line_number":121,"context_line":"        super(DnsmasqDriver, self).__init__()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_b295c642","line":118,"range":{"start_line":118,"start_character":23,"end_line":118,"end_character":33},"updated":"2017-05-21 17:32:15.000000000","message":"todo: use a timeout so an error is raised if we\u0027re unable to keep up with the port list such as when the workers died unexpectedly.","commit_id":"52610b75bb450ae82a6f50804199e290b7560469"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"353ac1f50a25b199f8afee7086a2cd03224be8f7","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                          ironic.port.list(limit\u003d0, fields\u003d[\u0027address\u0027]))"},{"line_number":85,"context_line":"        existing_macs \u003d set(os.listdir(CONF.dnsmasq_pxe_filter.dhcphosts_dir))"},{"line_number":86,"context_line":"        # clean filtering on ports not kept in ironic anymore"},{"line_number":87,"context_line":"        self._remove_macs(existing_macs - ironic_macs)"},{"line_number":88,"context_line":"        # blacklist ports that aren\u0027t being inspected"},{"line_number":89,"context_line":"        self._blacklist_macs(ironic_macs - active_macs)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff0f0b1f_0088986e","line":87,"range":{"start_line":87,"start_character":26,"end_line":87,"end_character":53},"updated":"2017-05-21 22:21:17.000000000","message":"missing the active macs; we keep only blacklist, if those were blacklisted before, they need removing so:\n\n  existing_macs - ironic_macs | active_macs","commit_id":"de143ec903d1df94c6f5c78fa40ebc893832d65c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"888350dcba8a9e762b2d9356dec0188081535f12","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # and un-blacklist active ports"},{"line_number":88,"context_line":"        self._remove_macs(existing_macs - ironic_macs | active_macs)"},{"line_number":89,"context_line":"        # blacklist ports that aren\u0027t being inspected"},{"line_number":90,"context_line":"        self._blacklist_macs(ironic_macs - active_macs)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @staticmethod"},{"line_number":93,"context_line":"    def _locked(func):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff0f0b1f_e0cc84bd","line":90,"range":{"start_line":90,"start_character":29,"end_line":90,"end_character":54},"updated":"2017-05-21 22:30:21.000000000","message":"only blacklist \"news\":\n\n  ironic_macs - (existing_macs | active_macs)","commit_id":"97664beadac45fa7919a688448818fb5356759aa"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"08e6e303e8d8b02251146b8c0634fbf1dd455970","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        existing_macs \u003d set(os.listdir(CONF.dnsmasq_pxe_filter.dhcphosts_dir))"},{"line_number":86,"context_line":"        # clean filtering on ports not kept in ironic anymore"},{"line_number":87,"context_line":"        # and un-blacklist active ports"},{"line_number":88,"context_line":"        self._remove_macs((existing_macs - ironic_macs) | active_macs)"},{"line_number":89,"context_line":"        # blacklist (new) ports that aren\u0027t being inspected"},{"line_number":90,"context_line":"        self._blacklist_macs(ironic_macs - (existing_macs | active_macs))"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ff0f0b1f_77436014","line":88,"range":{"start_line":88,"start_character":56,"end_line":88,"end_character":70},"updated":"2017-05-23 14:49:27.000000000","message":"Just tested this w/ dnsmasq: removing won\u0027t help; we need to first whitelist those (remove the ,ignore command) and then remove so dnsmasq gets updated.","commit_id":"4ba0ded9c30aea63ec34167767a679caf906bd1a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from eventlet.green import subprocess"},{"line_number":18,"context_line":"from eventlet import semaphore"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from oslo_utils import reflection"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_19be2eff","line":19,"updated":"2017-05-26 11:42:12.000000000","message":"s/blank line/","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from eventlet.green import subprocess"},{"line_number":18,"context_line":"from eventlet import semaphore"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from oslo_utils import reflection"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_0ea48607","line":19,"in_reply_to":"ff0f0b1f_19be2eff","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from ironic_inspector.pxe_filter import base as pxe_filter"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":"LOG \u003d log.getLogger(\"ironic_inspector.pxe_filter.dnsmasq\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"_BASE_COMMAND \u003d [\u0027sudo\u0027, \u0027ironic-inspector-rootwrap\u0027, CONF.rootwrap_config]"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_79440a1c","line":29,"range":{"start_line":29,"start_character":21,"end_line":29,"end_character":57},"updated":"2017-05-26 11:42:12.000000000","message":"nit: __file__","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from ironic_inspector.pxe_filter import base as pxe_filter"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":"LOG \u003d log.getLogger(\"ironic_inspector.pxe_filter.dnsmasq\")"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"_BASE_COMMAND \u003d [\u0027sudo\u0027, \u0027ironic-inspector-rootwrap\u0027, CONF.rootwrap_config]"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_eea832dc","line":29,"range":{"start_line":29,"start_character":21,"end_line":29,"end_character":57},"in_reply_to":"ff0f0b1f_79440a1c","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":78,"context_line":"        # also whitelist active MACs"},{"line_number":79,"context_line":"        for mac in (blacklist_macs - ironic_macs) | active_macs:"},{"line_number":80,"context_line":"            _whitelist_mac(mac)"},{"line_number":81,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":82,"context_line":"        for mac in ironic_macs - blacklist_macs:"},{"line_number":83,"context_line":"            _blacklist_mac(mac)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_f4d5bfe6","line":80,"range":{"start_line":80,"start_character":11,"end_line":80,"end_character":31},"updated":"2017-05-26 11:42:12.000000000","message":"so node reboot could happen before dnsmasq pick up new configs? How we could track this?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":78,"context_line":"        # also whitelist active MACs"},{"line_number":79,"context_line":"        for mac in (blacklist_macs - ironic_macs) | active_macs:"},{"line_number":80,"context_line":"            _whitelist_mac(mac)"},{"line_number":81,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":82,"context_line":"        for mac in ironic_macs - blacklist_macs:"},{"line_number":83,"context_line":"            _blacklist_mac(mac)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_6aef83e9","line":80,"range":{"start_line":80,"start_character":11,"end_line":80,"end_character":31},"in_reply_to":"ff0f0b1f_f4d5bfe6","updated":"2017-05-26 14:36:05.000000000","message":"we\u0027d have to have the dnsmasq run a script to give feedback about a lease to a MAC or listen on DBus interface to receive the update.\n\nI\u0027d rather avoid too tight state coupling as the firmware retries the DHCP request couple of times before giving up.\n\nWorst case scenario: the introspection times out waiting;\nThis won\u0027t affect discovery.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        \"\"\"Sync dnsmasq configuration with current Ironic\u0026Inspector state."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        Polls all ironic ports. Those being inspected, the active ones, are"},{"line_number":91,"context_line":"        whitelisted while the rest is blacklisted in the dnsmasq configuration."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param ironic: an optional ironic client instance."},{"line_number":94,"context_line":"        :raises: OSError, IOError."}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_3c18bd73","line":91,"range":{"start_line":91,"start_character":35,"end_line":91,"end_character":37},"updated":"2017-05-26 14:40:54.000000000","message":"s/is/are/","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        \"\"\"Sync dnsmasq configuration with current Ironic\u0026Inspector state."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        Polls all ironic ports. Those being inspected, the active ones, are"},{"line_number":91,"context_line":"        whitelisted while the rest is blacklisted in the dnsmasq configuration."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param ironic: an optional ironic client instance."},{"line_number":94,"context_line":"        :raises: OSError, IOError."}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_aeaa3acf","line":91,"range":{"start_line":91,"start_character":35,"end_line":91,"end_character":37},"in_reply_to":"ff0f0b1f_3c18bd73","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        whitelisted while the rest is blacklisted in the dnsmasq configuration."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param ironic: an optional ironic client instance."},{"line_number":94,"context_line":"        :raises: OSError, IOError."},{"line_number":95,"context_line":"        :returns: Nothing."},{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_1c4cd974","line":94,"range":{"start_line":94,"start_character":9,"end_line":94,"end_character":34},"updated":"2017-05-26 14:40:54.000000000","message":"Just wondering where these are being raised, _sync()?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        whitelisted while the rest is blacklisted in the dnsmasq configuration."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param ironic: an optional ironic client instance."},{"line_number":94,"context_line":"        :raises: OSError, IOError."},{"line_number":95,"context_line":"        :returns: Nothing."},{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_abad8c32","line":94,"range":{"start_line":94,"start_character":9,"end_line":94,"end_character":34},"in_reply_to":"ff0f0b1f_1c4cd974","updated":"2017-05-27 19:19:19.000000000","message":"yup, _(blacklist/whitelist)_mac -\u003e _sync -\u003e sync.\nwill \"propagate\" it through the docstrings.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"},{"line_number":98,"context_line":"        if not self._initialized:"},{"line_number":99,"context_line":"            LOG.warning(\u0027Syncing a uninitialized filter.\u0027)"},{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ironic \u003d ironic or ir_utils.get_client()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_f45edf10","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":23},"updated":"2017-05-26 11:42:12.000000000","message":"error? if filter not initialized, inspection will not work","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"},{"line_number":98,"context_line":"        if not self._initialized:"},{"line_number":99,"context_line":"            LOG.warning(\u0027Syncing a uninitialized filter.\u0027)"},{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ironic \u003d ironic or ir_utils.get_client()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_6eb42236","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":23},"in_reply_to":"ff0f0b1f_eab4b3f4","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \"\"\""},{"line_number":97,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"},{"line_number":98,"context_line":"        if not self._initialized:"},{"line_number":99,"context_line":"            LOG.warning(\u0027Syncing a uninitialized filter.\u0027)"},{"line_number":100,"context_line":"            return"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ironic \u003d ironic or ir_utils.get_client()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_eab4b3f4","line":99,"range":{"start_line":99,"start_character":16,"end_line":99,"end_character":23},"in_reply_to":"ff0f0b1f_f45edf10","updated":"2017-05-26 14:36:05.000000000","message":"yeah makes sense","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6dddc9515118b6a082898ccc03d8344b28375b50","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        LOG.debug(\u0027Setting up the dnsmasq PXE filter\u0027)"},{"line_number":113,"context_line":"        if self._initialized:"},{"line_number":114,"context_line":"            LOG.warning(\u0027Initializing an initialized filter\u0027)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        _purge_dhcphosts_dir()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_74a88fda","line":114,"range":{"start_line":114,"start_character":41,"end_line":114,"end_character":52},"updated":"2017-05-26 11:42:12.000000000","message":"dnsmasq","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        LOG.debug(\u0027Setting up the dnsmasq PXE filter\u0027)"},{"line_number":113,"context_line":"        if self._initialized:"},{"line_number":114,"context_line":"            LOG.warning(\u0027Initializing an initialized filter\u0027)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        _purge_dhcphosts_dir()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_4e839e57","line":114,"range":{"start_line":114,"start_character":41,"end_line":114,"end_character":52},"in_reply_to":"ff0f0b1f_0aa5a7b5","updated":"2017-05-27 19:19:19.000000000","message":"Done","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a451b33f9862fcf9834677dcdfef0e4bdd6f0af3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"\"\""},{"line_number":112,"context_line":"        LOG.debug(\u0027Setting up the dnsmasq PXE filter\u0027)"},{"line_number":113,"context_line":"        if self._initialized:"},{"line_number":114,"context_line":"            LOG.warning(\u0027Initializing an initialized filter\u0027)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        _purge_dhcphosts_dir()"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_0aa5a7b5","line":114,"range":{"start_line":114,"start_character":41,"end_line":114,"end_character":52},"in_reply_to":"ff0f0b1f_74a88fda","updated":"2017-05-26 14:36:05.000000000","message":"rather already initialized filter? will update","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        LOG.info(\u0027The dnsmasq PXE filter was initialized\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @_locked"},{"line_number":125,"context_line":"    def tear_down_filter(self):"},{"line_number":126,"context_line":"        \"\"\"Stops dnsmasq."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        :returns: nothing."}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_9c6b491e","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":24},"updated":"2017-05-26 14:40:54.000000000","message":"Its confusing to me that this call to reset the internal filter state will just stop dnsmasq. Couldn\u0027t a user of this class want to reset the filtering and as a result will inadvertently stop the dhcp server?","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        LOG.info(\u0027The dnsmasq PXE filter was initialized\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    @_locked"},{"line_number":125,"context_line":"    def tear_down_filter(self):"},{"line_number":126,"context_line":"        \"\"\"Stops dnsmasq."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        :returns: nothing."}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_cb5e8044","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":24},"in_reply_to":"ff0f0b1f_9c6b491e","updated":"2017-05-27 19:19:19.000000000","message":"The reset call would be: tear_down_filter; init_filter in this order, so that isn\u0027t an issue.\n\nActually running a not configured dnsmasq, if only the dhcp-hostsdir was purged, would IMO be unsafe (collisions).","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    \"\"\""},{"line_number":182,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcphosts_dir, mac)"},{"line_number":183,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":184,"context_line":"        fd.truncate()"},{"line_number":185,"context_line":"        fd.flush()"},{"line_number":186,"context_line":"    LOG.info(\u0027Whitelisted %s\u0027, mac)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_dca9c190","line":184,"range":{"start_line":184,"start_character":8,"end_line":184,"end_character":21},"updated":"2017-05-26 14:40:54.000000000","message":"Probably don\u0027t need this as an open() with \u0027w\u0027 will erase a previous file with same name, but no harm.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    \"\"\""},{"line_number":182,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcphosts_dir, mac)"},{"line_number":183,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":184,"context_line":"        fd.truncate()"},{"line_number":185,"context_line":"        fd.flush()"},{"line_number":186,"context_line":"    LOG.info(\u0027Whitelisted %s\u0027, mac)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_4b303008","line":184,"range":{"start_line":184,"start_character":8,"end_line":184,"end_character":21},"in_reply_to":"ff0f0b1f_dca9c190","updated":"2017-05-27 19:19:19.000000000","message":"nice catch! :)","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":66,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":67,"context_line":"        self._initialized \u003d False"},{"line_number":68,"context_line":"        LOG.info(\u0027Torn down filter.\u0027)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _sync(self, ironic):"},{"line_number":71,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_2a24fd0c","line":68,"updated":"2017-05-29 08:50:36.000000000","message":"this is not particularly helpful for operators IMO and should be demoted to debug","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"},{"line_number":104,"context_line":"        if not self._initialized:"},{"line_number":105,"context_line":"            LOG.error(\u0027Syncing a uninitialized filter.\u0027)"},{"line_number":106,"context_line":"            return"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        ironic \u003d ironic or ir_utils.get_client()"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_0a2139fc","line":105,"updated":"2017-05-29 08:50:36.000000000","message":"I wonder if we should include more details, since it\u0027s a potential bug","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        LOG.debug(\u0027Syncing the filter\u0027)"},{"line_number":104,"context_line":"        if not self._initialized:"},{"line_number":105,"context_line":"            LOG.error(\u0027Syncing a uninitialized filter.\u0027)"},{"line_number":106,"context_line":"            return"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        ironic \u003d ironic or ir_utils.get_client()"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_9c6473bb","line":105,"in_reply_to":"df140735_0a2139fc","updated":"2017-05-31 11:32:23.000000000","message":"this might happen if the driver.get_periodic_task was called before driver_init. Not sure how to up-log properly, though.\nDo you think raising an exception here would be more appropriate?","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":152,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":153,"context_line":"        os.remove(os.path.join(dhcp_hostsdir, mac))"},{"line_number":154,"context_line":"    LOG.info(\u0027Purged %s\u0027, dhcp_hostsdir)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_ea1de5bd","line":154,"updated":"2017-05-29 08:50:36.000000000","message":"this is a technical detail, I think it should stay debug. actually, instead of this log record, I\u0027d LOG.debug every file we remove","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":152,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":153,"context_line":"        os.remove(os.path.join(dhcp_hostsdir, mac))"},{"line_number":154,"context_line":"    LOG.info(\u0027Purged %s\u0027, dhcp_hostsdir)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_1c698324","line":154,"in_reply_to":"df140735_ea1de5bd","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":179,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":180,"context_line":"        fd.flush()"},{"line_number":181,"context_line":"    LOG.info(\u0027Blacklisted %s\u0027, mac)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_ca78e1f9","line":181,"updated":"2017-05-29 08:50:36.000000000","message":"I suspect this may add too much clutter to the logs, and should be demoted to debug","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":179,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":180,"context_line":"        fd.flush()"},{"line_number":181,"context_line":"    LOG.info(\u0027Blacklisted %s\u0027, mac)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def _whitelist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":15,"id":"df140735_7cd07fca","line":181,"in_reply_to":"df140735_ca78e1f9","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c72521057f3285e03b51cd3f5dd54d801df8e92a","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            LOG.warning(\u0027Initializing an already initialized filter\u0027)"},{"line_number":121,"context_line":"            return"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        _purge_dhcp_hostsdir()"},{"line_number":124,"context_line":"        ironic \u003d ir_utils.get_client()"},{"line_number":125,"context_line":"        self._sync(ironic)"},{"line_number":126,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_start_command, catch\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_c2942147","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":28},"updated":"2017-05-30 19:21:13.000000000","message":"Should this handle the FileNotFoundError that could be raised by _purge_dhcp_hostsdir and log an error?  Otherwise a user can set an invalid dhcp_hostsdir in con file, causing the exception to be generated.","commit_id":"fe4bd48fb1b5f7be94190ead0491616d09f36706"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"562e50eb8d04c23596c9d03b66acc7240e81239c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            LOG.warning(\u0027Initializing an already initialized filter\u0027)"},{"line_number":121,"context_line":"            return"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        _purge_dhcp_hostsdir()"},{"line_number":124,"context_line":"        ironic \u003d ir_utils.get_client()"},{"line_number":125,"context_line":"        self._sync(ironic)"},{"line_number":126,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_start_command, catch\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_4f1dc40d","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":28},"in_reply_to":"df140735_c2942147","updated":"2017-05-31 11:43:15.000000000","message":"This would be handled by the @_locked decorator (mind the :raises: docstring","commit_id":"fe4bd48fb1b5f7be94190ead0491616d09f36706"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c72521057f3285e03b51cd3f5dd54d801df8e92a","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"def _get_blacklist():"},{"line_number":158,"context_line":"    \"\"\"Get addresses currently blacklised in dnsmasq."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."},{"line_number":161,"context_line":"    :returns: a set of MACs currently blacklisted in dnsmasq."}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_a20a4d23","line":158,"range":{"start_line":158,"start_character":31,"end_line":158,"end_character":41},"updated":"2017-05-30 19:21:13.000000000","message":"nit - typo (blacklised)","commit_id":"fe4bd48fb1b5f7be94190ead0491616d09f36706"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"562e50eb8d04c23596c9d03b66acc7240e81239c","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":164,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":165,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":166,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003e"},{"line_number":167,"context_line":"               _MACWL_LEN)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"def _blacklist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_cfa434bc","line":167,"range":{"start_line":166,"start_character":58,"end_line":167,"end_character":26},"updated":"2017-05-31 11:43:15.000000000","message":"I just realized it might be better to say blacklist iff stat.st_size \u003d\u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027) so we\u0027re a bit future safe in case we need to apply some special config to whitelisted items. I\u0027ll invert the logic here.","commit_id":"fe4bd48fb1b5f7be94190ead0491616d09f36706"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self)._reset()"},{"line_number":42,"context_line":"        LOG.debug(\u0027Torn down filter\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_cf6c5a0a","line":39,"range":{"start_line":39,"start_character":29,"end_line":39,"end_character":59},"updated":"2017-06-08 20:37:49.000000000","message":"Comment is a bit misleading since this is actually set in BaseFilter","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        super(DnsmasqFilter, self)._reset()"},{"line_number":42,"context_line":"        LOG.debug(\u0027Torn down filter\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _sync(self, ironic):"},{"line_number":45,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :raises: IOError, OSError."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_6f5c2e4b","line":44,"range":{"start_line":44,"start_character":20,"end_line":44,"end_character":26},"updated":"2017-06-08 20:37:49.000000000","message":"Should have doc line for this input for consistency.","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        LOG.debug(\u0027Torn down filter\u0027)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _sync(self, ironic):"},{"line_number":45,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :raises: IOError, OSError."},{"line_number":48,"context_line":"        :returns: Nothing."}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_ef35def8","line":45,"range":{"start_line":45,"start_character":57,"end_line":45,"end_character":64},"updated":"2017-06-08 20:37:49.000000000","message":"Since the locking isn\u0027t done by this function should remove this.","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def _sync(self, ironic):"},{"line_number":45,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :raises: IOError, OSError."},{"line_number":48,"context_line":"        :returns: Nothing."},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        LOG.debug(\u0027Syncing the driver\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_8a12d057","line":47,"range":{"start_line":47,"start_character":17,"end_line":47,"end_character":34},"updated":"2017-06-08 20:37:49.000000000","message":"Also raises FileNotFoundError error from _whitelist_mac/_blacklist_mac","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"c60917bbfcb84cbc19a37581c66372c660776feb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        configuration."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        :param ironic: an ironic client instance."},{"line_number":73,"context_line":"        :raises: OSError, IOError."},{"line_number":74,"context_line":"        :returns: Nothing."},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        with self.precautions():"}],"source_content_type":"text/x-python","patch_set":25,"id":"bf091321_8a409037","line":73,"range":{"start_line":73,"start_character":17,"end_line":73,"end_character":34},"updated":"2017-06-08 20:37:49.000000000","message":"Ditto for FileNotFoundError","commit_id":"634db805fd7d1f7a71f023bd9eaca0ee597013fe"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"11b37b2a315f49e03038274d9d03ad0344226fad","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    through amending its configuration."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self).reset()"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_7af49f86","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":13},"updated":"2017-07-15 00:37:20.000000000","message":"might need a clean_up method for the current change here","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    through amending its configuration."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self).reset()"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_ce92344c","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":13},"in_reply_to":"1f1a1f67_106f99fc","updated":"2017-07-20 16:48:06.000000000","message":"I\u0027d avoid the dnsmasq filter cleaning up after iptables filter; this is definitely a valid input on that filter.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fae409d96ad63f9b456cec3c5dd94cd1653e9ef3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    through amending its configuration."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self).reset()"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_106f99fc","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":13},"in_reply_to":"1f1a1f67_3b54d220","updated":"2017-07-18 01:24:51.000000000","message":"So, the clean_up will flush and reset any rules if present in the ironic-inspector chain. Hence i thought as there were some rules already present on my machine it would be good to reset the iptables from code itself, wdyt?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ebd3a8b0dd835a1f13411bcb1a3192d0b6898147","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    through amending its configuration."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self).reset()"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_3b54d220","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":13},"in_reply_to":"1f1a1f67_7af49f86","updated":"2017-07-17 10:03:01.000000000","message":"could you please elaborate?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ebd3a8b0dd835a1f13411bcb1a3192d0b6898147","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def reset(self):"},{"line_number":39,"context_line":"        \"\"\"Stops dnsmasq and set self._initialized \u003d False.\"\"\""},{"line_number":40,"context_line":"        _base_cmd(CONF.dnsmasq_pxe_filter.dnsmasq_stop_command, catch\u003dTrue)"},{"line_number":41,"context_line":"        super(DnsmasqFilter, self).reset()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_fb52da3a","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":62},"updated":"2017-07-17 10:03:01.000000000","message":"stale docstring; now handled by the state machine.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3dd82a048728e8f2aa20e4996be1b4539befe8ff","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        blacklist_macs \u003d _get_blacklist()"},{"line_number":54,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":55,"context_line":"        # also whitelist active MACs"},{"line_number":56,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":57,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":58,"context_line":"            _whitelist_mac(mac)"},{"line_number":59,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":60,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"},{"line_number":61,"context_line":"            _blacklist_mac(mac)"},{"line_number":62,"context_line":"        LOG.debug(\u0027The dnsmasq PXE filter was synchronized\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.sync)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_381e6f70","line":61,"range":{"start_line":56,"start_character":8,"end_line":61,"end_character":31},"updated":"2017-07-21 09:33:12.000000000","message":"I am wondering, is it possible that a node flips between white/blacklisted states so that we end up creating both white and blacklist files for it e.g.:\n\n    01-02-03-04-05-06,ignore\n    01-02-03-04-05-06\n    \nIs it that the latest modified file wins?\n\nThe unrelated consideration would be to `remove` the complimentary file to save on directory size.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f503de0fb6f4727be5a9057cd7e654f28c0e5292","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        blacklist_macs \u003d _get_blacklist()"},{"line_number":54,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":55,"context_line":"        # also whitelist active MACs"},{"line_number":56,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":57,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":58,"context_line":"            _whitelist_mac(mac)"},{"line_number":59,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":60,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"},{"line_number":61,"context_line":"            _blacklist_mac(mac)"},{"line_number":62,"context_line":"        LOG.debug(\u0027The dnsmasq PXE filter was synchronized\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.sync)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_b73a85ca","line":61,"range":{"start_line":56,"start_character":8,"end_line":61,"end_character":31},"in_reply_to":"1f1a1f67_381e6f70","updated":"2017-07-21 14:50:06.000000000","message":"the filename will be the same in both the cases: 01-02-03-04-05-06; should not happen in a single sync call as: 1) the ironic port list is fetched in a single bunch 2) the driver is locked while performing a sync.\n\nUnsure about the removing; might cause more writes in next iteration?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4721b4f70eb29f85261750894f68afd0cf38391c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        blacklist_macs \u003d _get_blacklist()"},{"line_number":54,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":55,"context_line":"        # also whitelist active MACs"},{"line_number":56,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":57,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":58,"context_line":"            _whitelist_mac(mac)"},{"line_number":59,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":60,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"},{"line_number":61,"context_line":"            _blacklist_mac(mac)"},{"line_number":62,"context_line":"        LOG.debug(\u0027The dnsmasq PXE filter was synchronized\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.sync)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_1bf4c386","line":61,"range":{"start_line":56,"start_character":8,"end_line":61,"end_character":31},"in_reply_to":"1f1a1f67_b73a85ca","updated":"2017-07-21 16:33:59.000000000","message":"Done","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"ee7ca23f370138d82b354278e654ec092c78c3fd","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        LOG.info(\u0027The dnsmasq PXE filter was initialized\u0027)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def _purge_dhcp_hostsdir():"},{"line_number":93,"context_line":"    \"\"\"Remove all the DHCP hosts files."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."}],"source_content_type":"text/x-python","patch_set":39,"id":"3f1d235d_1f752bfa","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":24},"updated":"2017-07-06 21:13:11.000000000","message":"when will this be used?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"285af70cd337cab3e6d2bb13cb9f20b7df236a92","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        LOG.info(\u0027The dnsmasq PXE filter was initialized\u0027)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"def _purge_dhcp_hostsdir():"},{"line_number":93,"context_line":"    \"\"\"Remove all the DHCP hosts files."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."}],"source_content_type":"text/x-python","patch_set":39,"id":"3f1d235d_589ed654","line":92,"range":{"start_line":92,"start_character":4,"end_line":92,"end_character":24},"in_reply_to":"3f1d235d_1f752bfa","updated":"2017-07-10 09:47:14.000000000","message":"Whenever the filter driver is initialized (after a reset) to prevent stale cache.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":92,"context_line":"def _purge_dhcp_hostsdir():"},{"line_number":93,"context_line":"    \"\"\"Remove all the DHCP hosts files."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."},{"line_number":96,"context_line":"    :returns: Nothing."},{"line_number":97,"context_line":"    \"\"\""},{"line_number":98,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_9117bd52","line":95,"range":{"start_line":95,"start_character":13,"end_line":95,"end_character":30},"updated":"2017-07-20 16:48:06.000000000","message":"add IOError in case non-writable file found or path not a file at all.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"aa21cb376af8beb24c95cfb0ebfc8a87493e135a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":100,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":101,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":102,"context_line":"        os.remove(path)"},{"line_number":103,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_44f5e582","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":23},"updated":"2017-07-20 17:14:22.000000000","message":"Would it make sense to account for possible `remove()` and `listdir` failure? Or it\u0027s better to let it bubble up and caught there?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"b6026baff4da94062dd8d4490c13fb40f2720dbb","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":100,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":101,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":102,"context_line":"        os.remove(path)"},{"line_number":103,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_379a146e","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":23},"in_reply_to":"1f1a1f67_44f5e582","updated":"2017-07-20 20:56:40.000000000","message":"I\u0027d prefer it to bubble up; we\u0027re purging upon init_filter() so reset() will be called immediately, shutting down the dnsmasq service and changing the filter driver state to uninitialized.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a33a4542c0a435912acebe9a60add7f36c7118ce","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    :returns: a set of MACs currently blacklisted in dnsmasq."},{"line_number":111,"context_line":"    \"\"\""},{"line_number":112,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":113,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":114,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":115,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":116,"context_line":"               _MACBL_LEN)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_716b011f","line":113,"range":{"start_line":113,"start_character":0,"end_line":113,"end_character":49},"updated":"2017-07-20 16:48:06.000000000","message":"add a note explaining why we use the length and not e.g a _whitelist suffix; cause dnsmasq doesn\u0027t update cache on file rename or remove; have to update the content or create a new file.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"aa21cb376af8beb24c95cfb0ebfc8a87493e135a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":113,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":114,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":115,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":116,"context_line":"               _MACBL_LEN)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _blacklist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_64b0e18c","line":116,"range":{"start_line":115,"start_character":15,"end_line":116,"end_character":25},"updated":"2017-07-20 17:14:22.000000000","message":"Since we already rely on certain filter file name format elsewhere, would it make sense to match files by a regexp here rather than by size?\n\nOther than that, I\u0027m a bit concerned how size-based approach would work for symlinks and directories.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"b6026baff4da94062dd8d4490c13fb40f2720dbb","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":113,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":114,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":115,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":116,"context_line":"               _MACBL_LEN)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _blacklist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_ba128908","line":116,"range":{"start_line":115,"start_character":15,"end_line":116,"end_character":25},"in_reply_to":"1f1a1f67_64b0e18c","updated":"2017-07-20 20:56:40.000000000","message":"Could you please elaborate on why and how the regexp check would be used? Please note we have to update the content of the file rather than its name due to the dnsmasq inotify limitations.\n\nPlease note also the design relies on the dhcp_hostdir being  _exclusively_ in inspector\u0027s control; all the content is supposed to be created by inspector only so there are many ways how to break the filter. I can assert file type and symlinks following though but won\u0027t help against e.g crafted files.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3dd82a048728e8f2aa20e4996be1b4539befe8ff","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":113,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":114,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":115,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":116,"context_line":"               _MACBL_LEN)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"def _blacklist_mac(mac):"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_128714da","line":116,"range":{"start_line":115,"start_character":15,"end_line":116,"end_character":25},"in_reply_to":"1f1a1f67_ba128908","updated":"2017-07-21 09:33:12.000000000","message":"Right, please disregard this comment.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3dd82a048728e8f2aa20e4996be1b4539befe8ff","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :returns: Nothing."},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_1d5965fd","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":31},"updated":"2017-07-21 09:33:12.000000000","message":"I am not sure how much this concern is applicable here: from security standpoint it is generally safer to create temporary files with unpredictable names, then rename them atomically into their ultimate location.\n\nThe risk of privilege escalation caused by not following this practice depends on the safe directory ownership/perms interplay.\n\nA more robust alternative would be add the `tempfile` stanza. ;-)","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0c9a17c50fc154b0046ecced244d3634b6d5ba41","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :returns: Nothing."},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_5755711c","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":31},"in_reply_to":"1f1a1f67_1d5965fd","updated":"2017-07-21 15:02:02.000000000","message":"would have to keep the tempfile--mac mapping and complicate the cache I guess but yeah security-wise I guess I\u0027m quite porous with this design... I have to think more about what I\u0027m possibly leaking here if anyone forges content... from the top-of-my-head: if you forge something either inspector blows up with a failure or deployment of a node fails (wrong IPA booted) if the IPA is forged at the same time, anything can happen :D","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4721b4f70eb29f85261750894f68afd0cf38391c","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :returns: Nothing."},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_bb626f15","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":31},"in_reply_to":"1f1a1f67_5755711c","updated":"2017-07-21 16:33:59.000000000","message":"So what I meant is to write into a tempfile with a randomized name, then mv it into the proper file name. The code can be as trivial as this [1].\n\nThe security risk I\u0027m referring to here is not Inspector data  corruption, but Linux privilege escalation AKA Symlink Attack [2].\n\n1. https://stackoverflow.com/questions/10547859/rename-python-tempfile#36784658\n2. https://lwn.net/Articles/250468/","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"902d866939b629096bed8426596185efc416c375","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :returns: Nothing."},{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":39,"id":"ff346bd7_bdb6efd8","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":31},"in_reply_to":"1f1a1f67_bb626f15","updated":"2017-07-24 10:37:17.000000000","message":"Agreed, thanks for explaining and the links. Will update with this in mind.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3dd82a048728e8f2aa20e4996be1b4539befe8ff","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_58e80b15","line":128,"range":{"start_line":128,"start_character":8,"end_line":128,"end_character":37},"updated":"2017-07-21 09:33:12.000000000","message":"Apparently, the inotify message queue is unreliable [1]:\n\n\u003e Note that the event queue can overflow. In this case, events are lost. Robust applications should handle the possibility of lost events gracefully. \n\nCould that mess up the deployment if we fail to un/block a node on mass update?\n\nIf that would be a concern, can we do anything about it aside from \"rate-limiting\" the amount of filter file writes? Aghhh...\n\n1. https://linux.die.net/man/7/inotify","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4721b4f70eb29f85261750894f68afd0cf38391c","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_414a4e27","line":128,"range":{"start_line":128,"start_character":8,"end_line":128,"end_character":37},"in_reply_to":"1f1a1f67_171ed96f","updated":"2017-07-21 16:33:59.000000000","message":"I\u0027m not certain that `flush` would help here...\n\nSo the edge case is that when we modify too many files at once, the kernel produces the whole lot of inotify events to be picked by the dnsmaskq process. At some point the inotify queue may not be able to accommodate all the pending event so it would start dropping the some (as the [1] says). \n\nThat may lead to dnsmasq not noticing some of the changes on the file system thus not fully synchronizing its internals with our file-based filters.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0c9a17c50fc154b0046ecced244d3634b6d5ba41","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\""},{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_171ed96f","line":128,"range":{"start_line":128,"start_character":8,"end_line":128,"end_character":37},"in_reply_to":"1f1a1f67_58e80b15","updated":"2017-07-21 15:02:02.000000000","message":"yup I guess the flush() may make it more reliable; worth testing in scale I guess.","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"aa21cb376af8beb24c95cfb0ebfc8a87493e135a","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_a7071b19","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"updated":"2017-07-20 17:14:22.000000000","message":"Does `flush` make sense given the presence of a context manager?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f503de0fb6f4727be5a9057cd7e654f28c0e5292","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_373675b6","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"in_reply_to":"1f1a1f67_1d6f25c6","updated":"2017-07-21 14:50:06.000000000","message":"if the event is triggered on the fd close, we\u0027d better flush before closing so we ensure the dnsmasq reads the new record rather than the stale record from the file?\n\nSee also the limitations in [2] the inotify queue may overflow; the flush call may help (by slowing down) the initial sync with ironic where some 1000 items may be created in the dir.\n\nBut I may be defending bullshit here ;)","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4721b4f70eb29f85261750894f68afd0cf38391c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_61e9cab5","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"in_reply_to":"1f1a1f67_373675b6","updated":"2017-07-21 16:33:59.000000000","message":"I do agree that `flush()`ing might shorten the latency, which is good! A more direct way to achieve that is probably to disable stream I/O buffering entirely. [1]\n\nI\u0027m not sure if we could ever ensure reliable communication with the dnsmasq process via inotify. Though an explicit `sleep` every N writes may work better than less deterministic `flush()`.\n\n1. https://stackoverflow.com/questions/29712445/what-is-the-use-of-buffering-in-pythons-built-in-open-function","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3dd82a048728e8f2aa20e4996be1b4539befe8ff","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_1d6f25c6","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"in_reply_to":"1f1a1f67_3ac5595c","updated":"2017-07-21 09:33:12.000000000","message":"No performance concerns here. I asked because I did not understand the intention of the `flush` here.\n\nBut is it important to `flush` for inotify to notice the change?  I\u0027m a bit suspicious here because according to [1], [2] inotify watches files being closed, not flushed.\n\nBut that\u0027s definitely not a blocker, just sharing my thoughts. ;-)\n\n1. https://github.com/dnsmasq/dnsmasq/blob/master/src/inotify.c#L157\n2. https://linux.die.net/man/7/inotify","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"902d866939b629096bed8426596185efc416c375","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"ff346bd7_48517fd8","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"in_reply_to":"1f1a1f67_61e9cab5","updated":"2017-07-24 10:37:17.000000000","message":"Makes sense with the buffering. I\u0027d use line-buffered caching, the design uses single line files so the flush() should mean the same as a line-buffered fd.write() here.\n\nThe initial sync works a bit differently here;\nThe dnsmasq is shut-down while the MAC blacklist is being synced from Ironic. It\u0027s only after this that I start dnsmasq. Further sync events should be in couple hundreds of records top (in a huge deployment) whitelisting some records. I\u0027ll add a note explaining this.\n\nI\u0027d better also keep the explicit start--stop dnsmasq design otherwise the initial _sync() may not work reliably (will add a note)","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"b6026baff4da94062dd8d4490c13fb40f2720dbb","unresolved":false,"context_lines":[{"line_number":126,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":127,"context_line":"    with open(path, \u0027w\u0027) as fd:"},{"line_number":128,"context_line":"        fd.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":129,"context_line":"        fd.flush()"},{"line_number":130,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"1f1a1f67_3ac5595c","line":129,"range":{"start_line":129,"start_character":6,"end_line":129,"end_character":18},"in_reply_to":"1f1a1f67_a7071b19","updated":"2017-07-20 20:56:40.000000000","message":"yup it\u0027s redundant but ensures the content is seen by the inotify facility of dnsmasq immediately rather than eventually (file system caching). Maybe I\u0027ll add a note? Or are you concerned by performance impact of the initial sync?","commit_id":"345a56e85aad7cbf2eda00ed30b9161ba0425318"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"b7188e1cb15ecab0198c86a64b45d4809af9cc86","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_BASE_COMMAND \u003d [\u0027sudo\u0027, \u0027ironic-inspector-rootwrap\u0027, CONF.rootwrap_config]"},{"line_number":31,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"if six.PY3:"},{"line_number":34,"context_line":"    _NamedTemporaryHostFile \u003d functools.partial("},{"line_number":35,"context_line":"        tempfile.NamedTemporaryFile, dir\u003dCONF.dnsmasq_pxe_filter.dhcp_hostsdir,"},{"line_number":36,"context_line":"        mode\u003d\u0027w\u0027, buffering\u003d1)"},{"line_number":37,"context_line":"else:"},{"line_number":38,"context_line":"    _NamedTemporaryHostFile \u003d functools.partial("},{"line_number":39,"context_line":"        tempfile.NamedTemporaryFile, dir\u003dCONF.dnsmasq_pxe_filter.dhcp_hostsdir,"},{"line_number":40,"context_line":"        mode\u003d\u0027w\u0027, bufsize\u003d1)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class DnsmasqFilter(pxe_filter.BaseFilter):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_bf6003a7","line":40,"range":{"start_line":33,"start_character":0,"end_line":40,"end_character":28},"updated":"2017-07-25 06:15:22.000000000","message":"It\u0027s used by unittest, can we put this code into common utils to avoid duplicated codes?","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_BASE_COMMAND \u003d [\u0027sudo\u0027, \u0027ironic-inspector-rootwrap\u0027, CONF.rootwrap_config]"},{"line_number":31,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"if six.PY3:"},{"line_number":34,"context_line":"    _NamedTemporaryHostFile \u003d functools.partial("},{"line_number":35,"context_line":"        tempfile.NamedTemporaryFile, dir\u003dCONF.dnsmasq_pxe_filter.dhcp_hostsdir,"},{"line_number":36,"context_line":"        mode\u003d\u0027w\u0027, buffering\u003d1)"},{"line_number":37,"context_line":"else:"},{"line_number":38,"context_line":"    _NamedTemporaryHostFile \u003d functools.partial("},{"line_number":39,"context_line":"        tempfile.NamedTemporaryFile, dir\u003dCONF.dnsmasq_pxe_filter.dhcp_hostsdir,"},{"line_number":40,"context_line":"        mode\u003d\u0027w\u0027, bufsize\u003d1)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class DnsmasqFilter(pxe_filter.BaseFilter):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_b41705a4","line":40,"range":{"start_line":33,"start_character":0,"end_line":40,"end_character":28},"in_reply_to":"ff346bd7_bf6003a7","updated":"2017-07-25 07:38:32.000000000","message":"I\u0027m going to remove this, it\u0027s broken\nI didn\u0027t realize before: we\u0027re not handling temp files (that\u0027s where this security measurement was supposed to help) but a cache; there are edge cases... (see the failing dsvm jobs)","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        :raises: OSError, IOError."},{"line_number":86,"context_line":"        :returns: Nothing."},{"line_number":87,"context_line":"        \"\"\""},{"line_number":88,"context_line":"        self._sync(ironic)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.initialize)"},{"line_number":91,"context_line":"    def init_filter(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_5917f752","line":88,"range":{"start_line":88,"start_character":13,"end_line":88,"end_character":18},"updated":"2017-07-25 05:27:29.000000000","message":"there is no exception handling here, if anything happens, it will crash the periodic task.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c4cfa4ecaf6991b6efc8575204da16ef9c827697","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        :raises: OSError, IOError."},{"line_number":86,"context_line":"        :returns: Nothing."},{"line_number":87,"context_line":"        \"\"\""},{"line_number":88,"context_line":"        self._sync(ironic)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.initialize)"},{"line_number":91,"context_line":"    def init_filter(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_a05a1bf0","line":88,"range":{"start_line":88,"start_character":13,"end_line":88,"end_character":18},"in_reply_to":"ff346bd7_14225101","updated":"2017-07-25 09:13:07.000000000","message":"Alright, there is a one there, thanks.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        :raises: OSError, IOError."},{"line_number":86,"context_line":"        :returns: Nothing."},{"line_number":87,"context_line":"        \"\"\""},{"line_number":88,"context_line":"        self._sync(ironic)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.initialize)"},{"line_number":91,"context_line":"    def init_filter(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_14225101","line":88,"range":{"start_line":88,"start_character":13,"end_line":88,"end_character":18},"in_reply_to":"ff346bd7_5917f752","updated":"2017-07-25 07:38:32.000000000","message":"yup and that\u0027s by design; the exception bubbles up and the filter is reset()","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":116,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_debaad08","line":117,"range":{"start_line":117,"start_character":15,"end_line":117,"end_character":25},"updated":"2017-07-25 05:27:29.000000000","message":"it would return directories as well as files, i think we need to handle such case, leave them untouched.\nTo be honest, also adding prefix to mac files generated by pxe filter seems logical to me, we manage files we create, keep others intact.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c4cfa4ecaf6991b6efc8575204da16ef9c827697","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":116,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_0a36a8e7","line":117,"range":{"start_line":117,"start_character":15,"end_line":117,"end_character":25},"in_reply_to":"ff346bd7_d462893e","updated":"2017-07-25 09:13:07.000000000","message":"Mmm, I forgot the path is specified by configuration file, so this is the path users what, I think it\u0027s OK.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    \"\"\""},{"line_number":115,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":116,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"},{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_d462893e","line":117,"range":{"start_line":117,"start_character":15,"end_line":117,"end_character":25},"in_reply_to":"ff346bd7_debaad08","updated":"2017-07-25 07:38:32.000000000","message":"yes but the inspector is supposed to be the exclusive owner of the directory, it\u0027s a cache directory","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_7e7e216c","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":23},"updated":"2017-07-25 05:27:29.000000000","message":"this exception is not catched from init_filter, as we are cleaning mac files here, can you add exception handling here, ignore some errors and continue to purge other files?","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c4cfa4ecaf6991b6efc8575204da16ef9c827697","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_aad55c45","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":23},"in_reply_to":"ff346bd7_34d675c5","updated":"2017-07-25 09:13:07.000000000","message":"os.remove a directory will always raise exception, I think there is no need to propagate this up, since it\u0027s nothing to do with the filter thing.\nWell, as said above, if this directory is supposed to be owned by inspector, it may not happen, but still possible.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_34d675c5","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":23},"in_reply_to":"ff346bd7_7e7e216c","updated":"2017-07-25 07:38:32.000000000","message":"it is caught in the decorator @pxe_filter.locked_driver_event. The filter is reset() as the assertion that the cache is exclusively maintained by inspector has just been violated.\n\nIt\u0027s also best for the debuggig: keep the directory intact after the exception. Inspector restart would try again the same btw.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"cc357782103c5e3603584195a0533f04d32fd615","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    for mac in os.listdir(dhcp_hostsdir):"},{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"df3967d1_e271d4a9","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":23},"in_reply_to":"ff346bd7_aad55c45","updated":"2017-08-04 13:42:23.000000000","message":"well it is better propagated so we don\u0027t start the dnsmasq process w/o the possibility to filter (we might not be there yet, I know, but it\u0027s better to perform the upcall too to set proper filter driver state (that too is handled by the decorator)).","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_9ed54546","line":121,"range":{"start_line":121,"start_character":8,"end_line":121,"end_character":37},"updated":"2017-07-25 05:27:29.000000000","message":"it\u0027s a little verbose here, we can just filter out files not removed from os.listdir, and output them in one log.\nwhile i am not sure if LOG can handle large records, so keeping this way is fine with me.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":119,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":120,"context_line":"        os.remove(path)"},{"line_number":121,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_74ed1d8a","line":121,"range":{"start_line":121,"start_character":8,"end_line":121,"end_character":37},"in_reply_to":"ff346bd7_9ed54546","updated":"2017-07-25 07:38:32.000000000","message":"this was added per request from dtantsur in a former review","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"c897c37a54d2882cdad783ac88c2228201fa956b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":146,"context_line":"    path \u003d os.path.join(hostsdir, mac)"},{"line_number":147,"context_line":"    # NOTE(milan) line-buffering enforced to ensure dnsmasq record update"},{"line_number":148,"context_line":"    with _NamedTemporaryHostFile() as f:"},{"line_number":149,"context_line":"        f.write(\u0027%s,ignore\\n\u0027 % mac)"},{"line_number":150,"context_line":"        os.link(f.name, path)"},{"line_number":151,"context_line":"    LOG.debug(\u0027Blacklisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_00468750","line":148,"range":{"start_line":148,"start_character":0,"end_line":148,"end_character":40},"updated":"2017-07-25 09:09:05.000000000","message":"Just a quick note for posterity -- there is the `delete\u003dFalse` parameter which would make NamedTemporaryFile resting on the filesystem once you are out of the context manager. This is where you can `os.rename` already closed file.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :returns: Nothing."},{"line_number":160,"context_line":"    \"\"\""},{"line_number":161,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":162,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":163,"context_line":"        # remove the ,ignore directive"},{"line_number":164,"context_line":"        f.write(\u0027%s\\n\u0027 % mac)"},{"line_number":165,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_44226a54","line":162,"range":{"start_line":162,"start_character":25,"end_line":162,"end_character":26},"updated":"2017-07-25 05:27:29.000000000","message":"the file will be closed outside of the environment, so I think we can safely remove this buffering parameter.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :returns: Nothing."},{"line_number":160,"context_line":"    \"\"\""},{"line_number":161,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":162,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":163,"context_line":"        # remove the ,ignore directive"},{"line_number":164,"context_line":"        f.write(\u0027%s\\n\u0027 % mac)"},{"line_number":165,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_b466e528","line":162,"range":{"start_line":162,"start_character":25,"end_line":162,"end_character":26},"in_reply_to":"ff346bd7_44226a54","updated":"2017-07-25 07:38:32.000000000","message":"the inotify facility reacts on fd.close() not flush() so we either line buffer or f.flush(); flush was suggested to be removed by previous Ilya\u0027s review but we have to ensure dnsmasq is \"posted\" with a fresh record.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"cc357782103c5e3603584195a0533f04d32fd615","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :returns: Nothing."},{"line_number":160,"context_line":"    \"\"\""},{"line_number":161,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":162,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":163,"context_line":"        # remove the ,ignore directive"},{"line_number":164,"context_line":"        f.write(\u0027%s\\n\u0027 % mac)"},{"line_number":165,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":40,"id":"df3967d1_826208d7","line":162,"range":{"start_line":162,"start_character":25,"end_line":162,"end_character":26},"in_reply_to":"ff346bd7_a73475fc","updated":"2017-08-04 13:42:23.000000000","message":"closed yes but unless synced() or line-buffered I don\u0027t think the up-to-date content is guaranteed to be there, is it?","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c4cfa4ecaf6991b6efc8575204da16ef9c827697","unresolved":false,"context_lines":[{"line_number":159,"context_line":"    :returns: Nothing."},{"line_number":160,"context_line":"    \"\"\""},{"line_number":161,"context_line":"    path \u003d os.path.join(CONF.dnsmasq_pxe_filter.dhcp_hostsdir, mac)"},{"line_number":162,"context_line":"    with open(path, \u0027w\u0027, 1) as f:"},{"line_number":163,"context_line":"        # remove the ,ignore directive"},{"line_number":164,"context_line":"        f.write(\u0027%s\\n\u0027 % mac)"},{"line_number":165,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_a73475fc","line":162,"range":{"start_line":162,"start_character":25,"end_line":162,"end_character":26},"in_reply_to":"ff346bd7_b466e528","updated":"2017-07-25 09:13:07.000000000","message":"yup, file will be closed after leaving L164 if i remember correctly ^^","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"82a25add7441bf71becb3be87ceb08e73b8727b7","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    cmd \u003d _BASE_COMMAND + cmd.split()"},{"line_number":171,"context_line":"    LOG.debug(\u0027Executing cmd: %s\u0027, cmd)"},{"line_number":172,"context_line":"    try:"},{"line_number":173,"context_line":"        subprocess.check_output(cmd, stderr\u003dsubprocess.STDOUT)"},{"line_number":174,"context_line":"    except subprocess.CalledProcessError as e:"},{"line_number":175,"context_line":"        LOG.error(\u0027Encountered %(error)s executing %(cmd)s: %(output)s\u0027,"},{"line_number":176,"context_line":"                  {\u0027cmd\u0027: \u0027 \u0027.join(cmd), \u0027error\u0027: e, \u0027output\u0027: e.output})"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_6481ee4a","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":18},"updated":"2017-07-25 05:27:29.000000000","message":"I think you can use processutils from oslo.concurrency, it\u0027s well encapsulated.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    cmd \u003d _BASE_COMMAND + cmd.split()"},{"line_number":171,"context_line":"    LOG.debug(\u0027Executing cmd: %s\u0027, cmd)"},{"line_number":172,"context_line":"    try:"},{"line_number":173,"context_line":"        subprocess.check_output(cmd, stderr\u003dsubprocess.STDOUT)"},{"line_number":174,"context_line":"    except subprocess.CalledProcessError as e:"},{"line_number":175,"context_line":"        LOG.error(\u0027Encountered %(error)s executing %(cmd)s: %(output)s\u0027,"},{"line_number":176,"context_line":"                  {\u0027cmd\u0027: \u0027 \u0027.join(cmd), \u0027error\u0027: e, \u0027output\u0027: e.output})"}],"source_content_type":"text/x-python","patch_set":40,"id":"ff346bd7_74707ddd","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":18},"in_reply_to":"ff346bd7_6481ee4a","updated":"2017-07-25 07:38:32.000000000","message":"will check","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"cc357782103c5e3603584195a0533f04d32fd615","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    cmd \u003d _BASE_COMMAND + cmd.split()"},{"line_number":171,"context_line":"    LOG.debug(\u0027Executing cmd: %s\u0027, cmd)"},{"line_number":172,"context_line":"    try:"},{"line_number":173,"context_line":"        subprocess.check_output(cmd, stderr\u003dsubprocess.STDOUT)"},{"line_number":174,"context_line":"    except subprocess.CalledProcessError as e:"},{"line_number":175,"context_line":"        LOG.error(\u0027Encountered %(error)s executing %(cmd)s: %(output)s\u0027,"},{"line_number":176,"context_line":"                  {\u0027cmd\u0027: \u0027 \u0027.join(cmd), \u0027error\u0027: e, \u0027output\u0027: e.output})"}],"source_content_type":"text/x-python","patch_set":40,"id":"df3967d1_22a11cf9","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":18},"in_reply_to":"ff346bd7_74707ddd","updated":"2017-08-04 13:42:23.000000000","message":"Done","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3ffe632305c7d23297392ceb5d32155d57032a63","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":128,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":129,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":130,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":131,"context_line":"               _MACBL_LEN)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"bf3e73b7_b19aa8c2","line":130,"range":{"start_line":130,"start_character":59,"end_line":130,"end_character":67},"updated":"2017-08-07 03:40:22.000000000","message":"it\u0027s not safe by judging file size, they can be affected by file encodings, i think a better way is to check if this file contains `ignore`, or we can push it further, implement a utility function to parse file content, check both mac and flag.","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"b3e494ef1e1562378f6291d5b3547cab1c23442b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":128,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":129,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":130,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":131,"context_line":"               _MACBL_LEN)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"9f436f4f_4fa82476","line":130,"range":{"start_line":130,"start_character":59,"end_line":130,"end_character":67},"in_reply_to":"9f436f4f_4484a7b1","updated":"2017-08-11 03:29:45.000000000","message":"Well then, I\u0027m OK with this, but I think the notes in code is not visible by users, we may add some text in the option help text or release note, anywhere you think appropriate, make sense?","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"abaff44f1a5ac42c507f1b925f738088cdee3dde","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":128,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":129,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":130,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":131,"context_line":"               _MACBL_LEN)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"9f436f4f_213167ed","line":130,"range":{"start_line":130,"start_character":59,"end_line":130,"end_character":67},"in_reply_to":"9f436f4f_4fa82476","updated":"2017-08-11 13:27:59.000000000","message":"Done","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3cef3b4c51501b0e6f6efaefb444a6f473badbf3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":128,"context_line":"    # whitelisted MACs lack the ,ignore directive"},{"line_number":129,"context_line":"    return set(address for address in os.listdir(hostsdir)"},{"line_number":130,"context_line":"               if os.stat(os.path.join(hostsdir, address)).st_size \u003d\u003d"},{"line_number":131,"context_line":"               _MACBL_LEN)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"9f436f4f_4484a7b1","line":130,"range":{"start_line":130,"start_character":59,"end_line":130,"end_character":67},"in_reply_to":"bf3e73b7_b19aa8c2","updated":"2017-08-10 08:36:51.000000000","message":"This is by design[1]. I guess a more open/cooperative filter driver can be introduced in the future if needed.\n\n\n[1] https://review.openstack.org/#/c/466448/46/ironic_inspector/pxe_filter/dnsmasq.py@14","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"3ffe632305c7d23297392ceb5d32155d57032a63","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"},{"line_number":167,"context_line":"    processutils.execute(*cmd, run_as_root\u003dTrue, root_helper\u003dbase_command,"},{"line_number":168,"context_line":"                         check_exit_code\u003dnot catch)"}],"source_content_type":"text/x-python","patch_set":46,"id":"bf3e73b7_7108c027","line":168,"range":{"start_line":168,"start_character":41,"end_line":168,"end_character":50},"updated":"2017-08-07 03:40:22.000000000","message":"it has to be a boolean, int or [int]\nfor this case, i think you can pass [0] if catch\u003dTrue, and just remove check_exit_code when catch\u003dFalse","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"b3e494ef1e1562378f6291d5b3547cab1c23442b","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"},{"line_number":167,"context_line":"    processutils.execute(*cmd, run_as_root\u003dTrue, root_helper\u003dbase_command,"},{"line_number":168,"context_line":"                         check_exit_code\u003dnot catch)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9f436f4f_8f3a8c31","line":168,"range":{"start_line":168,"start_character":41,"end_line":168,"end_character":50},"in_reply_to":"9f436f4f_447267e5","updated":"2017-08-11 03:29:45.000000000","message":"Yes, you are right, and I have checked oslo code, if we don\u0027t want to raise, pass False is the only way, if check_exit_code is not provided, [0] will be used, that is not the logic we want here.","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3cef3b4c51501b0e6f6efaefb444a6f473badbf3","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"},{"line_number":167,"context_line":"    processutils.execute(*cmd, run_as_root\u003dTrue, root_helper\u003dbase_command,"},{"line_number":168,"context_line":"                         check_exit_code\u003dnot catch)"}],"source_content_type":"text/x-python","patch_set":46,"id":"9f436f4f_447267e5","line":168,"range":{"start_line":168,"start_character":41,"end_line":168,"end_character":50},"in_reply_to":"bf3e73b7_7108c027","updated":"2017-08-10 08:36:51.000000000","message":"that if statement would just duplicate the line 167; anyways, _base_cmd is a \"private\" function and the catch is used as a boolean argument, not \u003cboolean\u003e gains \u003cboolean\u003e, correct?","commit_id":"db5509e648a805298672f83d28fe1e692170e31e"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":33,"context_line":"CONF \u003d cfg.CONF"},{"line_number":34,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_BASE_COMMAND \u003d \u0027sudo ironic-inspector-rootwrap {rootwrap_config!s}\u0027"},{"line_number":37,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_a64a2252","line":36,"updated":"2017-10-06 09:16:32.000000000","message":"s/BASE/ROOTWRAP/ maybe?","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"CONF \u003d cfg.CONF"},{"line_number":34,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"_BASE_COMMAND \u003d \u0027sudo ironic-inspector-rootwrap {rootwrap_config!s}\u0027"},{"line_number":37,"context_line":"_MACBL_LEN \u003d len(\u0027ff:ff:ff:ff:ff:ff,ignore\\n\u0027)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_da95bc41","line":36,"in_reply_to":"7f515b1d_a64a2252","updated":"2017-10-09 13:38:47.000000000","message":"Done","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":116,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":117,"context_line":"        os.remove(path)"},{"line_number":118,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_8645e645","line":118,"updated":"2017-10-06 09:16:32.000000000","message":"let\u0027s log all paths in one short:\n\n     paths.append(path)\n LOG.debug(\u0027Removed %s\u0027, \u0027, \u0027.join(paths))","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        path \u003d os.path.join(dhcp_hostsdir, mac)"},{"line_number":116,"context_line":"        # NOTE(milan) relying on a failure here aborting the init_filter() call"},{"line_number":117,"context_line":"        os.remove(path)"},{"line_number":118,"context_line":"        LOG.debug(\u0027Removed %s\u0027, path)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def _get_blacklist():"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_5abd4cd6","line":118,"in_reply_to":"7f515b1d_8645e645","updated":"2017-10-09 13:38:47.000000000","message":"what if removing failed for a file? we wouldn\u0027t know which one failed actually? Would have to use a try except block because of logging and re-throw the exception so that the (decorated) init_filter method can process it.","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"def _base_cmd(cmd, catch\u003dFalse):"},{"line_number":164,"context_line":"    # e.g: [\u0027/bin/systemctl\u0027, \u0027start\u0027, \u0027dnsmasq\u0027]"},{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_66766aa7","line":163,"updated":"2017-10-06 09:16:32.000000000","message":"s/base_cmd/execute/ ?","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"def _base_cmd(cmd, catch\u003dFalse):"},{"line_number":164,"context_line":"    # e.g: [\u0027/bin/systemctl\u0027, \u0027start\u0027, \u0027dnsmasq\u0027]"},{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_5aa2ecaf","line":163,"in_reply_to":"7f515b1d_66766aa7","updated":"2017-10-09 13:38:47.000000000","message":"Done","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1006d12324337212f32aa9ef666865ae3b185962","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"def _base_cmd(cmd, catch\u003dFalse):"},{"line_number":164,"context_line":"    # e.g: [\u0027/bin/systemctl\u0027, \u0027start\u0027, \u0027dnsmasq\u0027]"},{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"},{"line_number":167,"context_line":"    processutils.execute(*cmd, run_as_root\u003dTrue, root_helper\u003dbase_command,"},{"line_number":168,"context_line":"                         check_exit_code\u003dnot catch)"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_46792e91","line":165,"updated":"2017-10-06 09:16:32.000000000","message":"let\u0027s maybe use shlex.split to allow shell-style escaping there?","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"def _base_cmd(cmd, catch\u003dFalse):"},{"line_number":164,"context_line":"    # e.g: [\u0027/bin/systemctl\u0027, \u0027start\u0027, \u0027dnsmasq\u0027]"},{"line_number":165,"context_line":"    cmd \u003d cmd.split()"},{"line_number":166,"context_line":"    base_command \u003d _BASE_COMMAND.format(rootwrap_config\u003dCONF.rootwrap_config)"},{"line_number":167,"context_line":"    processutils.execute(*cmd, run_as_root\u003dTrue, root_helper\u003dbase_command,"},{"line_number":168,"context_line":"                         check_exit_code\u003dnot catch)"}],"source_content_type":"text/x-python","patch_set":57,"id":"7f515b1d_7ac36858","line":165,"in_reply_to":"7f515b1d_46792e91","updated":"2017-10-09 13:38:47.000000000","message":"Done","commit_id":"023f526f5e281926dbafa260b84749994b2410e4"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :raises: IOError, OSError."},{"line_number":57,"context_line":"        :returns: Nothing."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        LOG.debug(\u0027Syncing the driver\u0027)"},{"line_number":60,"context_line":"        active_macs \u003d node_cache.active_macs()"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_128e0dd0","line":57,"range":{"start_line":57,"start_character":18,"end_line":57,"end_character":25},"updated":"2017-10-30 14:59:26.000000000","message":"nit: None","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\"Sync the inspector, ironic and dnsmasq state. Locked."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :raises: IOError, OSError."},{"line_number":57,"context_line":"        :returns: Nothing."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        LOG.debug(\u0027Syncing the driver\u0027)"},{"line_number":60,"context_line":"        active_macs \u003d node_cache.active_macs()"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_69442fb8","line":57,"range":{"start_line":57,"start_character":18,"end_line":57,"end_character":25},"in_reply_to":"3f4b6375_128e0dd0","updated":"2017-10-30 21:10:10.000000000","message":"will fix","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        :raises: IOError, OSError."},{"line_number":57,"context_line":"        :returns: Nothing."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        LOG.debug(\u0027Syncing the driver\u0027)"},{"line_number":60,"context_line":"        active_macs \u003d node_cache.active_macs()"},{"line_number":61,"context_line":"        ironic_macs \u003d set(port.address for port in"},{"line_number":62,"context_line":"                          ironic.port.list(limit\u003d0, fields\u003d[\u0027address\u0027]))"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_329109f3","line":59,"range":{"start_line":59,"start_character":27,"end_line":59,"end_character":37},"updated":"2017-10-30 14:59:26.000000000","message":"I\u0027d specify `dnsmasq PXE filter` here","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        :raises: IOError, OSError."},{"line_number":57,"context_line":"        :returns: Nothing."},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        LOG.debug(\u0027Syncing the driver\u0027)"},{"line_number":60,"context_line":"        active_macs \u003d node_cache.active_macs()"},{"line_number":61,"context_line":"        ironic_macs \u003d set(port.address for port in"},{"line_number":62,"context_line":"                          ironic.port.list(limit\u003d0, fields\u003d[\u0027address\u0027]))"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_4913b3b9","line":59,"range":{"start_line":59,"start_character":27,"end_line":59,"end_character":37},"in_reply_to":"3f4b6375_329109f3","updated":"2017-10-30 21:10:10.000000000","message":"will fix","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":65,"context_line":"        # also whitelist active MACs"},{"line_number":66,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":67,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":68,"context_line":"            _whitelist_mac(mac)"},{"line_number":69,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":70,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_05ec89f1","line":67,"range":{"start_line":67,"start_character":21,"end_line":67,"end_character":49},"updated":"2017-10-30 14:59:26.000000000","message":"when does this happens?\n\nSo mac is blacklisted in dnsmasq and active in inspector in same time. I guess note would be nice","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":65,"context_line":"        # also whitelist active MACs"},{"line_number":66,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":67,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":68,"context_line":"            _whitelist_mac(mac)"},{"line_number":69,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":70,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_c987a3b6","line":67,"range":{"start_line":67,"start_character":21,"end_line":67,"end_character":49},"in_reply_to":"3f4b6375_05ec89f1","updated":"2017-10-30 21:10:10.000000000","message":"those that are currently blacklisted in the config files but shouldn\u0027t be cause inspection has just been asked for them","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"5e80877fe40d4fb418ab06cd4422f1958cd9ecf2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # whitelist MACs of ports not kept in ironic anymore"},{"line_number":65,"context_line":"        # also whitelist active MACs"},{"line_number":66,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":67,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":68,"context_line":"            _whitelist_mac(mac)"},{"line_number":69,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":70,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_40037643","line":67,"range":{"start_line":67,"start_character":21,"end_line":67,"end_character":49},"in_reply_to":"3f4b6375_c987a3b6","updated":"2017-10-31 08:59:13.000000000","message":"yeah, sorry, I still keep in mind old version, where we talked about 2 separate methods for this.","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param ironic: an ironic client instance."},{"line_number":83,"context_line":"        :raises: OSError, IOError."},{"line_number":84,"context_line":"        :returns: Nothing."},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":"        self._sync(ironic)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_05c5a95b","line":84,"range":{"start_line":84,"start_character":18,"end_line":84,"end_character":25},"updated":"2017-10-30 14:59:26.000000000","message":"nit: None","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :param ironic: an ironic client instance."},{"line_number":83,"context_line":"        :raises: OSError, IOError."},{"line_number":84,"context_line":"        :returns: Nothing."},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":"        self._sync(ironic)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_09b7fb88","line":84,"range":{"start_line":84,"start_character":18,"end_line":84,"end_character":25},"in_reply_to":"3f4b6375_05c5a95b","updated":"2017-10-30 21:10:10.000000000","message":"will fix","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."},{"line_number":110,"context_line":"             IOError in case of non-writable file or a record not being a file."},{"line_number":111,"context_line":"    :returns: Nothing."},{"line_number":112,"context_line":"    \"\"\""},{"line_number":113,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":114,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_c5e0b1cf","line":111,"range":{"start_line":111,"start_character":14,"end_line":111,"end_character":21},"updated":"2017-10-30 14:59:26.000000000","message":"nit:ditto","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    :raises: FileNotFoundError in case the dhcp_hostsdir is invalid."},{"line_number":110,"context_line":"             IOError in case of non-writable file or a record not being a file."},{"line_number":111,"context_line":"    :returns: Nothing."},{"line_number":112,"context_line":"    \"\"\""},{"line_number":113,"context_line":"    dhcp_hostsdir \u003d CONF.dnsmasq_pxe_filter.dhcp_hostsdir"},{"line_number":114,"context_line":"    LOG.debug(\u0027Purging %s\u0027, dhcp_hostsdir)"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_e9bb7f6f","line":111,"range":{"start_line":111,"start_character":14,"end_line":111,"end_character":21},"in_reply_to":"3f4b6375_c5e0b1cf","updated":"2017-10-30 21:10:10.000000000","message":"will fix","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7d4bd2bf52372fb8898211dc2936a9535e3343cb","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # also whitelist active MACs that are still blacklisted in the"},{"line_number":66,"context_line":"        # dnsmasq configuration but have just been asked to be introspected"},{"line_number":67,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":68,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":69,"context_line":"            _whitelist_mac(mac)"},{"line_number":70,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":71,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":60,"id":"3f4b6375_0e928c59","line":68,"range":{"start_line":68,"start_character":38,"end_line":68,"end_character":49},"updated":"2017-11-08 16:50:45.000000000","message":"can some of the active macs not be present in ironic macs? if they can not, it can be just blacklist-ironic. if they can, would be good to add a test for this case.","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"381c264a40d22a1bcdbd0914899890e24d764790","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # also whitelist active MACs that are still blacklisted in the"},{"line_number":66,"context_line":"        # dnsmasq configuration but have just been asked to be introspected"},{"line_number":67,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":68,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":69,"context_line":"            _whitelist_mac(mac)"},{"line_number":70,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":71,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":60,"id":"3f4b6375_8ebb1c74","line":68,"range":{"start_line":68,"start_character":38,"end_line":68,"end_character":49},"in_reply_to":"3f4b6375_0e928c59","updated":"2017-11-08 16:54:05.000000000","message":"doh, sorry, if they can not, it can be just blacklist_macs - (ironic_macs - active_macs)","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f1ae87f30a28520fa3f963c05567d808e6da57a1","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        # also whitelist active MACs that are still blacklisted in the"},{"line_number":66,"context_line":"        # dnsmasq configuration but have just been asked to be introspected"},{"line_number":67,"context_line":"        for mac in ((blacklist_macs - ironic_macs) |"},{"line_number":68,"context_line":"                    (blacklist_macs \u0026 active_macs)):"},{"line_number":69,"context_line":"            _whitelist_mac(mac)"},{"line_number":70,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":71,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"}],"source_content_type":"text/x-python","patch_set":60,"id":"1f485f77_fd93675b","line":68,"range":{"start_line":68,"start_character":38,"end_line":68,"end_character":49},"in_reply_to":"3f4b6375_8ebb1c74","updated":"2017-11-09 12:54:34.000000000","message":"so they can; if there was a node you removed from ironic, that had been inspected long ago. A sync run would detect that there have been MACs files on the file system not belonging to any node. Those should be whitelisted (as whitelisted is the default for unknown nodes).\n\nThis is IMO covered: https://review.openstack.org/#/c/466448/60/ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py@181","commit_id":"93348ce1fb3e3b7ae171107c8d07da6067222448"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":70,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"},{"line_number":71,"context_line":"            _blacklist_mac(mac)"},{"line_number":72,"context_line":"        LOG.debug(\u0027The dnsmasq PXE filter was synchronized\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.sync)"},{"line_number":75,"context_line":"    def sync(self, ironic):"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_00630944","line":72,"updated":"2017-11-15 09:04:38.000000000","message":"nit: to make this a bit more useful, you could include how much time it took","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # blacklist new ports that aren\u0027t being inspected"},{"line_number":70,"context_line":"        for mac in ironic_macs - (blacklist_macs | active_macs):"},{"line_number":71,"context_line":"            _blacklist_mac(mac)"},{"line_number":72,"context_line":"        LOG.debug(\u0027The dnsmasq PXE filter was synchronized\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @pxe_filter.locked_driver_event(pxe_filter.Events.sync)"},{"line_number":75,"context_line":"    def sync(self, ironic):"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_397e37af","line":72,"in_reply_to":"1f485f77_00630944","updated":"2017-11-15 15:53:55.000000000","message":"+1; Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def _execute(cmd\u003dNone, catch\u003dFalse):"},{"line_number":165,"context_line":"    # e.g: \u0027/bin/kill $(cat /var/run/dnsmasq.pid)\u0027"},{"line_number":166,"context_line":"    if not cmd:"},{"line_number":167,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_e0658d46","line":164,"updated":"2017-11-15 09:04:38.000000000","message":"s/catch/ignore_errors/","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    LOG.debug(\u0027Whitelisted %s\u0027, mac)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def _execute(cmd\u003dNone, catch\u003dFalse):"},{"line_number":165,"context_line":"    # e.g: \u0027/bin/kill $(cat /var/run/dnsmasq.pid)\u0027"},{"line_number":166,"context_line":"    if not cmd:"},{"line_number":167,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":63,"id":"1f485f77_3c2ce5aa","line":164,"in_reply_to":"1f485f77_e0658d46","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"}],"ironic_inspector/test/unit/test_dnsmasq_pxe_filter.py":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"54bafb45bedaedae09cfb24f44f8a688512ba6e9","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_fd.truncate.assert_called_once_with()"},{"line_number":181,"context_line":"        mock_fd.flush.assert_called_once_with()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test__blacklist_mac(self):"},{"line_number":184,"context_line":"        with mock.patch.object(six.moves.builtins, \u0027open\u0027,"},{"line_number":185,"context_line":"                               mock.mock_open()) as mock_open:"},{"line_number":186,"context_line":"            dnsmasq._blacklist_mac(self.mac)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_bf3effd7","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":28},"updated":"2017-05-26 14:40:54.000000000","message":"Looks like this test is failing in CI\nFAIL: test__blacklist_mac (ironic_inspector.test.unit.test_dnsmasq_pxe_filter.TestMACHandlers)\n2017-05-25 16:31:56.933094 | ironic_inspector.test.unit.test_dnsmasq_pxe_filter.TestMACHandlers.test__blacklist_mac\n2017-05-25 16:31:56.933349 | AssertionError: Expected \u0027join\u0027 to be called once. Called 5 times.","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"59ef7c6ae6b5e13b36a08e4501bec348e097f3a2","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        mock_fd.truncate.assert_called_once_with()"},{"line_number":181,"context_line":"        mock_fd.flush.assert_called_once_with()"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test__blacklist_mac(self):"},{"line_number":184,"context_line":"        with mock.patch.object(six.moves.builtins, \u0027open\u0027,"},{"line_number":185,"context_line":"                               mock.mock_open()) as mock_open:"},{"line_number":186,"context_line":"            dnsmasq._blacklist_mac(self.mac)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_ce968e95","line":183,"range":{"start_line":183,"start_character":8,"end_line":183,"end_character":28},"in_reply_to":"ff0f0b1f_bf3effd7","updated":"2017-05-27 19:19:19.000000000","message":"yeah I know. For some reason the os.path.join is called more often (13 on my host) so it\u0027s almost like it wasn\u0027t reset properly. I tried manually resetting it before the blacklist call without any effect :-/","commit_id":"b150f5151ac7ea3ff18a6e701b00bb7e56c4fc1c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":3,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":4,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_a8558cfc","line":1,"updated":"2017-10-30 14:59:26.000000000","message":"nit: redundant","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":1,"context_line":""},{"line_number":2,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":3,"context_line":"# you may not use this file except in compliance with the License."},{"line_number":4,"context_line":"# You may obtain a copy of the License at"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_49197386","line":1,"in_reply_to":"3f4b6375_a8558cfc","updated":"2017-10-30 21:10:10.000000000","message":"Oops","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f2fb24fd788b7515fd6889b9a1d47ceba19cf5f9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import fixtures"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from ironic_inspector.common import ironic as ir_utils"},{"line_number":24,"context_line":"from ironic_inspector import node_cache"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_e89944d0","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":27},"updated":"2017-10-30 14:59:26.000000000","message":"hmm, why doesn\u0027t pep8 fail","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"5bef3965885ef874f3b312368cdf7985fa2ce705","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import fixtures"},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import six"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_config import cfg"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from ironic_inspector.common import ironic as ir_utils"},{"line_number":24,"context_line":"from ironic_inspector import node_cache"}],"source_content_type":"text/x-python","patch_set":59,"id":"3f4b6375_89064b20","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":27},"in_reply_to":"3f4b6375_e89944d0","updated":"2017-10-30 21:10:10.000000000","message":"maybe got tricked by the first bunch of imports, gonna fix","commit_id":"1178887922d3c397f373d372d68784fb5ab9f5d3"}],"releasenotes/notes/dnsmasq-pxe-filter-37928d3fdb1e8ec3.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The **dnsmasq** PXE filter driver was introduced."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"df140735_6a12f5b3","line":4,"updated":"2017-05-29 08:50:36.000000000","message":"please include some details","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The **dnsmasq** PXE filter driver was introduced."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"df140735_1047274e","line":4,"in_reply_to":"df140735_6a12f5b3","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d34017e4ae2418f2e6e6b7735c2de65d8322561e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The **dnsmasq** PXE filter driver was introduced. This driver takes"},{"line_number":5,"context_line":"    advantage of the ``inotify`` facility to reconfigure the **dnsmasq** service"},{"line_number":6,"context_line":"    in real time to implement a caching black-/white-list of port MAC addresses."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"1f485f77_80db79eb","line":4,"updated":"2017-11-15 09:04:38.000000000","message":"nit: to follow our common style, \"Introduces the **dnsmasq** PXE filter drifer.\"","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"7266433a113b79944297fe7e52c9a48009a35626","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The **dnsmasq** PXE filter driver was introduced. This driver takes"},{"line_number":5,"context_line":"    advantage of the ``inotify`` facility to reconfigure the **dnsmasq** service"},{"line_number":6,"context_line":"    in real time to implement a caching black-/white-list of port MAC addresses."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"1f485f77_87dee66a","line":4,"in_reply_to":"1f485f77_80db79eb","updated":"2017-11-15 15:53:55.000000000","message":"Done","commit_id":"b2cc8fe22056ba2a81c2d42bdcbbf45c686dc97a"}],"rootwrap.d/ironic-inspector-dnsmasq-systemctl.filters":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"b7188e1cb15ecab0198c86a64b45d4809af9cc86","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# ironic-inspector-rootwrap command filters for systemctl start/stop dnsmasq"},{"line_number":2,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[Filters]"},{"line_number":5,"context_line":"# ironic_inspector/pxe_filter/dnsmasq.py"},{"line_number":6,"context_line":"systemctl: CommandFilter, systemctl, root, restart, ironic-inspector-dhcp"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"ff346bd7_bf9b63c7","line":3,"updated":"2017-07-25 06:15:22.000000000","message":"In general, this file is placed at etc/\u003cproject\u003e/rootwrap.d/, and included by etc/\u003cproject\u003e/rootwrap.conf, we can follow this convention.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"cc357782103c5e3603584195a0533f04d32fd615","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# ironic-inspector-rootwrap command filters for systemctl start/stop dnsmasq"},{"line_number":2,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[Filters]"},{"line_number":5,"context_line":"# ironic_inspector/pxe_filter/dnsmasq.py"},{"line_number":6,"context_line":"systemctl: CommandFilter, systemctl, root, restart, ironic-inspector-dhcp"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"df3967d1_2290fc49","line":3,"in_reply_to":"ff346bd7_53845d0c","updated":"2017-08-04 13:42:23.000000000","message":"we already have content there (the ironic-inspector-firewall.filters) so a follow-up would make more sense","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"76d9f7ef99b847692a08c3611b4b88ce7228ea78","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# ironic-inspector-rootwrap command filters for systemctl start/stop dnsmasq"},{"line_number":2,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[Filters]"},{"line_number":5,"context_line":"# ironic_inspector/pxe_filter/dnsmasq.py"},{"line_number":6,"context_line":"systemctl: CommandFilter, systemctl, root, restart, ironic-inspector-dhcp"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"ff346bd7_53845d0c","line":3,"in_reply_to":"ff346bd7_5460d901","updated":"2017-07-25 15:47:24.000000000","message":"I think what dtantsur means is we don\u0027t specify data_files in the project.\nFiles needed in package, the location where they are intalled, are specified by rpm specs (take rpm packaging as an example), that doesn\u0027t not relate to our directory structure here.","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"ae4355968227900424340fb30774a0a2d266f540","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# ironic-inspector-rootwrap command filters for systemctl start/stop dnsmasq"},{"line_number":2,"context_line":"# This file should be owned by (and only-writeable by) the root user"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"[Filters]"},{"line_number":5,"context_line":"# ironic_inspector/pxe_filter/dnsmasq.py"},{"line_number":6,"context_line":"systemctl: CommandFilter, systemctl, root, restart, ironic-inspector-dhcp"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"ff346bd7_5460d901","line":3,"in_reply_to":"ff346bd7_bf9b63c7","updated":"2017-07-25 07:38:32.000000000","message":"that\u0027s up to packaging (see also previous review by dtantsur) https://review.openstack.org/#/c/466448/15/setup.cfg","commit_id":"99ca210730ede48b5beeb938e663d8a1dc2aed95"}],"setup.cfg":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc5f221f7c1f8cd0899efbc8c17628af3bfcd71d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    ironic_inspector"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"data_files \u003d"},{"line_number":24,"context_line":"    etc/ironic-inspector/dhcp-hostsdir \u003d"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"[entry_points]"},{"line_number":27,"context_line":"console_scripts \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":15,"id":"df140735_4a273114","line":24,"updated":"2017-05-29 08:50:36.000000000","message":"this should be left to packaging, I think","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3c39e754e04cca0e84cd7477b6a1dceab6c8284a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    ironic_inspector"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"data_files \u003d"},{"line_number":24,"context_line":"    etc/ironic-inspector/dhcp-hostsdir \u003d"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"[entry_points]"},{"line_number":27,"context_line":"console_scripts \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":15,"id":"df140735_4647251f","line":24,"in_reply_to":"df140735_4a273114","updated":"2017-05-31 11:32:23.000000000","message":"Done","commit_id":"c9800dae134ddb9b021dcc96b731bdc7058d9cd0"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2c38c4aaf6c7ff06e8cf0cc0d1dd259bafa3848b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"packages \u003d"},{"line_number":21,"context_line":"    ironic_inspector"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"data_files \u003d"},{"line_number":24,"context_line":"    etc/ironic-inspector/dhcp-hostsdir \u003d"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"[entry_points]"},{"line_number":27,"context_line":"console_scripts \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":21,"id":"df140735_5a15689b","line":24,"range":{"start_line":23,"start_character":0,"end_line":24,"end_character":40},"updated":"2017-10-09 13:38:47.000000000","message":"Oops, needs removing","commit_id":"6b303efe7b62c82b7445aa1700accd1aca271af4"}]}
