)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"87ebd6de3d4861f7cc08f69936e70c3f072ab771","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - https://review.openstack.org/#/c/196927/"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_816b671d","line":14,"updated":"2015-07-23 17:03:49.000000000","message":"Use commit 9d800021293d8564ced1c071b6415d9a97b3ef49 rather than a gerrit url.","commit_id":"00b0fbae38617f653b10628d109813dd531f90ba"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"7cfa25198748068c0dc92a863fc706fc736c22db","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - https://review.openstack.org/#/c/196927/"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_68a62855","line":14,"in_reply_to":"3a50d1a3_816b671d","updated":"2015-07-24 03:51:22.000000000","message":"Done","commit_id":"00b0fbae38617f653b10628d109813dd531f90ba"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"28dd5d1b6a64d0b1d394e02c5e1f60d156d93d03","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid stacktrace when dhcp port is deleted"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a dhcp port is deleted, dhcp agent dumps lots of stacktrace"},{"line_number":10,"context_line":"messages which makes debugging gate failures a bit difficult."},{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_281237b5","line":9,"updated":"2015-08-24 12:58:49.000000000","message":"Can you say more precisely what you mean by deleted?  For example, I guess you might mean (1) deleted by the Neutron server, or (2) that the Linux device on the DHCP agent host has been deleted.  If it\u0027s (1), what is the wider scenario for that? - e.g. is it when a subnet was previously DHCP enabled and is then changed to have DHCP disabled?  Also, does the stacktrace happen every time that such a deletion happens?  Or does it only happen sometimes, depending on some other conditions?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"bec7227cbb908b395fad7294e6f4eb4a14940763","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid stacktrace when dhcp port is deleted"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a dhcp port is deleted, dhcp agent dumps lots of stacktrace"},{"line_number":10,"context_line":"messages which makes debugging gate failures a bit difficult."},{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_f65f3273","line":9,"in_reply_to":"fa1b9901_281237b5","updated":"2015-08-24 17:39:11.000000000","message":"@Neil, by deleted I mean when a user deletes a \"network:dhcp\" port (albeit accidentally) by issuing the command \"neutron port-delete \u003cdhcp-port-id\u003e. \n\nThe current behavior in neutron [1] is to re-create the dhcp_port in such a situation. This patch addresses the issue by retaining the existing behavior and simply logs a message instead of the stacktrace.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid stacktrace when dhcp port is deleted"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a dhcp port is deleted, dhcp agent dumps lots of stacktrace"},{"line_number":10,"context_line":"messages which makes debugging gate failures a bit difficult."},{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_7891bd51","line":9,"in_reply_to":"fa1b9901_c6e6f1e7","updated":"2015-08-25 03:46:25.000000000","message":"Ok, I\u0027ll try to add some more details in the commit message. \n\nOTOH, please note that this patch is NOT addressing the dhcp-port deletion. It is simply addressing the stacktrace which is the current behavior in Neutron. \n\nEarlier, there was an effort to prevent deleting the dhcp-port from the API [*], which was not ok\u0027ed and only after that the dhcp-port re-creation patch was merged [**]. \n[*] https://review.openstack.org/#/c/198949/\n[**] https://review.openstack.org/#/c/196927/","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"bee308c5f12ca69cd2d6e07848b1e6e04fca5231","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid stacktrace when dhcp port is deleted"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a dhcp port is deleted, dhcp agent dumps lots of stacktrace"},{"line_number":10,"context_line":"messages which makes debugging gate failures a bit difficult."},{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_c6e6f1e7","line":9,"in_reply_to":"fa1b9901_f65f3273","updated":"2015-08-24 22:47:09.000000000","message":"That\u0027s really helpful.  I think it would be great to say this in the commit message.\n\nAlthough, actually, I\u0027m still not quite fully understanding this. Is there a scenario in which it makes sense for a user or operator to do \"neutron port-delete \u003cdhcp-port-id\u003e\"?  (Perhaps they don\u0027t know that it\u0027s a DHCP port?)  If not, why do we care enough to make this change at all?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"28dd5d1b6a64d0b1d394e02c5e1f60d156d93d03","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - 9d800021293d8564ced1c071b6415d9a97b3ef49"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_88e02398","line":14,"updated":"2015-08-24 12:58:49.000000000","message":"I think nicer to provide a link here:\nhttp://git.openstack.org/cgit/openstack/neutron/commit/?id\u003d9d80002","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"bee308c5f12ca69cd2d6e07848b1e6e04fca5231","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - 9d800021293d8564ced1c071b6415d9a97b3ef49"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_86ca394e","line":14,"in_reply_to":"fa1b9901_1698a61a","updated":"2015-08-24 22:47:09.000000000","message":"I think it\u0027s possible to satisfy both Matt\u0027s and my suggestion at the same time - and that the link that I suggested does that.  IIUC,\n\n- his point is to use a future-proof Git commit ID, instead of a Gerrit number\n\n- my point is that the reference should be a clickable link, rather than _just_ a commit ID.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - 9d800021293d8564ced1c071b6415d9a97b3ef49"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_b801956c","line":14,"in_reply_to":"fa1b9901_86ca394e","updated":"2015-08-25 03:46:25.000000000","message":"Although I\u0027m not fully convinced if this change is required, there is no harm in using the URL. So, lets do it.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"bec7227cbb908b395fad7294e6f4eb4a14940763","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch modifies the stacktrace to a simple warning and retains"},{"line_number":12,"context_line":"the current behavior of re-creating [1] the dhcp-port in such situations."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[1] - 9d800021293d8564ced1c071b6415d9a97b3ef49"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1477190"},{"line_number":17,"context_line":"Change-Id: I7e8ef4edd320a0f8cd6fa51ff50140435e8f1f12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_1698a61a","line":14,"in_reply_to":"fa1b9901_88e02398","updated":"2015-08-24 17:39:11.000000000","message":"I\u0027ve used the commit-id based on the previous review comments. \nPlease see - https://review.openstack.org/#/c/205101/1//COMMIT_MSG","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"}],"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0f331d1e233db74804369130515af655455947ba","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                and e.exc_type \u003d\u003d \u0027NetworkNotFound\u0027"},{"line_number":133,"context_line":"                or isinstance(e, exceptions.NetworkNotFound)):"},{"line_number":134,"context_line":"                LOG.warning(_LW(\"Network %s has been deleted.\"), network.id)"},{"line_number":135,"context_line":"            elif (isinstance(e, exceptions.PortNotFound)):"},{"line_number":136,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":137,"context_line":"                            network.id)"},{"line_number":138,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_07c40a3e","line":135,"updated":"2015-07-24 18:41:54.000000000","message":"embedding parenthesis are not needed","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0f331d1e233db74804369130515af655455947ba","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                or isinstance(e, exceptions.NetworkNotFound)):"},{"line_number":134,"context_line":"                LOG.warning(_LW(\"Network %s has been deleted.\"), network.id)"},{"line_number":135,"context_line":"            elif (isinstance(e, exceptions.PortNotFound)):"},{"line_number":136,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":137,"context_line":"                            network.id)"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_07e5eaa6","line":136,"updated":"2015-07-24 18:41:54.000000000","message":"it changes the behavior for all actions, it seems not inline with commit message (nor bug?).\n\nShould we change the condition to:\n\n  action \u003d\u003d \u0027...\u0027 and isinstance(...)","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"f9a234c55e9342740872c295bd2e2f46f4fdc61f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                or isinstance(e, exceptions.NetworkNotFound)):"},{"line_number":134,"context_line":"                LOG.warning(_LW(\"Network %s has been deleted.\"), network.id)"},{"line_number":135,"context_line":"            elif (isinstance(e, exceptions.PortNotFound)):"},{"line_number":136,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":137,"context_line":"                            network.id)"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_84467c79","line":136,"in_reply_to":"3a50d1a3_07e5eaa6","updated":"2015-07-28 06:29:18.000000000","message":"Done","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"28dd5d1b6a64d0b1d394e02c5e1f60d156d93d03","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            elif (action \u003d\u003d \u0027reload_allocations\u0027"},{"line_number":136,"context_line":"                  and isinstance(e, exceptions.PortNotFound)):"},{"line_number":137,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":138,"context_line":"                            network.id)"},{"line_number":139,"context_line":"            else:"},{"line_number":140,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"},{"line_number":141,"context_line":"                              {\u0027net_id\u0027: network.id, \u0027action\u0027: action})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_c8729be3","line":138,"updated":"2015-08-24 12:58:49.000000000","message":"What should I, as an operator, do, if I see this warning in my logs?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            elif (action \u003d\u003d \u0027reload_allocations\u0027"},{"line_number":136,"context_line":"                  and isinstance(e, exceptions.PortNotFound)):"},{"line_number":137,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":138,"context_line":"                            network.id)"},{"line_number":139,"context_line":"            else:"},{"line_number":140,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"},{"line_number":141,"context_line":"                              {\u0027net_id\u0027: network.id, \u0027action\u0027: action})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b838b53e","line":138,"in_reply_to":"fa1b9901_214d5799","updated":"2015-08-25 03:46:25.000000000","message":"You can read my previous comments. Anyway, for the sake of completeness, yes there was a patch that was proposed previously which was abandoned - https://review.openstack.org/#/c/198949/","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"bee308c5f12ca69cd2d6e07848b1e6e04fca5231","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            elif (action \u003d\u003d \u0027reload_allocations\u0027"},{"line_number":136,"context_line":"                  and isinstance(e, exceptions.PortNotFound)):"},{"line_number":137,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":138,"context_line":"                            network.id)"},{"line_number":139,"context_line":"            else:"},{"line_number":140,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"},{"line_number":141,"context_line":"                              {\u0027net_id\u0027: network.id, \u0027action\u0027: action})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_214d5799","line":138,"in_reply_to":"fa1b9901_56537e39","updated":"2015-08-24 22:47:09.000000000","message":"OK, but I can\u0027t help feeling that this is all a bit strange.  Wouldn\u0027t it be better for Neutron simply to disallow deleting the DHCP port of a DHCP-enabled subnet?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"bec7227cbb908b395fad7294e6f4eb4a14940763","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            elif (action \u003d\u003d \u0027reload_allocations\u0027"},{"line_number":136,"context_line":"                  and isinstance(e, exceptions.PortNotFound)):"},{"line_number":137,"context_line":"                LOG.warning(_LW(\"DHCP port is missing on the network %s.\"),"},{"line_number":138,"context_line":"                            network.id)"},{"line_number":139,"context_line":"            else:"},{"line_number":140,"context_line":"                LOG.exception(_LE(\u0027Unable to %(action)s dhcp for %(net_id)s.\u0027),"},{"line_number":141,"context_line":"                              {\u0027net_id\u0027: network.id, \u0027action\u0027: action})"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_56537e39","line":138,"in_reply_to":"fa1b9901_c8729be3","updated":"2015-08-24 17:39:11.000000000","message":"If the dhcp-port was accidentally deleted and this log appears in the dhcp logs, it can be ignored. If not, the cause for the warning can be investigated.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"358db6aa9ff8ce8562eee670efab7ce4ede112e5","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        if not dhcp_port_exists:"},{"line_number":676,"context_line":"            self.device_manager.driver.unplug("},{"line_number":677,"context_line":"                self.interface_name, namespace\u003dself.network.namespace)"},{"line_number":678,"context_line":"        else:"},{"line_number":679,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":680,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_1ba92990","line":678,"updated":"2015-08-12 21:08:20.000000000","message":"We need a comment here explaining why we only release leases if the dhcp port is not present. It\u0027s not obvious to me why.","commit_id":"7a1f952f191025e12367ad476073256fe5a011da"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"71ace1af3e3adb2c1348219ae8fa6a0f34176a21","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        if not dhcp_port_exists:"},{"line_number":676,"context_line":"            self.device_manager.driver.unplug("},{"line_number":677,"context_line":"                self.interface_name, namespace\u003dself.network.namespace)"},{"line_number":678,"context_line":"        else:"},{"line_number":679,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":680,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_c5187221","line":678,"in_reply_to":"1a4dcd0f_0fa32301","updated":"2015-08-14 09:28:46.000000000","message":"@Kevin and @Armando, as you know, we use dhcp_release binary to release the dhcp leases and it takes the interface as one of the argument. When the interface (i.e., dhcp tap interface) is missing and we try to invoke the utility we get errors. This patch avoids calling dhcp_release when dhcp port is deleted.  \n\n(Note: JFYI, there are more than 2500 hits for this issue in the last 7 days)\n\nI\u0027ll add a comment here to clarify the reason.\n\n2015-07-22 09:30:43.303 8230 ERROR neutron.agent.dhcp.agent Command: [\u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, u\u0027qdhcp-301ef35d-2482-4a13-a088-f456958e878a\u0027, \u0027dhcp_release\u0027, \u0027tapcb2fa9dc-f6\u0027, \u00272003::e6ef:eb57:47b4:91cf\u0027, \u0027fa:16:3e:18:e6:78\u0027]\n2015-07-22 09:30:43.303 8230 ERROR neutron.agent.dhcp.agent Exit code: 1\n2015-07-22 09:30:43.303 8230 ERROR neutron.agent.dhcp.agent Stdin:\n2015-07-22 09:30:43.303 8230 ERROR neutron.agent.dhcp.agent Stdout:\n2015-07-22 09:30:43.303 8230 ERROR neutron.agent.dhcp.agent Stderr: cannot setup interface: No such device","commit_id":"7a1f952f191025e12367ad476073256fe5a011da"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea865a3442a587f18bf9344c7376b829dbe94808","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        if not dhcp_port_exists:"},{"line_number":676,"context_line":"            self.device_manager.driver.unplug("},{"line_number":677,"context_line":"                self.interface_name, namespace\u003dself.network.namespace)"},{"line_number":678,"context_line":"        else:"},{"line_number":679,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":680,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_0fa32301","line":678,"in_reply_to":"1a4dcd0f_1ba92990","updated":"2015-08-12 23:14:31.000000000","message":"Well, I\u0027d want to see justified why this move is necessary in the first place, it looks to me that the release should be unconditional.","commit_id":"7a1f952f191025e12367ad476073256fe5a011da"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"28dd5d1b6a64d0b1d394e02c5e1f60d156d93d03","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_4b02050b","line":459,"updated":"2015-08-24 12:58:49.000000000","message":"What about DeviceNotFoundError instead?  It seems to me that that corresponds better to a failure of ip_lib.device_exists","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"bec7227cbb908b395fad7294e6f4eb4a14940763","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_d63d4ede","line":459,"in_reply_to":"fa1b9901_4b02050b","updated":"2015-08-24 17:39:11.000000000","message":"IMHO, since this is more about the dhcp-port that is missing PortNotFound seems to be more apt.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_f8caad19","line":459,"in_reply_to":"fa1b9901_86db19ed","updated":"2015-08-25 03:46:25.000000000","message":"ip_lib uses the term device whereas Neutron uses the term port. I honestly feel that PortNotFound is more apt here. \n\nDHCP Port is missing sounds more meaningful than DHPC device not found.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"bee308c5f12ca69cd2d6e07848b1e6e04fca5231","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_86db19ed","line":459,"in_reply_to":"fa1b9901_d63d4ede","updated":"2015-08-24 22:47:09.000000000","message":"But the condition being tested right here corresponds precisely to DeviceNotFound.\n\nIf you want to raise PortNotFound, you should instead do a lookup for the existing DHCP port, like the \"Look for an existing DHCP for this network\" block in _setup_existing_dhcp_port, and raise if that doesn\u0027t find anything.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"28dd5d1b6a64d0b1d394e02c5e1f60d156d93d03","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_4b9e85b9","line":702,"updated":"2015-08-24 12:58:49.000000000","message":"Does it matter, though?  If dhcp_release will fail in some benign way, when the interface does not exist, perhaps it would be better to continue invoking it anyway, instead of adding a complication to the code here?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"bec7227cbb908b395fad7294e6f4eb4a14940763","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_f981654e","line":702,"in_reply_to":"fa1b9901_4b9e85b9","updated":"2015-08-24 17:39:11.000000000","message":"Please see - https://review.openstack.org/#/c/205101/3/neutron/agent/linux/dhcp.py","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_f8bf0d5e","line":702,"in_reply_to":"fa1b9901_c19edb06","updated":"2015-08-25 03:46:25.000000000","message":"We are checking if dhcp agent has a port which matches the DHCP device-id for this host in the list of ports in self.network. If the network:dhcp port was previously deleted by the user (via API), the entry would be missing. IMHO, the existing code is more readable.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"bee308c5f12ca69cd2d6e07848b1e6e04fca5231","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_c19edb06","line":702,"in_reply_to":"fa1b9901_f981654e","updated":"2015-08-24 22:47:09.000000000","message":"OK, so far as why the change is bothering to avoid calling dhcp_release.\n\nBut - here you are again mixing up the DeviceNotFound and PortNotFound conditions.  The correct condition for calling _release_lease is that the Linux device must exist - but here you are instead using the existence of the DHCP port.  I think the code should be:\n\n    if Linux device exists:\n        for old_leases - new_leases:\n            _release_lease(...)\n\n    if not dhcp_port_exists:\n        unplug VIF","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"7a7823701a6a563bb57a07ad94f34d37652f32b9","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_cad7efbd","line":459,"updated":"2015-08-27 17:02:29.000000000","message":"My concern from the previous PS still stands.\n\nYou most recently wrote \"ip_lib uses the term device whereas Neutron uses the term port.\"  So perhaps the misunderstanding here is that you think this is just a matter of naming.\n\nBut it is not just a matter of naming.  The implementation of ip_lib.device_exists boils down (on Linux) to running \"ip link show ...\", and the point is that it is checking whether the underlying Linux interface (aka device) exists.\n\nSo, the condition that you are checking for, here, is DeviceNotFound.\n\nThe non-existence of the corresponding Port object, in the DHCP agent\u0027s network cache, is what would correspond to PortNotFound.  But it is entirely possible for the Linux device existence and Port existence to become inconsistent with each other:\n\n- An operator could accidentally delete the Linux device by hand.\n\n- I can imagine future reasons why there might be a window, during delete processing, between when the Port object is deleted, and when the Linux device is deleted.  (And it could be in either order.)\n\nSo, I do find it unhelpful if the code uses an exception that is wrongly named for the condition that it has actually tested.","commit_id":"bd205bb5bc22b0d9d763f5328cc90a57d59eca0d"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"d2be1e41347ec18498a6d062f4568a321018f03b","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            self.device_manager.update(self.network, self.interface_name)"},{"line_number":457,"context_line":"        else:"},{"line_number":458,"context_line":"            dhcp_port_id \u003d self.device_manager.get_device_id(self.network)"},{"line_number":459,"context_line":"            raise exceptions.PortNotFound(port_id\u003ddhcp_port_id)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def _sort_fixed_ips_for_dnsmasq(self, fixed_ips, v6_nets):"},{"line_number":462,"context_line":"        \"\"\"Sort fixed_ips so that stateless IPv6 subnets appear first."}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_971c8d78","line":459,"in_reply_to":"da20952f_cad7efbd","updated":"2015-08-28 14:55:07.000000000","message":"@Neil, I can modify the patch to DeviceNotFound instead of PortNotFound. \n\nSince this concern was not raised by the previous reviewers who were fine with PortNotFound, I\u0027ll give sometime to get the views of other reviewers about this change before I modify it and re-spin a new patch. Thanks.","commit_id":"bd205bb5bc22b0d9d763f5328cc90a57d59eca0d"},{"author":{"_account_id":13734,"name":"Nell Jerram","email":"nell@tigera.io","username":"neiljerram"},"change_message_id":"7a7823701a6a563bb57a07ad94f34d37652f32b9","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_5551440d","line":702,"updated":"2015-08-27 17:02:29.000000000","message":"My concern from the previous PS about confusing DeviceNotFound and PortNotFound conditions still stands here.\n\nYou have explained that the reason for changing the code in this area is to avoid generating worrying error output from dhcp_release, in the log.  dhcp_release will generate that error output if the Linux device does not still exist.\n\nTherefore, you should use ip_lib.device_exists to check for that, and not the check for the Port object as in the current PS.\n\nIf you\u0027re not concerned about getting this exactly right, I really don\u0027t see the point of submitting this change at all.","commit_id":"bd205bb5bc22b0d9d763f5328cc90a57d59eca0d"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"d2be1e41347ec18498a6d062f4568a321018f03b","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            # dhcp_release requires the interface to be present to simulate"},{"line_number":700,"context_line":"            # the release request coming from the client."},{"line_number":701,"context_line":"            for ip, mac, client_id in old_leases - new_leases:"},{"line_number":702,"context_line":"                self._release_lease(mac, ip, client_id)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def _output_addn_hosts_file(self):"},{"line_number":705,"context_line":"        \"\"\"Writes a dnsmasq compatible additional hosts file."}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_aa4cc470","line":702,"in_reply_to":"da20952f_5551440d","updated":"2015-08-28 14:55:07.000000000","message":"ditto.","commit_id":"bd205bb5bc22b0d9d763f5328cc90a57d59eca0d"}],"neutron/tests/unit/agent/linux/test_dhcp.py":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    id \u003d \u0027aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa\u0027"},{"line_number":53,"context_line":"    admin_state_up \u003d True"},{"line_number":54,"context_line":"    device_owner \u003d \u0027network:dhcp\u0027"},{"line_number":55,"context_line":"    fixed_ips \u003d [FakeIPAllocation(\u0027192.168.0.10\u0027,"},{"line_number":56,"context_line":"                                  \u0027dddddddd-dddd-dddd-dddd-dddddddddddd\u0027)]"},{"line_number":57,"context_line":"    mac_address \u003d \u002700:00:80:aa:bb:ee\u0027"},{"line_number":58,"context_line":"    device_id \u003d \u0027fake_dhcp_port\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_9331eb5c","line":55,"updated":"2015-07-27 21:59:27.000000000","message":"Probably should be .2 since .1 is usually the router port","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"f9a234c55e9342740872c295bd2e2f46f4fdc61f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    id \u003d \u0027aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa\u0027"},{"line_number":53,"context_line":"    admin_state_up \u003d True"},{"line_number":54,"context_line":"    device_owner \u003d \u0027network:dhcp\u0027"},{"line_number":55,"context_line":"    fixed_ips \u003d [FakeIPAllocation(\u0027192.168.0.10\u0027,"},{"line_number":56,"context_line":"                                  \u0027dddddddd-dddd-dddd-dddd-dddddddddddd\u0027)]"},{"line_number":57,"context_line":"    mac_address \u003d \u002700:00:80:aa:bb:ee\u0027"},{"line_number":58,"context_line":"    device_id \u003d \u0027fake_dhcp_port\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_c4500435","line":55,"in_reply_to":"3a50d1a3_9331eb5c","updated":"2015-07-28 06:29:18.000000000","message":"@Sean, 192.168.0.2 is used for other ports at couple of places in this file (for example at L67 below). \n\nSo, i will not be able to use 192.168.0.2 here and if its really required, I\u0027ll have to modify many other tests in this file. On the other hand, as you know, this is only a unit test so any IP as long as its valid in the subnet should be fine.","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"            \u002700:00:0f:aa:bb:cc 192.168.0.3 * *\u0027,"},{"line_number":1062,"context_line":"            \u002700:00:0f:aa:bb:cc [fdca:3ba5:a17a:4ba3::3] * *\u0027,"},{"line_number":1063,"context_line":"            \u002700:00:0f:rr:rr:rr 192.168.0.1 * *\u0027,"},{"line_number":1064,"context_line":"            \u002700:00:80:aa:bb:ee 192.168.0.10 * *\\n\u0027]"},{"line_number":1065,"context_line":"        expected \u003d \"\\n\".join([\u0027%s %s\u0027 % (timestamp, l) for l in expected])"},{"line_number":1066,"context_line":"        with mock.patch.object(dhcp.Dnsmasq, \u0027get_conf_file_name\u0027) as conf_fn:"},{"line_number":1067,"context_line":"            conf_fn.return_value \u003d \u0027/foo/leases\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_3332575f","line":1064,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1361,"context_line":"                         \u0027[fdca:3ba5:a17a:4ba3::3]\\n\u0027"},{"line_number":1362,"context_line":"                         \u002700:00:0f:rr:rr:rr,host-192-168-0-1,\u0027"},{"line_number":1363,"context_line":"                         \u0027192.168.0.1\\n\u0027"},{"line_number":1364,"context_line":"                         \u002700:00:80:aa:bb:ee,host-192-168-0-10,\u0027"},{"line_number":1365,"context_line":"                         \u0027192.168.0.10\\n\u0027).lstrip()"},{"line_number":1366,"context_line":"        exp_addn_name \u003d \u0027/dhcp/cccccccc-cccc-cccc-cccc-cccccccccccc/addn_hosts\u0027"},{"line_number":1367,"context_line":"        exp_addn_data \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_5337e34c","line":1364,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1362,"context_line":"                         \u002700:00:0f:rr:rr:rr,host-192-168-0-1,\u0027"},{"line_number":1363,"context_line":"                         \u0027192.168.0.1\\n\u0027"},{"line_number":1364,"context_line":"                         \u002700:00:80:aa:bb:ee,host-192-168-0-10,\u0027"},{"line_number":1365,"context_line":"                         \u0027192.168.0.10\\n\u0027).lstrip()"},{"line_number":1366,"context_line":"        exp_addn_name \u003d \u0027/dhcp/cccccccc-cccc-cccc-cccc-cccccccccccc/addn_hosts\u0027"},{"line_number":1367,"context_line":"        exp_addn_data \u003d ("},{"line_number":1368,"context_line":"            \u0027192.168.0.2\\t\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f3406fa7","line":1365,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1380,"context_line":"            \u0027host-192-168-0-1\\n\u0027"},{"line_number":1381,"context_line":"            \u0027192.168.0.10\\t\u0027"},{"line_number":1382,"context_line":"            \u0027host-192-168-0-10 \u0027"},{"line_number":1383,"context_line":"            \u0027host-192-168-0-10\\n\u0027"},{"line_number":1384,"context_line":"        ).lstrip()"},{"line_number":1385,"context_line":"        return (exp_host_name, exp_host_data,"},{"line_number":1386,"context_line":"                exp_addn_name, exp_addn_data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_133e3b28","line":1383,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1398,"context_line":"                         \u0027openstacklocal,[fdca:3ba5:a17a:4ba3::3]\\n\u0027"},{"line_number":1399,"context_line":"                         \u002700:00:0f:rr:rr:rr,host-192-168-0-1.openstacklocal,\u0027"},{"line_number":1400,"context_line":"                         \u0027192.168.0.1\\n\u0027"},{"line_number":1401,"context_line":"                         \u002700:00:80:aa:bb:ee,host-192-168-0-10.openstacklocal,\u0027"},{"line_number":1402,"context_line":"                         \u0027192.168.0.10\\n\u0027).lstrip()"},{"line_number":1403,"context_line":"        exp_addn_name \u003d \u0027/dhcp/cccccccc-cccc-cccc-cccc-cccccccccccc/addn_hosts\u0027"},{"line_number":1404,"context_line":"        exp_addn_data \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b34667be","line":1401,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"                         \u002700:00:0f:rr:rr:rr,host-192-168-0-1.openstacklocal,\u0027"},{"line_number":1400,"context_line":"                         \u0027192.168.0.1\\n\u0027"},{"line_number":1401,"context_line":"                         \u002700:00:80:aa:bb:ee,host-192-168-0-10.openstacklocal,\u0027"},{"line_number":1402,"context_line":"                         \u0027192.168.0.10\\n\u0027).lstrip()"},{"line_number":1403,"context_line":"        exp_addn_name \u003d \u0027/dhcp/cccccccc-cccc-cccc-cccc-cccccccccccc/addn_hosts\u0027"},{"line_number":1404,"context_line":"        exp_addn_data \u003d ("},{"line_number":1405,"context_line":"            \u0027192.168.0.2\\t\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_d343f3ad","line":1402,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1415,"context_line":"            \u0027192.168.0.1\\t\u0027"},{"line_number":1416,"context_line":"            \u0027host-192-168-0-1.openstacklocal \u0027"},{"line_number":1417,"context_line":"            \u0027host-192-168-0-1\\n\u0027"},{"line_number":1418,"context_line":"            \u0027192.168.0.10\\t\u0027"},{"line_number":1419,"context_line":"            \u0027host-192-168-0-10.openstacklocal \u0027"},{"line_number":1420,"context_line":"            \u0027host-192-168-0-10\\n\u0027"},{"line_number":1421,"context_line":"        ).lstrip()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_7313ffb8","line":1418,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"ab1da56869ef812e0ebcaecd787ff15f6c53d3b1","unresolved":false,"context_lines":[{"line_number":1417,"context_line":"            \u0027host-192-168-0-1\\n\u0027"},{"line_number":1418,"context_line":"            \u0027192.168.0.10\\t\u0027"},{"line_number":1419,"context_line":"            \u0027host-192-168-0-10.openstacklocal \u0027"},{"line_number":1420,"context_line":"            \u0027host-192-168-0-10\\n\u0027"},{"line_number":1421,"context_line":"        ).lstrip()"},{"line_number":1422,"context_line":"        exp_opt_name \u003d \u0027/dhcp/cccccccc-cccc-cccc-cccc-cccccccccccc/opts\u0027"},{"line_number":1423,"context_line":"        fake_v6 \u003d \u00272001:0200:feed:7ac0::1\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_93180bd5","line":1420,"updated":"2015-07-27 21:59:27.000000000","message":".2","commit_id":"b6af7f45d47b00c6b675b29312cfe8d168d41eef"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ea865a3442a587f18bf9344c7376b829dbe94808","unresolved":false,"context_lines":[{"line_number":461,"context_line":"    id \u003d \u0027cccccccc-cccc-cccc-cccc-cccccccccccc\u0027"},{"line_number":462,"context_line":"    subnets \u003d [FakeV4Subnet(), FakeV6SubnetDHCPStateful()]"},{"line_number":463,"context_line":"    ports \u003d [FakePort1(), FakeV6Port(), FakeDualPort(), FakeRouterPort(),"},{"line_number":464,"context_line":"             FakeDhcpPort()]"},{"line_number":465,"context_line":"    namespace \u003d \u0027qdhcp-ns\u0027"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_4fd28b5d","line":464,"updated":"2015-08-12 23:14:31.000000000","message":"Please do not re-use this \u0027fixture\u0027, consider adding a new one with relative testcase to validate your fix.","commit_id":"7a1f952f191025e12367ad476073256fe5a011da"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"71ace1af3e3adb2c1348219ae8fa6a0f34176a21","unresolved":false,"context_lines":[{"line_number":461,"context_line":"    id \u003d \u0027cccccccc-cccc-cccc-cccc-cccccccccccc\u0027"},{"line_number":462,"context_line":"    subnets \u003d [FakeV4Subnet(), FakeV6SubnetDHCPStateful()]"},{"line_number":463,"context_line":"    ports \u003d [FakePort1(), FakeV6Port(), FakeDualPort(), FakeRouterPort(),"},{"line_number":464,"context_line":"             FakeDhcpPort()]"},{"line_number":465,"context_line":"    namespace \u003d \u0027qdhcp-ns\u0027"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_39f5bbca","line":464,"in_reply_to":"1a4dcd0f_4fd28b5d","updated":"2015-08-14 09:28:46.000000000","message":"Done","commit_id":"7a1f952f191025e12367ad476073256fe5a011da"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"617a6209ac92794916f6a59551198e696b68a373","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1530,"context_line":"        dnsmasq.network.ports \u003d [FakeDhcpPort()]"},{"line_number":1531,"context_line":"        dnsmasq.device_manager.get_device_id \u003d mock.Mock("},{"line_number":1532,"context_line":"            return_value\u003d\u0027fake_dhcp_port\u0027)"},{"line_number":1533,"context_line":"        dnsmasq._release_unused_leases()"},{"line_number":1534,"context_line":"        # Verify that dhcp_release is called only for ipv4 addresses."},{"line_number":1535,"context_line":"        self.assertEqual(1, ipw.call_count)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_f2e233d4","line":1532,"updated":"2015-08-21 14:59:24.000000000","message":"Seems like there should be a refactor to move a lot of this init stuff into _get_dnsmasq() as you had to change most callers to do this.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"562dd95852ce8e89e26f36b0deb0877fefd3a360","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1530,"context_line":"        dnsmasq.network.ports \u003d [FakeDhcpPort()]"},{"line_number":1531,"context_line":"        dnsmasq.device_manager.get_device_id \u003d mock.Mock("},{"line_number":1532,"context_line":"            return_value\u003d\u0027fake_dhcp_port\u0027)"},{"line_number":1533,"context_line":"        dnsmasq._release_unused_leases()"},{"line_number":1534,"context_line":"        # Verify that dhcp_release is called only for ipv4 addresses."},{"line_number":1535,"context_line":"        self.assertEqual(1, ipw.call_count)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_21160da8","line":1532,"in_reply_to":"fa1b9901_f2e233d4","updated":"2015-08-21 18:43:45.000000000","message":"I\u0027m afraid, by moving this to _get_dnsmasq(), it triggers many failures as its used in other test-cases which are validating exp_host_data/exp_addn_data.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"617a6209ac92794916f6a59551198e696b68a373","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b2e83bb4","line":1563,"updated":"2015-08-21 14:59:24.000000000","message":"Why are you mocking the execute, why not just self._release_lease like the other lease tests here?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"14e15bc4995ef811947ed121cb8d7845805671e1","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_b8b9957b","line":1563,"in_reply_to":"fa1b9901_37ca811b","updated":"2015-08-25 03:46:25.000000000","message":"Done","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e5ccf0d0edb25ba78192ae2128e3c6e71537ffe3","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_37ca811b","line":1563,"in_reply_to":"fa1b9901_39fcbd3d","updated":"2015-08-24 19:51:44.000000000","message":"Yes, please fix this to mock _release_lease and check it\u0027s call count.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c147052df2cb02d0316989685e30f315dd47d12c","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_d90ee18b","line":1563,"in_reply_to":"fa1b9901_6f4ab129","updated":"2015-08-24 17:51:13.000000000","message":"I don\u0027t think you need both, just _release_lease as it\u0027s just building a command line to pass to execute, no need for the indirection.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"562dd95852ce8e89e26f36b0deb0877fefd3a360","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_6f4ab129","line":1563,"in_reply_to":"fa1b9901_b2e83bb4","updated":"2015-08-21 18:43:45.000000000","message":"We can mock _release_lease as well. I mocked the execute to show that its never called and its call_count is 0. Anyway, if you want me to update it to use mock on _release_lease, I can do it. Please let me know.","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"},{"author":{"_account_id":10257,"name":"Sridhar Gaddam","email":"sgaddam@redhat.com","username":"sridhargaddam"},"change_message_id":"39e1736bad7b5470f34952ab2bc2c99503e51276","unresolved":false,"context_lines":[{"line_number":1560,"context_line":""},{"line_number":1561,"context_line":"        old_leases \u003d set([(ip1, mac1, None)])"},{"line_number":1562,"context_line":"        ipw \u003d mock.patch("},{"line_number":1563,"context_line":"            \u0027neutron.agent.linux.ip_lib.IpNetnsCommand.execute\u0027).start()"},{"line_number":1564,"context_line":"        dnsmasq._read_hosts_file_leases \u003d mock.Mock(return_value\u003dold_leases)"},{"line_number":1565,"context_line":"        dnsmasq.network.ports \u003d []"},{"line_number":1566,"context_line":"        dnsmasq._release_unused_leases()"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_39fcbd3d","line":1563,"in_reply_to":"fa1b9901_d90ee18b","updated":"2015-08-24 17:54:57.000000000","message":"Yes, I agree. My intention was to say that we can mock _release_lease (if required) instead of execute. Do you want me to re-spin a new patch doing this change?","commit_id":"d9e98e096e8ca45e8dc9b84eb3417f6faa383209"}]}
