[2.4, UI] Region always sends trigger notifications for all handlers to client

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

Bug Description

Once a client has registered as a websocket any database trigger causes an update to the client. This is regardless of whether the client is actually on the page.

Reproduction:
1. In Chrome open the machine listing page and DNS page
2. Open up the network monitor in the developer tools and select the websocket in both pages
3. Clear existing data and refresh the page
4. You'll see the DNS page has not requested any machine data
5. Start commissioning a machine
6. Both pages will receive updates about the commissioning machine

This is also effecting what state the region thinks the client is on. Once a client performs a get() on an object the region always sends updates to the client for a get() instead of list().

Reproduction:
1. In Chrome open the machine listing page in two tabs
2. Open up the network monitor in the developer tools and select the websocket in both pages
3. Clear existing data and refresh the page
4. On one tab select a node to view details
5. Now go back the machine listing page by selecting the link in the top level navigation
6. On the machine listing page commission the node viewed in 4.
7. The updates which come in about the machine being commissioned will be different between the two tabs. The updates on the tab which only viewed the listing page will contain the output for a list dehydrate. This can be verified by looking at the update and seeing the disk object is missing from the machine object. The updates on the tab which viewed the node details page will have the disks object despite currently being on the nodes-listing page.

The region needs to keep better track of what page the user is actually viewing. Trigger updates should only be sent to the client if that manager is loaded in the UI. The region also needs to keep track of whether list or get dehydrate output should be sent.

Todo this the client will need to send an RPC call on destroy which will inform the client data is no longer needed. The region will receive all database triggers but will only take action if a client connected to it is currently viewing the data.

Tags: performance
Changed in maas:
milestone: 2.4.0beta3 → 2.4.0rc1
Changed in maas:
importance: Critical → High
milestone: 2.4.0rc1 → 2.4.0rc2
Changed in maas:
milestone: 2.4.0rc2 → 2.5.x
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

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.