Bug 1185958
| Summary: | Error looking up OSTree origin file. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Adrian Likins <alikins> |
| Status: | CLOSED ERRATA | QA Contact: | J.C. Molet <jmolet> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | alikins, crog, jmolet, lmiksik, mmj, wpoteat |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 11:48:21 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1121117 | ||
I'll add a dep on ostree plugin to require ostree. I'm going to open another bug about ostree plugin, because the gi_wrapper.py tool used for gtk2 based subman isn't needed anymore with gtk3 based subscription-manager. We also catch, log, and reraise the CalledProcessError there, but there isn't really anything that expects that. I think the plugins.py run() should be updated to log and swallow exceptions from plugins, and prevent them from bubbling up to subman (or yum, or initial-setup, etc). https://github.com/candlepin/subscription-manager/pull/1234 spec file change pr (In reply to Adrian Likins from comment #2) > I'm going to open another bug about ostree plugin, because the gi_wrapper.py > tool used for gtk2 based subman isn't needed anymore with gtk3 based > subscription-manager. > https://bugzilla.redhat.com/show_bug.cgi?id=1248153 (In reply to Adrian Likins from comment #2) > We also catch, log, and reraise the CalledProcessError there, but there > isn't really anything that expects that. I think the plugins.py run() should > be updated to log and swallow exceptions from plugins, and prevent them from > bubbling up to > subman (or yum, or initial-setup, etc). https://bugzilla.redhat.com/show_bug.cgi?id=1248154 commit 13004a0ebf2fd58e2484f7193b53fd0d106d5f96
Author: Adrian Likins <alikins>
Date: Wed Jul 29 13:47:37 2015 -0400
1185958: Make ostree plugin depend on ostree.
Couple of notes: * There is no ostree on plain rhel-7.2, so adding the dep as in 13004a0ebf2fd58e2484f7193b53fd0d106d5f96 creates an unsolvable deps (for both the upgrade from 7.1, and for the full repo closure for 7.2) * We can hit the error in description if the plugin is installed on 7.2, and doesn't have ostree (the default), but it attached to subs that provide ostree content. * The plugin could be quieter about that failure, since not having ostree at all is a legit answer to 'where is my ostree origin' * That would let us install and test the package on RHEL, but still be built and able to be pulled into atomic composes (where the ostree dep is assumed). ie, reverting it to as it was before. commit e6a140d6d995887bd1f6488ef2549f913e4c3790
Author: Adrian Likins <alikins>
Date: Fri Aug 14 11:10:28 2015 -0400
1185958: Remove ostree plugins req on ostree
ostree isn't provided in RHEL7, so the dep can't be
resolved, and it's a base dep on atomic. This allows
for testing/dev on non-atomic RHEL7.
Moving back to NEW/FailedQA since the behavior in comment 0 continues with version... [root@jsefler-7 ~]# rpm -q subscription-manager-plugin-ostree ostree subscription-manager-plugin-ostree-1.15.9-6.el7.x86_64 package ostree is not installed github master pr at https://github.com/candlepin/subscription-manager/pull/1299 commit 075a72fe7369f8471fc90113559c3bd16f1a7ec6 Author: Adrian Likins <alikins> Date: Mon Sep 21 13:13:12 2015 -0400 1185958: Quieter ostree plugin sans ostree If the ostree content plugin is installed on a system that doesn't have ostree installed and/or it is not an active ostree deployed system, more or less ignore ostree plugin errors. Add a new exception type for gi_wrapper related errors, and give it a unthreatening str() to avoid cluttering logs with generally harmless tracebacks. It should be every uncommon for a user to get in this situation unless they have specifially installed the ostree content plugin on a system that does not use ostree. *** Bug 1170324 has been marked as a duplicate of this bug. *** *** Bug 1257787 has been marked as a duplicate of this bug. *** Hash listed above is incorrect. The correct hash appears to be 9051f40cfadd0155f15c04c8aada055f4f5424af [root@jmolet-vm2 ~]# rpm -q subscription-manager-plugin-ostree ostree subscription-manager-plugin-ostree-1.15.9-12.el7.x86_64 package ostree is not installed [root@jmolet-vm2 ~]# subscription-manager register --username=testuser1 --password=password --org=admin Registering to: jmolet-cp0.usersys.redhat.com:8443/candlepin The system has been registered with ID: b94288bb-8271-4d30-b6d9-3ca5c6f099e9 [root@jmolet-vm2 ~]# subscription-manager unregister System has been unregistered. no tracebacks in rhsm.log marking VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2122.html |
Description of problem: When package 'subscription-manager-plugin-ostree' is installed while package 'ostree' is NOT installed, Tracebacks are thrown and logged to rhsm.log during calls to subscription-manager attach and unregister modules. In my opinion this is not a serious bug and may be working as designed. There are no adverse side affects from the Traceback and this is probably a rare situation since subscription-manager-plugin-ostree is only an optional package and should only be installed on an Atomic system where package ostree will also be installed. Version-Release number of selected component (if applicable): [root@jsefler-os7 ~]# rpm -q subscription-manager-plugin-ostree ostree subscription-manager-plugin-ostree-1.13.17-1.el7.x86_64 package ostree is not installed How reproducible: Steps to Reproduce: 1. Starting with a non-Atomic distribution of RHEL... 2. Install package subscription-manager-plugin-ostree 3. Register and then unregister. 4. While unregistering, tail the end of rhsm.log and you will find the following traceback... [root@jsefler-os7 ~]# tail -f /var/log/rhsm/rhsm.log 2015-01-26 11:47:18,384 [DEBUG] subscription-manager @plugins.py:769 - Running update_content_hook in ostree_content.OstreeContentPlugin 2015-01-26 11:47:18,384 [DEBUG] subscription-manager @base_action_client.py:85 - running lib: <subscription_manager.content_action_client.ContentPluginActionInvoker object at 0x2c28390> 2015-01-26 11:47:18,385 [INFO] subscription-manager @ostree_content.py:34 - ostree update_content_hook plugin. 2015-01-26 11:47:18,387 [DEBUG] subscription-manager @__init__.py:85 - Searching for content of type: ostree 2015-01-26 11:47:18,804 [ERROR] subscription-manager @model.py:342 - Error looking up OSTree origin file. 2015-01-26 11:47:18,805 [ERROR] subscription-manager @model.py:343 - ERROR:root:Could not find any typelib for OSTree Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/plugin/ostree/gi_wrapper.py", line 25, in <module> from gi.repository import OSTree ImportError: cannot import name OSTree 2015-01-26 11:47:18,805 [ERROR] subscription-manager @plugins.py:489 - Command '['python', '/usr/share/rhsm/subscription_manager/plugin/ostree/gi_wrapper.py', '--deployed-origin']' returned non-zero exit status 1 Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/plugins.py", line 487, in run self.func(self.conduit) File "/usr/share/rhsm-plugins/ostree_content.py", line 36, in update_content_hook report = action_invoker.OstreeContentUpdateActionCommand(ent_source=conduit.ent_source).perform() File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 67, in perform return self.update_repo_config() File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 93, in update_repo_config self.update_origin_file(ostree_repo_config) File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 120, in update_origin_file updater.run() File "/usr/share/rhsm/subscription_manager/plugin/ostree/model.py", line 384, in run self.originfile = self._get_deployed_origin() File "/usr/share/rhsm/subscription_manager/plugin/ostree/model.py", line 344, in _get_deployed_origin raise e CalledProcessError: Command '['python', '/usr/share/rhsm/subscription_manager/plugin/ostree/gi_wrapper.py', '--deployed-origin']' returned non-zero exit status 1 2015-01-26 11:47:18,808 [WARNING] subscription-manager @base_action_client.py:72 - Exception caught while running <subscription_manager.content_action_client.ContentPluginActionInvoker object at 0x2c28390> update 2015-01-26 11:47:18,808 [ERROR] subscription-manager @base_action_client.py:73 - Command '['python', '/usr/share/rhsm/subscription_manager/plugin/ostree/gi_wrapper.py', '--deployed-origin']' returned non-zero exit status 1 Traceback (most recent call last): File "/usr/share/rhsm/subscription_manager/base_action_client.py", line 63, in _run_update update_report = lib.update() File "/usr/share/rhsm/subscription_manager/certlib.py", line 31, in update self.report = self.locker.run(self._do_update) File "/usr/share/rhsm/subscription_manager/certlib.py", line 17, in run return action() File "/usr/share/rhsm/subscription_manager/content_action_client.py", line 81, in _do_update return action.perform() File "/usr/share/rhsm/subscription_manager/content_action_client.py", line 59, in perform self.runner.run() File "/usr/share/rhsm/subscription_manager/plugins.py", line 487, in run self.func(self.conduit) File "/usr/share/rhsm-plugins/ostree_content.py", line 36, in update_content_hook report = action_invoker.OstreeContentUpdateActionCommand(ent_source=conduit.ent_source).perform() File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 67, in perform return self.update_repo_config() File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 93, in update_repo_config self.update_origin_file(ostree_repo_config) File "/usr/share/rhsm/subscription_manager/plugin/ostree/action_invoker.py", line 120, in update_origin_file updater.run() File "/usr/share/rhsm/subscription_manager/plugin/ostree/model.py", line 384, in run self.originfile = self._get_deployed_origin() File "/usr/share/rhsm/subscription_manager/plugin/ostree/model.py", line 344, in _get_deployed_origin raise e CalledProcessError: Command '['python', '/usr/share/rhsm/subscription_manager/plugin/ostree/gi_wrapper.py', '--deployed-origin']' returned non-zero exit status 1