← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1683606] [NEW] segments notifier needs to be disabled in unit tests

 

Public bug reported:

I spotted the following tracebacks when running 'tox -epy27 segment'.
They don't cause failures because they are async notifications, but they
take up resources and make the logs ugly. It looks like we need to add a
fixture or mock to the setup of the segments plugin.

Captured stderr:
~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
        timer()
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 58, in __call__
        cb(*args, **kw)
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
        return f(*args, **kwargs)
      File "neutron/notifiers/batch_notifier.py", line 52, in synced_send
        self._notify()
      File "neutron/notifiers/batch_notifier.py", line 65, in _notify
        self.callback(batched_events)
      File "neutron/services/segments/plugin.py", line 165, in _send_notifications
        event.method(event)
      File "neutron/services/segments/plugin.py", line 189, in _create_or_update_nova_inventory
        self._update_nova_inventory(event)
      File "neutron/services/segments/plugin.py", line 198, in _update_nova_inventory
        IPV4_RESOURCE_CLASS)
      File "neutron/services/segments/placement_client.py", line 33, in wrapper
        return f(self, *a, **k)
      File "neutron/services/segments/placement_client.py", line 116, in get_inventory
        return self._get(url).json()
      File "neutron/services/segments/placement_client.py", line 53, in _get
        **kwargs)
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 758, in get
        return self.request(url, 'GET', **kwargs)
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
        return wrapped(*args, **kwargs)
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 513, in request
        **endpoint_filter)
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 855, in get_endpoint
        auth = self._auth_required(auth, 'determine endpoint URL')
      File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 798, in _auth_required
        raise exceptions.MissingAuthPlugin(msg_fmt % msg)
    MissingAuthPlugin: An auth plugin is required to determine endpoint URL

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1683606

Title:
  segments notifier needs to be disabled in unit tests

Status in neutron:
  New

Bug description:
  I spotted the following tracebacks when running 'tox -epy27 segment'.
  They don't cause failures because they are async notifications, but
  they take up resources and make the logs ugly. It looks like we need
  to add a fixture or mock to the setup of the segments plugin.

  Captured stderr:
  ~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 457, in fire_timers
          timer()
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/eventlet/hubs/timer.py", line 58, in __call__
          cb(*args, **kw)
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
          return f(*args, **kwargs)
        File "neutron/notifiers/batch_notifier.py", line 52, in synced_send
          self._notify()
        File "neutron/notifiers/batch_notifier.py", line 65, in _notify
          self.callback(batched_events)
        File "neutron/services/segments/plugin.py", line 165, in _send_notifications
          event.method(event)
        File "neutron/services/segments/plugin.py", line 189, in _create_or_update_nova_inventory
          self._update_nova_inventory(event)
        File "neutron/services/segments/plugin.py", line 198, in _update_nova_inventory
          IPV4_RESOURCE_CLASS)
        File "neutron/services/segments/placement_client.py", line 33, in wrapper
          return f(self, *a, **k)
        File "neutron/services/segments/placement_client.py", line 116, in get_inventory
          return self._get(url).json()
        File "neutron/services/segments/placement_client.py", line 53, in _get
          **kwargs)
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 758, in get
          return self.request(url, 'GET', **kwargs)
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
          return wrapped(*args, **kwargs)
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 513, in request
          **endpoint_filter)
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 855, in get_endpoint
          auth = self._auth_required(auth, 'determine endpoint URL')
        File "/home/administrator/git/openstack/neutron/.tox/py27/local/lib/python2.7/site-packages/keystoneauth1/session.py", line 798, in _auth_required
          raise exceptions.MissingAuthPlugin(msg_fmt % msg)
      MissingAuthPlugin: An auth plugin is required to determine endpoint URL

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1683606/+subscriptions


Follow ups