Merge "Fix DHCP test scenario"

This commit is contained in:
Jenkins 2016-08-15 20:06:34 +00:00 committed by Gerrit Code Review
commit c6fc3b01c2
2 changed files with 4 additions and 11 deletions

View File

@ -197,7 +197,9 @@ function create_node {
"
echo ${vm_xml} > /tmp/vm.xml
virsh create /tmp/vm.xml 2>&1 >/dev/null
# NOTE(TheJulia): the create command powers on a VM that has been defined,
# where as define creates the VM, but does not change the power state.
virsh define /tmp/vm.xml 2>&1 >/dev/null
if [ $? != 0 ]
then
echo "failed to create VM $NAME" >&2

View File

@ -16,13 +16,6 @@
# in the interest of keeping the active memory footprint small,
# should stop all of the VMs in advance, so we can proceed with
# install and initial deploy.
- name: Attempt to stop all test VMs
virt:
name: "testvm{{ item }}"
command: "stop"
state: shutdown
with_sequence: start=1 end={{ test_vm_num_nodes | default('5') }}
ignore_errors: yes
- name: Remove pre-existing leases file
file: path=/var/lib/misc/dnsmasq.leases state=absent
- hosts: localhost
@ -129,9 +122,7 @@
# validate that the dhcp config is working as expected and not
# serving these requests.
- name: Power on remaining test VMs
virt:
name: "testvm{{ item }}"
command: "start"
command: virsh start testvm{{item}}
with_sequence: start=4 end={{ test_vm_num_nodes | default('5') }}
ignore_errors: yes
when: inventory_dhcp | bool == true