<div dir="ltr">Did you apply "sudo" when you test the job?<div>If yes, sudo may use a different env so it could not find out the command.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 28, 2015 at 10:59 AM, Pierre Equoy <span dir="ltr"><<a href="mailto:pierre.equoy@canonical.com" target="_blank">pierre.equoy@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I'm trying to migrate local jobs (e.g. from the checkbox provider [1]) to unit template jobs [2].<br><br></div>For instance, I replaced the <b><i>hdparm</i></b> local job [3] with:<br><div><br><span style="font-family:monospace,monospace">unit: template<br>template-unit: job<br>template-resource: device<br>template-filter: device.category == 'DISK'<br>plugin: attachment<br>category_id: 2013.com.canonical.plainbox::info<br>id: info/hdparm_{name}.txt<br>estimated_duration: 1.0<br>requires:<br>Â <a href="http://package.name" target="_blank">package.name</a> == 'hdparm'<br>Â device.path == '{path}'<br>Â block_device.{name}_state != 'removable'<br>user: root<br>command: hdparm -I /dev/{name}</span><br><br></div><div>My problem is I cannot find this job afterwards! When I try to run plainbox to run this job, it tells me there are no job with the given pattern:<br><br><span style="font-family:monospace,monospace">Â Â Â plainbox run -i "^.*info/hdparm.*$"</span><br></div><div><br></div><div>(however, this command runs fine with current local job version of hdparm)<br><br></div><div>What am I doing wrong? How to test unit template jobs?<br><br></div><div>Thanks!<br></div><div><br>[1] <a href="https://launchpad.net/plainbox-provider-checkbox/" target="_blank">https://launchpad.net/plainbox-provider-checkbox/</a><br>[2] <a href="http://plainbox.readthedocs.org/en/latest/manpages/plainbox-template-units.html#migrating-from-local-jobs" target="_blank">http://plainbox.readthedocs.org/en/latest/manpages/plainbox-template-units.html#migrating-from-local-jobs</a><br>[3] <a href="http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/view/head:/providers/plainbox-provider-checkbox/jobs/info.txt.in#L212" target="_blank">http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/view/head:/providers/plainbox-provider-checkbox/jobs/info.txt.in#L212</a><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(102,102,102)">Pierre Equoy<br>QA & Certification Engineer | Canonical<br><a href="http://www.canonical.com" target="_blank">www.canonical.com</a> | <a href="http://www.ubuntu.com" target="_blank">www.ubuntu.com</a></span></div></div></div></div>
</div></div></font></span></div></div>
<br>--<br>
Checkbox-devel mailing list<br>
<a href="mailto:Checkbox-devel@lists.ubuntu.com">Checkbox-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/checkbox-devel" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/checkbox-devel</a><br>
<br></blockquote></div><br></div>