1.6.0.14: "Create new tasking" modal hangs on "Loading, please wait..." if the host has no image
-
Just ran into something odd after upgrading to 1.6.0.14. I wanted to capture an image from a host that had no image assigned yet, clicked Capture in the host’s Tasks tab, and the “Create new tasking” modal just sat there on “Loading, please wait…” for good. No error, nothing.
It took me a while to work out what was going on. The Apache access log shows the request coming back with a 400:
GET /fog/management/index.php?node=host&sub=deploy&id=607&type=2 -> 400From a quick look at
HostManagement::deploy()it seems to throw “Assigned image is invalid” when the host has no valid image, so I’m guessing that’s what the 400 says, but the modal never shows it.Setting an image in the host’s General tab fixed it right away. It would be nice if the modal showed the error, or if Deploy/Capture were greyed out when there’s no image, because from the UI it just looks like the page is broken.
-
@lperoma Thanks for tracking this down. Your reading is right.
The 400 is “Assigned image is invalid”. The modal tried to close itself on the error, but the request came back while the modal was still opening, and the browser ignored the close. So it sat on “Loading, please wait…” with nothing to say why. The group Tasks tab and the re-deploy link on the Tasks page had the same problem.
The fix is in this pull request: https://github.com/FOGProject/fogproject/pull/2091. On any refused request, the modal now shows the reason in a red box, for example “Assigned image is invalid”, and stops loading. It is not merged yet. It reaches stable with the next stable release after it merges.
Until then, the workaround is what you found: set an image on the host’s General tab first.
We did not grey out Deploy and Capture. With the reason in the modal, it is clear what to fix.
-
@lperoma The fix is now in stable release 1.6.0.158. Update to it, and a refused task shows its reason in the modal instead of hanging on “Loading, please wait…”.