Error during test_agent_ovs_cleanup

Bug #1102243 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Gary Kotton

Bug Description

The cause of this error is the args passed in "/home/zyluo/git/quantum/quantum/openstack/common/cfg.py", line 1629 is None.
Therefore it raises an exception when argparse tries to join argv in "/usr/lib/python2.7/argparse.py", line 1691

$ ./run_tests.sh test_agent_ovs_cleanup
TestOVSCleanup
    test_main (test_agent_ovs_cleanup.TestOVSCleanup) ERROR
    test_setup_conf (test_agent_ovs_cleanup.TestOVSCleanup) OK

======================================================================
ERROR: test_main (test_agent_ovs_cleanup.TestOVSCleanup)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/zyluo/git/quantum/.venv/local/lib/python2.7/site-packages/nose/case.py", line 133, in run
    self.runTest(result)
  File "/home/zyluo/git/quantum/.venv/local/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
    test(result)
  File "/home/zyluo/git/quantum/.venv/local/lib/python2.7/site-packages/unittest2/case.py", line 398, in __call__
    return self.run(*args, **kwds)
  File "/home/zyluo/git/quantum/.venv/local/lib/python2.7/site-packages/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/zyluo/git/quantum/quantum/tests/unit/test_agent_ovs_cleanup.py", line 39, in test_main
    util.main()
  File "/home/zyluo/git/quantum/quantum/agent/ovs_cleanup_util.py", line 58, in main
    conf()
  File "/home/zyluo/git/quantum/quantum/openstack/common/cfg.py", line 1137, in __call__
    self._cli_values = self._parse_cli_opts(args)
  File "/home/zyluo/git/quantum/quantum/openstack/common/cfg.py", line 1629, in _parse_cli_opts
    return vars(self._oparser.parse_args(args))
  File "/usr/lib/python2.7/argparse.py", line 1691, in parse_args
    self.error(msg % ' '.join(argv))
  File "/usr/lib/python2.7/argparse.py", line 2347, in error
    self.exit(2, _('%s: error: %s\n') % (self.prog, message))
  File "/usr/lib/python2.7/argparse.py", line 2335, in exit
    _sys.exit(status)
SystemExit: 2

Revision history for this message
Gary Kotton (garyk) wrote :

Hi,
The problem is due to the fact that the code invoked by the tests case uses sys.argv. I'll take care of the bug.
Thanks
Gary

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20110

Changed in quantum:
assignee: nobody → Gary Kotton (garyk)
status: New → In Progress
Gary Kotton (garyk)
Changed in quantum:
importance: Undecided → Low
milestone: none → grizzly-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/20110
Committed: http://github.com/openstack/quantum/commit/2daeeba8ab805c11c33e07690eca1204a88f914f
Submitter: Jenkins
Branch: master

commit 2daeeba8ab805c11c33e07690eca1204a88f914f
Author: Gary Kotton <email address hidden>
Date: Mon Jan 21 07:47:28 2013 +0000

    Enable test_agent_ovs_cleanup to be run alone

    Fixed bug 1102243

    Change-Id: I0d3df32301903a0ce8547fe50fd03222e1548a72

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.