Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-937

schema.validate(attributes) called 4 times before the router starts

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: Management Agent
    • Labels:
      None

      Description

      Start the router with the config file etc/qdrouterd.conf. This config file has one router entity

      router {
          mode: interior
          id: Router.A
      }

       

      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 -

       

      {'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():

       

       

        Attachments

        1. dispatch-937-1_vhost-creation-1.txt
          8 kB
          Charles E. Rolke

          Issue Links

            Activity

              People

              • Assignee:
                gmurthy Ganesh Murthy
                Reporter:
                gmurthy Ganesh Murthy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: