Fix ironic inspector

Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Closes-Bug: #1650345
Change-Id: Id03619b4e26a0a77c2a39e2de21efd13be0e9200
This commit is contained in:
Mauricio Lima 2017-01-13 15:32:35 -03:00 committed by Jeffrey Zhang
parent cae2305f78
commit 040ff6ea03
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,12 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block dnsmasq_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set dnsmasq_packages = ['dnsmasq'] %}
{{ macros.install_packages(dnsmasq_packages| customizable("packages")) }}
{% block dnsmasq_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -35,8 +35,11 @@ RUN ln -s ironic-inspector-source/* ironic-inspector \
{% endif %}
COPY ironic_sudoers /etc/sudoers.d/kolla_ironic_inspector_sudoers
COPY extend_start.sh /usr/local/bin/kolla_ironic_extend_start
RUN chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/kolla_ironic_inspector_sudoers
&& chmod 440 /etc/sudoers.d/kolla_ironic_inspector_sudoers \
&& chmod 755 /usr/local/bin/kolla_ironic_extend_start
{% block ironic_inspector_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -0,0 +1,8 @@
#!/bin/bash
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
exit 0
fi