Fix issue with dnsmasq not starting
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant.yaml b/xos/observers/vcpe/steps/sync_vcpetenant.yaml
index c3b7246..f7cc02f 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant.yaml
+++ b/xos/observers/vcpe/steps/sync_vcpetenant.yaml
@@ -133,14 +133,12 @@
- name: vCPE basic dnsmasq config
copy: src=/opt/xos/observers/vcpe/files/vcpe.dnsmasq dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/vcpe.conf owner=root group=root
notify:
- - stop dnsmasq
- - start dnsmasq
+ - restart dnsmasq
- name: dnsmasq config
template: src=/opt/xos/observers/vcpe/templates/dnsmasq_servers.j2 dest=/etc/vcpe-{{ s_tags[0] }}-{{ c_tags[0] }}/dnsmasq.d/servers.conf owner=root group=root
notify:
- - stop dnsmasq
- - start dnsmasq
+ - restart dnsmasq
# These are samples, not necessary for correct function of demo
@@ -154,11 +152,9 @@
service: name=vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} state=started
handlers:
- - name: stop dnsmasq
- shell: docker exec vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} /usr/bin/killall dnsmasq
-
- - name: start dnsmasq
- shell: docker exec vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} /usr/sbin/service dnsmasq start
+ # Dnsmasq is automatically restarted in the container
+ - name: restart dnsmasq
+ shell: docker exec vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} killall dnsmasq
- name: restart vcpe
shell: service vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} stop; sleep 1; service vcpe-{{ s_tags[0] }}-{{ c_tags[0] }} start
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant_new.yaml b/xos/observers/vcpe/steps/sync_vcpetenant_new.yaml
index e96f3c5..bb64a71 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant_new.yaml
+++ b/xos/observers/vcpe/steps/sync_vcpetenant_new.yaml
@@ -56,30 +56,14 @@
- name: vCPE basic dnsmasq config
copy: src=/opt/xos/observers/vcpe/files/vcpe.dnsmasq dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/vcpe.conf owner=root group=root
notify:
- - stop dnsmasq
- - start dnsmasq
+ - restart dnsmasq
- name: dnsmasq config
template: src=/opt/xos/observers/vcpe/templates/dnsmasq_servers.j2 dest=/var/container_volumes/{{ container_name }}/etc/dnsmasq.d/servers.conf owner=root group=root
notify:
- - stop dnsmasq
- - start dnsmasq
+ - restart dnsmasq
handlers:
- - name: stop dnsmasq
+ # Dnsmasq is automatically restarted in the container
+ - name: restart dnsmasq
shell: docker exec {{ container_name }} /usr/bin/killall dnsmasq
-
- - name: start dnsmasq
- shell: docker exec {{ container_name }} /usr/sbin/service dnsmasq start
-
- - name: restart vcpe
- shell: service {{ container_name }} stop; sleep 1; service vcpe-{{ vlan_ids[0] }} start
-
- - name: stop vcpe
- service: name={{ container_name }} state=stopped
-
- - name: remove container
- docker: name={{ container_name }} state=absent image=docker-vcpe
-
- - name: start vcpe
- service: name={{ container_name }} state=started