Fix designate bootstrap.
According to http://docs.openstack.org/developer/designate/getting-started.html#initialize-start-the-central-service designate database bootstrap to be done by designate-manage database sync. Was also missing designate-manage pool_manager_cache sync. designate-manage command is packaged with designate-central. Boot strap commands moved to designate-central. Added creation of log directories. Added python2-oslo-reports and python2-suds for bootstrap to complete. Change-Id: I3896064b0abb31c96307b16005a340fc193aac3c Closes-Bug: 1610795
This commit is contained in:
parent
cc4150292c
commit
e4259f805b
@ -17,9 +17,6 @@ RUN apt-get -y install --no-install-recommends \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/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
|
||||
designate-manage db_sync
|
||||
exit 0
|
||||
fi
|
@ -12,10 +12,13 @@ RUN yum -y install \
|
||||
openstack-designate-api \
|
||||
openstack-designate-common \
|
||||
python-tooz \
|
||||
python2-oslo-reports \
|
||||
python2-suds \
|
||||
&& yum clean all \
|
||||
&& cp /etc/designate/policy.json /tmp/ \
|
||||
&& rpm -e openstack-designate-api \
|
||||
&& mv /tmp/policy.json /etc/designate/
|
||||
&& mv /tmp/policy.json /etc/designate/ \
|
||||
&& chown designate: /etc/designate/policy.json
|
||||
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
@ -39,4 +42,9 @@ RUN ln -s designate-base-source/* designate \
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN touch /usr/local/bin/kolla_designate_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_designate_extend_start
|
||||
|
||||
RUN usermod -a -G kolla designate
|
||||
|
10
docker/designate/designate-base/extend_start.sh
Normal file
10
docker/designate/designate-base/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/designate" ]]; then
|
||||
mkdir -p /var/log/kolla/designate
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/designate) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/designate
|
||||
fi
|
||||
|
||||
source /usr/local/bin/kolla_designate_extend_start
|
@ -17,6 +17,10 @@ RUN apt-get -y install --no-install-recommends \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
14
docker/designate/designate-central/extend_start.sh
Normal file
14
docker/designate/designate-central/extend_start.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -f "/var/log/kolla/designate/designate-manage.log" ]]; then
|
||||
touch /var/log/kolla/designate/designate-manage.log
|
||||
chmod 644 /var/log/kolla/designate/designate-manage.log
|
||||
fi
|
||||
|
||||
# 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
|
||||
designate-manage database sync
|
||||
designate-manage pool-manager-cache sync
|
||||
exit 0
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user