Merge lp:~javier.collado/utah/bug1024364 into lp:utah
Proposed by
Javier Collado
Status: | Merged |
---|---|
Merged at revision: | 454 |
Proposed branch: | lp:~javier.collado/utah/bug1024364 |
Merge into: | lp:utah |
Diff against target: |
74 lines (+40/-1) 3 files modified
debian/control (+1/-1) utah/process.py (+30/-0) utah/provisioning/vm/libvirtvm.py (+9/-0) |
To merge this branch: | bzr merge lp:~javier.collado/utah/bug1024364 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Max Brustkern (community) | Approve | ||
Javier Collado (community) | Needs Resubmitting | ||
Review via email: mp+115160@code.launchpad.net |
Description of the change
Added a few checks to make sure that neither virtualbox nor vmware are running.
The checks are based in looking at the command line of running processes. They're not 100% accurate, but they should be fine for now.
To post a comment you must log in.
Your note says TBD: Run this only if provisioning a KVM. Would it make sense to move the check into the VM provisioning classes, specifically, VMToolsVM and CustomVM, and have them raise an exception if they are trying to provision a KVM? I think VMToolsVM always tries to provision a kvm (I'm not exactly sure, since that class uses an external command for provision) and I know that in CustomKVM as part of __init__, we pick an emulator if we weren't passed one, so we know then whether we're going to try qemu or kvm. I think having this in the provisioning classes would let us leverage it in future scripts.
That being said, this implementation is fine, so if you think it's better off this way, we can go with this, and it does have the advantage of already being written.
Also, at some point, I'd like to get run_test_vm and run_install_tests changed so that they share code better, but that's not really relevant to this, I just keep noticing how you have to duplicate code in these merges, so I'd like to fix that.