Allow configure of OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES
If network calls to retrieve ports and floating IPs take too long, then the project > instances page cannot be loaded. This config allows disabling the network calls when loading the page with minor side-effects, as a workaround to avoid downtime while other performance optimizations can be done on the side to allow the page the load so the workaround is no longer needed. Closes-bug: #2051003 Related-bug: #2045168 Change-Id: Iedad6ef48cbe0b776594f4ad8276d3d713cd360c
This commit is contained in:
parent
e5f3cf8395
commit
6b93e9dd87
12
config.yaml
12
config.yaml
@ -492,6 +492,18 @@ options:
|
||||
description: |
|
||||
This option can be used to toggle the Router/Floating-IP panel visibility in dashboard.
|
||||
Set True for visibility and False to hide.
|
||||
retrieve-network-data-when-listing-instances:
|
||||
type: boolean
|
||||
default: True
|
||||
description: |
|
||||
By setting this option to False, it can be used as a workaround to improve performance and
|
||||
avoid downtime when the Project > Instances page is timing out due to the neutron requests
|
||||
to retrieve ports and floating IPs taking too long. The side effect is that actions such
|
||||
as adding/removing floating IPs or interfaces no longer immediately update the network
|
||||
data in instance list, requiring a manual reload of the page. The default value for this
|
||||
config is True. For more information see
|
||||
https://docs.openstack.org/horizon/latest/configuration/settings.html#openstack-instance-retrieve-ip-addresses
|
||||
and LP#2045168.
|
||||
wsgi-socket-rotation:
|
||||
type: boolean
|
||||
default: True
|
||||
|
@ -274,6 +274,8 @@ class HorizonContext(OSContextGenerator):
|
||||
config('create-instance-flavor-sort-reverse'),
|
||||
'enable_router_panel':
|
||||
config('enable-router-panel'),
|
||||
'retrieve_network_data_when_listing_instances':
|
||||
config('retrieve-network-data-when-listing-instances'),
|
||||
}
|
||||
|
||||
return ctxt
|
||||
|
@ -15,7 +15,7 @@ from openstack_dashboard.settings import HORIZON_CONFIG
|
||||
|
||||
DEBUG = {{ debug }}
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES = {{ retrieve_network_data_when_listing_instances }}
|
||||
|
||||
# WEBROOT is the location relative to Webserver root
|
||||
# should end with a slash.
|
||||
|
@ -15,7 +15,7 @@ from openstack_dashboard.settings import HORIZON_CONFIG
|
||||
|
||||
DEBUG = {{ debug }}
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES = {{ retrieve_network_data_when_listing_instances }}
|
||||
|
||||
# WEBROOT is the location relative to Webserver root
|
||||
# should end with a slash.
|
||||
|
@ -15,7 +15,7 @@ from openstack_dashboard.settings import HORIZON_CONFIG
|
||||
|
||||
DEBUG = {{ debug }}
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES = {{ retrieve_network_data_when_listing_instances }}
|
||||
|
||||
# WEBROOT is the location relative to Webserver root
|
||||
# should end with a slash.
|
||||
|
@ -146,6 +146,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -187,6 +188,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -229,6 +231,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -273,6 +276,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": 'vcpus',
|
||||
"create_instance_flavor_sort_reverse": True,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -316,6 +320,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": False,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -358,6 +363,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -399,6 +405,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -440,6 +447,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -482,6 +490,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -527,6 +536,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -568,6 +578,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -578,6 +589,8 @@ class TestHorizonContexts(CharmTestCase):
|
||||
self.test_config.set('neutron-network-firewall', True)
|
||||
self.test_config.set('neutron-network-vpn', True)
|
||||
self.test_config.set('cinder-backup', True)
|
||||
self.test_config.set(
|
||||
'retrieve-network-data-when-listing-instances', False)
|
||||
self.assertEqual(horizon_contexts.HorizonContext()(),
|
||||
{'compress_offline': True, 'debug': False,
|
||||
'customization_module': '',
|
||||
@ -614,6 +627,8 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": (
|
||||
False),
|
||||
}
|
||||
)
|
||||
|
||||
@ -655,6 +670,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -696,6 +712,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -738,6 +755,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -780,6 +798,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -822,6 +841,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -864,6 +884,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -906,6 +927,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
@ -952,6 +974,7 @@ class TestHorizonContexts(CharmTestCase):
|
||||
"create_instance_flavor_sort_key": None,
|
||||
"create_instance_flavor_sort_reverse": False,
|
||||
"enable_router_panel": True,
|
||||
"retrieve_network_data_when_listing_instances": True,
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user