Skip to content

Commit

Permalink
Fix ironic inspector
Browse files Browse the repository at this point in the history
Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Closes-Bug: #1650345
Change-Id: Id03619b4e26a0a77c2a39e2de21efd13be0e9200
  • Loading branch information
2 people authored and Jeffrey Zhang committed Jan 20, 2017
1 parent cae2305 commit 040ff6e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docker/dnsmasq/Dockerfile.j2
@@ -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 %}
5 changes: 4 additions & 1 deletion docker/ironic/ironic-inspector/Dockerfile.j2
Expand Up @@ -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 %}
Expand Down
8 changes: 8 additions & 0 deletions docker/ironic/ironic-inspector/extend_start.sh
@@ -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

0 comments on commit 040ff6e

Please sign in to comment.