<div dir="ltr">James,<div><br></div><div>Are you triggering the publish via the REST API, or via the pulp-admin cli? Because I think pulp-admin will only call one distributor, not all that are configured.</div><div><br></div><div>Which brings me to the next question: Did you add the distributor to the repo you are trying to publish?</div><div><br></div><div>I didn't have the chance to look at your plugin, but thought I'd ask the obvious  questions first.</div><div><br></div><div>Also, you could look at <a href="https://github.com/sassoftware/pulp-snapshot">https://github.com/sassoftware/pulp-snapshot</a> as an example implementation too. It should be significantly simpler, in my opinion, since it doesn't introduce any new unit types.</div><div><br></div><div>Mihai</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 7, 2018 at 1:25 AM, James Shewey <span dir="ltr"><<a href="mailto:jdshewey@gmail.com" target="_blank">jdshewey@gmail.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">I am working on a very simply pulp distributor plugin (which I have published on github at <a href="https://github.com/jdshewey/pulp_hook" target="_blank">https://github.com/jdshewey/<wbr>pulp_hook</a>) which is designed to execute an arbitrary script which will allow me to trigger actions outside of pulp when a repo is published by executing an arbitrary script (in my case, I will be triggering actions in saltstack with it).<br><br>I have largely followed the documentation here: <a href="https://docs.pulpproject.org/dev-guide/newtypesupport/plugin/example.html" target="_blank">https://docs.<wbr>pulpproject.org/dev-guide/<wbr>newtypesupport/plugin/example.<wbr>html</a> and using the pulp_python plugin as examples, however I have found that with my distributor plugin, publish_repo does not seem to be called. I do see when reviewing the logs at /var/log/pulp/pulp.log that my plugin is discovered and loaded and if I attempt to write a test file to /tmp/test using a simple write, this will work if placed in the entry_point() function. If I move it down to the publish_repo function inside of my DistributionHook class however, this file is not created when a repo is synced and a new repo published; presumably because the function in my plugin is never called. Similarly, the system call to my script doesn't work either.<br><br>So what am I doing wrong? How come publish_repo is never called and what am I missing?<br><br>Regards,<br><br>James Shewey</div>
<br>______________________________<wbr>_________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-list</a><br></blockquote></div><br></div>