The snippet above - I replaced sleep(1) with defer and this works fine in our lab, it plainly won't make set pxe next until server is off. Furthermore, there is a limit of time (not an infinite loop) just in case server is broken or unresponsive to prevent stuck actions - it will eventually timeout and fail.
My concern here is that 'resetting' state is missing from latest maas and there is no clear plan how to backport this. We can idealize plans for far maas future but what we really need is a quick fix for the versions currently in use.
The snippet above - I replaced sleep(1) with defer and this works fine in our lab, it plainly won't make set pxe next until server is off. Furthermore, there is a limit of time (not an infinite loop) just in case server is broken or unresponsive to prevent stuck actions - it will eventually timeout and fail.
My concern here is that 'resetting' state is missing from latest maas and there is no clear plan how to backport this. We can idealize plans for far maas future but what we really need is a quick fix for the versions currently in use.