← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1251657] Re: neutron-2013.2 testsuite issues

 

Apparently it's an issue with setting up venv not directly related to
neutron project

** Changed in: neutron
       Status: New => Invalid

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

Title:
  neutron-2013.2 testsuite issues

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  See https://bugs.launchpad.net/python-swiftclient/+bug/1251507

  Now observe.

  testuser@archtester /mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2 $ ./run_tests.shNo virtual environment found...create one? (Y/n) n
  Running ` python setup.py testr --slowest --testr-args='--subunit  '`
  Searching for python-subunit>=0.0.10
  Reading https://pypi.python.org/simple/python-subunit/
  Reading http://launchpad.net/subunit
  Best match: python-subunit 0.0.15
  Downloading https://pypi.python.org/packages/source/p/python-subunit/python-subunit-0.0.15.tar.gz#md5=65e43979f1156911a468fa76cc192c0a
  Traceback (most recent call last):
    File "setup.py", line 22, in <module>
      pbr=True)
    File "/usr/lib64/python2.7/distutils/core.py", line 138, in setup
      ok = dist.parse_command_line()
    File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 276, in parse_command_line
      result = _Distribution.parse_command_line(self)
    File "/usr/lib64/python2.7/distutils/dist.py", line 467, in parse_command_line
      args = self._parse_command_opts(parser, args)
    File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 602, in _parse_command_opts
      nargs = _Distribution._parse_command_opts(self, parser, args)
    File "/usr/lib64/python2.7/distutils/dist.py", line 523, in _parse_command_opts
      cmd_class = self.get_command_class(command)
    File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 406, in get_command_class
      ep.require(installer=self.fetch_build_egg)
    File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 2272, in require
      working_set.resolve(self.dist.requires(self.extras),env,installer)))
    File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 618, in resolve
      dist = best[req.key] = env.best_match(req, self, installer)
    File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 862, in best_match
      return self.obtain(req, installer) # try and download/install
    File "/usr/lib64/python2.7/site-packages/pkg_resources.py", line 874, in obtain
      return installer(requirement)
    File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
      return cmd.easy_install(req)
    File "/usr/lib64/python2.7/site-packages/setuptools/command/easy_install.py", line 611, in easy_install
      self.local_index
    File "/usr/lib64/python2.7/site-packages/setuptools/package_index.py", line 539, in fetch_distribution
      return dist.clone(location=self.download(dist.location, tmpdir))
    File "/usr/lib64/python2.7/site-packages/setuptools/package_index.py", line 453, in download
      found = self._download_url(scheme.group(1), spec, tmpdir)
    File "/usr/lib64/python2.7/site-packages/setuptools/package_index.py", line 705, in _download_url
      return self._attempt_download(url, filename)
    File "/usr/lib64/python2.7/site-packages/setuptools/package_index.py", line 712, in _attempt_download
      headers = self._download_to(url, filename)
    File "/usr/lib64/python2.7/site-packages/setuptools/package_index.py", line 608, in _download_to
      "Can't download %s: %s %s" % (url, fp.code,fp.msg)
  distutils.errors.DistutilsError: Can't download https://pypi.python.org/packages/source/p/python-subunit/python-subunit-0.0.15.tar.gz: 502 Bad Gateway

  ----------------------------------------------------------------------
  Ran 0 tests in 5.706s

  OK
  cat: .testrepository/next-stream: No such file or directory

  So what was that about python-subunit vs. gentoo's naming of just subunit.
  This is what happens when relying on creating a VIRTUAL env.
  The system has all these installed already, so why not USE THEM??

  cat: .testrepository/next-stream: No such file or directory

  indeed.

  neutron-2013.2 $ ls -ld .testrepository
  ls: cannot access .testrepository: No such file or directory

  So,   running nosetests -I __init__.py -I test_wsgi.py -I test_ovs_tunnel.py \
  yields
  FAILED (SKIP=328, errors=14, failures=4)

  there are 9 of

  AttributeError: 'AgentMechanismFlatTestCase' object has no attribute
  'driver'

  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismFlatTestCase.test_type_flat_bad
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismFlatTestCase.test_type_flat
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismGenericTestCase.test_unknown_type
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismGreTestCase.test_type_gre
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismGreTestCase.test_type_gre_bad
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismLocalTestCase.test_type_local
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismLocalTestCase.test_type_local
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismLocalTestCase.test_type_local_dead
  ERROR: neutron.tests.unit.ml2._test_mech_agent.AgentMechanismVlanTestCase.test_type_vlan

  ---------------------------------------------
  a few of raise TypeError(repr(o) + " is not JSON serializable");

  ERROR: neutron.tests.unit._test_extension_portbindings.PortBindingsTestCase.test_create_port_binding_profile_none
  ----------------------------------------------------------------------
  _StringException: pythonlogging:'': {{{
  2013-11-15 21:19:37,486     INFO [neutron.manager] Loading Plugin: neutron.db.db_base_plugin_v2.NeutronDbPluginV2
  2013-11-15 21:19:37,491    ERROR [neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent] Failed reporting state!
  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/plugins/linuxbridge/agent/linuxbridge_neutron$
      self.agent_state)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/agent/rpc.py", line 74, in report_state
      return self.cast(context, msg, topic=self.topic)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/openstack/common/rpc/proxy.py", line 171, in $
      rpc.cast(context, self._get_topic(topic), msg)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/openstack/common/rpc/__init__.py", line 158, $
      return _get_impl().cast(CONF, context, topic, msg)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/openstack/common/rpc/impl_fake.py", line 166,$
      check_serialize(msg)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/openstack/common/rpc/impl_fake.py", line 131,$
      json.dumps(msg)
    File "/usr/lib64/python2.7/json/__init__.py", line 243, in dumps
      return _default_encoder.encode(obj)
    File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
      chunks = self.iterencode(o, _one_shot=True)
    File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
      return _iterencode(o, 0)
    File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
      raise TypeError(repr(o) + " is not JSON serializable")

  ------------------------------------------------
  some of HTTPBadRequest: Unrecognized attribute(s) 'binding:profile'

  2013-11-15 21:19:37,730    ERROR [neutron.api.v2.resource] create failed
  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/api/v2/resource.py", line 84, in resource
      result = method(request=request, **args)
   .........................................
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/api/v2/base.py", line 602, in _verify_attributes
      raise webob.exc.HTTPBadRequest(msg)
  HTTPBadRequest: Unrecognized attribute(s) 'binding:profile'
  }}}

  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/_test_extension_portbindings.py",
    line 100, in test_create_port_binding_profile_none
      self._test_create_port_binding_profile(None)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/_test_extension_portbindings.py",
    line 96, in _test_create_port_binding_profile
      **profile_arg) as port:
    File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
      return self.gen.next()
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/test_db_plugin.py", line 573, in port
      port = self._make_port(fmt or self.fmt, net_id, **kwargs)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/test_db_plugin.py", line 436, in _make_port
      raise webob.exc.HTTPClientError(code=res.status_int)
  HTTPClientError: The server could not comply with the request since it is either malformed or otherwise incorrect.

  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py",
    line 798, in _report_state
      self.agent_state)
  .................
    File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
      raise TypeError(repr(o) + " is not JSON serializable")

  possibly a wrong version here

  [system installed;
  dev-python/simplejson-3.3.0
  dev-python/jsonschema-0.8.0]

  ditto

  neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent: ERROR: Failed reporting state!
  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py", line 798, in _report_state
      self.agent_state)

  -----------------------------------------
  a few of KeyError: 'binding:vif_type'

  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/_test_extension_portbindings.py", line 61, in test_port_vif_details
      self._check_response_portbindings(port['port'])
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/_test_extension_portbindings.py", line 41, in _check_response_portbindings
      self.assertEqual(port['binding:vif_type'], self.VIF_TYPE)
  KeyError: 'binding:vif_type'

  ERROR: Failure: TypeError (expected string or buffer)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/lib64/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
      addr.filename, addr.module)
    File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
      return self.importFromDir(dir_path, fqname)
    File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
      mod = load_module(part_fqname, fh, filename, desc)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/quantum/api/__init__.py", line 29, in <module>
      _('You are using old configuration values for the api-paste config. '
  TypeError: expected string or buffer

  seems it picked on quantum/api/__init__.py despite attempting to
  Ignore it with -I. Likely got pointed to it independently.  nosetests
  has a habit of trawling __init__.py files, just needs setting the
  right set of test_ path(s) to avoid it as far as I recall.

  ----------------------------------------------------------
  a few of

  Traceback (most recent call last):
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/_test_extension_portbindings.py", line 136, in test_port_create_portinfo_no$
      **profile_arg):
    File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
      return self.gen.next()
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/test_db_plugin.py", line 573, in port
      port = self._make_port(fmt or self.fmt, net_id, **kwargs)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/test_db_plugin.py", line 432, in _make_port
      res = self._create_port(fmt, net_id, expected_res_status, **kwargs)
    File "/mnt/gen2/TmpDir/portage/sys-cluster/neutron-2013.2-r1/work/neutron-2013.2/neutron/tests/unit/test_db_plugin.py", line 373, in _create_port
      self.assertEqual(port_res.status_int, expected_res_status)
    File "/usr/lib64/python2.7/site-packages/testtools/testcase.py", line 322, in assertEqual
      self.assertThat(observed, matcher, message)
    File "/usr/lib64/python2.7/site-packages/testtools/testcase.py", line 417, in assertThat
      raise MismatchError(matchee, matcher, mismatch, verbose)
  MismatchError: 400 != 403

  if you wish for the whole log it's 351.124 kbytes in size

  Now your test uses nosetests anyways however it wants the subunit
  thingy which I don't know how to implement 'properly' or fully, so
  running nosetests is cutting pretty close to the bone.

  I shall attempt to exclude these failing tests in the short term.  18
  out of 9283 isn't too bad

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