TECHZEN Zenoss User Community ARCHIVE  

Not able to remove broken ZenPack from Zenoss 5.0.3

Subject: Not able to remove broken ZenPack from Zenoss 5.0.3
Author: [Not Specified]
Posted: 2015-06-04 11:00

I tried to install a ZenPack that was compatible with a previous version to test if it works on Zenoss 5 and I ended up with a broken Zenpack that I am not able to remove.

[root@zenoss tmp]# serviced service run zope zenpack uninstall ZenPacks.Nova.WinServiceSNMP
I0604 18:54:17.521719 42767 server.go:341] Connected to the control center at port 10.2.1.125:4979
I0604 18:54:17.876098 42767 server.go:435] Acquiring image from the dfs...
I0604 18:54:17.878219 42767 server.go:437] Acquired! Starting shell
Trying to connect to logstash server... 127.0.0.1:5042
Connected to logstash server.
ERROR:zen.ZenPackCmd:zenpack command failed
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenUtils/zenpack.py", line 800, in
zp.run()
File "/opt/zenoss/Products/ZenUtils/zenpack.py", line 256, in run
self.options.removePackName, None)
File "/opt/zenoss/Products/ZenRelations/ToManyContRelationship.py", line 204, in _getOb
return self._objects[id].__of__(self)
AttributeError: 'ZenPack' object has no attribute '__of__'
Command returned non-zero exit code 3. Container not commited.

Help would be appreciated. I am new to zenoss and I would like to make this project to work.

Thanks



Subject: Did you take a snapshot as
Author: Andrew Kirch
Posted: 2015-06-04 13:27

Did you take a snapshot as recommended, and if so can you just roll back If not:

you might want to attach to the zope container dowload and run http://wiki.zenoss.org/Removing_Broken_ZenPacks. Note that this hasn't been tested as yet.

Andrew Kirch

akirch@gvit.com

Need Zenoss support, consulting or custom development Look no further. Email or PM me!

Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard



Subject: It seems that it does not work for me
Author: [Not Specified]
Posted: 2015-06-04 14:18

Unfortunately by mistake I just installed zenpack without snapshot. It seems that it does not work for me as I will need to install everything from the beginning.

This is the error I receive when I try to run the commands:

I0604 22:13:24.702114 35761 server.go:341] Connected to the control center at port 10.2.1.125:4979
I0604 22:13:25.174779 35761 server.go:435] Acquiring image from the dfs...
I0604 22:13:25.176675 35761 server.go:437] Acquired! Starting shell
Trying to connect to logstash server... 127.0.0.1:5042
Connected to logstash server.
2015-06-04 19:13:50 WARNING OFS.Uninstalled Could not import class 'ZenPack' from module 'ZenPacks.Nova.WinServiceSNMP'
Unable to open script file 'zenpack-remove.py' -- exiting
Command returned non-zero exit code 1. Container not commited.



Subject: I am getting the same issue
Author: [Not Specified]
Posted: 2015-06-05 02:15

I am getting the same issue with my Fortigate zenpack.

Seems like it is also broken after the 5.0.3 update and I can't remove it.



Subject: have either of you run the
Author: Andrew Kirch
Posted: 2015-06-05 15:00

have either of you run the linked script in the Zope container (can you provide feedback as to whether it worked)

Andrew Kirch

akirch@gvit.com

Need Zenoss support, consulting or custom development Look no further. Email or PM me!

Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard



Subject: Trying to run that to fix the
Author: [Not Specified]
Posted: 2015-06-05 15:59

Trying to run that to fix the "broken" stuff left in my 5.0.3 after installation:

[zenoss@fb6214d1ed08 ~]$ zendmd --script=zenpack-remove.py
2015-06-05 20:54:08 WARNING OFS.Uninstalled Could not import class 'ZenPack' from module 'ZenPacks.community.VMwareESXiMonitor'
ZenPacks.Firestar.CiscoASA is fine.
ZenPacks.TwoNMS.PrinterMIB is fine.
Problem with broken ZenPack. Forcing removal.
Unable to remove this ZenPack.
ZenPacks.zenoss.ApacheMonitor is fine.
ZenPacks.zenoss.Dashboard is fine.
ZenPacks.zenoss.DellMonitor is fine.
ZenPacks.zenoss.DeviceSearch is fine.
ZenPacks.zenoss.DigMonitor is fine.
ZenPacks.zenoss.DnsMonitor is fine.
ZenPacks.zenoss.FtpMonitor is fine.
ZenPacks.zenoss.HPMonitor is fine.
ZenPacks.zenoss.HttpMonitor is fine.
ZenPacks.zenoss.LDAPMonitor is fine.
ZenPacks.zenoss.LinuxMonitor is fine.
ZenPacks.zenoss.Microsoft.Windows is fine.
ZenPacks.zenoss.MySqlMonitor is fine.
ZenPacks.zenoss.NtpMonitor is fine.
ZenPacks.zenoss.PythonCollector is fine.
ZenPacks.zenoss.ZenJMX is fine.

Starting Phase 2 removal

Forced removal of ZenPacks.Firestar.CiscoASA
Forced removal of ZenPacks.TwoNMS.PrinterMIB
Forced removal of ZenPacks.community.VMwareESXiMonitor
Forced removal of ZenPacks.zenoss.ApacheMonitor
Forced removal of ZenPacks.zenoss.Dashboard
Forced removal of ZenPacks.zenoss.DellMonitor
Forced removal of ZenPacks.zenoss.DeviceSearch
Forced removal of ZenPacks.zenoss.DigMonitor
Forced removal of ZenPacks.zenoss.DnsMonitor
Forced removal of ZenPacks.zenoss.FtpMonitor
Forced removal of ZenPacks.zenoss.HPMonitor
Forced removal of ZenPacks.zenoss.HttpMonitor
Forced removal of ZenPacks.zenoss.LDAPMonitor
Forced removal of ZenPacks.zenoss.LinuxMonitor
Forced removal of ZenPacks.zenoss.Microsoft.Windows
Forced removal of ZenPacks.zenoss.MySqlMonitor
Forced removal of ZenPacks.zenoss.NtpMonitor
Forced removal of ZenPacks.zenoss.PythonCollector
Forced removal of ZenPacks.zenoss.ZenJMX
[zenoss@fb6214d1ed08 ~]$ zendmd
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
In [1]: dmd.ZenPackManager.packs._delObject('ZenPacks.community.VMwareESXiMonitor')
2015-06-05 20:55:34 WARNING zen.ToManyRelationshipBase Tried to delete object id 'ZenPacks.community.VMwareESXiMonitor' but didn't find it on /zport/dmd/ZenPackManager/packs

In [2]: commit()

In [3]: exit

[zenoss@fb6214d1ed08 ~]$ exit
logout
[root@fb6214d1ed08 /]# exit
exit



Subject: Even tho i seemed to
Author: [Not Specified]
Posted: 2015-06-05 16:04

Even tho i seemed to undersand it was not working, i could install it afterwards.

Now, the microsoft zenpack remains in 2.4.1, and it's installation fails in the same way, what to do there (i want to instal 2.4.4)

EDIT:

CORRECTION!, the microsoft windows zenpack 2.4.4 now wont install because:

[root@zentoss5 zenpacks]# serviced service run zope zenpack install ZenPacks.zenoss.Microsoft.Windows-2.4.4.egg
I0605 18:02:27.534971 15876 server.go:341] Connected to the control center at port 10.11.12.2:4979
I0605 18:02:27.773865 15876 server.go:435] Acquiring image from the dfs...
I0605 18:02:27.775168 15876 server.go:437] Acquired! Starting shell
Trying to connect to logstash server... 127.0.0.1:5042
Connected to logstash server.
ERROR:zen.ZenPackCmd:Zenpack ZenPacks.zenoss.Microsoft.Windows-2.4.4.egg requires ZenPacks.zenoss.PythonCollector>=1.4
ERROR:zen.ZenPackCmd:zenpack stopped: ZenPacks.zenoss.Microsoft.Windows-2.4.4.egg not installed
Command returned non-zero exit code 3. Container not commited.

Will keep tinkering/restoring my snapshot :P



Subject: upon further testing, it
Author: [Not Specified]
Posted: 2015-06-05 23:27

upon further testing, it semes that the script removes EVERY zenpack, and the manual way does nothing to remove my broken vmware esxi monitor zenpack.

tomorrow y will try to modify the script to target the broken zenpack alone.

ps: the upgrade process FAILS to install the upgraded/comunity zenpacks because it looks for them where they can't be...



Subject: well, i extracted all of the
Author: [Not Specified]
Posted: 2015-06-06 15:43

well, i extracted all of the zenpacks from the zope container, ran the script there, installed them all again (and the custom ones and the upgraded microsoft windows one), and i THINK that i have a 5.0.3 running system.



Subject: microsoft ZP will install
Author: Andrew Kirch
Posted: 2015-06-08 13:25

microsoft ZP will install fine if you update your pythoncollector zp

Andrew Kirch

akirch@gvit.com

Need Zenoss support, consulting or custom development Look no further. Email or PM me!

Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard



Subject: i guess you did not read all
Author: [Not Specified]
Posted: 2015-06-09 07:04

i guess you did not read all the other things i said here and in my own thread, but the issue was that the script had removed ALL of my zenpacks.

After reinstalling ALL of them, and the custom ones, i THINK i am ok.

Is it normal for the upgrade script to fail in reinstalling zenpacks that are added by the user or upgraded by the user

Also, i wonder why each zenoss relase is behind the microsoft ZP :(



< Previous
Monitor Login failure / success in Active Directory domains?
  Next
Zenoss Core 5.0 How to Add WMI Support
>