Bug 1248154

Summary: [rfe] subscription-manager plugins should raise the correct exceptions for the environment it is operating in.
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: bcourt, redakkan, wpoteat
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 10:17:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adrian Likins 2015-07-29 18:00:12 UTC
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.

options:
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).

Comment 2 John Sefler 2015-09-25 16:19:14 UTC
deferring to rhel-7.3.0 due to schedule and severity

Comment 4 Barnaby Court 2016-02-23 18:31:17 UTC
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.

Comment 5 Rehana 2020-05-20 10:17:24 UTC
Subscription manager bugzilla backlog grooming :
================================================

Thank you for opening this feature request . We have evaluated this request, and while we recognise that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, Please reach out to us.

Thank you.
Rehana