)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"11a6835aa4ac122720fcb4101c99190f7e2462af","unresolved":false,"context_lines":[{"line_number":19,"context_line":"originally handed out the lease. Having failed, dnsmasq doesn\u0027t call"},{"line_number":20,"context_line":"nova-dhcpbridge and release_fixed_ip() is never called. The fixed IP"},{"line_number":21,"context_line":"is not returned to the pool and a new instance cannot be booted with"},{"line_number":22,"context_line":"that IP."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patches adds a release_dhcp RPC call that calls release_dhcp on"},{"line_number":25,"context_line":"the instance\u0027s \"original\" host, thus ensuring that the correct dnsmasq"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a9d85d2_d7af98e1","line":22,"updated":"2016-06-20 13:53:34.000000000","message":"I\u0027m quite sure that the above is not the case for all of the topologies that nova-network supports.\n\nOn multihost, which is by far the most common deployment topology, the instance can\u0027t talk to the original dhcp server once it has moved because filtering is used to ensure that all hosts have the same ip for things like the dhcp server. That means that if live migration occurs and a certain amount of time passes, the instance would have renewed its lease, which would go to the current host, which would mean that there now *is* a valid lease to drop. Consequently the lease on the original host could have long expired by the time the instance has deleted.\n\nIMHO, the only way to fix this properly is the synchronize the lease information during the migration operation so that the delete does the right thing always.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"353603b5ef0f78efe4dfc9fbc9c4d1ab8a747c09","unresolved":false,"context_lines":[{"line_number":19,"context_line":"originally handed out the lease. Having failed, dnsmasq doesn\u0027t call"},{"line_number":20,"context_line":"nova-dhcpbridge and release_fixed_ip() is never called. The fixed IP"},{"line_number":21,"context_line":"is not returned to the pool and a new instance cannot be booted with"},{"line_number":22,"context_line":"that IP."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patches adds a release_dhcp RPC call that calls release_dhcp on"},{"line_number":25,"context_line":"the instance\u0027s \"original\" host, thus ensuring that the correct dnsmasq"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_673e02ba","line":22,"in_reply_to":"3aaa91ec_2481984b","updated":"2016-06-21 21:33:25.000000000","message":"Actually Nova manages the lease file for dnsmasq by passing --leasefile-ro and writing out the --dhcp-hostsfile when we allocate an IP. Then whenever there is a lease or release action over dhcp, dnsmasq calls a helper script which makes an RPC call to the proper network node:\n\nhttps://github.com/openstack/nova/blob/master/nova/cmd/dhcpbridge.py#L48-L51","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"723a1759a127741f971c3296f364d3d699b1b4e5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"originally handed out the lease. Having failed, dnsmasq doesn\u0027t call"},{"line_number":20,"context_line":"nova-dhcpbridge and release_fixed_ip() is never called. The fixed IP"},{"line_number":21,"context_line":"is not returned to the pool and a new instance cannot be booted with"},{"line_number":22,"context_line":"that IP."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patches adds a release_dhcp RPC call that calls release_dhcp on"},{"line_number":25,"context_line":"the instance\u0027s \"original\" host, thus ensuring that the correct dnsmasq"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fad55976_76480e88","line":22,"in_reply_to":"3aaa91ec_673e02ba","updated":"2016-07-16 18:49:39.000000000","message":"I did some more digging. The lease database *is* in fact synchronized. In a devstack test environment, the file is called /opt/stack/data/nova/networks/nova-br100.conf and when an instance is live-migrated, its lease is removed from the source and added to the destination.\n\nI think the problem is that when dhcp_release sends the release packet, it sets the server-ID field to the source\u0027s IP address. You can see this with dhcpdump:\n\nOPTION:  54 (  4) Server identifier         10.4.129.255\n\ndnsmasq on the destination then replies with a message indicating the server-ID is wrong:\n\nOPTION:  54 (  4) Server identifier         10.4.131.255\nOPTION:  56 ( 15) Message                   wrong server-ID\n\nThat\u0027s why \u0027unknown lease\u0027 appears in the logs and nova-dhcpbridge is never called.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"de8445a8866f4d56a8c88f322a0b748abcfdd9e0","unresolved":false,"context_lines":[{"line_number":19,"context_line":"originally handed out the lease. Having failed, dnsmasq doesn\u0027t call"},{"line_number":20,"context_line":"nova-dhcpbridge and release_fixed_ip() is never called. The fixed IP"},{"line_number":21,"context_line":"is not returned to the pool and a new instance cannot be booted with"},{"line_number":22,"context_line":"that IP."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"This patches adds a release_dhcp RPC call that calls release_dhcp on"},{"line_number":25,"context_line":"the instance\u0027s \"original\" host, thus ensuring that the correct dnsmasq"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_2481984b","line":22,"in_reply_to":"5a9d85d2_d7af98e1","updated":"2016-06-21 21:15:40.000000000","message":"\u003e IMHO, the only way to fix this properly is the synchronize\n\u003e the lease information during the migration operation so\n\u003e that the delete does the right thing always.\n\nI agree, but how does this happen in practice? As far as I can tell dnsmasq doesn\u0027t keep a lease database, and the reason dnsmasq on the destination host fails releasing with \u0027unknown lease\u0027 is - I think - because the server IP address field in the DHCPRELEASE packet isn\u0027t its own.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"}],"nova/network/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"292f8607477f090f55dc2da70f7fe6b00af3a123","unresolved":false,"context_lines":[{"line_number":984,"context_line":"                    #             get called by nova-dhcpbridge."},{"line_number":985,"context_line":"                    try:"},{"line_number":986,"context_line":"                        self.network_rpcapi.release_dhcp(context,"},{"line_number":987,"context_line":"                                                         instance.launched_on,"},{"line_number":988,"context_line":"                                                         dev, address,"},{"line_number":989,"context_line":"                                                         vif.address)"},{"line_number":990,"context_line":"                    except exception.RPCPinnedToOldVersion:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_2ffba97c","line":987,"range":{"start_line":987,"start_character":57,"end_line":987,"end_character":77},"updated":"2016-07-26 15:40:11.000000000","message":"Only do this if instance.launched_on !\u003d instance.host?","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6cd755902db3144057bf3af43a2ff412c46fd70d","unresolved":false,"context_lines":[{"line_number":984,"context_line":"                    #             get called by nova-dhcpbridge."},{"line_number":985,"context_line":"                    try:"},{"line_number":986,"context_line":"                        self.network_rpcapi.release_dhcp(context,"},{"line_number":987,"context_line":"                                                         instance.launched_on,"},{"line_number":988,"context_line":"                                                         dev, address,"},{"line_number":989,"context_line":"                                                         vif.address)"},{"line_number":990,"context_line":"                    except exception.RPCPinnedToOldVersion:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_6ae8efe2","line":987,"range":{"start_line":987,"start_character":57,"end_line":987,"end_character":77},"in_reply_to":"dada55a8_2ac71799","updated":"2016-07-26 15:56:11.000000000","message":"Yeah, it used to be fairly important actually as it was a yield point for us. Not a requirement anymore because we\u0027re all remote from the database here, but still keeping with the pattern elsewhere.","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0888126a04009982015e683852be7aebc3740cd1","unresolved":false,"context_lines":[{"line_number":984,"context_line":"                    #             get called by nova-dhcpbridge."},{"line_number":985,"context_line":"                    try:"},{"line_number":986,"context_line":"                        self.network_rpcapi.release_dhcp(context,"},{"line_number":987,"context_line":"                                                         instance.launched_on,"},{"line_number":988,"context_line":"                                                         dev, address,"},{"line_number":989,"context_line":"                                                         vif.address)"},{"line_number":990,"context_line":"                    except exception.RPCPinnedToOldVersion:"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_2ac71799","line":987,"range":{"start_line":987,"start_character":57,"end_line":987,"end_character":77},"in_reply_to":"dada55a8_2ffba97c","updated":"2016-07-26 15:51:39.000000000","message":"Dan pointed out that we rpc to ourselves all over n-net, so this probably doesn\u0027t matter. Plus the call should be fast, it does a device check on the host and if the device exists, dhcp release and return (or fail if the command fails).","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"}],"nova/network/rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"11a6835aa4ac122720fcb4101c99190f7e2462af","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            cctxt \u003d cctxt.prepare(server\u003dinstance.host, version\u003dversion)"},{"line_number":177,"context_line":"        return cctxt.call(ctxt, \u0027deallocate_for_instance\u0027, **kwargs)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _find_instance_dhcp_lease_host(self, ctxt, instance):"},{"line_number":180,"context_line":"        migration_list \u003d migration.MigrationList.get_by_filters("},{"line_number":181,"context_line":"            ctxt, {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_572c484a","line":179,"updated":"2016-06-20 13:53:34.000000000","message":"Doing this in the RPC layer is suboptimal. We\u0027ve done similar things when we have to to keep some compatibility or hide purely RPC bits. However, in compute we usually calculate the host ahead of time and pass it into rpcapi, which uses it for the target. I think just moving this method to manager and determining the call ahead of time would be better.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"723a1759a127741f971c3296f364d3d699b1b4e5","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            cctxt \u003d cctxt.prepare(server\u003dinstance.host, version\u003dversion)"},{"line_number":177,"context_line":"        return cctxt.call(ctxt, \u0027deallocate_for_instance\u0027, **kwargs)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _find_instance_dhcp_lease_host(self, ctxt, instance):"},{"line_number":180,"context_line":"        migration_list \u003d migration.MigrationList.get_by_filters("},{"line_number":181,"context_line":"            ctxt, {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fad55976_56198a87","line":179,"in_reply_to":"3aaa91ec_a4bbc80d","updated":"2016-07-16 18:49:39.000000000","message":"This method has been entirely removed in PS4 in favour of using the instance.launched_on field, which gives us exactly what we need.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"de8445a8866f4d56a8c88f322a0b748abcfdd9e0","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            cctxt \u003d cctxt.prepare(server\u003dinstance.host, version\u003dversion)"},{"line_number":177,"context_line":"        return cctxt.call(ctxt, \u0027deallocate_for_instance\u0027, **kwargs)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _find_instance_dhcp_lease_host(self, ctxt, instance):"},{"line_number":180,"context_line":"        migration_list \u003d migration.MigrationList.get_by_filters("},{"line_number":181,"context_line":"            ctxt, {\u0027instance_uuid\u0027: instance.uuid,"},{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_a4bbc80d","line":179,"in_reply_to":"5a9d85d2_572c484a","updated":"2016-06-21 21:15:40.000000000","message":"Assuming we stick with this general approach, this can totally be done :)","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"11a6835aa4ac122720fcb4101c99190f7e2462af","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"},{"line_number":183,"context_line":"                   \u0027status\u0027: \u0027completed\u0027})"},{"line_number":184,"context_line":"        if len(migration_list) \u003e 0:"},{"line_number":185,"context_line":"            return migration_list[0].source_compute"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            return instance.host"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_f7ee14eb","line":185,"updated":"2016-06-20 13:53:34.000000000","message":"I\u0027m quite sure this logic is not complete. What happens if I live migrated the instance twice? The last live migration record won\u0027t be the one you\u0027re looking for. You should at least filter by source_host \u003d\u003d $host, but again, I think the proper fix is synchronizing the leases in the first place.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3bf77e857706e4c307df5635a88939e3bf56d2c5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"},{"line_number":183,"context_line":"                   \u0027status\u0027: \u0027completed\u0027})"},{"line_number":184,"context_line":"        if len(migration_list) \u003e 0:"},{"line_number":185,"context_line":"            return migration_list[0].source_compute"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            return instance.host"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_a773ca4c","line":185,"in_reply_to":"3aaa91ec_840ccc43","updated":"2016-06-21 21:43:47.000000000","message":"Hrmm, yeah, not sure what I was thinking when I coded this. If there were a lot of migrations it\u0027s not realistic to attempt to find which dnsmasq will accept the DHCPRELEASE, as it depends on which lease expired where.\n\nAs an alternative approach, how about just calling release_fixed_ip from Nova directly, perhaps checking if the guest has been live-migrated first?","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"353603b5ef0f78efe4dfc9fbc9c4d1ab8a747c09","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"},{"line_number":183,"context_line":"                   \u0027status\u0027: \u0027completed\u0027})"},{"line_number":184,"context_line":"        if len(migration_list) \u003e 0:"},{"line_number":185,"context_line":"            return migration_list[0].source_compute"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            return instance.host"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_840ccc43","line":185,"in_reply_to":"3aaa91ec_a400e8ab","updated":"2016-06-21 21:33:25.000000000","message":"Not if we migrate then migrate again.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"723a1759a127741f971c3296f364d3d699b1b4e5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"},{"line_number":183,"context_line":"                   \u0027status\u0027: \u0027completed\u0027})"},{"line_number":184,"context_line":"        if len(migration_list) \u003e 0:"},{"line_number":185,"context_line":"            return migration_list[0].source_compute"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            return instance.host"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fad55976_f6023e0a","line":185,"in_reply_to":"3aaa91ec_a773ca4c","updated":"2016-07-16 18:49:39.000000000","message":"See above.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"de8445a8866f4d56a8c88f322a0b748abcfdd9e0","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                   \u0027migration_type\u0027: \u0027live-migration\u0027,"},{"line_number":183,"context_line":"                   \u0027status\u0027: \u0027completed\u0027})"},{"line_number":184,"context_line":"        if len(migration_list) \u003e 0:"},{"line_number":185,"context_line":"            return migration_list[0].source_compute"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            return instance.host"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_a400e8ab","line":185,"in_reply_to":"5a9d85d2_f7ee14eb","updated":"2016-06-21 21:15:40.000000000","message":"Isn\u0027t migration_list[0] the first live migration? In which case the source compute is where dnsmasq originally had the lease.","commit_id":"aea5d8322366486ec323f39bfc51d06bfb615be0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"54b46c2fc323e1b8ded0bd8f9294467f8259c713","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    def release_dhcp(self, ctxt, host, dev, address, vif_address):"},{"line_number":179,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.17\u0027, server\u003dhost)"},{"line_number":180,"context_line":"        return cctxt.call(ctxt, \u0027release_dhcp\u0027, dev\u003ddev, address\u003daddress,"},{"line_number":181,"context_line":"                          vif_address\u003dvif_address)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def add_fixed_ip_to_instance(self, ctxt, instance_id, rxtx_factor,"},{"line_number":184,"context_line":"                                 host, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_caab1688","line":181,"updated":"2016-07-25 17:38:15.000000000","message":"You need to handle the case where we\u0027re pinned at \u003c\u003d1.16. Since this is a call, this will explode if you make this call against a remote machine that hasn\u0027t been upgraded yet. I assume that probably introduces an unhandled exception in the network code that will prevent other things from happening.","commit_id":"2e295daff312238c023af9672b66a1c2aeefd89b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"62bad03f753628bd673be542b9070c72a2b2ab01","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    def release_dhcp(self, ctxt, host, dev, address, vif_address):"},{"line_number":179,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.17\u0027, server\u003dhost)"},{"line_number":180,"context_line":"        return cctxt.call(ctxt, \u0027release_dhcp\u0027, dev\u003ddev, address\u003daddress,"},{"line_number":181,"context_line":"                          vif_address\u003dvif_address)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def add_fixed_ip_to_instance(self, ctxt, instance_id, rxtx_factor,"},{"line_number":184,"context_line":"                                 host, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dada55a8_c47781d2","line":181,"in_reply_to":"dada55a8_caab1688","updated":"2016-07-25 22:05:21.000000000","message":"Done","commit_id":"2e295daff312238c023af9672b66a1c2aeefd89b"}],"nova/tests/unit/network/test_manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"970f30fdfa5203e39e77449f146f64efece8a13e","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"            linux_net.release_dhcp(dev, address, vif_address)"},{"line_number":1713,"context_line":""},{"line_number":1714,"context_line":"        self.stub_out(\u0027nova.db.virtual_interface_get\u0027, vif_get)"},{"line_number":1715,"context_line":"        self.stub_out(\u0027nova.network.rpcapi.NetworkAPI.release_dhcp\u0027,"},{"line_number":1716,"context_line":"                      release_dhcp)"},{"line_number":1717,"context_line":"        context1 \u003d context.RequestContext(\u0027user\u0027, fakes.FAKE_PROJECT_ID)"},{"line_number":1718,"context_line":""},{"line_number":1719,"context_line":"        instance \u003d db.instance_create(context1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_a387ad5f","line":1716,"range":{"start_line":1715,"start_character":8,"end_line":1716,"end_character":35},"updated":"2016-07-26 18:11:54.000000000","message":"You\u0027re double mocking this, once above and once here (with mox), so something is probably going to go wrong at some point with this...I\u0027d think.","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7d8ecae52214b3c0ceba64b9314434a93e82038e","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"            linux_net.release_dhcp(dev, address, vif_address)"},{"line_number":1713,"context_line":""},{"line_number":1714,"context_line":"        self.stub_out(\u0027nova.db.virtual_interface_get\u0027, vif_get)"},{"line_number":1715,"context_line":"        self.stub_out(\u0027nova.network.rpcapi.NetworkAPI.release_dhcp\u0027,"},{"line_number":1716,"context_line":"                      release_dhcp)"},{"line_number":1717,"context_line":"        context1 \u003d context.RequestContext(\u0027user\u0027, fakes.FAKE_PROJECT_ID)"},{"line_number":1718,"context_line":""},{"line_number":1719,"context_line":"        instance \u003d db.instance_create(context1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_097a1788","line":1716,"range":{"start_line":1715,"start_character":8,"end_line":1716,"end_character":35},"in_reply_to":"dada55a8_437871c4","updated":"2016-07-26 19:21:23.000000000","message":"Done. And this should also take care of the failing gate, thank you for cluing me in when you mentioned tests not cleaning up after themselves.","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2005eb5f64300e92550d68a5d09fc264434d0926","unresolved":false,"context_lines":[{"line_number":1712,"context_line":"            linux_net.release_dhcp(dev, address, vif_address)"},{"line_number":1713,"context_line":""},{"line_number":1714,"context_line":"        self.stub_out(\u0027nova.db.virtual_interface_get\u0027, vif_get)"},{"line_number":1715,"context_line":"        self.stub_out(\u0027nova.network.rpcapi.NetworkAPI.release_dhcp\u0027,"},{"line_number":1716,"context_line":"                      release_dhcp)"},{"line_number":1717,"context_line":"        context1 \u003d context.RequestContext(\u0027user\u0027, fakes.FAKE_PROJECT_ID)"},{"line_number":1718,"context_line":""},{"line_number":1719,"context_line":"        instance \u003d db.instance_create(context1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"dada55a8_437871c4","line":1716,"range":{"start_line":1715,"start_character":8,"end_line":1716,"end_character":35},"in_reply_to":"dada55a8_a387ad5f","updated":"2016-07-26 18:30:20.000000000","message":"Correction, stub_out is using fixtures, not mox. But still probably a bad idea to double mock this.","commit_id":"809a252108cfb4171a07a6e089f4784776168c38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3327a13c88dcf1426d3e8769f42b9bbc139fb770","unresolved":false,"context_lines":[{"line_number":1728,"context_line":"                                                   **networks[1]))"},{"line_number":1729,"context_line":""},{"line_number":1730,"context_line":"        self.flags(force_dhcp_release\u003dTrue)"},{"line_number":1731,"context_line":"        self.mox.StubOutWithMock(linux_net, \u0027release_dhcp\u0027)"},{"line_number":1732,"context_line":"        linux_net.release_dhcp(networks[1][\u0027bridge\u0027], fix_addr.address,"},{"line_number":1733,"context_line":"                \u0027DE:AD:BE:EF:00:00\u0027)"},{"line_number":1734,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bacf61ea_dca98de1","line":1731,"updated":"2016-07-27 15:00:08.000000000","message":"This is what I was thinking.","commit_id":"f9e9b30b93443c986d3bee7f8b4140b82050418b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2979cfe3482db802e7eede90c58c75b7c1ffddcb","unresolved":false,"context_lines":[{"line_number":1759,"context_line":"        def release_dhcp(self, context, instance, dev, address, vif_address):"},{"line_number":1760,"context_line":"            raise exception.RPCPinnedToOldVersion()"},{"line_number":1761,"context_line":""},{"line_number":1762,"context_line":"        self.stub_out(\u0027nova.db.virtual_interface_get\u0027, vif_get)"},{"line_number":1763,"context_line":"        self.stub_out(\u0027nova.network.rpcapi.NetworkAPI.release_dhcp\u0027,"},{"line_number":1764,"context_line":"                      release_dhcp)"},{"line_number":1765,"context_line":"        context1 \u003d context.RequestContext(\u0027user\u0027, fakes.FAKE_PROJECT_ID)"},{"line_number":1766,"context_line":""},{"line_number":1767,"context_line":"        instance \u003d db.instance_create(context1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"bacf61ea_513106ec","line":1764,"range":{"start_line":1762,"start_character":8,"end_line":1764,"end_character":35},"updated":"2016-07-27 14:39:59.000000000","message":"nit: I\u0027d prefer we use mock consistently, but at least this uses fixtures and not mox.","commit_id":"f9e9b30b93443c986d3bee7f8b4140b82050418b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2979cfe3482db802e7eede90c58c75b7c1ffddcb","unresolved":false,"context_lines":[{"line_number":1778,"context_line":"                                                   **networks[1]))"},{"line_number":1779,"context_line":""},{"line_number":1780,"context_line":"        self.flags(force_dhcp_release\u003dTrue)"},{"line_number":1781,"context_line":"        self.mox.StubOutWithMock(linux_net, \u0027release_dhcp\u0027)"},{"line_number":1782,"context_line":"        linux_net.release_dhcp(networks[1][\u0027bridge\u0027], fix_addr.address,"},{"line_number":1783,"context_line":"                \u0027DE:AD:BE:EF:00:00\u0027)"},{"line_number":1784,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bacf61ea_f17bda79","line":1781,"updated":"2016-07-27 14:39:59.000000000","message":"We shouldn\u0027t use mox. Plus at this point you\u0027re using 3 different types of mock type things in this test, which is nasty.","commit_id":"f9e9b30b93443c986d3bee7f8b4140b82050418b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3327a13c88dcf1426d3e8769f42b9bbc139fb770","unresolved":false,"context_lines":[{"line_number":1778,"context_line":"                                                   **networks[1]))"},{"line_number":1779,"context_line":""},{"line_number":1780,"context_line":"        self.flags(force_dhcp_release\u003dTrue)"},{"line_number":1781,"context_line":"        self.mox.StubOutWithMock(linux_net, \u0027release_dhcp\u0027)"},{"line_number":1782,"context_line":"        linux_net.release_dhcp(networks[1][\u0027bridge\u0027], fix_addr.address,"},{"line_number":1783,"context_line":"                \u0027DE:AD:BE:EF:00:00\u0027)"},{"line_number":1784,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":7,"id":"bacf61ea_9c78b591","line":1781,"in_reply_to":"bacf61ea_f17bda79","updated":"2016-07-27 15:00:08.000000000","message":"Sorry this was an existing test, it showed up in my 5..6 diff though.","commit_id":"f9e9b30b93443c986d3bee7f8b4140b82050418b"}]}
