diff -Nru horizon-22.1.1/debian/changelog horizon-22.1.1/debian/changelog --- horizon-22.1.1/debian/changelog 2023-08-07 16:55:45.000000000 +0000 +++ horizon-22.1.1/debian/changelog 2024-03-01 11:47:42.000000000 +0000 @@ -1,3 +1,11 @@ +horizon (4:22.1.1-0ubuntu2) jammy; urgency=medium + + * d/p/lp2055409.patch: apply config + OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES to the + instance detail page (LP#2055409). + + -- Rodrigo Barbieri Fri, 01 Mar 2024 11:47:42 +0000 + horizon (4:22.1.1-0ubuntu1) jammy; urgency=medium * New stable point release for OpenStack Yoga (LP: #2030526). diff -Nru horizon-22.1.1/debian/patches/lp2055409.patch horizon-22.1.1/debian/patches/lp2055409.patch --- horizon-22.1.1/debian/patches/lp2055409.patch 1970-01-01 00:00:00.000000000 +0000 +++ horizon-22.1.1/debian/patches/lp2055409.patch 2024-03-01 11:47:42.000000000 +0000 @@ -0,0 +1,90 @@ +From 577c4d03cce03a7b030822d5aa9d7577387b370b Mon Sep 17 00:00:00 2001 +From: Rodrigo Barbieri +Date: Fri, 26 Jan 2024 15:10:41 -0300 +Subject: [PATCH] Extend configurable skippability of neutron calls to project + instance detail + +The OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES config aids +in envs struggling to load the instance list due to having +too many ports or bad neutron plugin performance. However, +the config does not apply its effect to the instance detail +page, which cannot be loaded due to the neutron calls +taking too long. + +This patch extends the config option to the instance +detail page, allowing the same benefit (and side-effects) +of the instance list page. + +Related-bug: #2045168 +Change-Id: I3e71a208a1c7212e168d63a259f2adddf27dbabf +(cherry picked from commit 95089025fda7c8cce6f7195e2a63f7f09efc9e0a) +(cherry picked from commit 4de36bb649c514f50d2a958c9277097a08b23cec) +(cherry picked from commit e621c9d745a5a84201d1a625cd252356385059b4) +(cherry picked from commit 8e624332831ec0a2638f917327abf971a407cf64) +--- + .../dashboards/project/instances/tests.py | 24 ++++++++++++++++--- + .../dashboards/project/instances/views.py | 2 ++ + 2 files changed, 23 insertions(+), 3 deletions(-) + +Index: horizon-22.1.1/openstack_dashboard/dashboards/project/instances/tests.py +=================================================================== +--- horizon-22.1.1.orig/openstack_dashboard/dashboards/project/instances/tests.py ++++ horizon-22.1.1/openstack_dashboard/dashboards/project/instances/tests.py +@@ -1338,7 +1338,8 @@ class InstanceDetailTests(InstanceTestBa + def _get_instance_details(self, server, qs=None, + flavor_return=None, volumes_return=None, + security_groups_return=None, +- flavor_exception=False, nova_api_ge_2_47=False): ++ flavor_exception=False, nova_api_ge_2_47=False, ++ skip_servers_update_addresses=False): + + url = reverse('horizon:project:instances:detail', args=[server.id]) + if qs: +@@ -1369,8 +1370,11 @@ class InstanceDetailTests(InstanceTestBa + + self.mock_server_get.assert_called_once_with( + helpers.IsHttpRequest(), server.id) +- self.mock_servers_update_addresses.assert_called_once_with( +- helpers.IsHttpRequest(), mock.ANY) ++ if skip_servers_update_addresses: ++ self.mock_servers_update_addresses.assert_not_called() ++ else: ++ self.mock_servers_update_addresses.assert_called_once_with( ++ helpers.IsHttpRequest(), mock.ANY) + self.mock_instance_volumes_list.assert_called_once_with( + helpers.IsHttpRequest(), server.id) + if nova_api_ge_2_47: +@@ -1408,6 +1412,20 @@ class InstanceDetailTests(InstanceTestBa + self.mock_is_extension_supported.assert_called_once_with( + helpers.IsHttpRequest(), 'mac-learning') + ++ @override_settings(OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES=False) ++ @helpers.create_mocks({api.neutron: ['is_extension_supported']}) ++ def test_instance_details_skip_servers_update_addresses(self): ++ server = self.servers.first() ++ ++ self.mock_is_extension_supported.return_value = False ++ ++ self._get_instance_details( ++ server, ++ skip_servers_update_addresses=True) ++ ++ self.mock_is_extension_supported.assert_called_once_with( ++ helpers.IsHttpRequest(), 'mac-learning') ++ + @helpers.create_mocks({api.neutron: ['is_extension_supported']}) + def test_instance_details_volume_sorting(self): + server = self.servers.first() +Index: horizon-22.1.1/openstack_dashboard/dashboards/project/instances/views.py +=================================================================== +--- horizon-22.1.1.orig/openstack_dashboard/dashboards/project/instances/views.py ++++ horizon-22.1.1/openstack_dashboard/dashboards/project/instances/views.py +@@ -534,6 +534,8 @@ class DetailView(tabs.TabView): + exceptions.handle(self.request, msg, ignore=True) + + def _update_addresses(self, instance): ++ if not settings.OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES: ++ return + instance_id = instance.id + try: + api.network.servers_update_addresses(self.request, [instance]) diff -Nru horizon-22.1.1/debian/patches/series horizon-22.1.1/debian/patches/series --- horizon-22.1.1/debian/patches/series 2023-08-07 16:55:45.000000000 +0000 +++ horizon-22.1.1/debian/patches/series 2024-03-01 11:47:42.000000000 +0000 @@ -2,3 +2,4 @@ fix-dashboard-manage.patch ubuntu_settings.patch embedded-xstatic.patch +lp2055409.patch