Skip to content

Commit

Permalink
Merge "ironic: Fix dnsmasq.log permissions" into stable/2024.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jan 14, 2025
2 parents 7712721 + 8a85658 commit efc4b72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker/dnsmasq/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% set dnsmasq_packages = ['dnsmasq'] %}
{{ macros.install_packages(dnsmasq_packages| customizable("packages")) }}

COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 644 /usr/local/bin/kolla_extend_start

{% block dnsmasq_footer %}{% endblock %}
{% block footer %}{% endblock %}
12 changes: 12 additions & 0 deletions docker/dnsmasq/extend_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

if [[ ! -d "/var/log/kolla/ironic" ]]; then
mkdir -p /var/log/kolla/ironic
fi
if [[ $(stat -c %a /var/log/kolla/ironic) != "755" ]]; then
chmod 755 /var/log/kolla/ironic
fi
if [[ ! -r "/var/log/kolla/ironic/dnsmasq.log" ]]; then
touch /var/log/kolla/ironic/dnsmasq.log
chown ironic:ironic /var/log/kolla/ironic/dnsmasq.log
fi

0 comments on commit efc4b72

Please sign in to comment.