canonical / maas-ui

The UI for MAAS (metal-as-a-service)
https://maas.io
Other
49 stars 48 forks source link

MAAS requires login/snap restart to pick up changes #4021

Closed webteam-app closed 2 years ago

webteam-app commented 2 years ago

Bug originally filed by billwear at https://bugs.launchpad.net/bugs/1977777

Working with maas 3.2.0~beta6-11974-g.58f181df4, 21449, 3.2/beta.

In the UI, when adding a custom OS, I have to logout of the UI and log back in to pick up the added image in the deployment dropdowns:

  1. I added a valid RHEL7 packer build via the CLI.
  2. I verified that the RHEL7 build was in the image set and synced to the region controller.
  3. I tried to deploy a machine with RHEL7, but it was not in the dropdowns on the deployment page.
  4. I logged out of MAAS and logged back in, and the image was now available in the dropdowns.

Also in the UI, when creating a KVM, I sometimes have to restart the MAAS snap to pick up resource changes:

  1. I created a new KVM.
  2. I over-committed resources on the KVM (different from the previous KVM settings) to be able to deploy more machines (but turn them off) for screenshot purposes.
  3. When I attempted to deploy even 1 KVM, the UI insisted that I needed to choose "0" for memory and "0" for CPU count.
  4. I did a "sudo snap restart maas".
  5. I created a new KVM, and the overcommit was honored.

Logs are attached below.

anthonydillon commented 2 years ago

@Caleb-Ellis can you address this please?

Caleb-Ellis commented 2 years ago

Left a comment and changed the tag since it's a websocket API issue

The root cause of this issue is that we don't receive updates to "general" data (in which a lot of OS info lives) over the websocket, so the UI doesn't know about these changes. We could poll the server but that seems like an odd approach when we already have websockets set up. https://bugs.launchpad.net/maas/+bug/1950106