qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh Murthy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DISPATCH-937) schema.validate(attributes) called 4 times before the router starts
Date Wed, 21 Mar 2018 00:44:00 GMT

    [ https://issues.apache.org/jira/browse/DISPATCH-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407284#comment-16407284
] 

Ganesh Murthy commented on DISPATCH-937:
----------------------------------------

[~chug] I added another commit to address your concern. Please re-test and let me know if
you still see multiple calls to validate. Thank you for reviewing the PR.

> schema.validate(attributes) called 4 times before the router starts
> -------------------------------------------------------------------
>
>                 Key: DISPATCH-937
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-937
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Management Agent
>    Affects Versions: 1.0.1
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.2.0
>
>         Attachments: dispatch-937-1_vhost-creation-1.txt
>
>
> Start the router with the config file etc/qdrouterd.conf. This config file has one router
entity
> {noformat}
> router {
>     mode: interior
>     id: Router.A
> }{noformat}
>  
> The schema.validate is called 4 times on the router entity. It should be called only
once
>  
> Here is the traceback of the 4 times it was called -
>  
> {noformat}
> {'type': u'org.apache.qpid.dispatch.router', u'mode': u'standalone', u'id': u'Router.A'}
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 142, in configure_dispatch
>     config = Config(filename)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 41, in __init__
>     self.load(filename, raw_json)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 112, in load
>     self.load(f, raw_json)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 120, in load
>     self.schema.validate_all(entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 576, in validate_all
>     self.validate_add(a, entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/qdrouter.py",
line 53, in validate_add
>     super(QdSchema, self).validate_add(attributes, entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 585, in validate_add
>     self.validate_entity(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 568, in validate_entity
>     entity_type.validate(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 396, in validate
>     for line in traceback.format_stack():
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 164, in configure_dispatch
>     configure(config.by_type('router')[0])
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 151, in configure
>     agent.configure(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 855, in configure
>     self._create(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 828, in _create
>     self.add_entity(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 859, in add_entity
>     self.entities.add(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 519, in add
>     entity.validate()       # Fill in defaults etc.
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 171, in validate
>     super(EntityAdapter, self).validate(**kwargs)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 639, in validate
>     self.entity_type.validate(self.attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 396, in validate
>     for line in traceback.format_stack():
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 164, in configure_dispatch
>     configure(config.by_type('router')[0])
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 151, in configure
>     agent.configure(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 855, in configure
>     self._create(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 828, in _create
>     self.add_entity(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 859, in add_entity
>     self.entities.add(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 521, in add
>     self.schema.validate_add(entity, self.entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/qdrouter.py",
line 53, in validate_add
>     super(QdSchema, self).validate_add(attributes, entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 585, in validate_add
>     self.validate_entity(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 566, in validate_entity
>     attributes['type'] = self.long_name(attributes['type'])
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/python2.7/site-packages/qpid_dispatch/management/entity.py",
line 77, in __setitem__
>     def __setitem__(self, name, value): self._set(name, value)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 636, in _set
>     self.validate()
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 171, in validate
>     super(EntityAdapter, self).validate(**kwargs)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 639, in validate
>     self.entity_type.validate(self.attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 396, in validate
>     for line in traceback.format_stack():
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 164, in configure_dispatch
>     configure(config.by_type('router')[0])
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/config.py",
line 151, in configure
>     agent.configure(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 855, in configure
>     self._create(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 828, in _create
>     self.add_entity(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 859, in add_entity
>     self.entities.add(entity)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/agent.py",
line 521, in add
>     self.schema.validate_add(entity, self.entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/qdrouter.py",
line 53, in validate_add
>     super(QdSchema, self).validate_add(attributes, entities)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 585, in validate_add
>     self.validate_entity(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 568, in validate_entity
>     entity_type.validate(attributes)
> File "/home/gmurthy/opensource/qpid-dispatch/install/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema.py",
line 396, in validate
>     for line in traceback.format_stack():{noformat}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message