Merge "Fix DHCP test scenario"
This commit is contained in:
commit
c6fc3b01c2
@ -197,7 +197,9 @@ function create_node {
|
|||||||
"
|
"
|
||||||
|
|
||||||
echo ${vm_xml} > /tmp/vm.xml
|
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 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
echo "failed to create VM $NAME" >&2
|
echo "failed to create VM $NAME" >&2
|
||||||
|
@ -16,13 +16,6 @@
|
|||||||
# in the interest of keeping the active memory footprint small,
|
# in the interest of keeping the active memory footprint small,
|
||||||
# should stop all of the VMs in advance, so we can proceed with
|
# should stop all of the VMs in advance, so we can proceed with
|
||||||
# install and initial deploy.
|
# 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
|
- name: Remove pre-existing leases file
|
||||||
file: path=/var/lib/misc/dnsmasq.leases state=absent
|
file: path=/var/lib/misc/dnsmasq.leases state=absent
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
@ -129,9 +122,7 @@
|
|||||||
# validate that the dhcp config is working as expected and not
|
# validate that the dhcp config is working as expected and not
|
||||||
# serving these requests.
|
# serving these requests.
|
||||||
- name: Power on remaining test VMs
|
- name: Power on remaining test VMs
|
||||||
virt:
|
command: virsh start testvm{{item}}
|
||||||
name: "testvm{{ item }}"
|
|
||||||
command: "start"
|
|
||||||
with_sequence: start=4 end={{ test_vm_num_nodes | default('5') }}
|
with_sequence: start=4 end={{ test_vm_num_nodes | default('5') }}
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when: inventory_dhcp | bool == true
|
when: inventory_dhcp | bool == true
|
||||||
|
Loading…
Reference in New Issue
Block a user