Adding the buildRelations() in the top loop allowed me to see some of them.
I did the t = dmd.Devices...() part and the returned object threw an
AttributeError on t.graphDefs(). Running t.buildRelations() fixes the
AttributeError and returns an empty List.
Navigating to that template in zmi now gives:
* Module Products.PageTemplates.Expressions, line 185, in __call__
* Module Products.PageTemplates.Expressions, line 173, in _eval
* Module Products.PageTemplates.Expressions, line 127, in _eval
__traceback_info__: thresh
* Module Products.PageTemplates.Expressions, line 320, in
restrictedTraverse
__traceback_info__: {'path': ['getTypeName'],
'TraversalRequestNameStack': []}
* Module OFS.ObjectManager, line 713, in __getitem__
KeyError: 'getTypeName'
Also, I did shut down Zenoss and remove var/*.zec.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jason Stevens
Sent: Thursday, October 11, 2007 10:55 AM
To: General discussion of using zenoss system
Subject: Re: [zenoss-users] Another 2.0.92 data issue
Todd,
Something whacky is going on here and I don't have any great ideas as
to what it is. So let's do a little fishing..
First of all, try the zedmd script I gave you before with a small
change that I should have included originally (note the addition of
aq_base in the conditional):
$ zendmd
>>> from Acquisition import aq_base
>>> for t in dmd.Devices.getAllRRDTemplates():
... if not hasattr(aq_base(t), 'graphDefs'):
... t.buildRelations()
... print t.getPrimaryId()
Next, try navigating to one of your broken templates via the zmi.
Click on a link for a broken template, then add /manage_main to the
end of the url. You should see the oh-so-styling zope management
interface with a list of attributes on that template. "graphDefs"
should be one of the 6 or so items in that list.
Then, try to bring up the template in zendmd and see if has graphDefs
defined. The exact path you need to type depends on what template
you are using, but it should look something like this:
$ zendmd
>>> t =
dmd.Devices.SomeDeviceClass.MaybeSomeSubClass.rrdTemplates._getOb
('YourTemplateId')
>>> t
<RRDTemplate at /zport/dmd/Devices/SomeDeviceClass/maybeSomeSubClass/
rrdTemplates/YourTemplateId>
>>> t.graphDefs()
Hopefully the last line will result in some nice list, probably
empty. Maybe you'll get the same AttributeError that you've been
seeing on the zenoss pages. If you see that error then try this:
>>> t.buildRelations()
>>> t.graphDefs()
If you still get an error from t.graphDefs() then things are in a
very sad state. If that works then things are in a slightly less sad
state. Let me know and we'll continue from there.
One other thing to check for - make sure you only have one instance
of zeo running on your zenoss server. If you do a zenoss stop then
ps -eaf | grep python you'll get a hopefully short list that
shouldn't include anything with zenoss or zope or zeo in the
command. Also, try deleting all the zeo cache files while you have
zenoss stopped:
$ rm $ZENHOME/var/*.zec
-jason
On Oct 11, 2007, at 11:06 AM, Todd Davis wrote:
> Upgraded to 2.0.93 -- this still occurs. Additionally, if I try to
> edit ANY
> of the templates I get the same error. However, I can add and edit
> a new
> template.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Todd Davis
> Sent: Wednesday, October 10, 2007 9:26 PM
> To: 'General discussion of using zenoss system'
> Subject: RE: [zenoss-users] Another 2.0.92 data issue
>
> Didn't seem to recurse. I took out the if statement to just get a
> list, but
> didn't get all of them. I definitely noticed one template that is
> set at an
> individual device that wasn't in the list.
>
> Also, it doesn't appear to be just filesystem graphs. I get it on
> all SNMP
> based graphs.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Jason Stevens
> Sent: Wednesday, October 10, 2007 5:41 PM
> To: General discussion of using zenoss system
> Subject: Re: [zenoss-users] Another 2.0.92 data issue
>
> The call to getAllRRDTemplates() recurses through all device classes,
> devices and device components, so it should have hit the template
> you're having trouble with. Are you able to navigate to the
> appropriate FileSystem template itself in zenoss? Are any graphs
> listed there?
>
> -jason
>
> On Oct 10, 2007, at 6:02 PM, Todd Davis wrote:
>
>> Odd. I ran the for loop in dmd. No results. Evidently, all of
>> those
>> top-level templates have that attribute.
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Jason Stevens
>> Sent: Wednesday, October 10, 2007 2:53 PM
>> To: General discussion of using zenoss system
>> Subject: Re: [zenoss-users] Another 2.0.92 data issue
>>
>> Todd,
>>
>> If you're comfortable with zendmd I'd be interested to see the output
>> from this:
>>
>> $ zendmd
>>>>> for t in dmd.Devices.getAllRRDTemplates():
>> ... if not hasattr(t, 'graphDefs'): # this line indented 2 spaces
>> ... print t.getPrimaryId() # this line indented 4 spaces
>>
>> This will print out a list of RRDTemplates that don't have the
>> relationship that appears from your error message to be missing. You
>> might be able to fix the problem you're seeing by adding this line to
>> the command above:
>>
>> ... t.buildRelations() # this line indented 4 spaces
>>
>> -jason
>>
>> On Oct 10, 2007, at 1:37 PM, Todd Davis wrote:
>>
>>> I upgraded from 2.0.90. I've periodically had problems with the
>>> migrate
>>> script(s). I don't remember if that one specifically had problems.
>>>
>>> I've re-run the two you specified. They appear to complete
>>> successfully.
>>> Restarted Zenoss, but I get the same error if I go into one of the
>>> graphs.
>>>
>>> -----Original Message-----
>>> From: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED] On Behalf Of Jason Stevens
>>> Sent: Wednesday, October 10, 2007 8:37 AM
>>> To: General discussion of using zenoss system
>>> Subject: Re: [zenoss-users] Another 2.0.92 data issue
>>>
>>> Todd,
>>>
>>> As for the AttributeError:graphDefs problem, it looks like one of
>>> the
>>> data migrate scripts did not complete properly. Give this a try:
>>>
>>>> zenmigrate --step Thresholds
>>>> zenmigrate --step GraphDefinitionsAndFriends
>>>
>>> Which version of zenoss did you upgrade to 2.0.92 from?
>>>
>>> -jason
>>>
>>>
>>>> From: "Todd Davis" <[EMAIL PROTECTED]>
>>>> Date: October 9, 2007 4:48:45 PM EDT
>>>> To: "'General discussion of using zenoss system'" <zenoss-
>>>> [EMAIL PROTECTED]>
>>>> Subject: [zenoss-users] Another 2.0.92 data issue
>>>> Reply-To: General discussion of using zenoss system <zenoss-
>>>> [EMAIL PROTECTED]>
>>>>
>>>> Here's another issue I'm having in 2.0.92.
>>>>
>>>> Trying to view filesystem graphs gives the following:
>>>> * Module Products.PageTemplates.ZRPythonExpr, line 47, in
>>>> __call__
>>>> __traceback_info__: here.getDefaultGraphDefs(drange=drange)
>>>> * Module Python expression "here.getDefaultGraphDefs
>>>> (drange=drange)",
>>>> line 1, in <expression>
>>>> * Module Products.ZenModel.RRDView, line 202, in
>>>> getDefaultGraphDefs
>>>> * Module Products.ZenModel.RRDTemplate, line 117, in
>>>> getGraphDefs
>>>>
>>>> AttributeError: graphDefs
>>>>
>>>> Also, zenperfsnmp doesn't appear to be gathering information
>>>> correctly
>>>> (filesystems show no usage). Zenperfsnmp shows the following:
>>>> 2007-10-09 15:41:27 INFO zen.zenperfsnmp: fetching default
>>>> RRDCreateCommand
>>>> 2007-10-09 15:41:27 INFO zen.zenperfsnmp: fetching snmp status
>>>> 2007-10-09 15:41:27 INFO zen.zenperfsnmp: Initiating incremental
>>>> device load
>>>> 2007-10-09 15:41:27 ERROR zen.zenperfsnmp: Error loading devices:
>>>> [Failure
>>>> instance: Traceback (failure with no frames): exceptions.TypeError:
>>>> iteration over non-sequence
>>>> ]
>>>> 2007-10-09 15:41:27 INFO zen.zenperfsnmp: Count 2 good 0 bad 0 time
>>>> 0.000060
>>>> 2007-10-09 15:41:27 INFO zen.zenperfsnmp: Count 2 good 1 bad 0 time
>>>> 0.014323
>>>>
>>>> I wonder what that TypeError might be.
>>>>
>>>
>>> _______________________________________________
>>> zenoss-users mailing list
>>> [email protected]
>>> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>>>
>>>
>>>
>>> _______________________________________________
>>> zenoss-users mailing list
>>> [email protected]
>>> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>>
>> _______________________________________________
>> zenoss-users mailing list
>> [email protected]
>> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>>
>>
>>
>> _______________________________________________
>> zenoss-users mailing list
>> [email protected]
>> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>
>
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
>
>
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users