Rack controller API/websocket read query count grows linearly

Bug #1854546 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

While solving LP:1847537 I discovered that factory.make_RackController and factory.make_RegionController were not linking a static IP to created interfaces. I fixed this in the factory with the following patch

diff --git a/src/maasserver/testing/factory.py b/src/maasserver/testing/factory.py
index 59391e6..ef2a825 100644
--- a/src/maasserver/testing/factory.py
+++ b/src/maasserver/testing/factory.py
@@ -1067,6 +1067,10 @@ class Factory(maastesting.factory.Factory):
             NODE_STATUS.NEW,
             NODE_STATUS.COMMISSIONING,
             NODE_STATUS.FAILED_COMMISSIONING,
+ ] or node.node_type in [
+ NODE_TYPE.RACK_CONTROLLER,
+ NODE_TYPE.REGION_CONTROLLER,
+ NODE_TYPE.REGION_AND_RACK_CONTROLLER,
         ]
         if should_have_default_link_configuration:
             self.make_StaticIPAddress(

This causes the following query_count tests to fail:
maasserver.api.tests.test_tag.TestTagAPI.test_GET_rack_controllers_query_count
maasserver.websockets.handlers.tests.test_controller.TestControllerHandler.test_get_num_queries_is_the_expected_number

Changed in maas:
milestone: 2.7.0b1 → 2.7.0b2
Changed in maas:
milestone: 2.7.0b2 → none
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

This issue will be addressed during transition to SQL Alchemy Core queries (internal ref PF-3939).

Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.