rackerlabs/auter

auter --prep and auter --apply should log how many packages downloaded/installed.

mark-hyde opened this issue · 5 comments

Hi,

It would be useful if auter --prep indicated in the logs how many packages it has downloaded.
It would be useful if auter --apply indicated in the logs how many packages it has installed/updated.

This would be useful for any reporting tools, and also to compare that the --apply and --prep were consistent.
Regards
Mark

@racker-markh This is easily achievable with pre/post scripts assessing the output of the logs in /var/lib/auter. Additionally, if you are using configsnap then you could do a diff (or add a post-script to do the diff) of packages.{pre,post}

If there is a need for the patches to be consistent then the "ONLYINSTALLFROMPREP" option should be set to "yes"

Hi @reaperzn
We're already using the onlyinstallfromprep option.

This request was inspired by the thought that it would be good to validate that the same number of patches which were downloaded during prep were installed during the apply.

I can think of a few scenarios where this might be the case (for instance if someone did a yum update packagename between the prep and apply, or perhaps if there were a change to the exclude line in yum.conf.

In addition it would be useful if patching a large number of servers that you could see that (say) if most servers had around 20-30 updates, but perhaps 1-2 had 300 packages while another couple had 0, it might trigger that we investigate why this subset of servers were different.

I appreciate that this can all be done with pre/post hooks, but wanted to raise it as a feature because it might be easier to count these things during the script itself rather than (say) counting files in a directory before/after the event.

It's not a critical issue though, just a suggestion.

I've put a PR in for adding package dependant rebooting into Auter - it also includes a package prep and install count.

PREPOUTPUT+="\\nSTATUS:SUCCESS:Package download complete:${#pkglist[@]}"

It just appends the count to the end of what was added #214, eg:

STATUS:SUCCESS:Package download complete:10

What do you think?

Looks good to me!

Added in #220