)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"1452926a3dcc247add72f219b8499f101d797792","unresolved":false,"context_lines":[{"line_number":16,"context_line":"distinguish between an unallocated network and one that doesn\u0027t return"},{"line_number":17,"context_line":"network information."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"bp remove-cast-to-schedule-run-instance"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: Ic427715f46cb5179a37c593c4217f239c65544c3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"AAAAT3%2F%2Fxk4%3D","line":19,"updated":"2014-01-01 15:21:35.000000000","message":"nit: Part of bp remove-cast-to-schedule-run-instance","commit_id":"a702c35b3c621e70e29ffa688b1efc3942d504b4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f15122ec249f0635feb23b31486bc037faac8773","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Don\u0027t deallocate/reallocate networks on reschedules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the virt driver doesn\u0027t have dhcp_options_for_instance (only"},{"line_number":10,"context_line":"baremetal seems to) then network allocation isn\u0027t dependent upon the"},{"line_number":11,"context_line":"host the instance is on.  In that case we don\u0027t need to deallocate and"},{"line_number":12,"context_line":"reallocate a network for each reschedule."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAAUH%2F%2F33c%3D","line":10,"updated":"2014-01-07 11:41:23.000000000","message":"Curious, what about the list of mac addresses, although I guess that is only used by baremetal too:\nhttps://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L188\n\nI am guessing this doesn\u0027t affect multi-host networking, as the setup of the specific network host is done much later, once the request hits the compute host, assuming I am remembering that correctly.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f9055333003b0f890c7c0f53d6d45a4f01010de8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Don\u0027t deallocate/reallocate networks on reschedules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the virt driver doesn\u0027t have dhcp_options_for_instance (only"},{"line_number":10,"context_line":"baremetal seems to) then network allocation isn\u0027t dependent upon the"},{"line_number":11,"context_line":"host the instance is on.  In that case we don\u0027t need to deallocate and"},{"line_number":12,"context_line":"reallocate a network for each reschedule."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAAUH%2F%2F3Pk%3D","line":10,"in_reply_to":"AAAAUH%2F%2F33c%3D","updated":"2014-01-07 14:48:05.000000000","message":"I can have a second look, but the only host dependent logic I found had to do with dhcp_options_for_instance.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7aa097ba84cc587ff1031ecf0ea3538afe1c9aab","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Don\u0027t deallocate/reallocate networks on reschedules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the virt driver doesn\u0027t have dhcp_options_for_instance (only"},{"line_number":10,"context_line":"baremetal seems to) then network allocation isn\u0027t dependent upon the"},{"line_number":11,"context_line":"host the instance is on.  In that case we don\u0027t need to deallocate and"},{"line_number":12,"context_line":"reallocate a network for each reschedule."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"AAAAUH%2F%2F1%2BU%3D","line":10,"in_reply_to":"AAAAUH%2F%2F3Pk%3D","updated":"2014-01-07 19:37:11.000000000","message":"It does appear that baremetal may have node specific mac addresses.  dhcp_options_for_instance is being used as a test of whether or not the baremetal driver is being used, so rather than calling out that method I\u0027ll reword this to clarify that only baremetal has host dependent network allocation.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"}],"nova/compute/manager.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"23a6f20b73eca08c29049f1ab05a99c8ce707299","unresolved":false,"context_lines":[{"line_number":1784,"context_line":"        try:"},{"line_number":1785,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":1786,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":1787,"context_line":"            instance.save()"},{"line_number":1788,"context_line":"        except Exception:"},{"line_number":1789,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"},{"line_number":1790,"context_line":"            LOG.exception(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BXYg%3D","line":1787,"updated":"2013-11-26 21:36:16.000000000","message":"do we need here to make here extra db call?","commit_id":"aa6c28766be06e095fa92c3f5556a311d5affcce"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a96ccb9b18525356840ca90af71e9aec5ea50afb","unresolved":false,"context_lines":[{"line_number":1784,"context_line":"        try:"},{"line_number":1785,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":1786,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":1787,"context_line":"            instance.save()"},{"line_number":1788,"context_line":"        except Exception:"},{"line_number":1789,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"},{"line_number":1790,"context_line":"            LOG.exception(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BXS0%3D","line":1787,"in_reply_to":"AAAATn%2F%2BXYg%3D","updated":"2013-11-26 21:56:54.000000000","message":"Where could it be done to save db traffic?","commit_id":"aa6c28766be06e095fa92c3f5556a311d5affcce"},{"author":{"_account_id":8430,"name":"Christopher Lefelhocz","email":"christopher.lefelhoc@rackspace.com","username":"leif"},"change_message_id":"30b6f63866f807b752acca305e6289f421dedf4f","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"                        dhcp_options\u003ddhcp_options)"},{"line_number":1240,"context_line":"                LOG.debug(_(\u0027Instance network_info: |%s|\u0027), nwinfo,"},{"line_number":1241,"context_line":"                          instance\u003dinstance)"},{"line_number":1242,"context_line":"                # NOTE(alaski): This can be done more cleanly once we\u0027re sure"},{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F87%2BY%3D","line":1242,"updated":"2013-12-18 15:50:47.000000000","message":"I was confused by the comment and use of old and new methods.  It took a side discussion for me to realize it\u0027s old code path vs. new code path.  I\u0027m not really going to suggest marking both paths throughout the code and I\u0027m not sure how to articulate it here.   However, the same file having both paths makes it somewhat confusing and potentially error prone if someone else comes in and starts modifying.","commit_id":"ed240a552032dfca0a80a4d59dd177848dbeddd1"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"d304a094703d12736319a8d3a2e76df952e8a84d","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1246,"context_line":"                self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":1247,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1248,"context_line":"                return nwinfo"},{"line_number":1249,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F6lM%3D","line":1246,"updated":"2014-01-06 20:47:44.000000000","message":"Do you think it\u0027s worth removing this key after the build completes?","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"6392d72852feff8ea371d719cfbb6e69f01a758a","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1246,"context_line":"                self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":1247,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1248,"context_line":"                return nwinfo"},{"line_number":1249,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F1ik%3D","line":1246,"in_reply_to":"AAAAUH%2F%2F1%2Fs%3D","updated":"2014-01-07 21:41:25.000000000","message":"Sounds good.  Keep it simple.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f9055333003b0f890c7c0f53d6d45a4f01010de8","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1246,"context_line":"                self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":1247,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1248,"context_line":"                return nwinfo"},{"line_number":1249,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F3RE%3D","line":1246,"in_reply_to":"AAAAUH%2F%2F36Y%3D","updated":"2014-01-07 14:48:05.000000000","message":"Yeah, though it is still allocated and the key would still be valid I don\u0027t want to start a trend of stuffing this kind of data into system_metadata.  I\u0027m looking into solving this by passing around a request_state dict for the whole boot workflow.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7aa097ba84cc587ff1031ecf0ea3538afe1c9aab","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1246,"context_line":"                self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":1247,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1248,"context_line":"                return nwinfo"},{"line_number":1249,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F1%2Fs%3D","line":1246,"in_reply_to":"AAAAUH%2F%2F3RE%3D","updated":"2014-01-07 19:37:11.000000000","message":"After playing around a bit, I can\u0027t find a good place to set a key in a request_state/context because of the asynchronous nature of this method.  This code may not run until execution is in the driver so there\u0027s no good way to get data out without persisting it elsewhere, like system_metadata in the db.\n\nSo I\u0027m going to keep using system_metadata for the moment, but I clear this key out after the build succeeds.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f15122ec249f0635feb23b31486bc037faac8773","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"                # we\u0027ll receive an object."},{"line_number":1244,"context_line":"                sys_meta \u003d utils.metadata_to_dict(instance[\u0027system_metadata\u0027])"},{"line_number":1245,"context_line":"                sys_meta[\u0027network_allocated\u0027] \u003d \u0027True\u0027"},{"line_number":1246,"context_line":"                self._instance_update(context, instance[\u0027uuid\u0027],"},{"line_number":1247,"context_line":"                        system_metadata\u003dsys_meta)"},{"line_number":1248,"context_line":"                return nwinfo"},{"line_number":1249,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F36Y%3D","line":1246,"in_reply_to":"AAAAUH%2F%2F6lM%3D","updated":"2014-01-07 11:41:23.000000000","message":"I guess it is still allocated at that point, but it would be good to keep the data in sys_meta to a minimum.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f15122ec249f0635feb23b31486bc037faac8773","unresolved":false,"context_lines":[{"line_number":1807,"context_line":"        try:"},{"line_number":1808,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":1809,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":1810,"context_line":"            instance.save()"},{"line_number":1811,"context_line":"        except Exception:"},{"line_number":1812,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"},{"line_number":1813,"context_line":"            LOG.exception(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F33M%3D","line":1810,"updated":"2014-01-07 11:41:23.000000000","message":"Is this race-y? What if we fail before the async network has allocated the network, but after we attempted to clean up the network, do we end up allocating the network twice? Anyways, this is mostly unrelated to your patch, it just made me think.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f9055333003b0f890c7c0f53d6d45a4f01010de8","unresolved":false,"context_lines":[{"line_number":1807,"context_line":"        try:"},{"line_number":1808,"context_line":"            self._deallocate_network(context, instance, requested_networks)"},{"line_number":1809,"context_line":"            instance.system_metadata[\u0027network_allocated\u0027] \u003d \u0027False\u0027"},{"line_number":1810,"context_line":"            instance.save()"},{"line_number":1811,"context_line":"        except Exception:"},{"line_number":1812,"context_line":"            msg \u003d _(\u0027Failed to deallocate networks\u0027)"},{"line_number":1813,"context_line":"            LOG.exception(msg, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2F3QI%3D","line":1810,"in_reply_to":"AAAAUH%2F%2F33M%3D","updated":"2014-01-07 14:48:05.000000000","message":"If I understand your question, no this isn\u0027t racey.  We can\u0027t reach this point without having wait()-ed on the async network allocation.","commit_id":"e72825707ab741cdf3d924844667dacb7325a22d"}]}
