)]}'
{"doc/source/installation/trunk_ports.rst":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"bd64cb12272d15e1369ea27e156202731738198a","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"In some deployments, it might be desired to have multiple network interfaces in"},{"line_number":52,"context_line":"the nova VM. In such cases, kuryr might not be able to correctly identify which"},{"line_number":53,"context_line":"interface is the trunk port\u0027s parent interface inside the VM. "},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"This can be achieved by adding a label \u0027trunk_port_ip\u0027 on the k8s node "},{"line_number":56,"context_line":"corresponding to the VM. This label should be equal to the IP address of the "}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa7e38b_258177a1","line":53,"range":{"start_line":53,"start_character":61,"end_line":53,"end_character":62},"updated":"2019-11-13 13:42:13.000000000","message":"Please, get rid of the trailing whitespaces","commit_id":"ed02d7d4a6324817f00a321dfa9579a3bbf3dd4b"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"bd64cb12272d15e1369ea27e156202731738198a","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"This can be achieved by adding a label \u0027trunk_port_ip\u0027 on the k8s node "},{"line_number":56,"context_line":"corresponding to the VM. This label should be equal to the IP address of the "},{"line_number":57,"context_line":"trunk\u0027s parent port. For example::"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    $ kubectl label node overcloud_vm.local trunk_port_ip\u003d192.168.1.11"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa7e38b_45b5937d","line":57,"range":{"start_line":57,"start_character":32,"end_line":57,"end_character":34},"updated":"2019-11-13 13:42:13.000000000","message":"Please use code-block directive instead.","commit_id":"ed02d7d4a6324817f00a321dfa9579a3bbf3dd4b"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"bd64cb12272d15e1369ea27e156202731738198a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"trunk\u0027s parent port. For example::"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    $ kubectl label node overcloud_vm.local trunk_port_ip\u003d192.168.1.11"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa7e38b_c5a8a321","line":60,"updated":"2019-11-13 13:42:13.000000000","message":"Remove trailing line, please.","commit_id":"ed02d7d4a6324817f00a321dfa9579a3bbf3dd4b"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7003a6688e63bf90645cf17ab30173c52331d001","unresolved":false,"context_lines":[{"line_number":56,"context_line":"corresponding to the VM. This label should be equal to the IP address of the"},{"line_number":57,"context_line":"trunk\u0027s parent port. For example:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. code-block::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    $ kubectl label node overcloud_vm.local trunk_port_ip\u003d192.168.1.11"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa7e38b_05446c73","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":15},"updated":"2019-11-14 07:20:26.000000000","message":"To be exact:\n\n  .. code-block:: console","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"3f9689292553cd5f826062d925f79cb93c787d73","unresolved":false,"context_lines":[{"line_number":56,"context_line":"corresponding to the VM. This label should be equal to the IP address of the"},{"line_number":57,"context_line":"trunk\u0027s parent port. For example:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. code-block::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    $ kubectl label node overcloud_vm.local trunk_port_ip\u003d192.168.1.11"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa7e38b_777953c3","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":15},"in_reply_to":"3fa7e38b_05446c73","updated":"2019-11-14 09:07:28.000000000","message":"thanks for the help, I\u0027m not too familiar with sphinx syntax :)","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7003a6688e63bf90645cf17ab30173c52331d001","unresolved":false,"context_lines":[{"line_number":57,"context_line":"trunk\u0027s parent port. For example:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. code-block::"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    $ kubectl label node overcloud_vm.local trunk_port_ip\u003d192.168.1.11"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa7e38b_654d2098","line":61,"range":{"start_line":60,"start_character":0,"end_line":61,"end_character":4},"updated":"2019-11-14 07:20:26.000000000","message":"According to sphinx documentation[1], code-block (and other indented elements) body should align with the directive name, so in this case it\u0027s exactly 3 spaces, not 4 :)\n\n\n[1] https://www.sphinx-doc.org/en/1.5/markup/code.html","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d87b3aa0a508e8cc181fda2b002ea373e5eb66c1","unresolved":false,"context_lines":[{"line_number":52,"context_line":"a nova VM. In such cases, kuryr might not be able to correctly identify which"},{"line_number":53,"context_line":"interface is the trunk port\u0027s parent interface inside the VM."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"This can be achieved by adding a label \u0027trunk_port_ip\u0027 on the k8s node"},{"line_number":56,"context_line":"corresponding to the VM. This label should be equal to the IP address of the"},{"line_number":57,"context_line":"trunk\u0027s parent port. For example:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":".. code-block:: console"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3fa7e38b_73235c06","line":57,"range":{"start_line":55,"start_character":0,"end_line":57,"end_character":33},"updated":"2019-11-20 12:25:29.000000000","message":"Interestingly I tried working with Neutron and Nova folks to get that information. Apparently it\u0027s impossible.","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"}],"kuryr_kubernetes/constants.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d87b3aa0a508e8cc181fda2b002ea373e5eb66c1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"K8S_ANNOTATION_CURRENT_DRIVER \u003d \u0027current_driver\u0027"},{"line_number":60,"context_line":"K8S_ANNOTATION_NEUTRON_PORT \u003d \u0027neutron_id\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"K8S_NODE_LABEL_TRUNK_PORT_IP \u003d \u0027trunk_port_ip\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"K8S_OS_VIF_NOOP_PLUGIN \u003d \"noop\""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_53542054","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":46},"updated":"2019-11-20 12:25:29.000000000","message":"This should definitely have K8S_ANNOTATION_PREFIX added. See example labels added for OpenShift deployment below. Also apparently the agreed way to name them is using - instead of _.\n\n    labels:                                                                                                                                                                                    \n      beta.kubernetes.io/arch: amd64                                                                                                                                                           \n      beta.kubernetes.io/instance-type: m4.xlarge                                                                                                                                              \n      beta.kubernetes.io/os: linux                                                                                                                                                             \n      failure-domain.beta.kubernetes.io/zone: nova                                                                                                                                             \n      kubernetes.io/arch: amd64                                                                                                                                                                \n      kubernetes.io/hostname: ostest-b5lv6-worker-x9jjs                                                                                                                                        \n      kubernetes.io/os: linux                                                                                                                                                                  \n      node-role.kubernetes.io/worker: \"\"                                                                                                                                                       \n      node.openshift.io/os_id: rhcos","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"}],"kuryr_kubernetes/controller/drivers/nested_vif.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"fe067f1b2c343522ba72cc4fef17d31eb6ebd4b3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      \" not found!\", fixed_ips)"},{"line_number":63,"context_line":"            raise kl_exc.NoResourceException"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":68,"context_line":"        node_info \u003d kubernetes.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9193924f","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":12},"updated":"2018-09-05 08:00:22.000000000","message":"I like the caching, but I wonder if it will be possible to change the node notation to change the trunk to use over time","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"2511deeb3c656b5f7e1df9588192ec6d02a30b76","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      \" not found!\", fixed_ips)"},{"line_number":63,"context_line":"            raise kl_exc.NoResourceException"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":68,"context_line":"        node_info \u003d kubernetes.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_fa0495c8","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":12},"in_reply_to":"3f79a3b5_9193924f","updated":"2019-04-23 03:02:40.000000000","message":"The cache_time can be set in the pod_vif_nested section in the config. Maybe this should be sufficient","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":21041,"name":"Yossi Boaron","email":"yossi.boaron.dev@gmail.com","username":"yboaron"},"change_message_id":"969141eb93e6a6e6ad5646dd5a9fec1f09afcce8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":68,"context_line":"        node_info \u003d kubernetes.get("},{"line_number":69,"context_line":"            constants.K8S_API_BASE + \u0027/nodes/\u0027 + node_name)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":72,"context_line":"        if labels:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_be9feb4f","line":69,"range":{"start_line":68,"start_character":7,"end_line":69,"end_character":59},"updated":"2018-09-12 09:15:25.000000000","message":"Don\u0027t you want to handle the case in which k8s.get raise \u0027K8sClientException\u0027?","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"2511deeb3c656b5f7e1df9588192ec6d02a30b76","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":68,"context_line":"        node_info \u003d kubernetes.get("},{"line_number":69,"context_line":"            constants.K8S_API_BASE + \u0027/nodes/\u0027 + node_name)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":72,"context_line":"        if labels:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_1a0ac9d1","line":69,"range":{"start_line":68,"start_character":7,"end_line":69,"end_character":59},"in_reply_to":"3f79a3b5_be9feb4f","updated":"2019-04-23 03:02:40.000000000","message":"Done","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":21041,"name":"Yossi Boaron","email":"yossi.boaron.dev@gmail.com","username":"yboaron"},"change_message_id":"969141eb93e6a6e6ad5646dd5a9fec1f09afcce8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            constants.K8S_API_BASE + \u0027/nodes/\u0027 + node_name)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":72,"context_line":"        if labels:"},{"line_number":73,"context_line":"            trunk_ip \u003d labels.get(constants.K8S_NODE_LABEL_TRUNK_PORT_IP, None)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        return trunk_ip"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3e2bdb33","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":18},"updated":"2018-09-12 09:15:25.000000000","message":"What value \u0027trunk_ip\u0027 gets if we not entering this if?","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"2511deeb3c656b5f7e1df9588192ec6d02a30b76","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            constants.K8S_API_BASE + \u0027/nodes/\u0027 + node_name)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":72,"context_line":"        if labels:"},{"line_number":73,"context_line":"            trunk_ip \u003d labels.get(constants.K8S_NODE_LABEL_TRUNK_PORT_IP, None)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        return trunk_ip"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_ba0e1de3","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":18},"in_reply_to":"3f79a3b5_3e2bdb33","updated":"2019-04-23 03:02:40.000000000","message":"My bad, fixed","commit_id":"23edb2ccd020323422e82481f4e1a3a026d8bac3"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"bd64cb12272d15e1369ea27e156202731738198a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        trunk_ip \u003d None"},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":70,"context_line":"            node_info \u003d kubernetes.get("},{"line_number":71,"context_line":"                constants.K8S_API_BASE + \u0027/nodes/\u0027 + node_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":74,"context_line":"            if labels:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_48060a1f","line":71,"range":{"start_line":70,"start_character":0,"end_line":71,"end_character":63},"updated":"2019-11-13 13:42:13.000000000","message":"It can be formatted, like:\n\n            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format(\n                constants.K8S_API_BASE, node_name))","commit_id":"ed02d7d4a6324817f00a321dfa9579a3bbf3dd4b"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7003a6688e63bf90645cf17ab30173c52331d001","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":70,"context_line":"            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format("},{"line_number":71,"context_line":"                constants.K8S_API_BASE,  node_name))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":74,"context_line":"            if labels:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8557fc26","line":71,"range":{"start_line":71,"start_character":39,"end_line":71,"end_character":41},"updated":"2019-11-14 07:20:26.000000000","message":"Single space.","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7003a6688e63bf90645cf17ab30173c52331d001","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_parent_port(self, neutron, pod):"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            node_fixed_ip \u003d self._get_node_trunk_port_ip("},{"line_number":84,"context_line":"                pod[\u0027spec\u0027][\u0027nodeName\u0027]) or pod[\u0027status\u0027][\u0027hostIP\u0027]"},{"line_number":85,"context_line":"        except KeyError:"},{"line_number":86,"context_line":"            if pod[\u0027status\u0027][\u0027conditions\u0027][0][\u0027type\u0027] !\u003d \"Initialized\":"},{"line_number":87,"context_line":"                LOG.debug(\"Pod condition type is not \u0027Initialized\u0027\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_5733f7f6","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"updated":"2019-11-14 07:20:26.000000000","message":"Does it mean, that we expect, that node fixed ip would be either from trunk port ip or host ip?\n\nMight it happen, that pod object doesn\u0027t have spec/nodeName keys?","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"3f9689292553cd5f826062d925f79cb93c787d73","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_parent_port(self, neutron, pod):"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            node_fixed_ip \u003d self._get_node_trunk_port_ip("},{"line_number":84,"context_line":"                pod[\u0027spec\u0027][\u0027nodeName\u0027]) or pod[\u0027status\u0027][\u0027hostIP\u0027]"},{"line_number":85,"context_line":"        except KeyError:"},{"line_number":86,"context_line":"            if pod[\u0027status\u0027][\u0027conditions\u0027][0][\u0027type\u0027] !\u003d \"Initialized\":"},{"line_number":87,"context_line":"                LOG.debug(\"Pod condition type is not \u0027Initialized\u0027\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_daf06e00","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"in_reply_to":"3fa7e38b_5733f7f6","updated":"2019-11-14 09:07:28.000000000","message":"Yes, the intent is to take trunk\u0027s parent port ip from the label if it is explicitly present on the node, otherwise try to find the parent port from hostIP itself.\n\nRegarding presence of spec/nodeName key, I followed the same approach as at vif_pool.py:1114 MultiVIFPool._get_pod_vif_type()\n\nThe k8s API docs do not seem to promise anything about k8s automatically populating spec/nodeName for some arbitrary pod. So might be a better idea to add some more exception handling and fall back to status/hostIP (which will definitely be present). What do you suggest?","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"9cd26ac0f8fd3f23d0d52039243c26548a3c728d","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_parent_port(self, neutron, pod):"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            node_fixed_ip \u003d self._get_node_trunk_port_ip("},{"line_number":84,"context_line":"                pod[\u0027spec\u0027][\u0027nodeName\u0027]) or pod[\u0027status\u0027][\u0027hostIP\u0027]"},{"line_number":85,"context_line":"        except KeyError:"},{"line_number":86,"context_line":"            if pod[\u0027status\u0027][\u0027conditions\u0027][0][\u0027type\u0027] !\u003d \"Initialized\":"},{"line_number":87,"context_line":"                LOG.debug(\"Pod condition type is not \u0027Initialized\u0027\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_62e4210f","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"in_reply_to":"3fa7e38b_daf06e00","updated":"2019-11-15 08:30:58.000000000","message":"Ok, so my concern was whether or not pod[\u0027spec\u0027][\u0027nodeName\u0027] can cause KeyError exception, but turns out, that drivers are used by handler only on certain condition, which check if pod have pod[\u0027spec\u0027][\u0027nodeName\u0027] set, and pod[\u0027status\u0027][\u0027phase\u0027] have \u0027Pending\u0027 value, so we\u0027re safe here.","commit_id":"1552abcbe9e85b15e3556cca42659a5d075faf50"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"d6aee9cac156fe14b403fc8a1e0b9236d34f330b","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      \" not found!\", fixed_ips)"},{"line_number":63,"context_line":"            raise kl_exc.NoResourceException"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        trunk_ip \u003d None"},{"line_number":68,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_0513e5b9","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":12},"updated":"2019-11-18 08:37:24.000000000","message":"I agree we want to skips calls when possible, but the concern here is, as this is now \u0027configurable\u0027, what will happen if the node trunk_port_ip information gets overwrite? We should either reduce the catching (to 1 min?) and/or add that information in the documentation, either stating the time it may take to take effect or make that action forbidden somehow","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"},{"author":{"_account_id":28082,"name":"Yash Gupta","email":"y.gupta@samsung.com","username":"y.gupta"},"change_message_id":"a6f9072f99383b0133183f38d7ddd633336804a8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                      \" not found!\", fixed_ips)"},{"line_number":63,"context_line":"            raise kl_exc.NoResourceException"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @MEMOIZE"},{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        trunk_ip \u003d None"},{"line_number":68,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_060f6ce0","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":12},"in_reply_to":"3fa7e38b_0513e5b9","updated":"2019-11-18 23:36:56.000000000","message":"I agree about adding it the docs, will update the patch.\n\nAlso, I think global caching is disabled by default (user needs to add cache.enabled and cache.backend to kuryr conf).","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d87b3aa0a508e8cc181fda2b002ea373e5eb66c1","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def _get_node_trunk_port_ip(self, node_name):"},{"line_number":67,"context_line":"        trunk_ip \u003d None"},{"line_number":68,"context_line":"        try:"},{"line_number":69,"context_line":"            kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":70,"context_line":"            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format("},{"line_number":71,"context_line":"                constants.K8S_API_BASE, node_name))"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_33dc04e0","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":56},"updated":"2019-11-20 12:25:29.000000000","message":"This should be outside of try-except block.","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d87b3aa0a508e8cc181fda2b002ea373e5eb66c1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format("},{"line_number":71,"context_line":"                constants.K8S_API_BASE, node_name))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":74,"context_line":"            if labels:"},{"line_number":75,"context_line":"                trunk_ip \u003d labels.get(constants.K8S_NODE_LABEL_TRUNK_PORT_IP,"},{"line_number":76,"context_line":"                                      None)"},{"line_number":77,"context_line":"        except exc.K8sClientException:"},{"line_number":78,"context_line":"            LOG.exception(\"Unable to get nested node\u0027s trunk port IP\")"},{"line_number":79,"context_line":"        return trunk_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_d3eed089","line":76,"range":{"start_line":73,"start_character":0,"end_line":76,"end_character":43},"updated":"2019-11-20 12:25:29.000000000","message":"Same here, no K8sClientException may happen here.","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d87b3aa0a508e8cc181fda2b002ea373e5eb66c1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format("},{"line_number":71,"context_line":"                constants.K8S_API_BASE, node_name))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            labels \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, None)"},{"line_number":74,"context_line":"            if labels:"},{"line_number":75,"context_line":"                trunk_ip \u003d labels.get(constants.K8S_NODE_LABEL_TRUNK_PORT_IP,"},{"line_number":76,"context_line":"                                      None)"},{"line_number":77,"context_line":"        except exc.K8sClientException:"},{"line_number":78,"context_line":"            LOG.exception(\"Unable to get nested node\u0027s trunk port IP\")"},{"line_number":79,"context_line":"        return trunk_ip"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_73ad9c2f","line":76,"range":{"start_line":73,"start_character":0,"end_line":76,"end_character":43},"updated":"2019-11-20 12:25:29.000000000","message":"You can just chain it like this:\n\n trunk_ip \u003d node_info[\u0027metadata\u0027].get(\u0027labels\u0027, {}).get(constants.K8S_NODE_LABEL_TRUNK_PORT_IP, None)\n\nWhichever you think looks better. ;)","commit_id":"a2d243c1386d1f2b4a3040d2b771f72879dc7734"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"83b8878bf3266c512553e4d2cabd04c7503d9d35","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            node_info \u003d kubernetes.get(\"{}/nodes/{}\".format("},{"line_number":71,"context_line":"                constants.K8S_API_BASE, node_name))"},{"line_number":72,"context_line":"            trunk_ip \u003d node_info[\u0027metadata\u0027].get(\u0027annotations\u0027, {}).get("},{"line_number":73,"context_line":"                constants.K8S_NODE_ANNOTATION_TRUNK_PORT_IP, None)"},{"line_number":74,"context_line":"        except exc.K8sClientException:"},{"line_number":75,"context_line":"            LOG.exception(\"Unable to get nested node\u0027s trunk port IP\")"},{"line_number":76,"context_line":"        return trunk_ip"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_fc29ed39","line":73,"range":{"start_line":72,"start_character":12,"end_line":73,"end_character":66},"updated":"2019-11-28 07:13:34.000000000","message":"You can just move this and replace line 76 like:\n\n    return node_info[\u0027metadata\u0027].get(\u0027annotations\u0027, {}).get(\n               constants.K8S_NODE_ANNOTATION_TRUNK_PORT_IP, None)\n\n(so that line 67 can also be removed, and after line 75 you can just return)","commit_id":"25ace2a23b5f898f5086eacb7aed983a572bac03"}]}
