)]}'
{"contrib/vagrant/Vagrantfile":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"ed5655b50903d0997baf0d3fbafd8db6e2a8e220","unresolved":true,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  config.vm.network :forwarded_port, guest: 80, host_ip: \"127.0.0.1\", host: 8080"},{"line_number":50,"context_line":"end"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Vagrant.configure(\"2\") do |config|"},{"line_number":53,"context_line":"  config.vm.network \"private_network\", ip: \"10.0.2.15\","},{"line_number":54,"context_line":"    virtualbox__intnet: true"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"22140d1a_c10d79c4","line":51,"updated":"2021-04-12 06:41:01.000000000","message":"probably you didn\u0027t want to commit this part?","commit_id":"c1924486d41fdfa9cd372dde468162bf7531232e"}],"kuryr_kubernetes/controller/drivers/lbaasv2.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"e5065800f64f0eec1b6066f941291f3d5582f6d8","unresolved":true,"context_lines":[{"line_number":124,"context_line":"                if v_tuple \u003e max_ver:"},{"line_number":125,"context_line":"                    max_ver \u003d v_tuple"},{"line_number":126,"context_line":"            except AttributeError:"},{"line_number":127,"context_line":"                LOG.error(\"Unable to reach Octavia\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        LOG.debug(\"Detected Octavia version %d.%d\", *max_ver)"},{"line_number":130,"context_line":"        return max_ver"}],"source_content_type":"text/x-python","patch_set":6,"id":"c9bb8364_068a7b82","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":52},"updated":"2021-04-13 06:34:13.000000000","message":"we should probably raise the exception here anyway right? If we cannot reach the Octavia API and we wrongly default a 0,0 version, there may be some side effects with the already created services/loadbalancer if we continue as if nothing would have happened.\n\nProbably we can move the if out of the try/except block too","commit_id":"790eabc48964099b3fc99b9224db10d7613aca3e"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"44820255ce2dbc97c4d89a74c7e77e3dc24713c9","unresolved":true,"context_lines":[{"line_number":124,"context_line":"                if v_tuple \u003e max_ver:"},{"line_number":125,"context_line":"                    max_ver \u003d v_tuple"},{"line_number":126,"context_line":"            except AttributeError:"},{"line_number":127,"context_line":"                LOG.error(\"Unable to reach Octavia\")"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        LOG.debug(\"Detected Octavia version %d.%d\", *max_ver)"},{"line_number":130,"context_line":"        return max_ver"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf028a00_85241a07","line":127,"range":{"start_line":127,"start_character":16,"end_line":127,"end_character":52},"in_reply_to":"c9bb8364_068a7b82","updated":"2021-04-13 12:27:23.000000000","message":"I agree. We can probably just check if version.get(\u0027version\u0027) is None and raise a descriptive exception.\nNote the difference on the versions output on line 115 when the API is running: http://paste.openstack.org/show/804435/, compared to when is not running http://paste.openstack.org/show/804436/.\n\nYou can reproduce this scenario but just doing \"sudo systemctl stop devstack@o-api.service\"","commit_id":"790eabc48964099b3fc99b9224db10d7613aca3e"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7faa069da3cd55d13e497d29449ef27bb2a9af62","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        # won\u0027t assume this dict is sorted."},{"line_number":119,"context_line":"        max_ver \u003d 0, 0"},{"line_number":120,"context_line":"        for version in versions:"},{"line_number":121,"context_line":"            try:"},{"line_number":122,"context_line":"                v_tuple \u003d versionutils.convert_version_to_tuple("},{"line_number":123,"context_line":"                    version[\u0027version\u0027])"},{"line_number":124,"context_line":"            except AttributeError:"}],"source_content_type":"text/x-python","patch_set":7,"id":"cfee21eb_8c6ea67c","line":121,"updated":"2021-04-15 12:14:48.000000000","message":"There is not a need to have the try except here if we make sure we include the check of line 125 before line 122. Can you try that?","commit_id":"89e15eb9a4c219a6ee83f6889fbd9666ad6c6654"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4d72487ea8e9f4f34922410b7f4b57b8db930db3","unresolved":true,"context_lines":[{"line_number":119,"context_line":"        max_ver \u003d 0, 0"},{"line_number":120,"context_line":"        for version in versions:"},{"line_number":121,"context_line":"            if version.get(\u0027version\u0027) is None:"},{"line_number":122,"context_line":"                raise Exception(\u0027Unable to reach Octavia\u0027)"},{"line_number":123,"context_line":"            v_tuple \u003d versionutils.convert_version_to_tuple("},{"line_number":124,"context_line":"                version[\u0027version\u0027])"},{"line_number":125,"context_line":"            if v_tuple \u003e max_ver:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ec62e048_771070b1","line":122,"range":{"start_line":122,"start_character":22,"end_line":122,"end_character":31},"updated":"2021-04-19 13:32:02.000000000","message":"Using top level exception class is not best way to go. Perhaps using custom one would be a better idea.","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"920b166d4f0a1fe90980e247256ff79081ab9c05","unresolved":true,"context_lines":[{"line_number":120,"context_line":"        max_ver \u003d 0, 0"},{"line_number":121,"context_line":"        for version in versions:"},{"line_number":122,"context_line":"            if version.get(\u0027version\u0027) is None:"},{"line_number":123,"context_line":"                raise Exception(\u0027Unable to reach Octavia\u0027)"},{"line_number":124,"context_line":"            v_tuple \u003d versionutils.convert_version_to_tuple("},{"line_number":125,"context_line":"                version[\u0027version\u0027])"},{"line_number":126,"context_line":"            if v_tuple \u003e max_ver:"}],"source_content_type":"text/x-python","patch_set":12,"id":"29a8e36c_76d31bdc","line":123,"range":{"start_line":123,"start_character":22,"end_line":123,"end_character":31},"updated":"2021-04-20 08:52:33.000000000","message":"this should raise k_exc.UnreachableOctavia instead","commit_id":"8ef4877088cbfe4c12e0c1e340b4df3a453a1696"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5aaf97d2c2d3aba3291c719b1a68c4f9eeaaf14b","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        services \u003d list(endpoints.values())[0]"},{"line_number":115,"context_line":"        # Try load-balancer service, if not take the first"},{"line_number":116,"context_line":"        versions \u003d services.get(\u0027load-balancer\u0027, list(services.values())[0])"},{"line_number":117,"context_line":"        LOG.debug(\"versions: %s\", versions)"},{"line_number":118,"context_line":"        # Lookup the latest version. For safety, we won\u0027t look for"},{"line_number":119,"context_line":"        # version[\u0027status\u0027] \u003d\u003d \u0027CURRENT\u0027 and assume it\u0027s the maximum. Also we"},{"line_number":120,"context_line":"        # won\u0027t assume this dict is sorted."}],"source_content_type":"text/x-python","patch_set":13,"id":"a357693e_f8ff60e0","line":117,"range":{"start_line":117,"start_character":8,"end_line":117,"end_character":43},"updated":"2021-04-20 22:03:15.000000000","message":"probably leftover?","commit_id":"3f4542e92c69fb662c815cb0bf65abad787b5115"}],"kuryr_kubernetes/tests/unit/controller/drivers/test_lbaasv2.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"42d69a48ead2ae98e659b466cee3ddd01825b5da","unresolved":true,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_get_octavia_version_is_none(self):"},{"line_number":115,"context_line":"        lbaas \u003d self.useFixture(k_fix.MockLBaaSClient()).client"},{"line_number":116,"context_line":"        lbaas.get_all_version_data.return_value \u003d OCTAVIA_VERSIONS"},{"line_number":117,"context_line":"        with self.assertRaises(Exception) as context:"},{"line_number":118,"context_line":"            self.assertTrue(\u0027Unable to reach Octavia\u0027 in context.exception,"},{"line_number":119,"context_line":"                            d_lbaasv2.LBaaSv2Driver.get_octavia_version(None))"}],"source_content_type":"text/x-python","patch_set":11,"id":"3e15abd0_ddb0df77","line":116,"range":{"start_line":116,"start_character":50,"end_line":116,"end_character":66},"updated":"2021-04-19 12:28:21.000000000","message":"The OCTAVIA_VERSIONS has the \u0027version\u0027 field defined, the Exception won\u0027t be raised.\nIt\u0027s needed to define another return value that matches what is being handled. Note that you can add LOG messages to the Kuryr-controller and retrieve the output of the calls on that method when the o-api service is stopped.","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"a706c8656a9ce3e1b1833333ed4eaf236905cf43","unresolved":true,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_get_octavia_version_is_none(self):"},{"line_number":115,"context_line":"        lbaas \u003d self.useFixture(k_fix.MockLBaaSClient()).client"},{"line_number":116,"context_line":"        lbaas.get_all_version_data.return_value \u003d OCTAVIA_VERSIONS"},{"line_number":117,"context_line":"        with self.assertRaises(Exception) as context:"},{"line_number":118,"context_line":"            self.assertTrue(\u0027Unable to reach Octavia\u0027 in context.exception,"},{"line_number":119,"context_line":"                            d_lbaasv2.LBaaSv2Driver.get_octavia_version(None))"}],"source_content_type":"text/x-python","patch_set":11,"id":"6ebe608b_807eaeb5","line":116,"range":{"start_line":116,"start_character":50,"end_line":116,"end_character":66},"in_reply_to":"088b4f8c_8de76f2d","updated":"2021-04-19 14:17:48.000000000","message":"and before all that the devstack@o-api.service systemd should be stopped to reproduce the failure.","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"4253a2331c722ca61596883fd1c1f4f76d6e755d","unresolved":true,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_get_octavia_version_is_none(self):"},{"line_number":115,"context_line":"        lbaas \u003d self.useFixture(k_fix.MockLBaaSClient()).client"},{"line_number":116,"context_line":"        lbaas.get_all_version_data.return_value \u003d OCTAVIA_VERSIONS"},{"line_number":117,"context_line":"        with self.assertRaises(Exception) as context:"},{"line_number":118,"context_line":"            self.assertTrue(\u0027Unable to reach Octavia\u0027 in context.exception,"},{"line_number":119,"context_line":"                            d_lbaasv2.LBaaSv2Driver.get_octavia_version(None))"}],"source_content_type":"text/x-python","patch_set":11,"id":"088b4f8c_8de76f2d","line":116,"range":{"start_line":116,"start_character":50,"end_line":116,"end_character":66},"in_reply_to":"3e15abd0_ddb0df77","updated":"2021-04-19 14:15:10.000000000","message":"Just a clarification about adding LOG messages, the LOG messages could be added after the octavia call , with \"LOG.debug(\"versions: %s\", versions)\" for you to have a better idea about the response format. The controller image can then be rebuild[2]  and after that you can check the kuryr-controller Pod logs.\n\n[1] https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/controller/drivers/lbaasv2.py#L115\n[2] https://github.com/openstack/kuryr-kubernetes/blob/master/contrib/regenerate_controller_pod.sh","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"42d69a48ead2ae98e659b466cee3ddd01825b5da","unresolved":true,"context_lines":[{"line_number":116,"context_line":"        lbaas.get_all_version_data.return_value \u003d OCTAVIA_VERSIONS"},{"line_number":117,"context_line":"        with self.assertRaises(Exception) as context:"},{"line_number":118,"context_line":"            self.assertTrue(\u0027Unable to reach Octavia\u0027 in context.exception,"},{"line_number":119,"context_line":"                            d_lbaasv2.LBaaSv2Driver.get_octavia_version(None))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_ensure_loadbalancer(self):"},{"line_number":122,"context_line":"        os_net \u003d self.useFixture(k_fix.MockNetworkClient()).client"}],"source_content_type":"text/x-python","patch_set":11,"id":"e209cbb4_09d48c82","line":119,"updated":"2021-04-19 12:28:21.000000000","message":"Why the second parameter is needed? Note that assertTrue needs an expression\nhttps://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTrue","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"2fa1ad213f30b454bef6215f28f9a94c57176a8e","unresolved":true,"context_lines":[{"line_number":116,"context_line":"        lbaas.get_all_version_data.return_value \u003d OCTAVIA_VERSIONS"},{"line_number":117,"context_line":"        with self.assertRaises(Exception) as context:"},{"line_number":118,"context_line":"            self.assertTrue(\u0027Unable to reach Octavia\u0027 in context.exception,"},{"line_number":119,"context_line":"                            d_lbaasv2.LBaaSv2Driver.get_octavia_version(None))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_ensure_loadbalancer(self):"},{"line_number":122,"context_line":"        os_net \u003d self.useFixture(k_fix.MockNetworkClient()).client"}],"source_content_type":"text/x-python","patch_set":11,"id":"0aa6c7aa_e2f9bbc0","line":119,"in_reply_to":"e209cbb4_09d48c82","updated":"2021-04-19 12:31:33.000000000","message":"It\u0027s possible to use Python side_effects, for example https://github.com/openstack/kuryr-kubernetes/blob/master/kuryr_kubernetes/tests/unit/controller/drivers/test_public_ip.py#L90-L93","commit_id":"84d1e42fb1f9aa9bd2a4e3d488a0f9c2eb7ec762"}]}
