James, 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.
Which brings me to the next question: Did you add the distributor to the repo you are trying to publish? I didn't have the chance to look at your plugin, but thought I'd ask the obvious questions first. Also, you could look at https://github.com/sassoftware/pulp-snapshot as an example implementation too. It should be significantly simpler, in my opinion, since it doesn't introduce any new unit types. Mihai On Wed, Feb 7, 2018 at 1:25 AM, James Shewey <[email protected]> wrote: > I am working on a very simply pulp distributor plugin (which I have > published on github at https://github.com/jdshewey/pulp_hook) 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). > > I have largely followed the documentation here: https://docs. > pulpproject.org/dev-guide/newtypesupport/plugin/example.html 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. > > So what am I doing wrong? How come publish_repo is never called and what > am I missing? > > Regards, > > James Shewey > > _______________________________________________ > Pulp-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/pulp-list >
_______________________________________________ Pulp-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-list
