Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1149095
Summary: | [abrt] yum: injectioninit.py:52:init_dep_injection:AttributeError: 'module' object has no attribute 'PROFILE_MANAGER' | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | David Jaša <djasa> | ||||||||||
Component: | subscription-manager | Assignee: | candlepin-bugs | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Sean Toner <stoner> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 7.1 | CC: | alikins, bkearney, djasa, james.antill, ohudlick, stoner, vmukhame, wpoteat | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | abrt_hash:ba19bcec6281bc484a40a4f8f5d016cedebe3c28 | ||||||||||||
Fixed In Version: | subscription-manager-1.14.6-1 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2015-11-19 11:48:11 UTC | Type: | --- | ||||||||||
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 | ||||||||||||
Attachments: |
|
Description
David Jaša
2014-10-03 08:31:46 UTC
Created attachment 943642 [details]
File: backtrace
Created attachment 943643 [details]
File: environ
Created attachment 943644 [details]
File: sosreport.tar.xz
Looks like the old yum product id plugin is running post transaction with the new subscription-manager code installed, and the plugin does a late import of 'injectioninit', gets the new injectioninit module, but the old 'inj' module is already loaded in the yum process. And the old 'inj' module does not have inj.PROFILE_MANAGER That will be interesting to fix. The existing deployed subman yum plugins end up loading subscription_manager.injection in the yum process plugins/subscription-manager.py has: from subscription_manager import injection as inj so 'injection' module already exists in the yum process (and has had 'init_dep_injection()' run once by the config_hook in plugins/subscription-manager.py. The post_trans hook for product id (in the RHEL7 GA product-id.py) tries to import injectioninit again and run injectioninit.init_dep_injection() again, which seems to end up with the new injectioninit module and the old 'injection' module. Not sure why though. *** Bug 1075669 has been marked as a duplicate of this bug. *** Please give a reproducer for the scenario. Is it an update to yum *and* subscription-manager through yum? Which yum plugins are enabled during this process? Is there an entitlment attached? Looking at this again, and I don't think that injectioninit needs to be a lazy import any longer. If it's imported at module scope, productid should end up loading the pre transaction version of all the modules. I think the lazy import was to work around issues with having to wait until logging was setup properly which I don't believe is a problem anymore. Created attachment 1055740 [details]
Attempt to reproduce yum update issue
On a RHEL 7.1 system, I did a downgrade from subman 1.13.22 to 1.10.14. I then did a yum update back to the most recent subman available in the repo (1.13.22) which should still have exhibited the problem as I understood the problem.
Is there an actual reproduction step for this bug?
I didn't try to reproduce - I just reported what I've seen back at the time. FWIW, I've disabled subscription-manager module since because I decided to use internal repos at some point of time and I didn't see it in other, RHN-connected - machines. I tried doing a full `yum update` to update a RHEL 7.0 system because it should update from a broken package to another broken package: ... ---> Package subscription-manager.x86_64 0:1.10.14-7.el7 will be updated ---> Package subscription-manager.x86_64 0:1.13.22-1.el7 will be an update ... However, this still succeeded. So I am still unsure of how to reproduce this issue. I dont know how to get the yum process in a state where sys.modules["injectioninit"] module still has references to the old definitions but a running script is trying to access the newer (upgraded) definition. I have tried a scenario where I yum updated a "broken" (subscription-manager < 1.14.6-1) package to a newer package, and also even from broken package to broken package, and I did not come across this issue. Looking at the code change, the move to not do a lazy import will mean that we should not run into a scenario where some symbols in the module refer to different versions in memory. 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 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |