Jun 21, 2010 2:57 PM
mib browser Zenapck install fails - and can't uninstall
-
Like (0)
Zenoss 2.5.2 on OpenSuSE 10.3. Mib Browser ZenPack 1.08. Brand new install so no history lying around. Zenoss server is zen-01.skills-1st.co.uk. Tried to install zenpack with:
zenoss@zen-01:/code/zenpacks> zenpack -v 10 --install ZenPacks.community.mib_utils-1.08-py2.4.egg
2010-06-21 21:49:25,265 INFO zen.ZPLoader: Loading /srv/zen-01-data/local/zenoss/zenoss/ZenPacks/ZenPacks.community.mib_utils-1.08-py2.4.egg/ZenPacks/community/mib_utils/objects/objects.xml
2010-06-21 21:49:25,819 INFO zen.AddToPack: End loading objects
2010-06-21 21:49:25,819 INFO zen.AddToPack: Processing links
2010-06-21 21:49:26,133 INFO zen.AddToPack: Loaded 4 objects into the ZODB database
2010-06-21 21:49:26,288 INFO zen.HookReportLoader: loading reports from:/srv/zen-01-data/local/zenoss/zenoss/ZenPacks/ZenPacks.community.mib_utils-1.08-py2.4.egg/ZenPacks/community/mib_utils/reports
ERROR: zenpack command failed. Reason: KeyError: 'zen'
Bounced zenhub, zopectl and zentrap. Don''t see broser icons from MIBs menu.
Command line thinks the zenpack is installed, as does Settings -> ZenPacks:
zenoss@zen-01:/code/zenpacks> zenpack --list
ZenPacks.community.mib_utils (/srv/zen-01-data/local/zenoss/zenoss/ZenPacks/ZenPacks.community.mib_utils-1.08-py2.4.egg)
But cannot de-install this broken zenpack:
zenoss@zen-01:/code/zenpacks> zenpack --remove ZenPacks.community.mib_utils
ERROR: zenpack command failed. Reason: NotImplementedError:
Tried all sorts but can't get rid. Can't reinstall because it tries to remove it first...
Looking at the ERROR from the install, I am wondering if the problem is with the Zenoss server name of zen-01 - can't see where else it might have a KeyError of zen ?????
Anyone have any thoughts or fixes?
Cheers,
Jane
Update....
It's not just the MIB Browser ZenPack - get the same with ZenPacks.zenoss.HttpMonitor and I suspect with others. Exactly the same error message about KeyError: 'zen'. Makes me think something may have truncated my zen-01 hostname at the hyphen....
Cheers,
Jane
PS. I have these same ZenPacks installed on other 2.5.2 implementations with no problem - but the Zenoss server doesn't have a hyphen in the hostname.
OK. This isn't hostname and it isn't specific to the MIB Browser ZenPack. If your $ZENHOME has a hyphen in it (I had /srv/zen-01-data/local/zenoss) then you get the:
ERROR: zenpack command failed. Reason: KeyError: 'zen'
message on install where the KeyError: 'zen' seems to be the bit before the hyphen. Once you have done this, you cannot deinstall the zenpack (NotImplementedError) - I've tried with command line, GUI and using the Zope Interface directly - you still can't get rid of it and you can't reinstall because that does an uninstall.
Most ZenPacks that I tried on the system with $ZENHOME having a hyphen, barfed. If you reinstall Zenoss, ensuring ZENHOME has no hyphen (and no dot - that is already a know problem with ticket 5838) then all the ZenPacks (that I've tried) install sweetly and can be removed. I have opened ticket 6915 - http://dev.zenoss.com/trac/ticket/6915 .
Cheers,
Jane
Hi Jane,
I also can't unistall the ZenPacks.community.mib_utils version 1.08 on my Zenoss 3.2.1. I get a simular output "NotImplementedError".
zenoss@zenoss1:/usr/local/zenoss/zenoss/$ zenpack --remove ZenPacks.community.mib_utils
ERROR:zen.ZenPackCmd:zenpack command failed
Traceback (most recent call last):
File "/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py", line 406, in <module>
zp.run()
File "/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py", line 168, in run
self.options.removePackName)
File "/usr/local/zenoss/zenoss/Products/ZenUtils/ZenPackCmd.py", line 812, in RemoveZenPack
zp.remove(dmd, leaveObjects)
File "/usr/local/zenoss/zenoss/ZenPacks/ZenPacks.community.mib_utils-1.08-py2.4.egg/ZenPacks/community/mib_utils/__init__.py", line 36, in remove
ZenPackBase.remove( self, app, leaveObjects=False )
File "/usr/local/zenoss/zenoss/Products/ZenModel/ZenPack.py", line 291, in remove
loader.unload(self, app, leaveObjects)
File "/usr/local/zenoss/zenoss/Products/ZenModel/ZenPackLoader.py", line 125, in unload
obj._delOb(id)
File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyRelationshipBase.py", line 106, in _delOb
raise NotImplementedError
NotImplementedError
Can you help ?
I have the same issue with the same zenpack. Kingpin, were you able to resolve this?
The answer is to hack the __init__.py file of the ZenPack - it is documented here - docs/DOC-3412
I will quote the relevant bit here:
With many thanks to Kells for the hint....
If you have this ZenPack installed on 3.x system that has been upgraded from 2.5 system, the functionality doesn't work and you get the message shown above. Drill down to $ZENHOME/ZenPacks/ZenPacks.community.mib_utils-1.08.egg/ZenPacks/community/mib_utils and edit the __init__.py to change leaveObjects=False to leaveObjects=True, bounce zenhub and zopectl and try again to remove the ZenPack - it worked for me!
Cheers,
Jane
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||