Owner data websocket methods are not working

Bug #1908356 reported by Caleb Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Dougal Matthews

Bug Description

The "get_owner_data" and "set_owner_data" websocket methods have not been included in the list of allowed methods for machines, so they can't be done from the client.

Also, I think it'd be nicer if we just added a field on the machine object directly (something like machine.owner_data) so we don't have to keep calling "get_owner_data" every time we navigate somewhere it's needed.

Related branches

tags: added: blocking-ui
Revision history for this message
Dougal Matthews (d0ugal) wrote :

I have added the methods to allowed_methods in the above branch. That should be landing soon.

> Also, I think it'd be nicer if we just added a field on the machine object directly (something like machine.owner_data) so we don't have to keep calling "get_owner_data" every time we navigate somewhere it's needed.

This was considered but since it wont be displayed by default in many places I think the overhead could be too high. However, I agree this would be a sensible change if it is a problem for the UI.

Changed in maas:
status: New → Fix Committed
milestone: none → 2.10-next
importance: Undecided → High
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

Hey Dougal, thanks for fixing the websocket handler bug!

After thinking about it a bit more I would say that adding owner data to the machine object is "nice to have" for the summary page, but borderline essential for client-side filtering to work. Without it I would need to call "get_owner_data" for every machine in the list, then store those results somewhere, at which point why not just cut out the middle man and have it available from the start? I can't comment on what overhead is acceptable, but if you think it could be too high we should drop filtering by workload annotations.

Revision history for this message
Dougal Matthews (d0ugal) wrote :

> but borderline essential for client-side filtering to work. Without it I would need to call "get_owner_data" for every machine in the list, then store those results somewhere, at which point why not just cut out the middle man and have it available from the start?

Yup, that makes sense. I had raised this a while ago when we were doing the initial design work. Maybe a new web socket handler dedicated to returning all the owner data would be a good compromise. Then it would be called once when the filtering is being done?

Changed in maas:
milestone: 3.0.0 → 3.0-beta1
Changed in maas:
status: Fix Committed → Fix Released
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.