)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a637ada47b7785e5680e4e7b33bd91814c00e3eb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"a DHCP release is missed, we immediately recycle the IP and give it to"},{"line_number":15,"context_line":"a new guest."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"We can mitigate this by sorting the results by last_updated. This"},{"line_number":18,"context_line":"means we\u0027ll favor fixed ips that were last given out much further in"},{"line_number":19,"context_line":"the past."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a5de9d1_e2c75810","line":17,"range":{"start_line":17,"start_character":47,"end_line":17,"end_character":59},"updated":"2016-01-28 16:18:54.000000000","message":"update_at","commit_id":"9695ae01623c840a1a7659bd406ca339c2a0b9bb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a637ada47b7785e5680e4e7b33bd91814c00e3eb","unresolved":false,"context_lines":[{"line_number":15,"context_line":"a new guest."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"We can mitigate this by sorting the results by last_updated. This"},{"line_number":18,"context_line":"means we\u0027ll favor fixed ips that were last given out much further in"},{"line_number":19,"context_line":"the past."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Related-Bug: #1532809"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a5de9d1_22fd703a","line":18,"range":{"start_line":18,"start_character":28,"end_line":18,"end_character":52},"updated":"2016-01-28 16:18:54.000000000","message":"This sounds to me like \u0027most recently\u0027 but I get that it means oldest used. You don\u0027t need to update, I just had to read it a few times.","commit_id":"9695ae01623c840a1a7659bd406ca339c2a0b9bb"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a637ada47b7785e5680e4e7b33bd91814c00e3eb","unresolved":false,"context_lines":[{"line_number":1131,"context_line":"                           filter(network_or_none).\\"},{"line_number":1132,"context_line":"                           filter_by(reserved\u003dreserved).\\"},{"line_number":1133,"context_line":"                           filter_by(address\u003daddress).\\"},{"line_number":1134,"context_line":"                           first()"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    if fixed_ip_ref is None:"},{"line_number":1137,"context_line":"        raise exception.FixedIpNotFoundForNetwork(address\u003daddress,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_42450cb1","line":1134,"updated":"2016-01-28 16:18:54.000000000","message":"How about up here? I forget the case in the network manager code, but it\u0027s an if condition in the network manager as to whether or not it uses a pool.  In the gate we use the pool method.","commit_id":"9695ae01623c840a1a7659bd406ca339c2a0b9bb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fedaa4b677399d4bf24318ad7adbf08065459a3e","unresolved":false,"context_lines":[{"line_number":1131,"context_line":"                           filter(network_or_none).\\"},{"line_number":1132,"context_line":"                           filter_by(reserved\u003dreserved).\\"},{"line_number":1133,"context_line":"                           filter_by(address\u003daddress).\\"},{"line_number":1134,"context_line":"                           first()"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"    if fixed_ip_ref is None:"},{"line_number":1137,"context_line":"        raise exception.FixedIpNotFoundForNetwork(address\u003daddress,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_a5416a0d","line":1134,"in_reply_to":"7a5de9d1_42450cb1","updated":"2016-01-28 16:23:55.000000000","message":"Sorry, nevermind, in this case we\u0027re given a specific fixed IP so this isn\u0027t a problem, the first() was throwing me off but it\u0027s here for other reasons apparently.","commit_id":"9695ae01623c840a1a7659bd406ca339c2a0b9bb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a637ada47b7785e5680e4e7b33bd91814c00e3eb","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"                            host\u003dNone, virtual_interface_id\u003dNone):"},{"line_number":1171,"context_line":"    \"\"\"allocate a fixed ip out of a fixed ip network pool."},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"    This allocates and unallocated fixed ip out of a specified"},{"line_number":1174,"context_line":"    network. We sort by updated_at to hand out the oldest address in"},{"line_number":1175,"context_line":"    the list."},{"line_number":1176,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_a25ac081","line":1173,"range":{"start_line":1173,"start_character":19,"end_line":1173,"end_character":22},"updated":"2016-01-28 16:18:54.000000000","message":"an","commit_id":"9695ae01623c840a1a7659bd406ca339c2a0b9bb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"04aa2d0b6523c1fd88d1d757df52b58dd58b955c","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"                           filter_by(instance_uuid\u003dNone).\\"},{"line_number":1187,"context_line":"                           filter_by(host\u003dNone).\\"},{"line_number":1188,"context_line":"                           filter_by(leased\u003dFalse).\\"},{"line_number":1189,"context_line":"                           order_by(asc(models.FixedIp.updated_at)).\\"},{"line_number":1190,"context_line":"                           first()"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"    if not fixed_ip_ref:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_9e43ea12","line":1189,"updated":"2016-02-01 11:36:40.000000000","message":"on IRC bauzas pointed out this might make us unable to use this index:\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L852\n\nAlso, there seem to be some general warnings over order_by with a limit, in general:\nhttps://www.percona.com/blog/2006/09/01/order-by-limit-performance-optimization/","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"03a513352a4a35693533d64354271c669fdad157","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"                           filter_by(instance_uuid\u003dNone).\\"},{"line_number":1187,"context_line":"                           filter_by(host\u003dNone).\\"},{"line_number":1188,"context_line":"                           filter_by(leased\u003dFalse).\\"},{"line_number":1189,"context_line":"                           order_by(asc(models.FixedIp.updated_at)).\\"},{"line_number":1190,"context_line":"                           first()"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"    if not fixed_ip_ref:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_b9ada09c","line":1189,"in_reply_to":"7a5de9d1_9e43ea12","updated":"2016-02-01 12:00:33.000000000","message":"So I\u0027m a bit torn here.\n\nhttp://paste.openstack.org/show/485590/\nIt shows that we do a full scan, but given the bug\u0027s criticity and how it could help the behaviour, I don\u0027t want to block that change to be merged.","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f4ff3cb3a2c0bcfe6e2ffea8e8251c735f114d2","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"        self.assertEqual(fixed_ip[\u0027instance_uuid\u0027], instance_uuid)"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"    def test_fixed_ip_associate_pool_order(self):"},{"line_number":4798,"context_line":"        \"\"\"Test that fixed_ip always uses oldest fixed_ip."},{"line_number":4799,"context_line":""},{"line_number":4800,"context_line":"        We should always be using the fixed ip with the oldest"},{"line_number":4801,"context_line":"        updated_at."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_5f913746","line":4798,"updated":"2016-01-29 12:04:04.000000000","message":"Oh Sean, you broke your own rule about not using docstrings in test methods...","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"65048f1ac9c381f8e59c08cce8e7853e9f4c2abf","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"        self.assertEqual(fixed_ip[\u0027instance_uuid\u0027], instance_uuid)"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"    def test_fixed_ip_associate_pool_order(self):"},{"line_number":4798,"context_line":"        \"\"\"Test that fixed_ip always uses oldest fixed_ip."},{"line_number":4799,"context_line":""},{"line_number":4800,"context_line":"        We should always be using the fixed ip with the oldest"},{"line_number":4801,"context_line":"        updated_at."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_dfe42ee2","line":4798,"in_reply_to":"7a5de9d1_5f913746","updated":"2016-01-29 20:56:24.000000000","message":"that rule is void now we don\u0027t use nose. The only reason we removed the docstrings was because nose masked all the test names.\n\nHonestly, we should start bringing doc strings in tests back IMHO.","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"de859388f7d980050da83f5c90f96987242d7c70","unresolved":false,"context_lines":[{"line_number":4795,"context_line":"        self.assertEqual(fixed_ip[\u0027instance_uuid\u0027], instance_uuid)"},{"line_number":4796,"context_line":""},{"line_number":4797,"context_line":"    def test_fixed_ip_associate_pool_order(self):"},{"line_number":4798,"context_line":"        \"\"\"Test that fixed_ip always uses oldest fixed_ip."},{"line_number":4799,"context_line":""},{"line_number":4800,"context_line":"        We should always be using the fixed ip with the oldest"},{"line_number":4801,"context_line":"        updated_at."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_52a8178d","line":4798,"in_reply_to":"7a5de9d1_dfe42ee2","updated":"2016-01-31 23:17:09.000000000","message":"What?! Let\u0027s just bring back nosetests for glory and valor!\n\nI\u0027m joking. Still jet lagged.","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f4ff3cb3a2c0bcfe6e2ffea8e8251c735f114d2","unresolved":false,"context_lines":[{"line_number":4804,"context_line":"        network \u003d db.network_create_safe(self.ctxt, {})"},{"line_number":4805,"context_line":"        self.addCleanup(timeutils.clear_time_override)"},{"line_number":4806,"context_line":"        start \u003d timeutils.utcnow()"},{"line_number":4807,"context_line":"        for i in range(1, 4):"},{"line_number":4808,"context_line":"            now \u003d start - datetime.timedelta(hours\u003di)"},{"line_number":4809,"context_line":"            timeutils.set_time_override(now)"},{"line_number":4810,"context_line":"            address \u003d self.create_fixed_ip("}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_1fe5ffda","line":4807,"updated":"2016-01-29 12:04:04.000000000","message":"So if I understand the test correctly, we loop 4 times and create 4 fixed IPs, with updated_at ranging from 1 hour ago to 4 hours ago. When we finish the loop, the address is for the fixed_ip that\u0027s 4 hours ago. Then we associate the instance with the network and it uses the address from the last fixed_ip created, which is the one updated 4 hours ago.\n\nCool, looks good to me.","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"},{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"f2f450fca64536fac18b468122aa0a03b3fba627","unresolved":false,"context_lines":[{"line_number":4804,"context_line":"        network \u003d db.network_create_safe(self.ctxt, {})"},{"line_number":4805,"context_line":"        self.addCleanup(timeutils.clear_time_override)"},{"line_number":4806,"context_line":"        start \u003d timeutils.utcnow()"},{"line_number":4807,"context_line":"        for i in range(1, 4):"},{"line_number":4808,"context_line":"            now \u003d start - datetime.timedelta(hours\u003di)"},{"line_number":4809,"context_line":"            timeutils.set_time_override(now)"},{"line_number":4810,"context_line":"            address \u003d self.create_fixed_ip("}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_a198101d","line":4807,"in_reply_to":"7a5de9d1_1fe5ffda","updated":"2016-02-01 08:19:35.000000000","message":"loop three times!","commit_id":"844bcb2bb8ae9075a200315ae3a1310d50e52763"}]}
