Use dumb-init with --single-child
We would probably like to forward signals only to the direct child which in turn takes care its children and not to all worker child processes. (cherry picked from commit6258a920fd
) This change also includes a cherry pick of a fix for bifrost: Clear ENTRYPOINT configuration for Bifrost Bifrost was broken by the recent kolla change [1] to use an ENTRYPOINT for dumb-init. The container failed to start because dumb-init was trying to run /sbin/init, which expects to be pid 1. [1] Id91ebb8b0ecc43946845de386350af0536dd661f (cherry picked from commitb06d8387f5
) Change-Id: Id91ebb8b0ecc43946845de386350af0536dd661f Depends-On: https://review.openstack.org/621871/ Closes-Bug: #1808326 Related-Bug: #1799642 Related-Bug: #1799642
This commit is contained in:
parent
3bc14c84b1
commit
1dacd1944e
|
@ -429,8 +429,7 @@ COPY curlrc /root/.curlrc
|
||||||
{% if base_arch == 'x86_64' %}
|
{% if base_arch == 'x86_64' %}
|
||||||
|
|
||||||
RUN curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 -o /usr/local/bin/dumb-init \
|
RUN curl -sSL https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 -o /usr/local/bin/dumb-init \
|
||||||
&& chmod +x /usr/local/bin/dumb-init \
|
&& chmod +x /usr/local/bin/dumb-init
|
||||||
&& sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start
|
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
|
@ -440,10 +439,12 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
||||||
&& python get-pip.py \
|
&& python get-pip.py \
|
||||||
&& rm get-pip.py \
|
&& rm get-pip.py \
|
||||||
&& pip --no-cache-dir install --prefix='/usr/local' dumb-init==1.1.3 \
|
&& pip --no-cache-dir install --prefix='/usr/local' dumb-init==1.1.3 \
|
||||||
&& chmod +x /usr/local/bin/dumb-init \
|
&& chmod +x /usr/local/bin/dumb-init
|
||||||
&& sed -i 's|#!|#!/usr/local/bin/dumb-init |' /usr/local/bin/kolla_start
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
ENTRYPOINT ["dumb-init", "--single-child", "--"]
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
RUN touch /usr/local/bin/kolla_extend_start \
|
RUN touch /usr/local/bin/kolla_extend_start \
|
||||||
|
|
|
@ -54,6 +54,8 @@ RUN /usr/sbin/update-rc.d -f ondemand remove; \
|
||||||
|
|
||||||
{{ macros.install_packages(bifrost_deploy_packages | customizable("packages")) }}
|
{{ macros.install_packages(bifrost_deploy_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
# Clear any customisation by Kolla to entrypoint & command
|
||||||
|
ENTRYPOINT []
|
||||||
CMD [ "/sbin/init" ]
|
CMD [ "/sbin/init" ]
|
||||||
|
|
||||||
{% block bifrost_deploy_footer %}{% endblock %}
|
{% block bifrost_deploy_footer %}{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue