Is there a way to identify the task failed?
-
Hi,
Currently if there is an error during capture/deploy the tasks state will stay at in-progress and the system will keep rebooting to re-try.
I m working on automation to schedule task and deploy/capture but i would like to cancel the tasks if encounter error on the system and retrieve the error message. Could you guide me on any where i can retrieve these info?
I do look at the db tasks table dont seem to have a column storing these info.
Thank You
WT -
@WT_101 Currently FOG does neither store the error message nor does it stop the task in case of a failure. Probably a nice feature to add if you are keen to get into it.
You wanna start by looking at the FOS script code. Pretty much all errors cause a single function to be called:
handleError()
in/usr/share/fog/lib/funcs.sh
(code reference). This function could be extended to report back to the FOG server and even cancel the task.