KVM test: Unattended install fixes
cover KVM test: Unattended install fixes
Here we have a handful of fixes for the unattended install code. In special, with the last patch we recover the ability to run ping pong migration in the background during the unattended install for linux guests.
This patchset was also sent as a pull request on gitub. Feel free to make comments there:
https://github.com/autotest/autotest/pull/24
Lucas Meneghel Rodrigues (4):
KVM test: unattended_install: Fix unused variable warning KVM test: unattended_install: Remove unused variable images_dir KVM test: unattended_install: Remove unused variable
post_install_delay
KVM test: unattended_install: Fix the background migration code
client/tests/kvm/tests/unattended_install.py | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.6
PATCH 1/4 KVM test: unattended_install: Fix unused variable warning
--- client/tests/kvm/tests/unattended_install.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
client/tests/kvm/tests/unattended_install.py +1 -0
@@ -91,6 +91,7 @@ class FloppyDisk(Disk): m_cmd = 'mount -o loop,rw %s %s' % (path, self.mount) utils.run(m_cmd) except error.CmdError, e: + logging.error("Error during floppy initialization: %s" % e) cleanup(self.mount) raise
Signature · 1 line
1.7.6
PATCH 2/4 KVM test: unattended_install: Remove unused variable images_dir
In reply to Lucas Meneghel Rodrigues--- client/tests/kvm/tests/unattended_install.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
client/tests/kvm/tests/unattended_install.py +0 -1
@@ -211,7 +211,6 @@ class UnattendedInstallConfig(object): @param params: Dictionary with test parameters. """ root_dir = test.bindir - images_dir = os.path.join(root_dir, 'images') self.deps_dir = os.path.join(root_dir, 'deps') self.unattended_dir = os.path.join(root_dir, 'unattended')
Signature · 1 line
1.7.6
PATCH 3/4 KVM test: unattended_install: Remove unused variable post_install_delay
In reply to Lucas Meneghel Rodrigues--- client/tests/kvm/tests/unattended_install.py | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
client/tests/kvm/tests/unattended_install.py +0 -1
@@ -580,7 +580,6 @@ def run_unattended_install(test, params, env): vm.create() install_timeout = int(params.get("timeout", 3000)) - post_install_delay = int(params.get("post_install_delay", 0)) port = vm.get_port(int(params.get("guest_port_unattended_install"))) migrate_background = params.get("migrate_background") == "yes"
Signature · 1 line
1.7.6
PATCH 4/4 KVM test: unattended_install: Fix the background migration code
In reply to Lucas Meneghel RodriguesCurrently we use initrd and kernel params to perform unattended install in all supported linux guests. Before that, we used to remove those params from the qemu params because they alledgedly 'broke' the migration. Well, turns out this code renders our migrate in background code path useless, and it does not appear to break migration on the tests I've made. So, let's just get rid of it and be happy.
--- client/tests/kvm/tests/unattended_install.py | 10 ---------- 1 files changed, 0 insertions(+), 10 deletions(-)
client/tests/kvm/tests/unattended_install.py +0 -10
@@ -611,16 +611,6 @@ def run_unattended_install(test, params, env): pass if migrate_background: - # Drop the params which may break the migration - # Better method is to use dnsmasq to do the - # unattended installation - if vm.params.get("initrd"): - vm.params["initrd"] = None - if vm.params.get("kernel"): - vm.params["kernel"] = None - if vm.params.get("extra_params"): - vm.params["extra_params"] = re.sub("--append '.*'", "", - vm.params["extra_params"]) vm.migrate(timeout=mig_timeout, protocol=mig_protocol) else: time.sleep(1)
Signature · 1 line
1.7.6