Skip to content

lava-worker: Ignore missing home directory when cleaning-up finished job

If the worker's host lost power the worker won't be able to clean-up job. This would mean when the worker comes back online it will think the job has just finished and will try to delete its home directory.

Simply ignore FileNotFoundError when deleting job's home.

Also instead of checking the length of a job.home_dir simply pass it to if statement as zero length string evaluates to False.

See upstream bug report:

https://gitlab.com/lava/lava/-/issues/631

Merge request reports