)]}'
{"nova/virt/docker/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b5dfaa0b7472dd95c68afae51fab5d58fc42359b","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                \u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, container_id, \u0027ifconfig\u0027,"},{"line_number":249,"context_line":"                if_remote_name, ip,"},{"line_number":250,"context_line":"                run_as_root\u003dTrue)"},{"line_number":251,"context_line":"            utils.execute("},{"line_number":252,"context_line":"                \u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, container_id,"},{"line_number":253,"context_line":"                \u0027ip\u0027, \u0027r\u0027, \u0027r\u0027, \u0027default\u0027, \u0027via\u0027, gateway, \u0027dev\u0027,"},{"line_number":254,"context_line":"                if_remote_name, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9LrM%3D","line":251,"updated":"2013-12-15 13:01:20.000000000","message":"can you please add a test to check this flow?","commit_id":"5604d8480a1888050880e3a33c7423104611878d"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                run_as_root\u003dTrue)"},{"line_number":246,"context_line":"            utils.execute("},{"line_number":247,"context_line":"                \u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, container_id,"},{"line_number":248,"context_line":"                \u0027ip\u0027, \u0027r\u0027, \u0027r\u0027, \u0027default\u0027, \u0027via\u0027, gateway, \u0027dev\u0027,"},{"line_number":249,"context_line":"                if_remote_name, run_as_root\u003dTrue)"},{"line_number":250,"context_line":"        except Exception:"},{"line_number":251,"context_line":"            msg \u003d _(\u0027Failed to setup the network, rolling back\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fpw4%3D","line":248,"updated":"2014-01-10 03:06:06.000000000","message":"I\u0027d prefer \u0027route\u0027, \u0027replace\u0027 to be more explicit. Not everyone will know the expansion for \u0027r\u0027, \u0027r\u0027.","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"57a7136be781ef889d96aaa4cbe207b14dd2c740","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                run_as_root\u003dTrue)"},{"line_number":246,"context_line":"            utils.execute("},{"line_number":247,"context_line":"                \u0027ip\u0027, \u0027netns\u0027, \u0027exec\u0027, container_id,"},{"line_number":248,"context_line":"                \u0027ip\u0027, \u0027r\u0027, \u0027r\u0027, \u0027default\u0027, \u0027via\u0027, gateway, \u0027dev\u0027,"},{"line_number":249,"context_line":"                if_remote_name, run_as_root\u003dTrue)"},{"line_number":250,"context_line":"        except Exception:"},{"line_number":251,"context_line":"            msg \u003d _(\u0027Failed to setup the network, rolling back\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fo%2FA%3D","line":248,"in_reply_to":"AAAAUH%2F%2Fpw4%3D","updated":"2014-01-10 07:01:43.000000000","message":"Will do as you wish :)","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"}],"nova/virt/docker/network.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b5dfaa0b7472dd95c68afae51fab5d58fc42359b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":14,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":"from nova.openstack.common.gettextutils import _"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9LrU%3D","line":16,"updated":"2013-12-15 13:01:20.000000000","message":"new line","commit_id":"5604d8480a1888050880e3a33c7423104611878d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b5dfaa0b7472dd95c68afae51fab5d58fc42359b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":24,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"},{"line_number":25,"context_line":"                return ip[\u0027address\u0027] + \"/\" + cidr"},{"line_number":26,"context_line":"    raise RuntimeError(_(\u0027Cannot set fixed ip\u0027))"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def find_gateway(network_info):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9Lrc%3D","line":26,"updated":"2013-12-15 13:01:20.000000000","message":"Cannot set fixed ip\u0027 \u003d\u003e Cannot find fixed ip\u0027","commit_id":"5604d8480a1888050880e3a33c7423104611878d"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"53a8fa8b1db82b42ab3fe3e13e9d6ca20d1ec5a3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":25,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"},{"line_number":26,"context_line":"                return ip[\u0027address\u0027] + \"/\" + cidr"},{"line_number":27,"context_line":"    raise RuntimeError(_(\u0027Cannot find fixed ip\u0027))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def find_gateway(network_info):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9Hv0%3D","line":27,"updated":"2013-12-16 16:09:12.000000000","message":"Can you use something more specific here?  Perhaps something based on nova.exception.NotFound?  There may be a defined exception already that fits","commit_id":"ec0764fab795f1e3f679decd8e0f53377dd105ac"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def find_fixed_ip(network_info, instance_id):"},{"line_number":23,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":24,"context_line":"        cidr \u003d subnet[\u0027cidr\u0027].split(\u0027/\u0027)[1]"},{"line_number":25,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":26,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FpuA%3D","line":23,"updated":"2014-01-10 03:06:06.000000000","message":"Each subnet should exist as a separate interface or IP alias. (It isn\u0027t clear to me how other drivers are doing this, I\u0027ll need to dig more unless yourself or another reviewer knows if other drivers are creating interfaces or aliases for multiple subnets)","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def find_fixed_ip(network_info, instance_id):"},{"line_number":23,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":24,"context_line":"        cidr \u003d subnet[\u0027cidr\u0027].split(\u0027/\u0027)[1]"},{"line_number":25,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":26,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"},{"line_number":27,"context_line":"                return ip[\u0027address\u0027] + \"/\" + cidr"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fpxs%3D","line":24,"updated":"2014-01-10 03:06:06.000000000","message":"This variable name should be \u0027netmask\u0027, not \u0027cidr\u0027\u0027, as it is extracting the netmask from the cidr.","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":22,"context_line":"def find_fixed_ip(network_info, instance_id):"},{"line_number":23,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":24,"context_line":"        cidr \u003d subnet[\u0027cidr\u0027].split(\u0027/\u0027)[1]"},{"line_number":25,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":26,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"},{"line_number":27,"context_line":"                return ip[\u0027address\u0027] + \"/\" + cidr"},{"line_number":28,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find fixed ip\u0027),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FpyA%3D","line":25,"updated":"2014-01-10 03:06:06.000000000","message":"If this can have multiple IPs, perhaps the solution is to add IP aliases.","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        for ip in subnet[\u0027ips\u0027]:"},{"line_number":26,"context_line":"            if ip[\u0027type\u0027] \u003d\u003d \u0027fixed\u0027 and ip[\u0027address\u0027]:"},{"line_number":27,"context_line":"                return ip[\u0027address\u0027] + \"/\" + cidr"},{"line_number":28,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find fixed ip\u0027),"},{"line_number":29,"context_line":"                                          instance_id\u003dinstance_id)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fpvk%3D","line":28,"updated":"2014-01-10 03:06:06.000000000","message":"FYI - While I\u0027m okay with this because it isn\u0027t a use-case that is yet supported by this driver, or even perhaps Nova itself, but ultimately I\u0027d like it such that containers can deploy without IP addresses.","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9a594e1893029a35c62ce62f38548faa5767ecfe","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def find_gateway(network_info, instance_id):"},{"line_number":33,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":34,"context_line":"        return subnet[\u0027gateway\u0027][\u0027address\u0027]"},{"line_number":35,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find gateway\u0027),"},{"line_number":36,"context_line":"                                          instance_id\u003dinstance_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FpzU%3D","line":34,"updated":"2014-01-10 03:06:06.000000000","message":"The right solution here seems to be to look at \u0027network_info[\u0027subnets\u0027][\u0027routes\u0027]\n\nThen add routes using:\n\n for subnet in network_info[\u0027subnets\u0027]:\n   for route in subnet[\u0027routes\u0027]:\n     utils.execute(\u0027ip\u0027, \u0027netns\u0027, container_id, \u0027exec\u0027, \u0027ip\u0027, \u0027route\u0027, \u0027replace\u0027, route[\u0027cidr\u0027], \u0027via\u0027, route[\u0027address\u0027], \u0027dev\u0027, if_remote_name, run_as_root\u003dTrue)","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"629fb14c2a2bc298707eed62c4f1b77049445f7c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def find_gateway(network_info, instance_id):"},{"line_number":33,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":34,"context_line":"        return subnet[\u0027gateway\u0027][\u0027address\u0027]"},{"line_number":35,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find gateway\u0027),"},{"line_number":36,"context_line":"                                          instance_id\u003dinstance_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FQs0%3D","line":34,"in_reply_to":"AAAAUH%2F%2Fo%2FY%3D","updated":"2014-01-15 18:56:10.000000000","message":"I might need to test this, then. From reading the source, I thought that \u0027routes\u0027 would contain the right content here.\n\nStill, even if we fetch from subnet[\u0027gateway\u0027][\u0027address\u0027], it seems that we might potentially have more than one subnet?","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"57a7136be781ef889d96aaa4cbe207b14dd2c740","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def find_gateway(network_info, instance_id):"},{"line_number":33,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":34,"context_line":"        return subnet[\u0027gateway\u0027][\u0027address\u0027]"},{"line_number":35,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find gateway\u0027),"},{"line_number":36,"context_line":"                                          instance_id\u003dinstance_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fo%2FY%3D","line":34,"in_reply_to":"AAAAUH%2F%2FpzU%3D","updated":"2014-01-10 07:01:43.000000000","message":"subnets/routes was empty in my tryouts, has that changed recently?\n\nSnipped from investigations:\n\n\u0027routes\u0027: [],\n\u0027cidr\u0027: u\u002710.0.0.0/24\u0027,\n\u0027gateway\u0027: IP({\n  \u0027meta\u0027: {},\n  \u0027version\u0027: 4,\n  \u0027type\u0027: u\u0027gateway\u0027,\n  \u0027address\u0027: u\u002710.0.0.1\u0027,\n}),","commit_id":"aa56fda37815b90f34c42a75842e0fd494f7d288"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"8c53d42fd955232e661e0a6af29b2830bd6c7a99","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                    container_id)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def find_fixed_ip(network_info, instance_id):"},{"line_number":41,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":42,"context_line":"        netmask \u003d subnet[\u0027cidr\u0027].split(\u0027/\u0027)[1]"},{"line_number":43,"context_line":"        for ip in subnet[\u0027ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BGsI%3D","line":40,"updated":"2014-01-30 03:45:35.000000000","message":"This is a strange choice here to use instance_id. The rest of the nova code would use an instance uuid. Is there a strong reason to use instance id here?\n\nAlso, I have a preference for passing the entire instance around, instead of attributes of it, as that will ease the object conversion later.","commit_id":"afd729633342de8baae1362c4b27edd44d53f00c"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"8c53d42fd955232e661e0a6af29b2830bd6c7a99","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                          instance_id\u003dinstance_id)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def find_gateway(network_info, instance_id):"},{"line_number":51,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":52,"context_line":"        return subnet[\u0027gateway\u0027][\u0027address\u0027]"},{"line_number":53,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find gateway\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BGsE%3D","line":50,"updated":"2014-01-30 03:45:35.000000000","message":"Ditto.","commit_id":"afd729633342de8baae1362c4b27edd44d53f00c"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"08a32fe7fb2c6ea1ba68bd1f98a1654bc2c79178","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                          instance_id\u003dinstance_id)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def find_gateway(network_info, instance_id):"},{"line_number":51,"context_line":"    for subnet in network_info[\u0027subnets\u0027]:"},{"line_number":52,"context_line":"        return subnet[\u0027gateway\u0027][\u0027address\u0027]"},{"line_number":53,"context_line":"    raise exception.InstanceDeployFailure(_(\u0027Cannot find gateway\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BDVo%3D","line":50,"in_reply_to":"AAAAUH%2F%2BGsE%3D","updated":"2014-01-30 16:44:15.000000000","message":"note that it is actually instance_name that is passed here so that is doubly confusing. I prefer passing the whole object as well and using instance_id\u003dinstance_name in the exception","commit_id":"afd729633342de8baae1362c4b27edd44d53f00c"}]}
