>From 1e77035b46ee9721904ec610c35f588b00715c2c Mon Sep 17 00:00:00 2001
From: Onkar N Mahajan <[email protected]>
Date: Mon, 20 Feb 2012 11:55:13 +0530
Subject: [PATCH] Xen driver changes breaks KVM Autotest tests.
Logs -
11:37:42 INFO | Writing results to /root/autotest/client/results/default
11:37:42 DEBUG| Initializing the state engine
11:37:42 DEBUG| Persistent state client.steps now set to []
11:37:42 DEBUG| Persistent option harness now set to None
11:37:42 DEBUG| Persistent option harness_args now set to None
11:37:42 DEBUG| Selected harness: standalone
11:37:42 DEBUG| Running 'grep :initdefault: /etc/inittab'
11:37:42 DEBUG| Running 'egrep -q "Red Hat" /etc/issue'
11:37:42 INFO | START ---- ---- timestamp=1329718062 localtime=Feb
20 11:37:42
11:37:42 DEBUG| Persistent state client._record_indent now set to 1
11:37:42 INFO | Test 1: smp2.RHEL.5.8.x86_64.unattended_install.cdrom
11:37:42 INFO | Test 2: smp2.RHEL.5.8.x86_64.boot
11:37:42 INFO | Test 3: smp2.RHEL.5.8.x86_64.shutdown
11:37:42 DEBUG| Running '/usr/bin/kvm_stat --batch'
11:37:42 DEBUG| Running 'mount -t debugfs debugfs /sys/kernel/debug'
11:37:42 INFO | START
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom timestamp=1329718062
localtime=Feb 20 11:37:42
11:37:42 DEBUG| Persistent state client._record_indent now set to 2
11:37:42 DEBUG| Persistent state client.unexpected_reboot now set to
('kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom',
'kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom')
11:37:42 WARNI| Could not import json module. QMP monitor functionality
disabled.
11:37:42 ERROR| Asked for kvm_stat profiler, but kvm_stat not present
11:37:42 DEBUG| Profilers present. Profiling run started
11:37:42 DEBUG| Test parameters:
11:37:42 DEBUG| backup_image = no
11:37:42 DEBUG| backup_image_on_check_error = no
11:37:42 DEBUG| boot_path = images/pxeboot
11:37:42 DEBUG| bridge = virbr0
11:37:42 DEBUG| cdrom_cd1 =
/tmp/kvm_autotest_root/isos/linux/RHEL5.8-Server-20120118.0-x86_64-DVD.iso
11:37:42 DEBUG| cdrom_unattended =
/tmp/kvm_autotest_root/images/rhel58-64/ks.iso
11:37:42 DEBUG| cdroms = cd1 unattended
11:37:42 DEBUG| check_image = yes
11:37:42 DEBUG| connect_uri = default
11:37:42 DEBUG| convert_ppm_files_to_png_on_error = yes
11:37:42 DEBUG| cpu_chk_cmd = grep -c processor /proc/cpuinfo
11:37:42 DEBUG| dep = []
11:37:42 DEBUG| display = vnc
11:37:42 DEBUG| drive_cache = none
11:37:42 DEBUG| drive_format = ide
11:37:42 DEBUG| drive_index_cd1 = 2
11:37:42 DEBUG| drive_index_image1 = 0
11:37:42 DEBUG| drive_index_unattended = 1
11:37:42 DEBUG| drive_rerror_image1 =
11:37:42 DEBUG| drive_werror_image1 =
11:37:42 DEBUG| encode_video_files = yes
11:37:42 DEBUG| extra_params = -boot d
11:37:42 DEBUG| file_transfer_client = scp
11:37:42 DEBUG| file_transfer_port = 22
11:37:42 DEBUG| force_create_image = yes
11:37:42 DEBUG| guest_port_remote_shell = 22
11:37:42 DEBUG| guest_port_unattended_install = 12323
11:37:42 DEBUG| image_format = qcow2
11:37:42 DEBUG| image_name = /tmp/kvm_autotest_root/images/rhel58-64
11:37:42 DEBUG| image_raw_device = no
11:37:42 DEBUG| image_size = 10G
11:37:42 DEBUG| images = image1
11:37:42 DEBUG| images_good = fileserver.foo.com:/autotest/images_good
11:37:42 DEBUG| initrd = /tmp/kvm_autotest_root/images/rhel58-64/initrd.img
11:37:42 DEBUG| keep_ppm_files = no
11:37:42 DEBUG| keep_ppm_files_on_error = no
11:37:42 DEBUG| keep_screendumps_on_error = yes
11:37:42 DEBUG| keep_video_files = yes
11:37:42 DEBUG| keep_video_files_on_error = yes
11:37:42 DEBUG| kernel = /tmp/kvm_autotest_root/images/rhel58-64/vmlinuz
11:37:42 DEBUG| kernel_params = ks=cdrom nicdelay=60 console=ttyS0,115200
console=tty0
11:37:42 DEBUG| kill_unresponsive_vms = yes
11:37:42 DEBUG| kill_vm = yes
11:37:42 DEBUG| kill_vm_gracefully = yes
11:37:42 DEBUG| kill_vm_on_error = yes
11:37:42 DEBUG| login_timeout = 360
11:37:42 DEBUG| main_vm = vm1
11:37:42 DEBUG| malloc_perturb = no
11:37:42 DEBUG| md5sum_1m_cd1 = 365e03b242a0cda4ec21cfca61eda34e
11:37:42 DEBUG| md5sum_cd1 = 3e8d18debd44bbf9ddcc1428324666c4
11:37:42 DEBUG| medium = cdrom
11:37:42 DEBUG| mem = 1024
11:37:42 DEBUG| mem_chk_cmd = dmidecode -t 17 | awk -F: '/Size/ {print $2}'
11:37:42 DEBUG| mem_chk_cur_cmd = grep MemTotal /proc/meminfo
11:37:42 DEBUG| monitor_type = human
11:37:42 DEBUG| monitors = humanmonitor1
11:37:42 DEBUG| name =
qemu_kvm_rhel58x64_quick.no_9p_export.smallpages.no_pci_assignable.qcow2.ide.smp2.rtl8139.Linux.RHEL.5.8.x86_64.unattended_install.cdrom
11:37:42 DEBUG| netdev_peer_re = \s{2,}(.*?): .*?\\\s(.*?):
11:37:42 DEBUG| nic_mode = tap
11:37:42 DEBUG| nic_model = rtl8139
11:37:42 DEBUG| nics = nic1
11:37:42 DEBUG| os_type = linux
11:37:42 DEBUG| password = 123456
11:37:42 DEBUG| pci_assignable = no
11:37:42 DEBUG| priv_bridge_ports = 53 67
11:37:42 DEBUG| profilers = kvm_stat
11:37:42 DEBUG| qemu_binary = /usr/libexec/qemu-kvm
11:37:42 DEBUG| qemu_img_binary = /usr/bin/qemu-img
11:37:42 DEBUG| qemu_io_binary = /usr/bin/qemu-io
11:37:42 DEBUG| qxl = on
11:37:42 DEBUG| qxl_dev_nr = 1
11:37:42 DEBUG| reboot_command = shutdown -r now
11:37:42 DEBUG| redirs = remote_shell unattended_install
11:37:42 DEBUG| restore_image_on_check_error = no
11:37:42 DEBUG| run_tcpdump = yes
11:37:42 DEBUG| screendump_delay = 5
11:37:42 DEBUG| screendump_quality = 30
11:37:42 DEBUG| screendump_temp_dir = /dev/shm
11:37:42 DEBUG| screendump_verbose = no
11:37:42 DEBUG| shell_client = ssh
11:37:42 DEBUG| shell_port = 22
11:37:42 DEBUG| shell_prompt = ^\[.*\][\#\$]\s*$
11:37:42 DEBUG| shortname = smp2.RHEL.5.8.x86_64.unattended_install.cdrom
11:37:42 DEBUG| shutdown_cleanly = yes
11:37:42 DEBUG| shutdown_cleanly_timeout = 120
11:37:42 DEBUG| shutdown_command = shutdown -h now
11:37:42 DEBUG| smp = 2
11:37:42 DEBUG| spice = disable-ticketing
11:37:42 DEBUG| start_vm = no
11:37:42 DEBUG| status_test_command = echo $?
11:37:42 DEBUG| take_regular_screendumps = yes
11:37:42 DEBUG| type = unattended_install
11:37:42 DEBUG| unattended_file = unattended/RHEL-5-series.ks
11:37:42 DEBUG| url_auto_ip = 192.168.122.1
11:37:42 DEBUG| usb_controller_tablet1 = uhci
11:37:42 DEBUG| usb_devices = tablet1
11:37:42 DEBUG| usb_max_port = 2
11:37:42 DEBUG| usb_type = ich9-usb-uhci1
11:37:42 DEBUG| usb_type_tablet1 = usb-tablet
11:37:42 DEBUG| usbs = usb1
11:37:42 DEBUG| use_autostart = no
11:37:42 DEBUG| use_check_cpu = yes
11:37:42 DEBUG| use_debug = yes
11:37:42 DEBUG| use_no_reboot = no
11:37:42 DEBUG| use_os_type = yes
11:37:42 DEBUG| use_os_variant = no
11:37:42 DEBUG| use_virt_install_wait = no
11:37:42 DEBUG| used_cpus = 2
11:37:42 DEBUG| used_mem = 512
11:37:42 DEBUG| username = root
11:37:42 DEBUG| virsh_network = network=default
11:37:42 DEBUG| virt_install_wait_time = 300
11:37:42 DEBUG| vm_type = kvm
11:37:42 DEBUG| vms = vm1
11:37:42 DEBUG| Starting tcpdump '/usr/sbin/tcpdump -npvi any 'dst port 68''
11:37:43 DEBUG| KVM version: kvm-83-249.el5
11:37:43 DEBUG| KVM userspace version: 0.9.1 (kvm-83-maint-snapshot-20090205)
11:37:43 DEBUG| Param 'force_create_image' specified, creating image
11:37:43 DEBUG| Running '/usr/bin/qemu-img create -f qcow2
/tmp/kvm_autotest_root/images/rhel58-64.qcow2 10G'
11:37:45 DEBUG| [stdout] Formatting
'/tmp/kvm_autotest_root/images/rhel58-64.qcow2', fmt=qcow2, size=10485760 kB
11:37:45 DEBUG| Preprocessing VM 'vm1'
11:37:45 DEBUG| VM object for 'vm1' does not exist, creating it
11:37:45 DEBUG| Starting screendump thread
11:37:45 INFO | Starting unattended install setup
11:37:45 ERROR| Test failed: AttributeError: 'VM' object has no attribute
'driver_type'
11:37:45 DEBUG| Postprocessing VM 'vm1'
11:37:45 DEBUG| Param 'kill_vm' specified, killing VM
11:37:45 DEBUG| Checking image file
/tmp/kvm_autotest_root/images/rhel58-64.qcow2
11:37:45 DEBUG| Running '/usr/bin/qemu-img'
11:37:45 DEBUG| Running '/usr/bin/qemu-img info
/tmp/kvm_autotest_root/images/rhel58-64.qcow2'
11:37:45 DEBUG| [stdout] image: /tmp/kvm_autotest_root/images/rhel58-64.qcow2
11:37:45 DEBUG| [stdout] file format: qcow2
11:37:45 DEBUG| [stdout] virtual size: 10G (10737418240 bytes)
11:37:45 DEBUG| [stdout] disk size: 144K
11:37:45 DEBUG| [stdout] cluster_size: 65536
11:37:45 DEBUG| Running '/usr/bin/qemu-img check
/tmp/kvm_autotest_root/images/rhel58-64.qcow2'
11:37:45 DEBUG| Terminating screendump thread
11:37:45 DEBUG| Param 'convert_ppm_files_to_png' specified, converting PPM
files to PNG format
11:37:45 DEBUG| Param 'keep_ppm_files' not specified, removing all PPM files
from debug dir
11:37:45 DEBUG| Param 'kill_unresponsive_vms' specified, killing all VMs that
fail to respond to a remote login request
11:37:46 ERROR| child process failed
11:37:46 DEBUG| Traceback (most recent call last):
11:37:46 DEBUG| File "/root/autotest/client/bin/parallel.py", line 18, in
fork_start
11:37:46 DEBUG| l()
11:37:46 DEBUG| File "/root/autotest/client/bin/job.py", line 531, in <lambda>
11:37:46 DEBUG| l = lambda : test.runtest(self, url, tag, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/bin/test.py", line 114, in runtest
11:37:46 DEBUG| job.sysinfo.log_after_each_iteration)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 920, in
runtest
11:37:46 DEBUG| mytest._exec(args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 418, in
_exec
11:37:46 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 840, in
_call_test_function
11:37:46 DEBUG| raise error.UnhandledTestFail(e)
11:37:46 DEBUG| UnhandledTestFail: Unhandled AttributeError: 'VM' object has no
attribute 'driver_type' [context: (run_unattended_install) --> Copying
vmlinuz and initrd.img from install cdrom
/tmp/kvm_autotest_root/isos/linux/RHEL5.8-Server-20120118.0-x86_64-DVD.iso]
11:37:46 DEBUG| Traceback (most recent call last):
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 833, in
_call_test_function
11:37:46 DEBUG| return func(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 291, in
execute
11:37:46 DEBUG| postprocess_profiled_run, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 207, in
_call_run_once
11:37:46 DEBUG| self.run_once_profiling(postprocess_profiled_run,
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 314, in
run_once_profiling
11:37:46 DEBUG| self.run_once(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/virt/virt_test.py", line 88, in
run_once
11:37:46 DEBUG| run_func(self, params, env)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/error.py", line 138,
in new_fn
11:37:46 DEBUG| return fn(*args, **kwargs)
11:37:46 DEBUG| File
"/root/autotest/client/virt/tests/unattended_install.py", line 925, in
run_unattended_install
11:37:46 DEBUG| unattended_install_config.setup()
11:37:46 DEBUG| File
"/root/autotest/client/virt/tests/unattended_install.py", line 900, in setup
11:37:46 DEBUG| self.setup_cdrom()
11:37:46 DEBUG| File "/root/autotest/client/common_lib/error.py", line 138,
in new_fn
11:37:46 DEBUG| return fn(*args, **kwargs)
11:37:46 DEBUG| File
"/root/autotest/client/virt/tests/unattended_install.py", line 766, in
setup_cdrom
11:37:46 DEBUG| if self.vm.driver_type == 'xen':
11:37:46 DEBUG| AttributeError: 'VM' object has no attribute 'driver_type'
11:37:46 DEBUG|
11:37:46 INFO | FAIL
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom timestamp=1329718066
localtime=Feb 20 11:37:46 Unhandled AttributeError: 'VM' object has no
attribute 'driver_type' [context: (run_unattended_install) --> Copying
vmlinuz and initrd.img from install cdrom
/tmp/kvm_autotest_root/isos/linux/RHEL5.8-Server-20120118.0-x86_64-DVD.iso]
Traceback (most recent call last):
File "/root/autotest/client/common_lib/test.py", line 833, in
_call_test_function
return func(*args, **dargs)
File "/root/autotest/client/common_lib/test.py", line 291, in execute
postprocess_profiled_run, args, dargs)
File "/root/autotest/client/common_lib/test.py", line 207, in _call_run_once
self.run_once_profiling(postprocess_profiled_run,
File "/root/autotest/client/common_lib/test.py", line 314, in
run_once_profiling
self.run_once(*args, **dargs)
File "/root/autotest/client/virt/virt_test.py", line 88, in run_once
run_func(self, params, env)
File "/root/autotest/client/common_lib/error.py", line 138, in new_fn
return fn(*args, **kwargs)
File "/root/autotest/client/virt/tests/unattended_install.py", line 925, in
run_unattended_install
unattended_install_config.setup()
File "/root/autotest/client/virt/tests/unattended_install.py", line 900, in
setup
self.setup_cdrom()
File "/root/autotest/client/common_lib/error.py", line 138, in new_fn
return fn(*args, **kwargs)
File "/root/autotest/client/virt/tests/unattended_install.py", line 766, in
setup_cdrom
if self.vm.driver_type == 'xen':
AttributeError: 'VM' object has no attribute 'driver_type'
11:37:46 INFO | END FAIL
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom
kvm.smp2.RHEL.5.8.x86_64.unattended_install.cdrom timestamp=1329718066
localtime=Feb 20 11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 1
11:37:46 DEBUG| Persistent state client.unexpected_reboot deleted
11:37:46 INFO | START kvm.smp2.RHEL.5.8.x86_64.boot
kvm.smp2.RHEL.5.8.x86_64.boot timestamp=1329718066localtime=Feb 20 11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 2
11:37:46 DEBUG| Persistent state client.unexpected_reboot now set to
('kvm.smp2.RHEL.5.8.x86_64.boot', 'kvm.smp2.RHEL.5.8.x86_64.boot')
11:37:46 WARNI| Could not import json module. QMP monitor functionality
disabled.
11:37:46 ERROR| child process failed
11:37:46 DEBUG| Traceback (most recent call last):
11:37:46 DEBUG| File "/root/autotest/client/bin/parallel.py", line 18, in
fork_start
11:37:46 DEBUG| l()
11:37:46 DEBUG| File "/root/autotest/client/bin/job.py", line 531, in <lambda>
11:37:46 DEBUG| l = lambda : test.runtest(self, url, tag, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/bin/test.py", line 114, in runtest
11:37:46 DEBUG| job.sysinfo.log_after_each_iteration)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 920, in
runtest
11:37:46 DEBUG| mytest._exec(args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 418, in
_exec
11:37:46 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 833, in
_call_test_function
11:37:46 DEBUG| return func(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 291, in
execute
11:37:46 DEBUG| postprocess_profiled_run, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 211, in
_call_run_once
11:37:46 DEBUG| self.run_once(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/virt/virt_test.py", line 34, in
run_once
11:37:46 DEBUG| raise error.TestNAError("Test dependency failed")
11:37:46 DEBUG| TestNAError: Test dependency failed
11:37:46 INFO | TEST_NA kvm.smp2.RHEL.5.8.x86_64.boot
kvm.smp2.RHEL.5.8.x86_64.boot timestamp=1329718066 localtime=Feb 20
11:37:46 Test dependency failed
11:37:46 INFO | END TEST_NA kvm.smp2.RHEL.5.8.x86_64.boot
kvm.smp2.RHEL.5.8.x86_64.boot timestamp=1329718066 localtime=Feb 20
11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 1
11:37:46 DEBUG| Persistent state client.unexpected_reboot deleted
11:37:46 INFO | START kvm.smp2.RHEL.5.8.x86_64.shutdown
kvm.smp2.RHEL.5.8.x86_64.shutdown timestamp=1329718066 localtime=Feb
20 11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 2
11:37:46 DEBUG| Persistent state client.unexpected_reboot now set to
('kvm.smp2.RHEL.5.8.x86_64.shutdown', 'kvm.smp2.RHEL.5.8.x86_64.shutdown')
11:37:46 WARNI| Could not import json module. QMP monitor functionality
disabled.
11:37:46 ERROR| child process failed
11:37:46 DEBUG| Traceback (most recent call last):
11:37:46 DEBUG| File "/root/autotest/client/bin/parallel.py", line 18, in
fork_start
11:37:46 DEBUG| l()
11:37:46 DEBUG| File "/root/autotest/client/bin/job.py", line 531, in <lambda>
11:37:46 DEBUG| l = lambda : test.runtest(self, url, tag, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/bin/test.py", line 114, in runtest
11:37:46 DEBUG| job.sysinfo.log_after_each_iteration)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 920, in
runtest
11:37:46 DEBUG| mytest._exec(args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 418, in
_exec
11:37:46 DEBUG| _call_test_function(self.execute, *p_args, **p_dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 833, in
_call_test_function
11:37:46 DEBUG| return func(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 291, in
execute
11:37:46 DEBUG| postprocess_profiled_run, args, dargs)
11:37:46 DEBUG| File "/root/autotest/client/common_lib/test.py", line 211, in
_call_run_once
11:37:46 DEBUG| self.run_once(*args, **dargs)
11:37:46 DEBUG| File "/root/autotest/client/virt/virt_test.py", line 34, in
run_once
11:37:46 DEBUG| raise error.TestNAError("Test dependency failed")
11:37:46 DEBUG| TestNAError: Test dependency failed
11:37:46 INFO | TEST_NA kvm.smp2.RHEL.5.8.x86_64.shutdown
kvm.smp2.RHEL.5.8.x86_64.shutdown timestamp=1329718066 localtime=Feb
20 11:37:46 Test dependency failed
11:37:46 INFO | END TEST_NA kvm.smp2.RHEL.5.8.x86_64.shutdown
kvm.smp2.RHEL.5.8.x86_64.shutdown timestamp=1329718066 localtime=Feb
20 11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 1
11:37:46 DEBUG| Persistent state client.unexpected_reboot deleted
11:37:46 INFO | END GOOD ---- ---- timestamp=1329718066
localtime=Feb 20 11:37:46
11:37:46 DEBUG| Persistent state client._record_indent now set to 0
---------------------------------------------------------------------------------------------------------------------------------
Change that tiggers this error is :-
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 765)
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 766) if self.vm.driver_type == 'xen':
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 767) i =
iso9660.Iso9660Mount(self.cdrom_cd1)
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 768) self.cdrom_cd1_mount = i.mnt_dir
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 769) else:
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 770) i = iso9660.iso9660(self.cdrom_cd1)
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 771) if i is None:
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 772) raise error.TestFail("Could not
instantiate an iso9660 class")
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 773)
3b7fe852 client/virt/tests/unattended_install.py (Cleber Rosa
2012-01-25 09:12:21 -0300 774) i.copy(os.path.join(self.boot_path,
os.path.basename(self.kernel)),
3b7fe852 client/virt/tests/unattended_install.py (Cleber Rosa
2012-01-25 09:12:21 -0300 775) self.kernel)
3b7fe852 client/virt/tests/unattended_install.py (Cleber Rosa
2012-01-25 09:12:21 -0300 776) i.copy(os.path.join(self.boot_path,
os.path.basename(self.initrd)),
3b7fe852 client/virt/tests/unattended_install.py (Cleber Rosa
2012-01-25 09:12:21 -0300 777) self.initrd)
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 778) if self.vm.driver_type != 'xen':
f552a005 client/virt/tests/unattended_install.py (Miroslav Rezanina
2012-02-15 15:27:09 +0100 779) i.close()
Signed-off-by: Onkar N Mahajan <[email protected]>
---
client/virt/tests/unattended_install.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/client/virt/tests/unattended_install.py
b/client/virt/tests/unattended_install.py
index ad73e89..4d0a7e5 100644
--- a/client/virt/tests/unattended_install.py
+++ b/client/virt/tests/unattended_install.py
@@ -763,7 +763,13 @@ class UnattendedInstallConfig(object):
if not os.path.isdir(self.image_path):
os.makedirs(self.image_path)
- if self.vm.driver_type == 'xen':
+ driver_type_attr = True
+ try:
+ driver_type = getattr(self.vm,'driver_type')
+ except AttributeError:
+ driver_type_attr = False
+
+ if driver_type_attr and driver_type == 'xen':
i = iso9660.Iso9660Mount(self.cdrom_cd1)
self.cdrom_cd1_mount = i.mnt_dir
else:
@@ -775,7 +781,7 @@ class UnattendedInstallConfig(object):
self.kernel)
i.copy(os.path.join(self.boot_path, os.path.basename(self.initrd)),
self.initrd)
- if self.vm.driver_type != 'xen':
+ if driver_type_attr and self.vm.driver_type != 'xen':
i.close()
if self.unattended_file.endswith('.preseed'):
--
1.7.4.4
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest