Apply Swift rolling upgrade

Apply Swift rolling upgrade based on recommendations from Swift PTL John
Dickinson at [1]

[1]https://www.swiftstack.com/blog/2013/12/20/upgrade-openstack-swift-no-downtime/

Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
Co-Authored-By: Ha Manh Dong <donghm@vn.fujitsu.com>
Change-Id: Ic59a2d2dda3469af5d4259e020d22b619ff7d603
Implements: blueprint apply-service-upgrade-procedure
This commit is contained in:
confi-surya 2018-04-11 12:03:29 +09:00 committed by Ha Manh Dong
parent 98a6804860
commit dc1389bc58
3 changed files with 20 additions and 0 deletions

View File

@ -30,6 +30,9 @@ RUN {{ macros.install_pip(swift_proxy_server_pip_packages | customizable("pip_pa
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block swift_proxy_server_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -0,0 +1,8 @@
#!/bin/bash
# Gracefully stop swift proxy and exit if KOLLA_STOP_SERVICES variable is set.
if [[ "${!KOLLA_STOP_SERVICES[@]}" ]]; then
echo "Gracefully Shutdown all Swift proxy processes"
swift-init proxy shutdown
exit
fi

View File

@ -2,3 +2,12 @@
sudo chown -R swift:swift /srv/node
mkdir -p /var/lib/swift/lock
# Migrate swift database and exit if KOLLA_STOP_SERVICES variable is set.
if [[ "${!KOLLA_STOP_SERVICES[@]}" ]]; then
echo "Stop background Swift jobs"
swift-init rest stop
echo "Gracefully Shutdown all Swift storage processes"
swift-init {account|container|object} shutdown
exit
fi