patchman icon indicating copy to clipboard operation
patchman copied to clipboard

Add a -P argument, to look for updates when processing pending reports

Open garbled1 opened this issue 6 years ago • 5 comments

Patch 2/4: This calls report.process with an argument of True instead of false when doing a report process. This allows me to patch a host, send a report to patchman, and then immediately recompute that one host to see if there are missing patches.

garbled1 avatar Aug 22 '19 15:08 garbled1

The only issue I have with this is that if the repos don't exist, it pretends to find updates but won't find them, because there are no repos. That was why I delayed adding this before.

furlongm avatar Aug 27 '19 23:08 furlongm

I'm not sure I understand the scenario, but is it acceptable to just document that behaviour?

garbled1 avatar Aug 28 '19 22:08 garbled1

Yes possibly we could just document it. The first time a host reports a repo that does not previously exist, then it will not find the updates, because that repo needs to update it's mirrors first.

furlongm avatar Aug 28 '19 23:08 furlongm

I think per your own documentation you suggest that the full update (with the -a) be done daily, which should take care of the issue. If properly maintained like that, all my request does is let you immediately see updates in the data.

garbled1 avatar Aug 29 '19 17:08 garbled1

Note that if you set up celery per the installation docs, the report processing automatically finds updates when a report is received. That was the original intention for having the find_updates argument to report.process().

It seems like it would also do exactly what you want it to do.

furlongm avatar Aug 29 '19 20:08 furlongm