Skip to content
Snippets Groups Projects
Commit e4259f80 authored by Ross Krumbeck's avatar Ross Krumbeck
Browse files

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
parent cc415029
No related branches found
No related tags found
No related merge requests found
...@@ -17,9 +17,6 @@ RUN apt-get -y install --no-install-recommends \ ...@@ -17,9 +17,6 @@ RUN apt-get -y install --no-install-recommends \
{% endif %} {% endif %}
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{{ include_footer }} {{ include_footer }}
USER designate USER designate
...@@ -12,10 +12,13 @@ RUN yum -y install \ ...@@ -12,10 +12,13 @@ RUN yum -y install \
openstack-designate-api \ openstack-designate-api \
openstack-designate-common \ openstack-designate-common \
python-tooz \ python-tooz \
python2-oslo-reports \
python2-suds \
&& yum clean all \ && yum clean all \
&& cp /etc/designate/policy.json /tmp/ \ && cp /etc/designate/policy.json /tmp/ \
&& rpm -e openstack-designate-api \ && 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'] %} {% elif base_distro in ['ubuntu'] %}
...@@ -39,4 +42,9 @@ RUN ln -s designate-base-source/* designate \ ...@@ -39,4 +42,9 @@ RUN ln -s designate-base-source/* designate \
{% endif %} {% 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 RUN usermod -a -G kolla designate
#!/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 \ ...@@ -17,6 +17,10 @@ RUN apt-get -y install --no-install-recommends \
{% endif %} {% endif %}
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{{ include_footer }} {{ include_footer }}
USER designate USER designate
#!/bin/bash #!/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 # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty. # of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
designate-manage db_sync designate-manage database sync
designate-manage pool-manager-cache sync
exit 0 exit 0
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment