Discussion:
[Libstoragemgmt-devel] Rais LsmError or return JobStatus.ERROR when a job failed and user call job_status()?
Gris Ge
2014-09-10 03:25:01 UTC
Permalink
Hi Tony,

I am trying to document the ASYNC job handling and found a blur
definition about it.

If a task(like volume_create) support ASYNC job, where does the error
code and error message should store if job failed?

Should plugin raise LsmError in job_status() or just set JobStatus.ERROR?

Thank you in advance.
Best regards.
--
Gris Ge
Tony Asleson
2014-09-10 13:43:52 UTC
Permalink
Post by Gris Ge
If a task(like volume_create) support ASYNC job, where does the error
code and error message should store if job failed?
Should plugin raise LsmError in job_status() or just set JobStatus.ERROR?
For python we end up raising LsmError with the error information. For C
we return an error code and the error information. The job status of
'ERROR' will unlikely be used unless we introduce functionality to
retrieve additional error information or add the ability to cancel long
running jobs etc.

Regards,
Tony

Loading...