Disable DHCP on the libvirt network rather than doing killall dnsmasq
We're doing a weird thing: first we enable DHCP in libvirt, then we killall dnsmasq to stop it. Just don't enable it in the first plac Change-Id: I539ffbfc5d4d004d27aaae0f83fef649f0e5be8c
This commit is contained in:
parent
1f37c41413
commit
5befa87e9d
@ -27,9 +27,6 @@ network_interface: "virbr0"
|
||||
test_vm_network: "{{ lookup('env', 'VM_NET_BRIDGE') | default('default', true) }}"
|
||||
test_vm_network_ip: "192.168.122.1"
|
||||
test_vm_network_netmask: "255.255.255.0"
|
||||
test_vm_network_enable_dhcp: true
|
||||
test_vm_network_dhcp_start: "192.168.122.2"
|
||||
test_vm_network_dhcp_end: "192.168.122.254"
|
||||
|
||||
test_vm_storage_pool: "{{ lookup('env', 'LIBVIRT_STORAGE_POOL') | default('default', true) }}"
|
||||
test_vm_storage_pool_path: "/var/lib/libvirt/images"
|
||||
|
@ -6,11 +6,5 @@
|
||||
</nat>
|
||||
</forward>
|
||||
<bridge name='{{ network_interface }}' stp='on' delay='0'/>
|
||||
<ip address='{{ test_vm_network_ip }}' netmask='{{ test_vm_network_netmask }}'>
|
||||
{% if test_vm_network_enable_dhcp | bool %}
|
||||
<dhcp>
|
||||
<range start='{{ test_vm_network_dhcp_start }}' end='{{ test_vm_network_dhcp_end }}'/>
|
||||
</dhcp>
|
||||
{% endif %}
|
||||
</ip>
|
||||
<ip address='{{ test_vm_network_ip }}' netmask='{{ test_vm_network_netmask }}' />
|
||||
</network>
|
||||
|
@ -56,14 +56,6 @@
|
||||
- name: "Stop dnsmasq explicitly."
|
||||
service: name=dnsmasq state=stopped
|
||||
|
||||
# NOTE(Shrews) When testing, we want to use our custom dnsmasq.conf file,
|
||||
# not the one supplied by libvirt. And the libvirt started dnsmasq processes
|
||||
# are not controlled by upstart, so we need to manually kill those.
|
||||
- name: "Stop existing libvirt dnsmasq processes"
|
||||
command: killall -9 -w dnsmasq
|
||||
when: testing | bool == true and include_dhcp_server | bool == true
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "Ensure dnsmasq is running with current config"
|
||||
service: name={{ item }} state=restarted enabled=yes
|
||||
loop:
|
||||
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Removes the ``test_vm_network_enable_dhcp`` option and disables DHCP on
|
||||
the libvirt network instead of unconditionally killing all dnsmasq
|
||||
processes on the machine.
|
||||
upgrade:
|
||||
- |
|
||||
Bifrost will no longer kill all running dnsmasq processes for you. If you
|
||||
have dnsmasq processes that are not managed by systemd, you have to stop
|
||||
them yourself.
|
Loading…
Reference in New Issue
Block a user