[Kimchi-devel] [PATCH v2] Do not reuse names when cloning the same VM more than once at the same time

Crístian Viana vianac at linux.vnet.ibm.com
Tue Jan 13 17:02:17 UTC 2015


This is the difference between this and the previous patchset (v1):

- Add test.

Without the changes to src/kimchi/model/vms.py, the test mentioned above returns
the following error:

$ sudo ./run_tests.sh test_model.ModelTests.test_vm_clone
WARNING: no 'numpy' module, HyBi protocol will be slower
cpu_info topology not supported.
Loading YumUpdate features.
Loaded plugins: fastestmirror, langpacks, remove-with-leaves
libvirt: Domain Config error : operation failed: domain 'test-clone-1' already exists with uuid f1150e4f-36a6-49c2-a6ef-e416a3358852
Error in async_task 2 
Traceback (most recent call last):
  File "/home/vianac/LTC/kimchi/src/kimchi/asynctask.py", line 70, in _run_helper
    self.fn(cb, opaque)
  File "/home/vianac/LTC/kimchi/src/kimchi/model/vms.py", line 380, in _clone_task
    'err': e.message})
OperationFailed: KCHVM0035E: Unable to clone VM 'test'. Details: operation failed: domain 'test-clone-1' already exists with uuid f1150e4f-36a6-49c2-a6ef-e416a3358852

libvirt: Test Driver error : Domain not found
F
======================================================================
FAIL: test_vm_clone (test_model.ModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_model.py", line 1390, in test_vm_clone
    self.assertEquals('finished', task2['status'])
AssertionError: 'finished' != u'failed'

----------------------------------------------------------------------
Ran 1 test in 1.072s

FAILED (failures=1)

Crístian Viana (1):
  Do not reuse names when cloning the same VM more than once at the same
    time

 src/kimchi/model/vms.py | 19 ++++++++++++++++---
 tests/test_model.py     | 22 +++++++++++++++-------
 2 files changed, 31 insertions(+), 10 deletions(-)

-- 
2.1.0




More information about the Kimchi-devel mailing list