-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Log the exception when the update cache command fails #77941
Comments
Files identified in the description: If these files are incorrect, please update the |
I ran into this issue where ansible effectively swallowed the following error:
There are other cases where Assuming there is no package server running on
and then
and compare with
Note specifically a recommendation made on that thread:
|
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
|
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
I did a few experiments with the python library itself and the situation is not better there. Before this can be tackled in ansible, the python apt lib must be extended fist. Closing this for the moment. |
@guenhter Do you think #77941 (comment) is better than nothing? |
Although it doesn't contain the actual reason, it is definitely better then nothing. |
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Fixes: ansible#77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Fixes: #77941 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Summary
The apt module should get some more logging in case of errors
Issue Type
Feature Idea
Component Name
lib/ansible/modules/apt.py
Additional Information
The apt python package sometimes fails on
cache.update()
with an error which is not extractable byerr = to_native(e)
.This is then quite unfortunate, because the error message in the log is them simply:
Failed to update apt cache: unknown reason
.I'd suggest that when the
cache.update()
throws an exception that that exception is logged (to the debug log or so), so that it is possible to get an understanding what went wrong withcache.update()
.Code of Conduct
The text was updated successfully, but these errors were encountered: