teemtee / tmt

Test Management Tool
MIT License
84 stars 125 forks source link

Skip cleaning the running run with "tmt clean runs -vv" #1586

Open yizhanglinux opened 2 years ago

yizhanglinux commented 2 years ago

The running run will be deleted when I execute tmt clean runs on another terminal, will it be more reasonable to skip deleting the running one?

idorax commented 1 year ago

Currently tmt doesn't have lock mechanism while it is running. Not sure it is worthwhile having such a feature, @psss, any idea?

psss commented 1 year ago

Sorry, this slipped through the email filters. I think it makes sense to skip run which is being executed. Let's confirm this with others on the hacking session.

idorax commented 1 year ago

Copy+paste the proposed solution:

> Save the number of the running process to the run workdir?
[mpr] a lock file, /var/tmp/tmt/${run}/.lock, owned by the tmt running the $run, 
all other tmt processes need to acquire the lock before removing the directory? 
The lock exists as long as the owning process exists, and it does not block other 
non-tmt processes to access the directory (advisory locking)
psss commented 1 year ago

@idorax, what's the status here?

idorax commented 1 year ago

Hi @psss, I haven't started to work on this issue, please move it to 1.29, thanks!