VirTechSystems
2013-07-11 17:21:54 UTC
VirTechSystems [http://community.zenoss.org/people/VirTechSystems] created the discussion
"Broken Devices"
To view the discussion, visit: http://community.zenoss.org/message/73932#73932
--------------------------------------------------------------
Hey,
This error is possibly related to this issue I solved yesterday, but I'm not sure. http://community.zenoss.org/thread/20114?tstart=0 http://community.zenoss.org/thread/20114?tstart=0
I am receiving an error when I try to reindex() my data (I didn't try this before I solved the problem yesterday and thought it might be a good idea this morning).
 File "<console>", line 1, in <module>
 File "/opt/zenoss/Products/ZenModel/zendmd.py", line 142, in reindex
   dmd.Devices.reIndex()
 File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 807, in reIndex
   dev._create_componentSearch()
 File "/opt/zenoss/Products/ZenModel/Device.py", line 560, in _create_componentSearch
   c.index_object()
 File "/opt/zenoss/Products/ZenModel/IpInterface.py", line 177, in index_object
   self.index_links()
 File "/opt/zenoss/Products/ZenModel/Linkable.py", line 27, in index_links
   cat.catalog_object(self, self.getPrimaryId())
 File "/opt/zenoss/lib/python/Products/ZCatalog/ZCatalog.py", line 476, in catalog_object
   update_metadata=update_metadata)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 320, in catalogObject
   index = self.updateMetadata(object, uid, None)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 270, in updateMetadata
   newDataRecord = self.recordify(object)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 396, in recordify
   attr = attr()
 File "/opt/zenoss/Products/ZenModel/IpInterface.py", line 566, in deviceId
   d = self.device()
 File "/opt/zenoss/Products/ZenModel/OSComponent.py", line 46, in device
   if os: return os.device()
 File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 158, in device
   return self.getPrimaryParent()
 File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 83, in getPrimaryParent
   return self.__primary_parent__.primaryAq()
 File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 78, in primaryAq
   raise KeyError(self.id)
KeyError: 'Server1'
So, I decided to check the relations again and I get the following error:
zenchkrels -r -x1
INFO:zen.CheckRelations:Checking relations...
ERROR:zen.Relations:remote relation Server1/deviceClass doesn't point back to /zport/dmd/Devices/Server/Windows/devices
WARNING:zen.Relations:reconnecting relation Server1/deviceClass to relation /zport/dmd/Devices/Server/Windows/devices
ERROR:zen.Relations:remote relation Server2/deviceClass doesn't point back to /zport/dmd/Devices/Server/Windows/devices
WARNING:zen.Relations:reconnecting relation Server2/deviceClass to relation /zport/dmd/Devices/Server/Windows/devices
Traceback (most recent call last):
 File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 70, in <module>
   tmbk.rebuild()
 File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 34, in rebuild
   for object in getAllConfmonObjects(self.dmd):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 504, in getSubObjectsMemo
   not obj.getPrimaryDmdId().startswith(base.getPrimaryDmdId())):
 File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 426, in getPrimaryDmdId
   path = path[path.index(rootName)+1:]
ValueError: 'dmd' is not in list
There seems to be two devices that are pretty messed up.
I have run the zenoss-repairdevice.py and a whole slew of other cleaning scripts to try to get rid of them, with no success. They still show up on the WebUI, but they are unaccessable.
The repairdevice script doesn't even check these two devices, so I'm guessing the data is incomplete and it's pulling the object from somewhere other than Devices. A find() of the Device returns None.
I guess the ultimate issue is, is there somewhere else I can search for this entry and find what reference is broken and delete it?
Any pointers would be greatly appreciated.
Thanks,
Chris
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73932#73932]
Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"Broken Devices"
To view the discussion, visit: http://community.zenoss.org/message/73932#73932
--------------------------------------------------------------
Hey,
This error is possibly related to this issue I solved yesterday, but I'm not sure. http://community.zenoss.org/thread/20114?tstart=0 http://community.zenoss.org/thread/20114?tstart=0
I am receiving an error when I try to reindex() my data (I didn't try this before I solved the problem yesterday and thought it might be a good idea this morning).
reindex()
Traceback (most recent call last):Â File "<console>", line 1, in <module>
 File "/opt/zenoss/Products/ZenModel/zendmd.py", line 142, in reindex
   dmd.Devices.reIndex()
 File "/opt/zenoss/Products/ZenModel/DeviceClass.py", line 807, in reIndex
   dev._create_componentSearch()
 File "/opt/zenoss/Products/ZenModel/Device.py", line 560, in _create_componentSearch
   c.index_object()
 File "/opt/zenoss/Products/ZenModel/IpInterface.py", line 177, in index_object
   self.index_links()
 File "/opt/zenoss/Products/ZenModel/Linkable.py", line 27, in index_links
   cat.catalog_object(self, self.getPrimaryId())
 File "/opt/zenoss/lib/python/Products/ZCatalog/ZCatalog.py", line 476, in catalog_object
   update_metadata=update_metadata)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 320, in catalogObject
   index = self.updateMetadata(object, uid, None)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 270, in updateMetadata
   newDataRecord = self.recordify(object)
 File "/opt/zenoss/lib/python/Products/ZCatalog/Catalog.py", line 396, in recordify
   attr = attr()
 File "/opt/zenoss/Products/ZenModel/IpInterface.py", line 566, in deviceId
   d = self.device()
 File "/opt/zenoss/Products/ZenModel/OSComponent.py", line 46, in device
   if os: return os.device()
 File "/opt/zenoss/Products/ZenModel/OperatingSystem.py", line 158, in device
   return self.getPrimaryParent()
 File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 83, in getPrimaryParent
   return self.__primary_parent__.primaryAq()
 File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 78, in primaryAq
   raise KeyError(self.id)
KeyError: 'Server1'
So, I decided to check the relations again and I get the following error:
zenchkrels -r -x1
INFO:zen.CheckRelations:Checking relations...
ERROR:zen.Relations:remote relation Server1/deviceClass doesn't point back to /zport/dmd/Devices/Server/Windows/devices
WARNING:zen.Relations:reconnecting relation Server1/deviceClass to relation /zport/dmd/Devices/Server/Windows/devices
ERROR:zen.Relations:remote relation Server2/deviceClass doesn't point back to /zport/dmd/Devices/Server/Windows/devices
WARNING:zen.Relations:reconnecting relation Server2/deviceClass to relation /zport/dmd/Devices/Server/Windows/devices
Traceback (most recent call last):
 File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 70, in <module>
   tmbk.rebuild()
 File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 34, in rebuild
   for object in getAllConfmonObjects(self.dmd):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 509, in getSubObjectsMemo
   for x in getSubObjectsMemo(obj, filter, descend, memo):
 File "/opt/zenoss/Products/ZenUtils/Utils.py", line 504, in getSubObjectsMemo
   not obj.getPrimaryDmdId().startswith(base.getPrimaryDmdId())):
 File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 426, in getPrimaryDmdId
   path = path[path.index(rootName)+1:]
ValueError: 'dmd' is not in list
There seems to be two devices that are pretty messed up.
I have run the zenoss-repairdevice.py and a whole slew of other cleaning scripts to try to get rid of them, with no success. They still show up on the WebUI, but they are unaccessable.
The repairdevice script doesn't even check these two devices, so I'm guessing the data is incomplete and it's pulling the object from somewhere other than Devices. A find() of the Device returns None.
I guess the ultimate issue is, is there somewhere else I can search for this entry and find what reference is broken and delete it?
Any pointers would be greatly appreciated.
Thanks,
Chris
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73932#73932]
Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]