
The tests are failing with this patch set: ====================================================================== ERROR: test_delete_running_vm (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 786, in test_delete_running_vm inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_template_clone (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 492, in test_template_clone inst.templates_create(orig_params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_template_create (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 437, in test_template_create inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_template_storage_customise (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 380, in test_template_storage_customise inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_template_update (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 515, in test_template_update inst.templates_create(orig_params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_use_test_host (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 830, in test_use_test_host inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_cdrom (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 169, in test_vm_cdrom inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_edit (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 547, in test_vm_edit inst.templates_create(orig_params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_graphics (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 100, in test_vm_graphics inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_ifaces (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 127, in test_vm_ifaces inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_lifecycle (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 77, in test_vm_lifecycle inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_list_sorted (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 809, in test_vm_list_sorted inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ====================================================================== ERROR: test_vm_storage_provisioning (test_model.ModelTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alinefm/kimchi/tests/test_model.py", line 236, in test_vm_storage_provisioning inst.templates_create(params) File "/home/alinefm/kimchi/src/kimchi/model/templates.py", line 41, in create iso = params['cdrom'] KeyError: 'cdrom' ---------------------------------------------------------------------- Ran 158 tests in 128.172s FAILED (errors=13) [10/Mar/2014:16:41:39] ENGINE Waiting for child threads to terminate... make[3]: *** [check-local] Error 1 make[3]: Leaving directory `/home/alinefm/kimchi/tests' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/home/alinefm/kimchi/tests' make[1]: *** [check] Error 2 make[1]: Leaving directory `/home/alinefm/kimchi/tests' make: *** [check-recursive] Error 1 On 03/10/2014 12:01 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
V2 -> V2 sort the import.
V1 -> V2 use debug to log the open exception trace stack.
It is complex to check the permission for qemu user. There are too many access controlling mechanisms in Linux, such as ACL, traditional ugo+-rwx, SELinux and AppArmor. It's not possible to enumerate and check every access mechanisms if it allows QEMU to access a file. So now I'm simply trying to access the file with qemu user and see if it's OK
It is simple and avoid handling corner case.
Also I can try to start a simple guest with the given iso.
ShaoHe Feng (3): add a method to probe the permission as qemu user qemu user tests: probe the username of qemu process started by libvirt Don't allow templates to be created with ISOs that won't be usable.
Makefile.am | 1 + src/kimchi/i18n.py | 5 ++++ src/kimchi/kvmusertests.py | 64 +++++++++++++++++++++++++++++++++++++++++++ src/kimchi/model/templates.py | 13 ++++++++- src/kimchi/utils.py | 26 ++++++++++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 src/kimchi/kvmusertests.py