yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #17332
[Bug 1342498] [NEW] test_live_migration_* tests fail with fakelibvirt
Public bug reported:
With the recent merging of https://review.openstack.org/73428,
test_live_migration_(changes_listen_addresses|raises_exception) requires
fakelibvirt to have the migrateToURI2() method (if libvirt, at least
v0.9.2, is not installed) so that it can be mocked out by those tests,
otherwise the following mox errors occur during unit testing.
UnknownMethodCallError: Method called is not a member of the object:
migrateToURI2
patch attached (which i may submit properly in the next 24 hours if
someone doesn't beat me to it), with signature taken from upstream
libvirt and mocking stolen from fakelibvirt's migrateToURI().
full error log:
$ ./run_tests.sh nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_*
Running `tools/with_venv.sh python -m nova.openstack.common.lockutils python setup.py testr --testr-args='--subunit --concurrency 0 nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_*'`
nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase
test_live_migration_changes_listen_addresses FAIL
test_live_migration_uses_migrateToURI_without_dest_listen_addrs OK 0.27
test_live_migration_raises_exception FAIL
test_live_migration_fails_without_migratable_flag_or_0_addr OK 3.32
test_live_migration_uses_migrateToURI_without_migratable_flag OK 0.43
Slowest 5 tests took 8.80 secs:
nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase
test_live_migration_changes_listen_addresses 2.10
test_live_migration_fails_without_migratable_flag_or_0_addr 3.32
test_live_migration_raises_exception 2.68
test_live_migration_uses_migrateToURI_without_dest_listen_addrs 0.27
test_live_migration_uses_migrateToURI_without_migratable_flag 0.43
======================================================================
FAIL: nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_changes_listen_addresses
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
pythonlogging:'': {{{
INFO [migrate.versioning.api] 215 -> 216...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 216 -> 217...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 217 -> 218...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 218 -> 219...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 219 -> 220...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 220 -> 221...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 221 -> 222...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 222 -> 223...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 223 -> 224...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 224 -> 225...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 225 -> 226...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 226 -> 227...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 227 -> 228...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 228 -> 229...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 229 -> 230...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 230 -> 231...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 231 -> 232...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 232 -> 233...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 233 -> 234...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 234 -> 235...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 235 -> 236...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 236 -> 237...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 237 -> 238...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 238 -> 239...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 239 -> 240...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 240 -> 241...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 241 -> 242...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 242 -> 243...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 243 -> 244...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 244 -> 245...
INFO [migrate.versioning.api] done
INFO [nova.network.driver] Loading network driver 'nova.network.linux_net'
INFO [nova.virt.driver] Loading compute driver 'nova.virt.fake.FakeDriver'
}}}
Traceback (most recent call last):
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/dev/Desktop/nova/nova/tests/virt/libvirt/test_driver.py", line 4418, in test_live_migration_changes_listen_addresses
self.mox.StubOutWithMock(vdmock, "migrateToURI2")
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 308, in StubOutWithMock
attr_to_replace = getattr(obj, attr_name)
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: migrateToURI2
======================================================================
FAIL: nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_raises_exception
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
pythonlogging:'': {{{
INFO [migrate.versioning.api] 215 -> 216...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 216 -> 217...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 217 -> 218...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 218 -> 219...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 219 -> 220...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 220 -> 221...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 221 -> 222...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 222 -> 223...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 223 -> 224...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 224 -> 225...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 225 -> 226...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 226 -> 227...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 227 -> 228...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 228 -> 229...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 229 -> 230...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 230 -> 231...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 231 -> 232...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 232 -> 233...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 233 -> 234...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 234 -> 235...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 235 -> 236...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 236 -> 237...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 237 -> 238...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 238 -> 239...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 239 -> 240...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 240 -> 241...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 241 -> 242...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 242 -> 243...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 243 -> 244...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 244 -> 245...
INFO [migrate.versioning.api] done
INFO [nova.network.driver] Loading network driver 'nova.network.linux_net'
INFO [nova.virt.driver] Loading compute driver 'nova.virt.fake.FakeDriver'
}}}
Traceback (most recent call last):
File "/home/dev/Desktop/nova/nova/tests/virt/libvirt/test_driver.py", line 4584, in test_live_migration_raises_exception
self.mox.StubOutWithMock(vdmock, "migrateToURI2")
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 308, in StubOutWithMock
attr_to_replace = getattr(obj, attr_name)
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: migrateToURI2
Ran 7 tests in 18.406s
FAILED (failures=2)
** Affects: nova
Importance: Undecided
Status: New
** Patch added: "add migrateToURL2 method to fakelibvirt"
https://bugs.launchpad.net/bugs/1342498/+attachment/4153596/+files/fakelibvirt_add_migrateToURL2.patch
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1342498
Title:
test_live_migration_* tests fail with fakelibvirt
Status in OpenStack Compute (Nova):
New
Bug description:
With the recent merging of https://review.openstack.org/73428,
test_live_migration_(changes_listen_addresses|raises_exception)
requires fakelibvirt to have the migrateToURI2() method (if libvirt,
at least v0.9.2, is not installed) so that it can be mocked out by
those tests, otherwise the following mox errors occur during unit
testing.
UnknownMethodCallError: Method called is not a member of the object:
migrateToURI2
patch attached (which i may submit properly in the next 24 hours if
someone doesn't beat me to it), with signature taken from upstream
libvirt and mocking stolen from fakelibvirt's migrateToURI().
full error log:
$ ./run_tests.sh nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_*
Running `tools/with_venv.sh python -m nova.openstack.common.lockutils python setup.py testr --testr-args='--subunit --concurrency 0 nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_*'`
nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase
test_live_migration_changes_listen_addresses FAIL
test_live_migration_uses_migrateToURI_without_dest_listen_addrs OK 0.27
test_live_migration_raises_exception FAIL
test_live_migration_fails_without_migratable_flag_or_0_addr OK 3.32
test_live_migration_uses_migrateToURI_without_migratable_flag OK 0.43
Slowest 5 tests took 8.80 secs:
nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase
test_live_migration_changes_listen_addresses 2.10
test_live_migration_fails_without_migratable_flag_or_0_addr 3.32
test_live_migration_raises_exception 2.68
test_live_migration_uses_migrateToURI_without_dest_listen_addrs 0.27
test_live_migration_uses_migrateToURI_without_migratable_flag 0.43
======================================================================
FAIL: nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_changes_listen_addresses
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
pythonlogging:'': {{{
INFO [migrate.versioning.api] 215 -> 216...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 216 -> 217...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 217 -> 218...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 218 -> 219...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 219 -> 220...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 220 -> 221...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 221 -> 222...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 222 -> 223...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 223 -> 224...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 224 -> 225...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 225 -> 226...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 226 -> 227...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 227 -> 228...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 228 -> 229...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 229 -> 230...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 230 -> 231...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 231 -> 232...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 232 -> 233...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 233 -> 234...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 234 -> 235...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 235 -> 236...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 236 -> 237...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 237 -> 238...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 238 -> 239...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 239 -> 240...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 240 -> 241...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 241 -> 242...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 242 -> 243...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 243 -> 244...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 244 -> 245...
INFO [migrate.versioning.api] done
INFO [nova.network.driver] Loading network driver 'nova.network.linux_net'
INFO [nova.virt.driver] Loading compute driver 'nova.virt.fake.FakeDriver'
}}}
Traceback (most recent call last):
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/dev/Desktop/nova/nova/tests/virt/libvirt/test_driver.py", line 4418, in test_live_migration_changes_listen_addresses
self.mox.StubOutWithMock(vdmock, "migrateToURI2")
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 308, in StubOutWithMock
attr_to_replace = getattr(obj, attr_name)
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: migrateToURI2
======================================================================
FAIL: nova.tests.virt.libvirt.test_driver.LibvirtConnTestCase.test_live_migration_raises_exception
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
pythonlogging:'': {{{
INFO [migrate.versioning.api] 215 -> 216...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 216 -> 217...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 217 -> 218...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 218 -> 219...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 219 -> 220...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 220 -> 221...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 221 -> 222...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 222 -> 223...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 223 -> 224...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 224 -> 225...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 225 -> 226...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 226 -> 227...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 227 -> 228...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 228 -> 229...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 229 -> 230...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 230 -> 231...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 231 -> 232...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 232 -> 233...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 233 -> 234...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 234 -> 235...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 235 -> 236...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 236 -> 237...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 237 -> 238...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 238 -> 239...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 239 -> 240...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 240 -> 241...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 241 -> 242...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 242 -> 243...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 243 -> 244...
INFO [migrate.versioning.api] done
INFO [migrate.versioning.api] 244 -> 245...
INFO [migrate.versioning.api] done
INFO [nova.network.driver] Loading network driver 'nova.network.linux_net'
INFO [nova.virt.driver] Loading compute driver 'nova.virt.fake.FakeDriver'
}}}
Traceback (most recent call last):
File "/home/dev/Desktop/nova/nova/tests/virt/libvirt/test_driver.py", line 4584, in test_live_migration_raises_exception
self.mox.StubOutWithMock(vdmock, "migrateToURI2")
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 308, in StubOutWithMock
attr_to_replace = getattr(obj, attr_name)
File "/home/dev/Desktop/nova/.venv/local/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: migrateToURI2
Ran 7 tests in 18.406s
FAILED (failures=2)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1342498/+subscriptions
Follow ups
References