Fix bug in core.service unregister method for new UI
On a mini running FreeNAS-11.2-MASTER-201807240859
Seen while testing https://redmine.ixsystems.com/issues/39103
I created a zvol, created a VM using that zvol, started up the vm, stopped the vm, deleted the zvol used by the VM, restarted the vm and got the error message.
The error spawns too many pop up windows that need to be cancelled to move on
#1 Updated by Bonnie Follweiler about 2 years ago
- Subject changed from Trying to start a VM after deleting the zvol does give the correct error message in the new UI but it spawns over 5 windows that need to be closed to Trying to start a VM after deleting the zvol does give the correct error message in the new UI but it spawns to many popup windows
#4 Updated by Vaibhav Chauhan about 2 years ago
- Status changed from Unscreened to Screened
I have been narrow its reproduction case
1) create a functional VM try to run it once to make sure that VM starts to boot
2) stop the VM
3) edit the disk device to a non existing path, (add some extra character in the path)
4) click save
5) try to power on VM
6) you should see bunch of error dialogue overlayed on top of each other
7) if you happen to reload the browser this multiple error dialogue seems to get lost, to reproduce multiple error dialogue try to repeat steps from 3-5
what I have noticed that `VmStartFailed` is getting registered a few times, coincidentally number of times this service is registered == number of error dialoge.
one possible solution is to register `VmStartFailed` only once however this does require changes in core.service.ts file but there are regression that changes brings in.