Hi all,

Having problems when it come to creating Multi-Graph Reports. At first the 
report is working, until I created 2 new entries on /Device/Server and move all 
monitored device on these 2 newly created entries. The 2 new entry is 
/Device/Server/GTLocal and /Device/Server/GTRemote.

The problem start when I recreating the Multi-Graph Reports to update for the 
new Device Path to point to the newly created entries. On zenmigrate side, the 
zenmigrate is failed with errors as shown below:


Code:

$ zenmigrate 
INFO:zen.migrate:Installing DifferentiateTemplates (2.3.1)
Recovering
Traceback (most recent call last):
  File "/usr/local/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in 
?
    main()
  File "/usr/local/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in 
main
    m.main()
  File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 425, in 
main
    self.cutover()
  File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 305, in 
cutover
    self.migrate()
  File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 281, in 
migrate
    m.cutover(self.dmd)
  File "/usr/local/zenoss/Products/ZenModel/migrate/differentiateTemplates.py", 
line 45, in cutover
    for t in dmd.Devices.getAllRRDTemplates():
  File "/usr/local/zenoss/Products/ZenModel/DeviceClass.py", line 562, in 
getAllRRDTemplates
    rrdts.extend(RRDTemplate.YieldAllRRDTemplates(self))
  File "/usr/local/zenoss/Products/ZenModel/RRDTemplate.py", line 76, in 
YieldAllRRDTemplates
    yield result.getObject()
  File "usr/local/zenoss/lib/python/Products/ZCatalog/CatalogBrains.py", line 
77, in getObject
  File "usr/local/zenoss/lib/python/OFS/Traversable.py", line 221, in 
unrestrictedTraverse
  File "usr/local/zenoss/lib/python/OFS/ObjectManager.py", line 713, in 
__getitem__
KeyError: 'Linux'




Quick temp fix for this problem is to open the 
/usr/local/zenoss/Products/ZenModel/migrate/differentialTemplates.py, go to 
line 45 and change the line:

"for t in dmd.Devices.getAllRRDTemplates():" 
to 
"for t in dmd.Devices.getAllRRDTemplatesPainfully():" 

Save the differentialTemplates.py and run the zenmigrate again.

The zenmigrate should be successful.

Step to reproduce this error:

1- Create 2 new entry in /Device/Server
2- Move the already monitored devices into the 2 new entries
3- Run zenmigrate

So the zenmigrate issues resolved for now, although not sure if this some kind 
of bug or not. The second issue, is that I having more or less the same error 
on Zope with the temp fix as shown above applied when try to configure the 
Graph Definition in Multi-Graph Reports. 

Step to reproduce the error:

1- Go to Reports -> Multi-Graph Reports -> Reports instance (in my case is 
Apache Servers Uptime)
2- Click Edit which will bring to the editable ReportConfiguration.
3- There are Collections, Graph Definitions and Graph Groups. The Collection 
can be configured correctly to load those devices in the 2 newly created 
entries as shown above. But the problem start when trying to configure the 
Graph Definitions where the page only shown errors as shown below:


Code:

 Type: KeyError
Value: 'Linux'

Traceback (innermost last):

    * Module ZPublisher.Publish, line 114, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 40, in call_object
    * Module Products.ZenModel.ZenModelBase, line 64, in __call__
    * Module Shared.DC.Scripts.Bindings, line 311, in __call__
    * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
    * Module Products.CMFCore.FSPageTemplate, line 195, in _exec
    * Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
    * Module Products.PageTemplates.PageTemplate, line 104, in pt_render
      <FSPageTemplate at /zport/editGraphDefinition used for 
/zport/dmd/Reports/Multi-Graph Reports/Apache 
Uptime/graphDefs/ApacheUptimeGraphs>
    * Module TAL.TALInterpreter, line 206, in __call__
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 711, in do_useMacro
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 426, in do_optTag_tal
    * Module TAL.TALInterpreter, line 411, in do_optTag
    * Module TAL.TALInterpreter, line 406, in no_tag
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 711, in do_useMacro
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 426, in do_optTag_tal
    * Module TAL.TALInterpreter, line 411, in do_optTag
    * Module TAL.TALInterpreter, line 406, in no_tag
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 734, in do_defineSlot
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 426, in do_optTag_tal
    * Module TAL.TALInterpreter, line 411, in do_optTag
    * Module TAL.TALInterpreter, line 406, in no_tag
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 734, in do_defineSlot
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 677, in do_condition
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 426, in do_optTag_tal
    * Module TAL.TALInterpreter, line 411, in do_optTag
    * Module TAL.TALInterpreter, line 406, in no_tag
    * Module TAL.TALInterpreter, line 250, in interpret
    * Module TAL.TALInterpreter, line 651, in do_loop_tal
    * Module Products.PageTemplates.TALES, line 206, in setRepeat
    * Module Products.PageTemplates.TALES, line 221, in evaluate
      URL: file:ZenModel/skins/zenmodel/editGraphDefinition.pt
      Line 15, Column 0
      Expression: standard:'here/getUniqueDpNames'
      Names:

      {'container': <ZentinelPortal at /zport>,
       'context': <GraphDefinition at /zport/dmd/Reports/Multi-Graph 
Reports/Apache Uptime/graphDefs/ApacheUptimeGraphs>,
       'default': <Products.PageTemplates.TALES.Default instance at 
0x7f3451a9acf8>,
       'here': <GraphDefinition at /zport/dmd/Reports/Multi-Graph 
Reports/Apache Uptime/graphDefs/ApacheUptimeGraphs>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at 0x3c92248>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter 
instance at 0x7f3451821128>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0x3c92248>,
       'request': <HTTPRequest, 
URL=http://hidro.logistics.com:8080/zport/dmd/Reports/Multi-Graph%20Reports/Apache%20Uptime/graphDefs/ApacheUptimeGraphs>,
       'root': <Application at >,
       'template': <FSPageTemplate at /zport/editGraphDefinition used for 
/zport/dmd/Reports/Multi-Graph Reports/Apache 
Uptime/graphDefs/ApacheUptimeGraphs>,
       'traverse_subpath': [],
       'user': admin}

    * Module Products.PageTemplates.Expressions, line 185, in __call__
    * Module Products.PageTemplates.Expressions, line 180, in _eval
    * Module Products.PageTemplates.Expressions, line 85, in render
    * Module Products.ZenModel.GraphDefinition, line 523, in getUniqueDpNames
    * Module Products.ZenModel.DeviceClass, line 562, in getAllRRDTemplates
    * Module Products.ZenModel.RRDTemplate, line 76, in YieldAllRRDTemplates
    * Module Products.ZCatalog.CatalogBrains, line 77, in getObject
    * Module OFS.Traversable, line 221, in unrestrictedTraverse
      __traceback_info__: (['eth0', 'interfaces', 'os', 'hidro.logistics.com', 
'devices', 'Ubuntu'], 'Linux')
    * Module OFS.ObjectManager, line 713, in __getitem__

KeyError: 'Linux' 




For this one, I have even applied the Chet scripts to repair unhealthy catalog 
as shown below to no avail (the Zope error still exists):


Code:

problems = True
while problems:
    problems = False
    brains = dmd.Devices.deviceSearch()
    for d in brains:
        try:
            bah = d.getObject()
        except Exception:
            print "Removing non-existent device from deviceSearch: " + 
d.getPath()
            dmd.Devices.deviceSearch.uncatalog_object(d.getPath())
            problems = True

problems = True
while problems:
    problems = False
    brains = dmd.Devices.componentSearch()
    for d in brains:
        try:
            bah = d.getObject()
        except Exception:
            print "Removing non-existent component from componentSearch: " + 
d.getPath()
            dmd.Devices.componentSearch.uncatalog_object(d.getPath())
            problems = True

commit()




I have searched the forums for the more or less same problem as me and try out 
any fix but still not successful.  It seem that the Zope db is not updated with 
the 2 newly created entries as shown above but so far do not have any idea on 
how to fix this.

Help please?

Thanks!




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=31446#31446

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to