Fix ownership of ironic inspector DHCP hostsdir

If you run with enable_ironic set to true and
ironic_inspector_pxe_filter set to dnsmasq (the default in stein),
ironic inspector can fail with the following in the logs:

Permission denied: u'/var/lib/ironic-inspector/dhcp-hostsdir/<MAC address>'

A node must be registered with a port for this to happen.

Weirdly this happens on centos/source, ubuntu/source, and ubuntu/binary,
but not centos/binary.

This change changes the ownership of
/var/lib/ironic-inspector/dhcp-hostsdir to ironic-inspector user to make
it writeable.

Change-Id: I19447727f19dbd9c0a3e17d218b48ddc4c253587
Closes-Bug: #1832026
This commit is contained in:
Mark Goddard 2019-06-07 18:49:46 +01:00
parent 498c57fcac
commit 41bcd7b496
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ RUN chmod 750 /etc/sudoers.d \
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& chown -R ironic-inspector: /etc/ironic-inspector
&& mkdir -p /var/lib/ironic-inspector/dhcp-hostsdir \
&& chown -R ironic-inspector: /etc/ironic-inspector /var/lib/ironic-inspector
{% block ironic_inspector_footer %}{% endblock %}
{% block footer %}{% endblock %}