clean up the wrapper left in artifactsdir when libtaskotron is interrupted by an error
AbandonedPublic

Authored by lnie on Jun 30 2016, 3:57 AM.

Details

Summary

As no useful log will be generated when libtaskotron is interrupted by an error,I'd like suggest we clean the wrapper for users,
so that they won't take the space for nothing.

Test Plan

Just do the common --libtaskotron runtask,and feed an exception to libtaskotron,then check if there is unwanted wrapper left.

Diff Detail

Repository
rLTRN libtaskotron
Branch
brownie
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 693
Build 693: arc lint + arc unit
lnie retitled this revision from to clean up the wrapper left in artifactsdir when libtaskotron is interrupted by an error.Jun 30 2016, 3:57 AM
lnie updated this object.
lnie edited the test plan for this revision. (Show Details)
lnie added reviewers: jskladan, lbrabec, kparal.

I'm not in favor of this change. For cleanup we have conf/tmpfiles.d/taskotron.conf. If you copy that file to /etc/tmpfiles.d/, the artifactsdir gets cleaned every week (you can change the period). No need to clean the directory here.
Moreover, if self._get_output() raises in the middle of copying (network error?), this code would delete even the little that managed to copy out of the disposable client.

jskladan requested changes to this revision.Jul 7 2016, 1:44 PM
In D913#17158, @lbrabec wrote:

I'm not in favor of this change.

+1 I don't see any benefit of it, and it seems like it's likely to produce heisenbugs.

This revision now requires changes to proceed.Jul 7 2016, 1:44 PM
kparal requested changes to this revision.Jul 12 2016, 2:23 PM

A good idea disk-wise, Lili, but we need to keep the logs if the execution fails, for the very reason that it failed, and therefore we need to debug what went wrong. For that reason, we need all logs that we can get from that minion. They are not "useless".

You can select "Abandon revision" in the Action box to close this diff, I don't think this is going to get accepted, sorry.

lnie added a comment.Jul 13 2016, 5:00 AM
In D913#17499, @kparal wrote:

A good idea disk-wise, Lili, but we need to keep the logs if the execution fails, for the very reason that it failed, and therefore we need to debug what went wrong. For that reason, we need all logs that we can get from that minion. They are not "useless".
You can select "Abandon revision" in the Action box to close this diff, I don't think this is going to get accepted, sorry.

Gonna to do.I was in favor of this because I saw lots of wrappers ( no log in it) ,which will be there , if exceptions happen before libtaskotron do "dnf --cacheonly repolist || dnf makecache" ,but now I think it's better to abandon this diff: )

lnie abandoned this revision.Jul 13 2016, 5:00 AM
In D913#17516, @lnie wrote:

Gonna to do.I was in favor of this because I saw lots of wrappers ( no log in it) ,which will be there , if exceptions happen before libtaskotron do "dnf --cacheonly repolist || dnf makecache" ,but now I think it's better to abandon this diff: )

Out of curiosity, what do you mean by a "wrapper"? I can't figure that out.

By the way, if you format the text, it will be more readable. Use the help button in the editor to see available markup (or use the graphical buttons for basic operations). For example like this: dnf --cacheonly repolist || dnf makecache

lnie added a comment.Jul 14 2016, 5:21 AM
This comment was removed by lnie.
lnie added a comment.Jul 14 2016, 5:27 AM

Out of curiosity, what do you mean by a "wrapper"? I can't figure that out.

Er,empty file folder,another improper used word? Speaking of that,I want to say that I really feel sorry for having taken so much time just because I have
mistakenly understand the meaning when you are talking zombie VMs,and I shouldn't take for sure that the zombie VMs and zombie VM files are the same
thing. I know you handsome workaholic are very busy,as you are making contributions in lots of things,and I will try to use proper words and describe things in a more clear way :)

By the way, if you format the text, it will be more readable. Use the help button in the editor to see available markup (or use the graphical buttons for basic operations). For example like this: dnf --cacheonly repolist || dnf makecache

Thanks for your useful information,and I will keep it on mind

Er,empty file folder,another improper used word?

Never heard of using it like that. Empty folder/directory is just... empty folder/directory :-) A wrapper in an IT sense is usually a code which tightly wraps around another code, and offers some extra functionality or maybe simpler access. So let's say libvirt is a wrapper around kvm/xen low-level virtualization. Testcloud is a wrapper around libvirt. In taskotron, we often have python wrappers which serve to execute the task written in a different language (e.g. bash) and then return parsed output back to taskotron.

lnie added a comment.Jul 14 2016, 9:14 AM

Never heard of using it like that. Empty folder/directory is just... empty folder/directory :-) A wrapper in an IT sense is usually a code which tightly wraps around another code, and offers some extra functionality or maybe simpler access. So let's say libvirt is a wrapper around kvm/xen low-level virtualization. Testcloud is a wrapper around libvirt. In taskotron, we often have python wrappers which serve to execute the task written in a different language (e.g. bash) and then return parsed output back to taskotron.

Thanks for your patient explanation,much clearer for me now,I shouldn't use words so casually .