diff --git a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 b/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 index 11bcb432e7..7f54aa1332 100644 --- a/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-dhcp-agent/Dockerfile.j2 @@ -12,6 +12,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(neutron_dhcp_agent_packages | customizable("packages")) }} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + {% block neutron_dhcp_agent_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/neutron/neutron-dhcp-agent/extend_start.sh b/docker/neutron/neutron-dhcp-agent/extend_start.sh new file mode 100644 index 0000000000..8becf549d9 --- /dev/null +++ b/docker/neutron/neutron-dhcp-agent/extend_start.sh @@ -0,0 +1,9 @@ +if [[ ! -d "/var/log/kolla/neutron" ]]; then + mkdir -p /var/log/kolla/neutron +fi +if [[ ! -f "/var/log/kolla/neutron/dnsmasq.log" ]]; then + touch /var/log/kolla/neutron/dnsmasq.log + chown neutron:kolla /var/log/kolla/neutron/dnsmasq.log +fi + +. /usr/local/bin/kolla_neutron_extend_start