-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ignore stdout/stderr messages before "yum history list" #158
Conversation
Yum stderr logs as "Warning: RPMDB modified outside of yum." are appended to the SSH output which completely breaks the history parsing. To solve this problem, we need to skip all log lines before transactions. Signed-off-by: Ronan Abhamon <[email protected]>
Maybe explain why those warnings are here ? |
This warn is an example. It's not the first time that we have a problem like this with a yum command, this fix is here to handle all cases, not just this one. But for the context of this example, you can get this trace when you install an RPM without using a yum command. |
This precise case would possibly be better fixed by using I'm a bit wary of ignoring input more largely, as this can help us miss some real issues. |
The example is a benine warning so ignoring it is the correct way to handle. |
This specific warning is benign and we know how to avoid it. My point is that this patch ignores all warnings -- how can we be sure that all the warnings we can get will be benign as well? |
I'm not convinced to abort when there is a warn. A warn is not an error. From my POV, If we can install packages without issue just after this savepoint, it's ok. Also: the warns were totally ignored before my previous commit and the yum rollback command crashed because we didn't have a valid tid. And of course we didn't have the source of the problem at all. Now we have a log + always a valid tid. |
A warning for a human operator is not an error, but there is a reason why compiler flags like A warning is something like "this is not necessarily an error, I'm not sure what you're doing, please be more specific or fix the problem if it was not intended". Else there would be no warning in the first place. |
Until now all warning has been benign. |
"jusqu'ici tout va bien" :D
If something else comes up, my understanding is it be silently dropped and we won't see we have another specific case to handle - or did I miss something? |
tested and validated. |
Yum stderr logs as "Warning: RPMDB modified outside of yum." are appended to the SSH output which completely breaks the history parsing. To solve this problem, we need to skip all log lines before transactions.