Skip to contentSkip to conversation

A test patch - Boot VMs until one of them becomes unresponsive

PATCH Michael Goldish 2 participants 2 messages Jun 10, 2009 – Jun 11, 2009 1 message not in the archive KVM

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 147 lines · ----- "Yolkfull Chow
Quoted 9 lines · Michael Goldish
Quoted 6 lines · ----- "Yolkfull Chow
Quoted 4 lines · Michael Goldish

The test looks pretty nicely written. Comments:

1. Consider making all the cloned VMs use image snapshots:

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

curr_vm = vm1.clone() curr_vm.get_params()["extra_params"] += " -snapshot"

I'm not sure it's a good idea to let all VMs use the same disk

image.

Quoted 1 line

Or maybe you shouldn't add -snapshot yourself, but rather do it

in

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

the config

Quoted 1 line

file for the first VM, and then all cloned VMs will have

-snapshot

Quoted 18 lines
Quoted 18 lines
Quoted 1 line

as well.

Quoted 2 lines

Yes I use 'image_snapshot = yes' in config file.

Quoted 11 lines

2. Consider changing the message
" Booting the %dth guest" % num
to
"Booting guest #%d" % num
(because there's no such thing as 2th and 3th)

3. Consider changing the message
"Cannot boot vm anylonger"
to
"Cannot create VM #%d" % num

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

4. Why not add curr_vm to vms immediately after cloning it? That way you can kill it in the exception handler later, without

having

Quoted 1 line

to send it a 'quit' if you can't login ('if not

curr_vm_session').

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

Yes, good idea.

Quoted 1 line

5. " %dth guest boots up successfully" % num --> again, 2th and

3th

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

make no sense.

Quoted 1 line

Also, I wonder why you add those spaces before every info

message.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

6. "%dth guest's session is not responsive" --> same
(maybe use "Guest session #%d is not responsive" % num)

7. "Shut down the %dth guest" --> same
(maybe "Shutting down guest #%d"? or destroying/killing?)

8. Shouldn't we fail the test when we find an unresponsive

session?

Quoted 1 line
Quoted 1 line
Quoted 1 line

It seems you just display an error message. You can simply

replace

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

logging.error( with raise error.TestFail(.

9. Consider using a stricter test than just

Quoted 7 lines
Quoted 7 lines

vm_session.is_responsive().

Quoted 2 lines

vm_session.is_responsive() just sends ENTER to the sessions and

returns

Quoted 1 line

True if it gets anything as a result (usually a prompt, or even

just

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

a

Quoted 1 line

newline echoed back). If the session passes this test it is

indeed

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

responsive, so it's a decent test, but maybe you can send some

command

Quoted 1 line

(user configurable?) and test for some output. I'm really not

sure

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

this

Quoted 1 line

is important, because I can't imagine a session would respond to

a

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

newline

Quoted 2 lines

but not to other commands, but who knows. Maybe you can send the

first VM

Quoted 1 line

a user-specified command when the test begins, remember the

output,

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

and

Quoted 1 line

then send all other VMs the same command and make sure the output

is

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

the

Quoted 3 lines

same.

maybe use 'info status' and send command 'help' via session to vms

and

Quoted 3 lines
Quoted 2 lines

compare their output?

I'm not sure I understand. What does 'info status' do? We're talking

about

Quoted 1 line

an SSH shell, not the monitor. You can do whatever you like, like

'uname -a',

Quoted 1 line

and 'ls /', but you should leave it up to the user to decide, so

he/she

Quoted 1 line

can specify different commands for different guests. Linux commands

won't

Quoted 1 line

work under Windows, so Linux and Windows must have different

commands in

Quoted 1 line

the config file. In the Linux section, under '- @Linux:' you can

add

Quoted 10 lines

something like:

stress_boot:
stress_boot_test_command = uname -a

and under '- @Windows:':

stress_boot:

     stress_boot_test_command = ver && vol
Quoted 6 lines
Quoted 1 line

These commands are just naive suggestions. I'm sure someone can

think of

Quoted 2 lines

much more informative commands.

That's really good suggestions. Thanks, Michael. And can I use 'migration_test_command' instead?

Not really. Why would you want to use another test's param?

1. There's no guarantee that 'migration_test_command' is defined for your boot stress test. In fact, it is probably only defined for migration tests, so you probably won't be able to access it. Try params.get('migration_test_command') in your test and you'll probably get None.

2. The user may not want to run migration at all, and then he/she will probably not define 'migration_test_command'.

3. The user might want to use different test commands for migration and for the boot stress test.

Quoted 102 lines
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

10. I'm not sure you should use the param "kill_vm_gracefully"

because that's

Quoted 2 lines

a postprocessor param (probably not your business). You can just

call

Quoted 1 line

destroy() in the exception handler with gracefully=False, because

if

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

the VMs

Quoted 1 line

are non- responsive, I don't expect them to shutdown nicely with

an

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

SSH

Quoted 1 line

command (that's what gracefully does). Also, we're using

-snapshot,

Quoted 9 lines
Quoted 9 lines
Quoted 1 line

so

Quoted 3 lines

there's no reason to shut them down nicely.

Yes, I agree. :)

Quoted 1 line

11. "Total number booted successfully: %d" % (num - 1) --> why

not

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

just num?

Quoted 2 lines

We really have num VMs including the first one.
Or you can say: "Total number booted successfully in addition to

the

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

first one"

Quoted 3 lines

but that's much longer.

Since after the first guest booted, I set num = 1 and then 'num +=

1'

Quoted 3 lines
Quoted 3 lines

at first in while loop ( for the purpose of getting a new vm ). So curr_vm is vm2 ( num is 2) now. If the second vm failed to boot

up,

Quoted 2 lines
Quoted 2 lines

the num booted successfully should be (num - 1).
I would use enumerate(vms) that Uri suggested to make number easier

to

Quoted 6 lines
Quoted 2 lines

count.

OK, I didn't notice that.

Quoted 1 line
Quoted 1 line

12. Consider adding a 'max_vms' (or 'threshold') user param to

the

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

test. If

Quoted 2 lines

num reaches 'max_vms', we stop adding VMs and pass the test.

Quoted 7 lines
Quoted 7 lines

Otherwise the

Quoted 2 lines

test will always fail (which is depressing). If

params.get("threshold") is

Quoted 1 line

None or "", or in short -- 'if not params.get("threshold")',

disable

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

this

Quoted 1 line

feature and keep adding VMs forever. The user can enable the

feature

Quoted 11 lines
Quoted 11 lines
Quoted 1 line

with:

Quoted 5 lines

max_vms = 50
or disable it with:
max_vms =

This is a good idea for hardware resource limit of host.

Quoted 1 line

13. Why are you catching OSError? If you get OSError it might be

a

Quoted 11 lines
Quoted 10 lines
Quoted 1 line

framework bug.

Quoted 2 lines

Since sometimes, vm.create() successfully but failed to ssh-login since
the running python cannot allocate physical memory (OSError). Add max_vms could fix this problem I think.

Do you remember exactly where OSError was thrown? Do you happen to

have

Quoted 2 lines

a backtrace? (I just want to be very it's not a bug.)

Quoted 7 lines

The OSError was thrown when checking all VMs are responsive and I got many traceback about "OSError: [Errno 12] Cannot allocate memory". Maybe since when last VM was created successfully with lucky, whereas python cannot get physical memory after that when checking all sessions.
So can we now catch the OSError and tell user the number of max_vms is too large?

Sure. I was just worried it might be a framework bug. If it's a legitimate memory error -- catch it and fail the test.

If you happen to catch that OSError again, and get a backtrace, I'd like to see it if that's possible.

Thanks,
Michael

Quoted 73 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

14. At the end of the exception handler you should proably

re-raise

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

the exception

Quoted 1 line

you caught. Otherwise the user won't see the error message. You

can

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

simply replace

Quoted 2 lines

'break' with 'raise' (no parameters), and it should work,

Quoted 7 lines
Quoted 6 lines

hopefully.

Quoted 2 lines

Yes I should if add a 'max_vms'.

I think you should re-raise anyway. Otherwise, what's the point in

writing

Quoted 1 line

error messages such as "raise error.TestFail("Cannot boot vm

anylonger")"?

Quoted 4 lines

I you don't re-raise, the user won't see the messages.

Quoted 1 line
Quoted 1 line

I know these are quite a few comments, but they're all rather

minor

Quoted 16 lines
Quoted 16 lines
Quoted 1 line

and the test

Quoted 3 lines

is well written in my opinion.

Thank you, I will do modification according to your and Uri's comments,
and will re-submit it here later. :)

Thanks and Best Regards,
Yolkfull

Quoted 3 lines

Thanks,
Michael

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

----- Original Message -----
From: "Yolkfull Chow"<[email protected]> To:[email protected]
Cc: "Uri Lublin"<[email protected]>
Sent: Tuesday, June 9, 2009 11:41:54 AM (GMT+0200) Auto-Detected
Subject: [KVM-AUTOTEST PATCH] A test patch - Boot VMs until one

of

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

them becomes unresponsive

Quoted 4 lines

Hi,

This test will boot VMs until one of them becomes unresponsive,

and

Quoted 10 lines
Quoted 10 lines
Quoted 5 lines

records the maximum number of VMs successfully started.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Yolkfull
Regards,
#2 lore raw
Quoted 421 lines · Michael Goldish
Quoted 225 lines · ----- "Yolkfull Chow
Quoted 14 lines · Michael Goldish
Quoted 10 lines · ----- "Yolkfull Chow
Quoted 7 lines · Michael Goldish

The test looks pretty nicely written. Comments:

1. Consider making all the cloned VMs use image snapshots:

curr_vm = vm1.clone() curr_vm.get_params()["extra_params"] += " -snapshot"

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

I'm not sure it's a good idea to let all VMs use the same disk

image.

Quoted 2 lines

Or maybe you shouldn't add -snapshot yourself, but rather do it

in

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

the config

Quoted 2 lines

file for the first VM, and then all cloned VMs will have

-snapshot

Quoted 25 lines
Quoted 25 lines
Quoted 2 lines

as well.

Quoted 2 lines

Yes I use 'image_snapshot = yes' in config file.

Quoted 15 lines

2. Consider changing the message
" Booting the %dth guest" % num
to
"Booting guest #%d" % num
(because there's no such thing as 2th and 3th)

3. Consider changing the message
"Cannot boot vm anylonger"
to
"Cannot create VM #%d" % num

4. Why not add curr_vm to vms immediately after cloning it? That way you can kill it in the exception handler later, without

Quoted 5 lines
Quoted 5 lines

having

Quoted 2 lines

to send it a 'quit' if you can't login ('if not

curr_vm_session').

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

Yes, good idea.

Quoted 2 lines

5. " %dth guest boots up successfully" % num --> again, 2th and

3th

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

make no sense.

Quoted 2 lines

Also, I wonder why you add those spaces before every info

message.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

6. "%dth guest's session is not responsive" --> same
(maybe use "Guest session #%d is not responsive" % num)

7. "Shut down the %dth guest" --> same
(maybe "Shutting down guest #%d"? or destroying/killing?)

8. Shouldn't we fail the test when we find an unresponsive

session?

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

It seems you just display an error message. You can simply

replace

Quoted 12 lines
Quoted 12 lines
Quoted 9 lines

logging.error( with raise error.TestFail(.

9. Consider using a stricter test than just

vm_session.is_responsive().

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

vm_session.is_responsive() just sends ENTER to the sessions and

returns

Quoted 2 lines

True if it gets anything as a result (usually a prompt, or even

just

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

a

Quoted 2 lines

newline echoed back). If the session passes this test it is

indeed

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

responsive, so it's a decent test, but maybe you can send some

command

Quoted 2 lines

(user configurable?) and test for some output. I'm really not

sure

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

this

Quoted 2 lines

is important, because I can't imagine a session would respond to

a

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

newline

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

but not to other commands, but who knows. Maybe you can send the

first VM

Quoted 2 lines

a user-specified command when the test begins, remember the

output,

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

and

Quoted 2 lines

then send all other VMs the same command and make sure the output

is

Quoted 11 lines
Quoted 11 lines
Quoted 2 lines

the

Quoted 4 lines

same.

maybe use 'info status' and send command 'help' via session to vms

and

Quoted 5 lines
Quoted 3 lines

compare their output?

I'm not sure I understand. What does 'info status' do? We're talking

about

Quoted 2 lines

an SSH shell, not the monitor. You can do whatever you like, like

'uname -a',

Quoted 2 lines

and 'ls /', but you should leave it up to the user to decide, so

he/she

Quoted 2 lines

can specify different commands for different guests. Linux commands

won't

Quoted 2 lines

work under Windows, so Linux and Windows must have different

commands in

Quoted 2 lines

the config file. In the Linux section, under '- @Linux:' you can

add

Quoted 5 lines

something like:

stress_boot:
stress_boot_test_command = uname -a

Quoted 7 lines

and under '- @Windows:':

stress_boot:

      stress_boot_test_command = ver&&  vol

These commands are just naive suggestions. I'm sure someone can

Quoted 8 lines

think of

Quoted 3 lines

much more informative commands.

That's really good suggestions. Thanks, Michael. And can I use 'migration_test_command' instead?

Not really. Why would you want to use another test's param?

1. There's no guarantee that 'migration_test_command' is defined for your boot stress test. In fact, it is probably only defined for migration tests, so you probably won't be able to access it. Try params.get('migration_test_command') in your test and you'll probably get None.

2. The user may not want to run migration at all, and then he/she will probably not define 'migration_test_command'.

3. The user might want to use different test commands for migration and for the boot stress test.

Quoted 162 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

10. I'm not sure you should use the param "kill_vm_gracefully"

because that's

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

a postprocessor param (probably not your business). You can just

call

Quoted 2 lines

destroy() in the exception handler with gracefully=False, because

if

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

the VMs

Quoted 2 lines

are non- responsive, I don't expect them to shutdown nicely with

an

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

SSH

Quoted 2 lines

command (that's what gracefully does). Also, we're using

-snapshot,

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

so

Quoted 4 lines

there's no reason to shut them down nicely.

Quoted 5 lines
Quoted 5 lines

Yes, I agree. :)

Quoted 2 lines

11. "Total number booted successfully: %d" % (num - 1) --> why

not

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines

just num?

Quoted 3 lines

We really have num VMs including the first one.
Or you can say: "Total number booted successfully in addition to

the

Quoted 11 lines
Quoted 11 lines
Quoted 2 lines

first one"

Quoted 4 lines

but that's much longer.

Since after the first guest booted, I set num = 1 and then 'num +=

1'

Quoted 3 lines
Quoted 3 lines

at first in while loop ( for the purpose of getting a new vm ). So curr_vm is vm2 ( num is 2) now. If the second vm failed to boot

up,

Quoted 3 lines
Quoted 3 lines

the num booted successfully should be (num - 1).
I would use enumerate(vms) that Uri suggested to make number easier

to

Quoted 9 lines
Quoted 3 lines

count.

OK, I didn't notice that.

Quoted 2 lines
Quoted 2 lines

12. Consider adding a 'max_vms' (or 'threshold') user param to

the

Quoted 11 lines
Quoted 11 lines
Quoted 2 lines

test. If

Quoted 3 lines

num reaches 'max_vms', we stop adding VMs and pass the test.

Otherwise the

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

test will always fail (which is depressing). If

params.get("threshold") is

Quoted 2 lines

None or "", or in short -- 'if not params.get("threshold")',

disable

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

this

Quoted 2 lines

feature and keep adding VMs forever. The user can enable the

feature

Quoted 11 lines
Quoted 11 lines
Quoted 2 lines

with:

Quoted 6 lines

max_vms = 50
or disable it with:
max_vms =

Quoted 5 lines
Quoted 5 lines

This is a good idea for hardware resource limit of host.

Quoted 2 lines

13. Why are you catching OSError? If you get OSError it might be

a

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

framework bug.

Quoted 2 lines
Quoted 8 lines
Quoted 6 lines

Since sometimes, vm.create() successfully but failed to ssh-login since
the running python cannot allocate physical memory (OSError). Add max_vms could fix this problem I think.

Do you remember exactly where OSError was thrown? Do you happen to

have

Quoted 3 lines

a backtrace? (I just want to be very it's not a bug.)

Quoted 8 lines

The OSError was thrown when checking all VMs are responsive and I got many traceback about "OSError: [Errno 12] Cannot allocate memory". Maybe since when last VM was created successfully with lucky, whereas python cannot get physical memory after that when checking all sessions.
So can we now catch the OSError and tell user the number of max_vms is too large?

Quoted 6 lines

Sure. I was just worried it might be a framework bug. If it's a legitimate memory error -- catch it and fail the test.

If you happen to catch that OSError again, and get a backtrace, I'd like to see it if that's possible.

Michael, these are the backtrace messages:

...
20090611-064959 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: ERROR: run_once: Test failed: [Errno 12] Cannot allocate memory
20090611-064959 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: DEBUG: run_once: Postprocessing on error...
20090611-065000 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: DEBUG: postprocess_vm: Postprocessing VM 'vm1'...
20090611-065000 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: DEBUG: postprocess_vm: VM object found in environment
20090611-065000 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: DEBUG: send_monitor_cmd: Sending monitor command: screendump /kvm-autotest/client/results/default/kvm_runtest_2.[RHEL-Server-5.3-64][None][1024][1][qcow2]<no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024>/debug/post_vm1.ppm 20090611-065000 no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024: DEBUG: run_once: Contents of environment: {'vm__vm1': <kvm_vm.VM instance at 0x92999a28>}
post-test sysinfo error:
Traceback (most recent call last):
File "/kvm-autotest/client/common_lib/log.py", line 58, in decorated_func

    fn(*args, **dargs)

File "/kvm-autotest/client/bin/base_sysinfo.py", line 213, in
log_after_each_test
log.run(test_sysinfodir)
File "/kvm-autotest/client/bin/base_sysinfo.py", line 112, in run
shell=True, env=env)
File "/usr/lib64/python2.4/subprocess.py", line 412, in call
return Popen(*args, **kwargs).wait()
File "/usr/lib64/python2.4/subprocess.py", line 542, in __init__
errread, errwrite)
File "/usr/lib64/python2.4/subprocess.py", line 902, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

2009-06-11 06:50:02,859 Configuring logger for client level
        FAIL    

kvm_runtest_2.[RHEL-Server-5.3-64][None][1024][1][qcow2]<no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024> kvm_runtest_2.[RHEL-Server-5.3-64][None][1024][1][qcow2]<no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024> timestamp=1244717402 localtime=Jun 11 06:50:02 Unhandled OSError: [Errno 12] Cannot allocate memory
Traceback (most recent call last):
File "/kvm-autotest/client/common_lib/test.py", line 304,
in _exec
self.execute(*p_args, **p_dargs)
File "/kvm-autotest/client/common_lib/test.py", line 187,
in execute

              self.run_once(*args, **dargs)
            File 

"/kvm-autotest/client/tests/kvm_runtest_2/kvm_runtest_2.py", line 145, in run_once
routine_obj.routine(self, params, env)
File
"/kvm-autotest/client/tests/kvm_runtest_2/kvm_tests.py", line 3071, in run_boot_vms
curr_vm_session = kvm_utils.wait_for(curr_vm.ssh_login,
240, 0, 2)
File
"/kvm-autotest/client/tests/kvm_runtest_2/kvm_utils.py", line 797, in wait_for
output = func()
File "/kvm-autotest/client/tests/kvm_runtest_2/kvm_vm.py",
line 728, in ssh_login
session = kvm_utils.ssh(address, port, username,
password, prompt, timeout)
File
"/kvm-autotest/client/tests/kvm_runtest_2/kvm_utils.py", line 553, in ssh
return remote_login(command, password, prompt, "\n", timeout)
File
"/kvm-autotest/client/tests/kvm_runtest_2/kvm_utils.py", line 431, in remote_login
sub = kvm_spawn(command, linesep)
File
"/kvm-autotest/client/tests/kvm_runtest_2/kvm_utils.py", line 114, in __init__

              (pid, fd) = pty.fork()
            File "/usr/lib64/python2.4/pty.py", line 108, in fork
              pid = os.fork()
          OSError: [Errno 12] Cannot allocate memory

Persistent state variable __group_level now set to 1
END FAIL
kvm_runtest_2.[RHEL-Server-5.3-64][None][1024][1][qcow2]<no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024> kvm_runtest_2.[RHEL-Server-5.3-64][None][1024][1][qcow2]<no_boundary.local_stg.RHEL.5.3-server-64.no_ksm.boot_vms.e1000.user.size_1024> timestamp=1244717403 localtime=Jun 11 06:50:03
Dropping caches

2009-06-11 06:50:03,409 running: sync

JOB ERROR: Unhandled OSError: [Errno 12] Cannot allocate memory Traceback (most recent call last):
File "/kvm-autotest/client/bin/job.py", line 978, in step_engine
execfile(self.control, global_control_vars, global_control_vars)
File "/kvm-autotest/client/control", line 1030, in ?

    cfg_to_test("kvm_tests.cfg")

File "/kvm-autotest/client/control", line 1013, in cfg_to_test
current_status = job.run_test("kvm_runtest_2", params=dict,
tag=tagname)
File "/kvm-autotest/client/bin/job.py", line 44, in wrapped
utils.drop_caches()
File "/kvm-autotest/client/bin/base_utils.py", line 638, in drop_caches
utils.system("sync")
File "/kvm-autotest/client/common_lib/utils.py", line 510, in system
stdout_tee=sys.stdout, stderr_tee=sys.stderr).exit_status
File "/kvm-autotest/client/common_lib/utils.py", line 330, in run

    bg_job = join_bg_jobs(

File "/kvm-autotest/client/common_lib/utils.py", line 37, in __init__
stdin=stdin)
File "/usr/lib64/python2.4/subprocess.py", line 542, in __init__
errread, errwrite)
File "/usr/lib64/python2.4/subprocess.py", line 902, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

Persistent state variable __group_level now set to 0
END ABORT ---- ---- timestamp=1244717418 localtime=Jun 11 06:50:18 Unhandled OSError: [Errno 12] Cannot allocate memory
Traceback (most recent call last):
File "/kvm-autotest/client/bin/job.py", line 978, in step_engine
execfile(self.control, global_control_vars, global_control_vars)
File "/kvm-autotest/client/control", line 1030, in ?
cfg_to_test("kvm_tests.cfg")
File "/kvm-autotest/client/control", line 1013, in cfg_to_test
current_status = job.run_test("kvm_runtest_2", params=dict,
tag=tagname)
File "/kvm-autotest/client/bin/job.py", line 44, in wrapped
utils.drop_caches()
File "/kvm-autotest/client/bin/base_utils.py", line 638, in drop_caches
utils.system("sync")
File "/kvm-autotest/client/common_lib/utils.py", line 510, in system
stdout_tee=sys.stdout, stderr_tee=sys.stderr).exit_status
File "/kvm-autotest/client/common_lib/utils.py", line 330, in run
bg_job = join_bg_jobs(
File "/kvm-autotest/client/common_lib/utils.py", line 37, in __init__
stdin=stdin)
File "/usr/lib64/python2.4/subprocess.py", line 542, in __init__
errread, errwrite)
File "/usr/lib64/python2.4/subprocess.py", line 902, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
[root@dhcp-66-70-9 kvm_runtest_2]#

Quoted 106 lines

Thanks,
Michael

Quoted 102 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

14. At the end of the exception handler you should proably

re-raise

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

the exception

Quoted 2 lines

you caught. Otherwise the user won't see the error message. You

can

Quoted 13 lines
Quoted 13 lines
Quoted 2 lines

simply replace

Quoted 3 lines

'break' with 'raise' (no parameters), and it should work,

hopefully.

Quoted 2 lines
Quoted 5 lines
Quoted 3 lines

Yes I should if add a 'max_vms'.

I think you should re-raise anyway. Otherwise, what's the point in

writing

Quoted 2 lines

error messages such as "raise error.TestFail("Cannot boot vm

anylonger")"?

Quoted 6 lines

I you don't re-raise, the user won't see the messages.

Quoted 2 lines
Quoted 2 lines

I know these are quite a few comments, but they're all rather

minor

Quoted 20 lines
Quoted 20 lines
Quoted 2 lines

and the test

Quoted 4 lines

is well written in my opinion.

Thank you, I will do modification according to your and Uri's comments,
and will re-submit it here later. :)

Thanks and Best Regards,
Yolkfull

Quoted 3 lines

Thanks,
Michael

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

----- Original Message -----
From: "Yolkfull Chow"<[email protected]> To:[email protected]
Cc: "Uri Lublin"<[email protected]>
Sent: Tuesday, June 9, 2009 11:41:54 AM (GMT+0200) Auto-Detected
Subject: [KVM-AUTOTEST PATCH] A test patch - Boot VMs until one

of

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

them becomes unresponsive

Quoted 4 lines

Hi,

This test will boot VMs until one of them becomes unresponsive,

and

Quoted 12 lines
Quoted 12 lines
Quoted 6 lines

records the maximum number of VMs successfully started.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Yolkfull
Regards,
Signature · 2 lines
Yolkfull
Regards,