Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mark-hyde opened this issue Sep 7, 2018 · 5 comments · Fixed by #220
Closed

Comments

@mark-hyde
Copy link
Contributor

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

@reaperzn
Copy link
Contributor

@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"

@mark-hyde
Copy link
Contributor Author

mark-hyde commented Sep 25, 2018

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.

@rhodesn
Copy link
Contributor

rhodesn commented Mar 27, 2019

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?

@mark-hyde
Copy link
Contributor Author

Looks good to me!

@rhodesn
Copy link
Contributor

rhodesn commented Mar 29, 2019

Added in #220

@rhodesn rhodesn closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants