Discussion:
cannot use custom properties- wierd error
kenhen93
2013-11-21 17:30:07 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"cannot use custom properties- wierd error"

To view the discussion, visit: http://community.zenoss.org/message/75313#75313

--------------------------------------------------------------
Hi,

I have just finished migrating all my zenoss 3.x hosts to zenoss 4.2.4. (I did not upgrade, I migrated by adding servers manually and bringing templates over via zenpacks). We just tried to use a custom property for the first time and I am getting this error:

h2. Site Error
An error was encountered while publishing this resource.

  Sorry, a site error occurred.
Traceback (innermost last):
*   Module ZPublisher.Publish, line 237, in publish_module_standard
*   Module ZPublisher.Publish, line 165, in publish
*   Module Zope2.App.startup, line 230, in __call__
*   Module Products.ZenUI3.browser, line 103, in __call__
*   Module Products.ZenWidgets.FileGzipper, line 82, in __call__
*   Module Products.Five.browser.pagetemplatefile, line 59, in __call__
*   Module zope.pagetemplate.pagetemplate, line 132, in pt_render
*   Module zope.pagetemplate.pagetemplate, line 240, in __call__
*   Module zope.tal.talinterpreter, line 266, in __call__
*   Module zope.tal.talinterpreter, line 338, in interpret
*   Module zope.tal.talinterpreter, line 853, in do_defineMacro
*   Module zope.tal.talinterpreter, line 338, in interpret
*   Module zope.tal.talinterpreter, line 528, in do_optTag_tal
*   Module zope.tal.talinterpreter, line 513, in do_optTag
*   Module zope.tal.talinterpreter, line 508, in no_tag
*   Module zope.tal.talinterpreter, line 338, in interpret
*   Module zope.tal.talinterpreter, line 615, in do_insertText_tal
*   Module Products.PageTemplates.Expressions, line 225, in evaluateText
*   Module zope.tales.tales, line 696, in evaluate
*URL: /opt/zenoss/Products/ZenUI3/browser/error_message.pt*
*Line 4, Column 12*
*Expression: <PathExpr standard:u'view/instanceIdentifier'>*
*Names:*{'args': (), 'container': ValueError('Empty entry when <strong>integer</strong> expected',), 'context': ValueError('Empty entry when <strong>integer</strong> expected',), 'default': <object object at 0x7fa113fecae0>, 'here': ValueError('Empty entry when <strong>integer</strong> expected',), 'loop': {}, 'nothing': None, 'options': {}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7fa04305b1b0>, 'request': <HTTPRequest, URL= http://zenoss_url:8080 http://zenoss_url:8080>, 'root': None, 'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7fa03157d6d0>, 'traverse_subpath': [], 'user': <PropertiedUser 'user'>, 'view': <Products.Five.metaclass.ErrorMessage object at 0x7fa0f297c910>, 'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7fa03157db50>}
*   Module zope.tales.expressions, line 217, in __call__
*   Module Products.PageTemplates.Expressions, line 147, in _eval
*   Module zope.tales.expressions, line 124, in _eval
*   Module Products.PageTemplates.Expressions, line 97, in trustedBoboAwareZopeTraverse
*   Module zope.traversing.adapters, line 136, in traversePathElement
__traceback_info__: (<Products.Five.metaclass.ErrorMessage object at 0x7fa0f297c910>, 'instanceIdentifier')
*   Module zope.traversing.adapters, line 42, in traverse
__traceback_info__: (<Products.Five.metaclass.ErrorMessage object at 0x7fa0f297c910>, 'instanceIdentifier', [])
*   Module Products.ZenUI3.browser, line 81, in instanceIdentifier
*   Module Products.ZenUI3.browser, line 77, in dmd
KeyError: 'PARENTS' 
----
Troubleshooting Suggestions
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the error log.
If the error persists please contact the site maintainer. Thank you for your patience.

NOTE: I changed the zenoss url and username in the error for security reasons.

Anyone have any idea what I can do to fix this? I can add C properties but not set them.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75313#75313]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jcurry
2013-11-25 10:30:55 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"Re: cannot use custom properties- wierd error"

To view the discussion, visit: http://community.zenoss.org/message/75327#75327

--------------------------------------------------------------
How are you setting the properties?

There is a nasty issue whereby if you just set the attribute directly (whether it is a standard zProperty or a cProperty), then they end up inconsistent - see http://community.zenoss.org/message/69612#69612 http://community.zenoss.org/message/69612#69612 .

Not sure if there were significant changes between 3.x and 4.2.4 but there may well have been.  I can confirm that using setZenProperty DOES work on 4.2.x with both zProperties and cProperties.

Cheers,
Jane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75327#75327]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
kenhen93
2013-11-25 19:24:35 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Re: cannot use custom properties- wierd error"

To view the discussion, visit: http://community.zenoss.org/message/75331#75331

--------------------------------------------------------------
Hi Jane,

I create the properties at /Device level by editing the custom schema. I set the properties at whatever level I want them set like a device or device class. We are forces to use Z properties that we do not really use like zWinUser. This sucks as the Zenoss instance I migrated from, the custom schema was messed up and i thought going to a fresh 4.2.4 would fix that.

Our Zenoss Instances are very self service for users so I would have to create some kind of script to use setZenProperty.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75331#75331]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...