Skip navigation
1 2 3 Previous Next 15343 Views 37 Replies Latest reply: May 10, 2013 4:07 PM by Shane Scott RSS Go to original post
  • telcoman Newbie 4 posts since
    Jun 12, 2012
    Currently Being Moderated
    30. Jun 12, 2012 4:04 PM (in response to jshardlow)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    Did you ever get a solution to this? I have a similar problem on a 3.2.1 install. The lingering datasource and broken zenpack is driving me nuts. How can we force remove these things?

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    32. Jun 12, 2012 4:28 PM (in response to jshardlow)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    Ralph:

     

    What problem are you running in to? The problem with jshardlows installation may not be easily resolvable.

     

    Jshardlow:

     

    Looking at this fresh I think it might make more sense to zendevicedump your devices in to a fresh installation.

     

    Best,

     

    --Shane (Hackman238)

  • telcoman Newbie 4 posts since
    Jun 12, 2012
    Currently Being Moderated
    33. Jun 12, 2012 4:42 PM (in response to Shane Scott)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    My problem is almost exactly the same except with a pack named "DnsMonitor".  Here is some output:

     

    [zenoss@zenoss_ct5 log]$ zenpack --list

    DnsMonitor (/usr/local/zenoss/zenoss/Products/DnsMonitor)

     

    [zenoss@zenoss_ct5 log]$ zenpack --remove DnsMonitor

    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 169, in run

        RemoveZenPack(self.dmd, self.options.removePackName, self.log)

      File "/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py", line 63, in RemoveZenPack

        dmd.ZenPackManager.packs._delObject(packName)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyRelationshipBase.py", line 91, in _delObject

        self.removeRelation(obj, suppress_events)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/RelationshipBase.py", line 109, in removeRelation

        self._remoteRemove(obj)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyContRelationship.py", line 191, in _remoteRemove

        rel = getattr(obj, remoteName)

    AttributeError: manager

     

    [zenoss@zenoss_ct5 log]$ zendmd

    Welcome to the Zenoss dmd command shell!

    'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.

    Use TAB-TAB to see a list of zendmd related commands.

    Tab completion also works for objects -- hit tab after an object name and '.'

    (eg dmd. + tab-key).

    >>> print "Checking for broken zenpacks..."

    Checking for broken zenpacks...

    >>> packs = None

    >>> if hasattr(dmd, 'ZenPackManager'):

    ...  packs = dmd.ZenPackManager.packs

    ... else:

    ...  packs = dmd.packs

    ...

    >>> for pack in packs():

    ...  try:

    ...   unused = pack.primaryAq()

    ...   print "%s is fine." % (pack.id,)

    ...   if pack.id == "DnsMonitor":

    ...    packs._remove(pack)

    ...  except AttributeError:

    ...   print "Problem with %s ZenPack. Forcing removal." % (pack.id,)

    ...   packs._remove(pack)

    ...  

    ...

    DnsMonitor is fine.

    Traceback (most recent call last):

      File "<console>", line 6, in <module>

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyContRelationship.py", line 163, in _remove

        notify(ObjectWillBeRemovedEvent(robj, self, robj.getId()))

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.event-3.4.1-py2.6.egg/zope/event/__init__.py", line 23, in notify

        subscriber(event)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/event.py", line 26, in dispatch

        for ignored in zope.component.subscribers(event, None):

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/_api.py", line 138, in subscribers

        return sitemanager.subscribers(objects, interface)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/registry.py", line 323, in subscribers

        return self.adapters.subscribers(objects, provided)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.interface-3.5.2-py2.6-linux-i686.egg/zope/interface/adapter.py", line 579, in subscribers

        subscription(*objects)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/event.py", line 33, in objectEventNotify

        adapters = zope.component.subscribers((event.object, event), None)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/_api.py", line 138, in subscribers

        return sitemanager.subscribers(objects, interface)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/registry.py", line 323, in subscribers

        return self.adapters.subscribers(objects, provided)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.interface-3.5.2-py2.6-linux-i686.egg/zope/interface/adapter.py", line 579, in subscribers

        subscription(*objects)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/Zope2-2.12.1-py2.6-linux-i686.egg/OFS/subscribers.py", line 107, in dispatchObjectWillBeMovedEvent

        dispatchToSublocations(ob, event)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.container-3.9.1-py2.6-linux-i686.egg/zope/container/contained.py", line 148, in dispatchToSublocations

        for ignored in zope.component.subscribers((sub, event), None):

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/_api.py", line 138, in subscribers

        return sitemanager.subscribers(objects, interface)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.component-3.7.1-py2.6.egg/zope/component/registry.py", line 323, in subscribers

        return self.adapters.subscribers(objects, provided)

      File "/usr/local/zenoss/python/lib/python2.6/site-packages/zope.interface-3.5.2-py2.6-linux-i686.egg/zope/interface/adapter.py", line 579, in subscribers

        subscription(*objects)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/subscribers.py", line 24, in cleanUpRelationships

        ob._remoteRemove()

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyRelationship.py", line 124, in _remoteRemove

        rel._remove(self.__primary_parent__)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToOneRelationship.py", line 91, in _remove

        raise ObjectNotFound( "object %s was not found on %s" % (obj, self))

    ObjectNotFound: object <ZenPack at DnsMonitor> was not found on <ToOneRelationship at pack>

  • telcoman Newbie 4 posts since
    Jun 12, 2012
    Currently Being Moderated
    34. Jun 12, 2012 4:48 PM (in response to telcoman)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    When checking relations, it dies here:

     

    INFO:zen.Relations:checking relations on object /zport/dmd/ZenPackManager

    Traceback (most recent call last):

      File "/usr/local/zenoss/zenoss/Products/ZenUtils/CheckRelations.py", line 72, in <module>

        tmbk.rebuild()

      File "/usr/local/zenoss/zenoss/Products/ZenUtils/CheckRelations.py", line 40, in rebuild

        object.checkRelations(repair=repair)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/RelationshipManager.py", line 262, in checkRelations

        rel.checkRelation(repair)

      File "/usr/local/zenoss/zenoss/Products/ZenRelations/ToManyContRelationship.py", line 311, in checkRelation

        rrel = getattr(obj, remoteName)

  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    35. Jun 12, 2012 5:00 PM (in response to telcoman)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    Ralph:

     

    Yikes. I'm afraid I havent a solution for this.

     

    --Shane (Hackman238)

  • rolfs Rank: White Belt 27 posts since
    Jan 27, 2010
    Currently Being Moderated
    36. May 10, 2013 2:53 AM (in response to Shane Scott)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem
    In zendmd:

     

    for user in dmd.ZenUsers.getUsers():

        user.messages.removeRelation()

     

    For me, this did not loop through the admin user where the problem with the "messages/msg/messageQueue"  was. I had to run this:

     

    dmd.ZenUsers.admin.messages.removeRelation()
  • Shane Scott ZenossMaster 1,373 posts since
    Jul 6, 2009
    Currently Being Moderated
    37. May 10, 2013 4:07 PM (in response to rolfs)
    Re: 2.5.2 -> 3.0.3 ZenPack removal problem

    rolfs:

     

    You'll want to zenchkrels -x1 -r after that.

     

    Best,

    --Shane Scott (Hackman238)

    http://www.linkedin.com/in/shanewilliamscott/

1 2 3 Previous Next

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points