Red Hat Bugzilla – Bug 1248154
[rfe] subscription-manager plugins should raise the correct exceptions for the environment it is operating in.
Last modified: 2017-07-01 19:53:50 EDT
Description of problem:
src/subscription_manager/plugins.py's run() methods currently catch any
exceptions from within the plugin code, log it, and then reraise it.
Since the subman code is embedded within yum, initial-setup, anaconda and other tools, it should not raise unexpected exceptions into those apps.
1) Catch and log them, then drop them.
2) Catch and log them, but instead of raising the origin exception again, raise a subscription-manager plugin api specific Exception, that could be more easily handled by plugins for other apps (plugins/productid.py for ex).
deferring to rhel-7.3.0 due to schedule and severity
For dnf Documentation on exceptions & logging can be found at http://dnf.readthedocs.org/en/latest/api_common.html & http://dnf.readthedocs.org/en/latest/api_exceptions.html
For yum, if a fatal exception occurs then a PluginYumExit() exception should be raised. Yum warnings are done either via. the plugin API conduit.info() etc. … or by just getting the yum base object and using base.logger etc.