)]}'
{"ironic/api/controllers/v1/ramdisk.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        return cls(node\u003dnode, config\u003dconfig())"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"class PublicApiWithUsurpationProtection(rest.RestController):"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def __init__(self):"},{"line_number":83,"context_line":"        super(PublicApiWithUsurpationProtection, self).__init__()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_b29eed66","line":80,"updated":"2020-08-31 15:13:30.000000000","message":"Could you make it a function rather than a controller? We\u0027re trying to reduce our reliance on wsme and pecan.","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if self.restrict_agent_call_usurpation:"},{"line_number":101,"context_line":"            LOG.info(\"Usurpation restriction activated. Usurpation proxies \""},{"line_number":102,"context_line":"                     \"%s. Usurpation whitelist %s. Proxy header %s\","},{"line_number":103,"context_line":"                     self.usurpation_proxies,"},{"line_number":104,"context_line":"                     self.usurpation_whitelist,"},{"line_number":105,"context_line":"                     self.usurpation_proxy_header)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_92a3e9b1","line":102,"updated":"2020-08-31 15:13:30.000000000","message":"not really needed, we log all configuration values on start up","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # depends on pecan.request. Better safe than sorry"},{"line_number":124,"context_line":"        remote_addr \u003d getattr(request, \u0027remote_addr\u0027, None)"},{"line_number":125,"context_line":"        if not remote_addr:"},{"line_number":126,"context_line":"            LOG.warning(\"Unable to identify calling source ip!\")"},{"line_number":127,"context_line":"            return True"},{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            remote_addr \u003d netaddr.IPAddress(remote_addr).format()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_f2a8658d","line":126,"updated":"2020-08-31 15:13:30.000000000","message":"Let\u0027s log the node.","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            remote_addr \u003d netaddr.IPAddress(remote_addr).format()"},{"line_number":130,"context_line":"            if remote_addr not in self.usurpation_proxies:"},{"line_number":131,"context_line":"                LOG.info(\"Remote addr %s is not a proxy. Usurpating node %s\","},{"line_number":132,"context_line":"                         remote_addr, node.uuid)"},{"line_number":133,"context_line":"                return True"},{"line_number":134,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_d2ad619c","line":131,"updated":"2020-08-31 15:13:30.000000000","message":"Let\u0027s maybe invent a clearer (and less contradictive) term than \"usurpating\"? Maybe just explain in plain English words?","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        except Exception as e:"},{"line_number":135,"context_line":"            # Not sure this is possible at all, that request has no such"},{"line_number":136,"context_line":"            # attribute depends on pecan.request. Better safe than sorry"},{"line_number":137,"context_line":"            LOG.exception(e)"},{"line_number":138,"context_line":"            LOG.error(\"Remote addr %s is not an ip address!\", remote_addr)"},{"line_number":139,"context_line":"            return True"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_3292dd59","line":137,"updated":"2020-08-31 15:13:30.000000000","message":"remove in favor of the next one","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            # Not sure this is possible at all, that request has no such"},{"line_number":136,"context_line":"            # attribute depends on pecan.request. Better safe than sorry"},{"line_number":137,"context_line":"            LOG.exception(e)"},{"line_number":138,"context_line":"            LOG.error(\"Remote addr %s is not an ip address!\", remote_addr)"},{"line_number":139,"context_line":"            return True"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        headers \u003d request.headers"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_128fd92e","line":138,"updated":"2020-08-31 15:13:30.000000000","message":"s/exception/error/ and let\u0027s log the node","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            header_value \u003d netaddr.IPAddress("},{"line_number":144,"context_line":"                headers.get(self.usurpation_proxy_header))"},{"line_number":145,"context_line":"        except Exception as e:"},{"line_number":146,"context_line":"            LOG.exception(e)"},{"line_number":147,"context_line":"            LOG.warning(\"Unexpected exception while getting caller ip.\")"},{"line_number":148,"context_line":"            return True"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_729c556a","line":146,"updated":"2020-08-31 15:13:30.000000000","message":"remove this..","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                headers.get(self.usurpation_proxy_header))"},{"line_number":145,"context_line":"        except Exception as e:"},{"line_number":146,"context_line":"            LOG.exception(e)"},{"line_number":147,"context_line":"            LOG.warning(\"Unexpected exception while getting caller ip.\")"},{"line_number":148,"context_line":"            return True"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        # Only requests forwarded for either the node ip or some ip"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_52995177","line":147,"updated":"2020-08-31 15:13:30.000000000","message":".. and change s/warning/exception/ here","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # explicitely whitelisted are considered not usurpated"},{"line_number":152,"context_line":"        whitelisted \u003d self.usurpation_whitelist[:]"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        if [subnet for subnet in whitelisted if header_value in subnet]:"},{"line_number":155,"context_line":"            LOG.debug(\"Caller %s is whitelisted for node %s. Whitelist: %s\","},{"line_number":156,"context_line":"                      header_value, node.uuid, [str(i) for i in whitelisted])"},{"line_number":157,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_b2870d13","line":154,"updated":"2020-08-31 15:13:30.000000000","message":"nit: [] -\u003e any()","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                        vif[\u0027network_id\u0027] in ["},{"line_number":175,"context_line":"                            CONF.neutron.provisioning_network,"},{"line_number":176,"context_line":"                            CONF.neutron.cleaning_network,"},{"line_number":177,"context_line":"                            CONF.neutron.rescuing_network]:"},{"line_number":178,"context_line":"                    LOG.debug(\"Source ip is one of the node ports, coming \""},{"line_number":179,"context_line":"                              \"from one of the provisioning/rescuing/cleaning \""},{"line_number":180,"context_line":"                              \"networks. Source ip %s\", header_value.format())"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_928c8936","line":177,"updated":"2020-08-31 15:13:30.000000000","message":"These options won\u0027t necessary be available on the API node AND can be modified per node. Let\u0027s include some flag in the VIF RPC output?","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                            CONF.neutron.provisioning_network,"},{"line_number":176,"context_line":"                            CONF.neutron.cleaning_network,"},{"line_number":177,"context_line":"                            CONF.neutron.rescuing_network]:"},{"line_number":178,"context_line":"                    LOG.debug(\"Source ip is one of the node ports, coming \""},{"line_number":179,"context_line":"                              \"from one of the provisioning/rescuing/cleaning \""},{"line_number":180,"context_line":"                              \"networks. Source ip %s\", header_value.format())"},{"line_number":181,"context_line":"                    return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_f28185fd","line":178,"updated":"2020-08-31 15:13:30.000000000","message":"nit: IP","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                            CONF.neutron.rescuing_network]:"},{"line_number":178,"context_line":"                    LOG.debug(\"Source ip is one of the node ports, coming \""},{"line_number":179,"context_line":"                              \"from one of the provisioning/rescuing/cleaning \""},{"line_number":180,"context_line":"                              \"networks. Source ip %s\", header_value.format())"},{"line_number":181,"context_line":"                    return False"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        LOG.debug(\"Source ip %s is not whitelisted for node %s\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_d2860114","line":180,"updated":"2020-08-31 15:13:30.000000000","message":"nit: no need for format()","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            usurpated \u003d self._node_usurpated(node)"},{"line_number":190,"context_line":"        except Exception as e:"},{"line_number":191,"context_line":"            LOG.exception(e)"},{"line_number":192,"context_line":"            raise Exception(\u0027Unexpected error\u0027)"},{"line_number":193,"context_line":"        else:"},{"line_number":194,"context_line":"            if usurpated:"},{"line_number":195,"context_line":"                raise exception.NotFound()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_327bfd29","line":192,"updated":"2020-08-31 15:13:30.000000000","message":"ditto re exceptions","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}],"ironic/conductor/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":3321,"context_line":"    @METRICS.timer(\u0027ConductorManager.vif_list\u0027)"},{"line_number":3322,"context_line":"    @messaging.expected_exceptions(exception.NetworkError,"},{"line_number":3323,"context_line":"                                   exception.InvalidParameterValue)"},{"line_number":3324,"context_line":"    def vif_list(self, context, node_id, detailed\u003dFalse):"},{"line_number":3325,"context_line":"        \"\"\"List attached VIFs for a node"},{"line_number":3326,"context_line":""},{"line_number":3327,"context_line":"        :param context: request context."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_72757532","line":3324,"updated":"2020-08-31 15:13:30.000000000","message":"s/detailed/include_port/ maybe?","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"121158e09e938fb7e6574f3c33a5ee3a1c456ecc","unresolved":false,"context_lines":[{"line_number":3326,"context_line":""},{"line_number":3327,"context_line":"        :param context: request context."},{"line_number":3328,"context_line":"        :param node_id: node ID or UUID."},{"line_number":3329,"context_line":"        :returns: List of VIF dictionaries, each dictionary will have an"},{"line_number":3330,"context_line":"            \u0027id\u0027 entry with the ID of the VIF."},{"line_number":3331,"context_line":"        :raises: NetworkError, if something goes wrong during list the VIFs."},{"line_number":3332,"context_line":"        :raises: InvalidParameterValue, if a parameter that\u0027s required for"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_7f4d3ec3","line":3329,"updated":"2020-09-01 07:44:13.000000000","message":"missing new param definition","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}],"ironic/conf/api.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":63,"context_line":"               default\u003d300,"},{"line_number":64,"context_line":"               deprecated_group\u003d\u0027agent\u0027, deprecated_name\u003d\u0027heartbeat_timeout\u0027,"},{"line_number":65,"context_line":"               help\u003d_(\u0027Maximum interval (in seconds) for agent heartbeats.\u0027)),"},{"line_number":66,"context_line":"    cfg.BoolOpt(\u0027restrict_agent_call_usurpation\u0027,"},{"line_number":67,"context_line":"                default\u003dFalse,"},{"line_number":68,"context_line":"                help\u003d_("},{"line_number":69,"context_line":"                    \u0027Whether to restrict agent lookup/heartbeats usurpations, \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_52c4b15f","line":66,"updated":"2020-08-31 15:13:30.000000000","message":"Is usurpation a common term here? It\u0027s completely unclear for me.","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}],"ironic/drivers/modules/network/common.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        return (port_like_obj.internal_info.get(TENANT_VIF_KEY)"},{"line_number":360,"context_line":"                or port_like_obj.extra.get(\u0027vif_port_id\u0027))"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def vif_list(self, task, detailed\u003dFalse):"},{"line_number":363,"context_line":"        \"\"\"List attached VIF IDs for a node"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        :param task: A TaskManager instance."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_12ca396d","line":362,"updated":"2020-08-31 15:13:30.000000000","message":"s/detailed/include_port/ ?","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        for port_like_obj in task.ports + task.portgroups:"},{"line_number":372,"context_line":"            vif_id \u003d self._get_vif_id_by_port_like_obj(port_like_obj)"},{"line_number":373,"context_line":"            if vif_id:"},{"line_number":374,"context_line":"                vifs.append({\u0027id\u0027: vif_id})"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        if detailed:"},{"line_number":377,"context_line":"            client \u003d neutron.get_client(context\u003dtask.context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_72c73566","line":374,"updated":"2020-08-31 15:13:30.000000000","message":"process include_port here, no need for a new loop","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"121158e09e938fb7e6574f3c33a5ee3a1c456ecc","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        for port_like_obj in task.ports + task.portgroups:"},{"line_number":372,"context_line":"            vif_id \u003d self._get_vif_id_by_port_like_obj(port_like_obj)"},{"line_number":373,"context_line":"            if vif_id:"},{"line_number":374,"context_line":"                vifs.append({\u0027id\u0027: vif_id})"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        if detailed:"},{"line_number":377,"context_line":"            client \u003d neutron.get_client(context\u003dtask.context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_0e34cdfa","line":374,"in_reply_to":"9f560f44_72c73566","updated":"2020-09-01 07:44:13.000000000","message":"++","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}],"ironic/drivers/modules/network/noop.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"121158e09e938fb7e6574f3c33a5ee3a1c456ecc","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"\"\"List attached VIF IDs for a node."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param task: A TaskManager instance."},{"line_number":61,"context_line":"        :returns: List of VIF dictionaries, each dictionary will have an \u0027id\u0027"},{"line_number":62,"context_line":"            entry with the ID of the VIF."},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_ee57d925","line":61,"updated":"2020-09-01 07:44:13.000000000","message":"missing new param definition","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}],"releasenotes/notes/heartbeat-lookup-usurpation-protection-through-source-ip-ab647530e0c15daa.yaml":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"121158e09e938fb7e6574f3c33a5ee3a1c456ecc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds a lookup/heartbeat usurpation prevention mechanism through source ip."},{"line_number":4,"context_line":"    Disabled by default. Only relevant when provider has a way to identify"},{"line_number":5,"context_line":"    a node by its source ip, at least when it is on one of the provisioning,"},{"line_number":6,"context_line":"    rescuing and cleaning networks (no nat in the middle, no possible ip"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f560f44_2e18b182","line":3,"updated":"2020-09-01 07:44:13.000000000","message":"we may need to explain what \"usurpation\" means in this specific context, or provide external sources","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"941a95ec1166dfab362009805944f4c044e3f79d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    ``[api]/usurpation_proxies``, ``[api]/usurpation_proxy_header``,"},{"line_number":14,"context_line":"    ``[api]/usurpation_whitelist``."},{"line_number":15,"context_line":"upgrade:"},{"line_number":16,"context_line":"  - Condutor rpc api from 1.48 to 1.49"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f560f44_12787929","line":16,"updated":"2020-08-31 15:13:30.000000000","message":"This information is internal, not needed here.","commit_id":"07ccee44b8f55cee53872c46634f74d60554cfad"}]}
