Is it possible to check for a console log message?

Asked by Kyle Jorgensen

Openstack/Rally newbie here. In the basic Rally scenario for boot_and_list.json, the boot operation simply checks whether the VM reaches the "ACTIVE" state.

https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L144

However, in my organization, just because the VM has become "ACTIVE" does not mean that it has completely finished setting up all of our networking configuration. We would like to use Rally to benchmark the time it takes until a VM reaches a "Working" state, where "Working" is reached when a certain message is output into the console log. Currently our organization has set up a custom message to be printed out in the console log which indicates the state, such as "My image booted!" or "My image failed to boot: <error message>". This way we can be confident that the VM is both "ACTIVE" and "Working."

Is there any existing way to use Rally to check some output in the nova console log? Perhaps by using the 'getConsoleOutput' API? http://developer.openstack.org/api-ref-compute-v2.1.html#getConsoleOutput

Any insight would be appreciated, thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Rally Edit question
Assignee:
No assignee Edit question
Solved by:
Jesse Keating
Solved:
Last query:
Last reply:
Revision history for this message
Best Jesse Keating (jesse-keating) said :
#1

You could make use of https://github.com/openstack/rally/blob/master/samples/tasks/scenarios/vm/boot-runcommand-delete.yaml which will allow you to test how quickly you can boot and then get into the instance to do something.

Be sure to check vm_ping_poll_interval configuration, which defaults to 1 second, as that can throw off your timing.

Revision history for this message
Kyle Jorgensen (kyle-jorgensen) said :
#2

Thanks Jesse for sharing that link. I was not aware of that scenario, but looking at the details I might have found an alternate solution to my problem. The real thing that I want to check is whether VM's are booted AND pingable. I found the '_wait_for_ping' method which might be of use

https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/vm/utils.py#L160

Revision history for this message
Kyle Jorgensen (kyle-jorgensen) said :
#3

Thanks Jesse Keating, that solved my question.