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

Pick-up failed update cycles (with E or s in the "altered" column of yum history) #73

Open
swampdogmash opened this issue Apr 4, 2024 · 2 comments

Comments

@swampdogmash
Copy link
Contributor

swampdogmash commented Apr 4, 2024

It would be useful to identify when any "U|Upgrade|Update" had an issue of some sort - EG, check the "altered" column of "yum history" to see if there is an "E" (Error message produced) or "s" ("--skip-broken" was used) to identify any situations where not all updates may have been installed OR there is work needed to fix the YUM config. Still currently trying to work out all possibilities for this one

@swampdogmash swampdogmash changed the title Pick-up failed update cycles (with E or S in the "altered" column of yum history) Pick-up failed update cycles (with E or s in the "altered" column of yum history) Apr 4, 2024
@swampdogmash
Copy link
Contributor Author

swampdogmash commented Apr 4, 2024

Using something like:

Or better still, getting the history list into a file/variable and operating on that to get the last update time and the "status" of that update as per below command line:

/usr/bin/yum -C --quiet --noplugins history list all | awk '{if(NR>2)print}' | grep ' U \|Upgrade\|Update' | cut -d '|' -f5 | head -n 1| awk '{$1=$1};1'| cut -d ' ' -f2

Statuses seem to be:

EE
ss

E
E<
s<
s

@swampdogmash
Copy link
Contributor Author

swampdogmash commented Jun 18, 2024

Further research into this shows that ANY rpm with echo statements in the posttrans scriptlet section will cause E (EE, E< or similar) to be flagged in yum. IT is expected behaviour for any tty output from the rpm and does not solely represent an "error" being generated. It is thus not 100% useful to flag this , but could be something that could be an option which by default is turned off in the yum plugin.

https://access.redhat.com/solutions/1134423

For example, the Check-mk-agent install rpm outputs details of the systemd or xinetd config changes as the rpm installs, causing EE to be flagged despite there being no error or issue with the installation.

A similar "by default don't flag it but have the capability to" option would be viable for the s flag also. by default do not flag it up, but give the user the option to do so.

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

No branches or pull requests

1 participant