config_drive unit tests (libvirt driver) aren't mocking genisoimage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Diana Clarke |
Bug Description
I was running unit tests on a bare bones vm that didn't have genisoimage installed and the test_rescue_
=======
Failed 1 tests - output below:
=======
nova.tests.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "nova/tests/
instance, exists=lambda name: name != 'disk.config.
File "/home/
return func(*args, **keywargs)
File "nova/tests/
File "nova/virt/
File "/home/
return _mock_self.
File "/home/
ret_val = effect(*args, **kwargs)
File "nova/tests/
File "nova/virt/
File "nova/virt/
File "nova/virt/
File "nova/utils.py", line 296, in execute
return processutils.
File "/home/
File "/home/
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
When I installed genisoimage, the test passed.
genisoimage is the default value for mkisofs_cmd (configurable). It's called in the _make_iso9660 method for creating an image. Besides the issue of shelling out to a process going beyond the scope of what a unit test should cover, this also creates a hard dependency on genisoimage.
Other areas in the code mock the call to genisoimage. This test should do something similar.
https:/
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
assignee: | nobody → Diana Clarke (diana-clarke) |
status: | Confirmed → In Progress |
Also see: https:/ /bugs.launchpad .net/nova/ +bug/1629555
"Allow the usage of mkisofs instead of genisoimage"