)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"26d424fdad31176c295ba60c66055e92840f7a48","unresolved":false,"context_lines":[{"line_number":10,"context_line":"\u0027dns_name\u0027 attribute of the ports attached to the instance. \u0027dns_name\u0027 is used"},{"line_number":11,"context_line":"for the port\u0027s name in the Neutron\u0027s internal DNS service. It can also be"},{"line_number":12,"context_line":"published to an external DNS service, like Designate, if integration with such"},{"line_number":13,"context_line":"a service is enabled in Neutron."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I465ac35914186be0b645a6694b7d49d5dc396ba6"},{"line_number":16,"context_line":"Implements: blueprint neutron-hostname-dns"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a5ae5dd_bbfb6dc0","line":13,"updated":"2016-02-06 01:58:10.000000000","message":"This commit message doesn\u0027t say what this patch actually does, but ok.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"c07a576e1c528dc1276c46bee36041c20efe9d34","unresolved":false,"context_lines":[{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":433,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":434,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"                    # Make sure the port is usable"},{"line_number":437,"context_line":"                    if (port.get(\u0027binding:vif_type\u0027) \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_549ae315","line":434,"updated":"2016-01-27 17:22:03.000000000","message":"Can we switch this around a little? If the port has a different name set, then mark it unusable?","commit_id":"f11039ede964f4eaceb986e38f53b1fdcb957fb2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"20ca4c616f633045d7cb513507a4af480827cf8a","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        port creation or update in allocate_for_instance, which are executed in"},{"line_number":756,"context_line":"        an admin context."},{"line_number":757,"context_line":"        \"\"\""},{"line_number":758,"context_line":"        if constants.DNS_INTEGRATION not in self.extensions:"},{"line_number":759,"context_line":"            return"},{"line_number":760,"context_line":"        try:"},{"line_number":761,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027dns_name\u0027: instance.hostname}}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_2c1a336f","line":758,"range":{"start_line":758,"start_character":8,"end_line":758,"end_character":60},"updated":"2016-01-28 23:00:19.000000000","message":"I wanted to call attention to the fact that this is different than the mechanism that was spelled out in the spec which had much more error handling.  The point of that mechanism was for Nova to work whether or not Neutron had been upgraded to support setting dns_name on the port.  \n\nAt the time of writing / reviewing the spec, it seems we were all ignorant of the fact that the Neutron client would cache the list of extensions supported by Neutron and update the cache every ten minutes.  All we really needed to do was look at that cached list and see if this extension was among them.  If it isn\u0027t then we\u0027re done.  If it is then we have every reason expect that the following code will work.","commit_id":"f11039ede964f4eaceb986e38f53b1fdcb957fb2"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"4859cd7a16928a2259659439ce28bdc99107e74d","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        port creation or update in allocate_for_instance, which are executed in"},{"line_number":756,"context_line":"        an admin context."},{"line_number":757,"context_line":"        \"\"\""},{"line_number":758,"context_line":"        if constants.DNS_INTEGRATION not in self.extensions:"},{"line_number":759,"context_line":"            return"},{"line_number":760,"context_line":"        try:"},{"line_number":761,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027dns_name\u0027: instance.hostname}}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_5cff1e67","line":758,"range":{"start_line":758,"start_character":8,"end_line":758,"end_character":60},"in_reply_to":"7a5de9d1_2c1a336f","updated":"2016-01-28 23:31:20.000000000","message":"To provide more details, the Neutron extensions cache is kept in self.extensions by method _refresh_neutron_extensions_cache that is executed every time allocate_for_instance is executed. The update interval is CONF.neutron.extension_sync_interval:\n\n    cfg.IntOpt(\u0027extension_sync_interval\u0027,\n                default\u003d600,\n                help\u003d\u0027Number of seconds before querying neutron for\u0027\n                     \u0027 extensions\u0027),","commit_id":"f11039ede964f4eaceb986e38f53b1fdcb957fb2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"588549473f525a81028d6f19c3f4b7c636e2442d","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":430,"context_line":"                    # dns_name attribute."},{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":433,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":434,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"},{"line_number":435,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_176a1a81","line":432,"updated":"2016-02-03 17:58:40.000000000","message":"bit worried if this leaks out the API.","commit_id":"91e61f6ac1084cc9223cb12ae98d5382907bfe95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b1ce82733b9124af074ed869db86f783aeca972","unresolved":false,"context_lines":[{"line_number":429,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":430,"context_line":"                    # dns_name attribute."},{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":433,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":434,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"},{"line_number":435,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_775a6e85","line":432,"in_reply_to":"5a5ae5dd_176a1a81","updated":"2016-02-03 18:14:06.000000000","message":"nope its fine, we just log the reason and get on with life.","commit_id":"91e61f6ac1084cc9223cb12ae98d5382907bfe95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b1ce82733b9124af074ed869db86f783aeca972","unresolved":false,"context_lines":[{"line_number":654,"context_line":"                    neutron\u003dneutron, bind_host_id\u003dbind_host_id)"},{"line_number":655,"context_line":"                if request.port_id:"},{"line_number":656,"context_line":"                    port \u003d ports[request.port_id]"},{"line_number":657,"context_line":"                    port_client.update_port(port[\u0027id\u0027], port_req_body)"},{"line_number":658,"context_line":"                    preexisting_port_ids.append(port[\u0027id\u0027])"},{"line_number":659,"context_line":"                    ports_in_requested_order.append(port[\u0027id\u0027])"},{"line_number":660,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_f7065e1f","line":657,"updated":"2016-02-03 18:14:06.000000000","message":"it does seem wasteful to call update_port twice in this case?","commit_id":"91e61f6ac1084cc9223cb12ae98d5382907bfe95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b1ce82733b9124af074ed869db86f783aeca972","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                    preexisting_port_ids.append(port[\u0027id\u0027])"},{"line_number":659,"context_line":"                    ports_in_requested_order.append(port[\u0027id\u0027])"},{"line_number":660,"context_line":"                else:"},{"line_number":661,"context_line":"                    created_port \u003d self._create_port("},{"line_number":662,"context_line":"                            port_client, instance, request.network_id,"},{"line_number":663,"context_line":"                            port_req_body, request.address,"},{"line_number":664,"context_line":"                            security_group_ids, available_macs, dhcp_opts)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_da04a716","line":661,"updated":"2016-02-03 18:14:06.000000000","message":"I guess we can\u0027t pass in the dns_name into the create call?","commit_id":"91e61f6ac1084cc9223cb12ae98d5382907bfe95"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"588549473f525a81028d6f19c3f4b7c636e2442d","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        an admin context."},{"line_number":757,"context_line":"        \"\"\""},{"line_number":758,"context_line":"        if constants.DNS_INTEGRATION not in self.extensions:"},{"line_number":759,"context_line":"            return"},{"line_number":760,"context_line":"        try:"},{"line_number":761,"context_line":"            port_req_body \u003d {\u0027port\u0027: {\u0027dns_name\u0027: instance.hostname}}"},{"line_number":762,"context_line":"            neutron.update_port(port_id, port_req_body)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_97460a22","line":759,"updated":"2016-02-03 17:58:40.000000000","message":"Nit: tempting to log a debug message in this case.","commit_id":"91e61f6ac1084cc9223cb12ae98d5382907bfe95"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5ae76629cb5b53e15618f5c99a76a2c52f2f78fc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                     \u0027 extensions\u0027),"},{"line_number":61,"context_line":"    cfg.BoolOpt(\u0027allow_dns_integration_for_all_ports\u0027, default\u003dFalse,"},{"line_number":62,"context_line":"                help\u003d_(\"Allow dns_name attribute to be added to all ports \""},{"line_number":63,"context_line":"                       \"when allocating network resources for an instance\")),"},{"line_number":64,"context_line":"   ]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"NEUTRON_GROUP \u003d \u0027neutron\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_c8e81d13","line":63,"updated":"2016-02-04 19:11:32.000000000","message":"This only holds true when the dns_integration extension is enabled in Neutron and should be noted.  It\u0027s also not entirely clear to me under what conditions will the dns_name not be added to the port, assuming the dns_integration extension is enabled in Neutron.  From what I can tell below if the port_binding extension is enabled dns_integration won\u0027t be used, and if network.get(\u0027dns_domain\u0027) is set it won\u0027t happen.  And that last condition is the only one that this config affects.  So it\u0027s misleading to say that this will apply to all ports, and very confusing for users because there\u0027s a gauntlet of conditions that need to occur for this to work.","commit_id":"aaff55b56524c428103d85eae1b3573b889173a6"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"48625aab5e9aa13338e43371e7fdd38191c3dc37","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                     \u0027 extensions\u0027),"},{"line_number":61,"context_line":"    cfg.BoolOpt(\u0027allow_dns_integration_for_all_ports\u0027, default\u003dFalse,"},{"line_number":62,"context_line":"                help\u003d_(\"Allow dns_name attribute to be added to all ports \""},{"line_number":63,"context_line":"                       \"when allocating network resources for an instance\")),"},{"line_number":64,"context_line":"   ]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"NEUTRON_GROUP \u003d \u0027neutron\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_44296836","line":63,"in_reply_to":"5a5ae5dd_c8e81d13","updated":"2016-02-05 04:23:33.000000000","message":"Based on your feedback, I removed this","commit_id":"aaff55b56524c428103d85eae1b3573b889173a6"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"5ae76629cb5b53e15618f5c99a76a2c52f2f78fc","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":433,"context_line":"                    # dns_name attribute."},{"line_number":434,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":435,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":436,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":437,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_3f9a4d64","line":434,"updated":"2016-02-04 19:11:32.000000000","message":"The spec proposed that this should only raise an exception if port.get(\u0027dns_name\u0027) doesn\u0027t match instance.hostname.","commit_id":"aaff55b56524c428103d85eae1b3573b889173a6"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"48625aab5e9aa13338e43371e7fdd38191c3dc37","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":433,"context_line":"                    # dns_name attribute."},{"line_number":434,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":435,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":436,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":437,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_c41558e5","line":434,"in_reply_to":"5a5ae5dd_3f9a4d64","updated":"2016-02-05 04:23:33.000000000","message":"You are absolutely right. Thank you for catching this error","commit_id":"aaff55b56524c428103d85eae1b3573b889173a6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"bdbd27fe7fd861acc98c3fce6af5f2f46a9a0057","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":433,"context_line":"                    # dns_name attribute."},{"line_number":434,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":435,"context_line":"                        raise exception.PortNotUsableDNS("},{"line_number":436,"context_line":"                            port_id\u003drequest.port_id, instance\u003dinstance.uuid,"},{"line_number":437,"context_line":"                            value\u003dport[\u0027dns_name\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_7d5d0978","line":434,"in_reply_to":"5a5ae5dd_c41558e5","updated":"2016-02-05 12:22:52.000000000","message":"Ah, thank you alaski, that was bugging me, but I couldn\u0027t put a finger on why.","commit_id":"aaff55b56524c428103d85eae1b3573b889173a6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"26d424fdad31176c295ba60c66055e92840f7a48","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            port\u0027s MAC address is not in that set."},{"line_number":395,"context_line":"        :raises nova.exception.PortInUse: If a requested port is already"},{"line_number":396,"context_line":"            attached to another instance."},{"line_number":397,"context_line":"        :raises nova.exception.PortNotUsableDNS: If a requested port has a"},{"line_number":398,"context_line":"            value assigned to its dns_name attribute."},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_dbf8a9c5","line":397,"updated":"2016-02-06 01:58:10.000000000","message":"is this gonna be raised only when doing nova boot by specifying a pre-existent port? I assume it is, but I wouldn\u0027t mind if you clarified.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"af8abd6ab837103c9b2ef5ec6b09c7362ed3d428","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            port\u0027s MAC address is not in that set."},{"line_number":395,"context_line":"        :raises nova.exception.PortInUse: If a requested port is already"},{"line_number":396,"context_line":"            attached to another instance."},{"line_number":397,"context_line":"        :raises nova.exception.PortNotUsableDNS: If a requested port has a"},{"line_number":398,"context_line":"            value assigned to its dns_name attribute."},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_8622c8a1","line":397,"in_reply_to":"5a5ae5dd_dbf8a9c5","updated":"2016-02-07 01:56:28.000000000","message":"This exception only is raised when doing the nova boot by specifying a pre-existing port","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"76a1bddb4c1a0d418f670c1c709e7717c3a1372e","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":430,"context_line":"                    # dns_name attribute."},{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        if port[\u0027dns_name\u0027] !\u003d instance.hostname:"},{"line_number":433,"context_line":"                            raise exception.PortNotUsableDNS("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_1d0f3538","line":430,"updated":"2016-02-05 13:01:24.000000000","message":"Nit: this comment is out of date now.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f2698a8a2cb62b791465e1b4316bbbdc06db26ad","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":430,"context_line":"                    # dns_name attribute."},{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        if port[\u0027dns_name\u0027] !\u003d instance.hostname:"},{"line_number":433,"context_line":"                            raise exception.PortNotUsableDNS("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_51a79e0a","line":430,"in_reply_to":"5a5ae5dd_06b9f814","updated":"2016-02-08 07:36:31.000000000","message":"Fixed this in a dependent patch https://review.openstack.org/#/c/277302 where I also add unit tests","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"af8abd6ab837103c9b2ef5ec6b09c7362ed3d428","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                        raise exception.PortInUse(port_id\u003drequest.port_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"                    # Make sure the user didn\u0027t assign a value to the port\u0027s"},{"line_number":430,"context_line":"                    # dns_name attribute."},{"line_number":431,"context_line":"                    if port.get(\u0027dns_name\u0027):"},{"line_number":432,"context_line":"                        if port[\u0027dns_name\u0027] !\u003d instance.hostname:"},{"line_number":433,"context_line":"                            raise exception.PortNotUsableDNS("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_06b9f814","line":430,"in_reply_to":"5a5ae5dd_1d0f3538","updated":"2016-02-07 01:56:28.000000000","message":"I can fix this in PS7, where I will add unit tests or in a follow up patchset. I\u0027ll wait for guidance about this","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"26d424fdad31176c295ba60c66055e92840f7a48","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_3bdf7d0e","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"updated":"2016-02-06 01:58:10.000000000","message":"We\u0027re doubling the number of calls to be made here, I wish there were a better solution. It seems this is somewhat a limitation of Designate that doesn\u0027t allow admin to make a call on behalf of a tenant. That said, we do pass the tenant id in the port creation request even if we are making the call as admin, so we should be able to push this bubble over the Neutron fence and have Neutron/Designate have a suboptimal integration for now. If that gets fixed later on, we don\u0027t have to touch Nova to appreciate the performance gain.\n\nIf we keep it like this and we work out a better way to integrate with Designate we gotta change two places instead: here and Neutron. \n\nThat said, why ports_in_requested_order[-1], wouldn\u0027t created_port be just as well?","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8862e27d663fbd1eb0ecb9df2127abacdc34fe62","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_2ea92625","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_23ef141f","updated":"2016-02-09 01:23:03.000000000","message":"Ack. I realize that you guys had given this a lot of thought and I am sure that this was the most sensible solution given the circumstances. It\u0027s my understanding that the extra call is introduced any time a user wants his/her VM\u0027s hostname as a dns record (in Designate). Once this feature is available, I would reckon this would become more and more frequent and my concern stems from the fact that later down the line we could get feedback by perf teams saying: \"Hey I used to be able to spawn these many VM\u0027s in this much time, now I can only do a fraction of it, what gives?\"\n\nUltimately we\u0027d need to figure out a long term solution to this problem, as John suggests. That brings me to the point, do we need a release note for this, potentially highlighting this integration issue?","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"13f0be19e2500739fc7c2b2c8bab89accc06529b","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_5d8671ba","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_2ea92625","updated":"2016-02-09 16:28:53.000000000","message":"I will add a release note to the dependent patch where I am also adding unit tests. Also, as I have said before, I am writing a chapter for the Networking Guide, where I am documenting this.\n\nFinally, I want to clarify that not all the users wanting his/her VM\u0027s hostname as a dns record (in Designate) will incur the extra call. Many users will accomplish this by associating a floating ip to the port on the Neutron side. In this case, the extra call is not needed. It is only needed when the user wants its VM\u0027s hostname as a dns record through the the port\u0027s dns_name, which is triggered when the port\u0027s network has a non blank dns_domain. And this only happens only if port binding extension is enabled. And I am documenting this very clearly in the Networking Guide and will do the same in the release note","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"af8abd6ab837103c9b2ef5ec6b09c7362ed3d428","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_a6d3445f","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_3bdf7d0e","updated":"2016-02-07 01:56:28.000000000","message":"We are not doubling the number of calls to be made here. Even with the port binding extension enabled, for the vast majority of ports, the dns_name attribute will be set by the requests in line 660 or line 664 above (dns_name is added to the body of these requests by method _populate_neutron_extension_values, lines 751 to 762).\n\nThis additional update request is executed if the port binding extension is enabled only for those ports on a network that has a dns_domain with a non blank value. This is because only those ports are susceptible to be sent to Designate and the user context is required for this. It will be a small fraction of all ports created, though. Only for ports that the user wants to make accesible from the outside, it makes sense to assign a value to their networks dns_domain attribute. This will be prominently documented in the new chapter I am writing for the Networking Guide describing the DNS extension. \n\ncreated_port is only useful when Nova is creating the port. The user might specify a pre-existing port for the instance. In both cases, the the id of the port currently being processed is in ports_in_requested_order[-1]","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2b2653c5a000706f5a3ba2996b0364bd5783021a","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_ebe433ad","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_5d8671ba","updated":"2016-02-09 16:56:03.000000000","message":"In other words, with the proper documentation, the users have total control on whether they want to incur the extra cost or not in exchange for the benefit of making their VM\u0027s hostnames known in the external DNS. And even if they choose not to pay the extra cost, they still can benefit from this DNS integration using floating ip\u0027s as the vehicle","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7f8bbf45e7d1c9a37c7712ae808416804eb757b1","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_23ef141f","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_6ba2e89a","updated":"2016-02-08 18:20:14.000000000","message":"So there is totally a bigger keystone cross service problem here.\n\nIts not really one we have fixed at all, but its possible to have a Nova service user call, and also attach a tenant token. That would help.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"22c963323c76d965b12cd0fe6b85d7ad1d9503de","unresolved":false,"context_lines":[{"line_number":668,"context_line":"                    created_port_ids.append(created_port)"},{"line_number":669,"context_line":"                    ports_in_requested_order.append(created_port)"},{"line_number":670,"context_line":"                self._update_port_dns_name(context, instance, network,"},{"line_number":671,"context_line":"                                           ports_in_requested_order[-1],"},{"line_number":672,"context_line":"                                           neutron)"},{"line_number":673,"context_line":"            except Exception:"},{"line_number":674,"context_line":"                with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_6ba2e89a","line":671,"range":{"start_line":671,"start_character":43,"end_line":671,"end_character":71},"in_reply_to":"5a5ae5dd_a6d3445f","updated":"2016-02-08 05:37:32.000000000","message":"@Armando What you might be missing here is the condition on L778-L780 which drastically limits when this update will be made under most conditions, especially in the gate.  Most tests won\u0027t have dns_domain set on the network except where the test is specifically targeted at this use case.\n\nIn practice, any tenant who does add a dns_domain to a network will expect to see an extra call made each time a boot is done.  I didn\u0027t see this as a big concern.\n\nI don\u0027t know what you mean when you say \"sub-optimal integration\" between Neutron and Designate.\"  Could you elaborate?  How would that work?\n\nIt is my understanding that passing the tenant_id over to Neutron in admin context isn\u0027t sufficient to allow Neutron to interact with Designate on behalf of the user.  I thought that we had to contact Neutron in the user\u0027s context so that Neutron could carry that context forward to Designate.  I think the alternative would be to give the Neutron admin admin privileges in Designate.  I\u0027m not sure it is wise from a security point of view.  I thought it was specifically what Designate did not want to do.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"26d424fdad31176c295ba60c66055e92840f7a48","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            port \u003d {\u0027id\u0027: \u0027portid_\u0027 + network[\u0027id\u0027]}"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            api._populate_neutron_extension_values(self.context,"},{"line_number":1144,"context_line":"                self.instance, None, binding_port_req_body, network\u003dnetwork,"},{"line_number":1145,"context_line":"                neutron\u003dself.moxed_client, bind_host_id\u003dNone).AndReturn(None)"},{"line_number":1146,"context_line":"            if index \u003d\u003d 0:"},{"line_number":1147,"context_line":"                self.moxed_client.create_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_5b327960","line":1144,"updated":"2016-02-06 01:58:10.000000000","message":"nothing tests the newly introduced exception. This isn\u0027t my codebase, but are you happy with this? Was this granted or overlooked?","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"22c963323c76d965b12cd0fe6b85d7ad1d9503de","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            port \u003d {\u0027id\u0027: \u0027portid_\u0027 + network[\u0027id\u0027]}"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            api._populate_neutron_extension_values(self.context,"},{"line_number":1144,"context_line":"                self.instance, None, binding_port_req_body, network\u003dnetwork,"},{"line_number":1145,"context_line":"                neutron\u003dself.moxed_client, bind_host_id\u003dNone).AndReturn(None)"},{"line_number":1146,"context_line":"            if index \u003d\u003d 0:"},{"line_number":1147,"context_line":"                self.moxed_client.create_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_cbf19c6c","line":1144,"in_reply_to":"5a5ae5dd_26c8b4a5","updated":"2016-02-08 05:37:32.000000000","message":"Let\u0027s try to get them in to this patch set.  Typically, I prefer tests to land in the same patch set.  It makes sense for unit tests at least and possible others.  I have made exceptions in the past but I don\u0027t think it would be unreasonable to beef up the coverage of this new functionality in this patch set.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8862e27d663fbd1eb0ecb9df2127abacdc34fe62","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            port \u003d {\u0027id\u0027: \u0027portid_\u0027 + network[\u0027id\u0027]}"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            api._populate_neutron_extension_values(self.context,"},{"line_number":1144,"context_line":"                self.instance, None, binding_port_req_body, network\u003dnetwork,"},{"line_number":1145,"context_line":"                neutron\u003dself.moxed_client, bind_host_id\u003dNone).AndReturn(None)"},{"line_number":1146,"context_line":"            if index \u003d\u003d 0:"},{"line_number":1147,"context_line":"                self.moxed_client.create_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_7112a35a","line":1144,"in_reply_to":"5a5ae5dd_31f22207","updated":"2016-02-09 01:23:03.000000000","message":"I would squash them in this patch but I don\u0027t feel strongly one way or the other.","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"af8abd6ab837103c9b2ef5ec6b09c7362ed3d428","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            port \u003d {\u0027id\u0027: \u0027portid_\u0027 + network[\u0027id\u0027]}"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            api._populate_neutron_extension_values(self.context,"},{"line_number":1144,"context_line":"                self.instance, None, binding_port_req_body, network\u003dnetwork,"},{"line_number":1145,"context_line":"                neutron\u003dself.moxed_client, bind_host_id\u003dNone).AndReturn(None)"},{"line_number":1146,"context_line":"            if index \u003d\u003d 0:"},{"line_number":1147,"context_line":"                self.moxed_client.create_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_26c8b4a5","line":1144,"in_reply_to":"5a5ae5dd_5b327960","updated":"2016-02-07 01:56:28.000000000","message":"Besides following this review, my task for this weekend is to complete the unit tests for this patchset. I can add them to this patchset or a follow up. I\u0027ll wait for guidance on this","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f2698a8a2cb62b791465e1b4316bbbdc06db26ad","unresolved":false,"context_lines":[{"line_number":1141,"context_line":"            port \u003d {\u0027id\u0027: \u0027portid_\u0027 + network[\u0027id\u0027]}"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"            api._populate_neutron_extension_values(self.context,"},{"line_number":1144,"context_line":"                self.instance, None, binding_port_req_body, network\u003dnetwork,"},{"line_number":1145,"context_line":"                neutron\u003dself.moxed_client, bind_host_id\u003dNone).AndReturn(None)"},{"line_number":1146,"context_line":"            if index \u003d\u003d 0:"},{"line_number":1147,"context_line":"                self.moxed_client.create_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a5ae5dd_31f22207","line":1144,"in_reply_to":"5a5ae5dd_cbf19c6c","updated":"2016-02-08 07:36:31.000000000","message":"Added unit tests in dependent patch: https://review.openstack.org/#/c/277302. The newly introduced exception is covered","commit_id":"30ba0c5eb19a9c9628957ac8e617ae78c0c1fa84"}]}
