Enable duplex platform upgrades: migrate etcd
Enable the mechanism to upgrade the platform components on a running StarlingX system with duplex controllers. This includes upgrade updates for: o migrate etcd on host-swact Depends-On: https://review.opendev.org/#/c/717038/ Change-Id: Ife45253b46a9d58216d6cc943d7f4d40dd48b970 Story: 2007403 Task: 39246 Signed-off-by: John Kung <john.kung@windriver.com>
This commit is contained in:
parent
1ec5117202
commit
21690922e2
@ -19,6 +19,7 @@
|
||||
DESC="ETCD highly-available key value database"
|
||||
SERVICE="etcd.service"
|
||||
PIDFILE="/var/run/etcd.pid"
|
||||
UPGRADE_SWACT_FILE="/etc/platform/.upgrade_swact_controller_1"
|
||||
|
||||
|
||||
status()
|
||||
@ -46,16 +47,28 @@ start()
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Starting $SERVICE..."
|
||||
RETVAL=0
|
||||
|
||||
systemctl start $SERVICE
|
||||
if [ -e $UPGRADE_SWACT_FILE ]; then
|
||||
echo "Perform upgrade_swact_migration migrate etcd ..."
|
||||
/usr/bin/upgrade_swact_migration.py migrate_etcd
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
RETVAL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Started $SERVICE successfully"
|
||||
RETVAL=0
|
||||
else
|
||||
echo "$SERVICE failed!"
|
||||
RETVAL=1
|
||||
if [ $RETVAL -eq 0 ]; then
|
||||
echo "Starting $SERVICE..."
|
||||
|
||||
systemctl start $SERVICE
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Started $SERVICE successfully"
|
||||
else
|
||||
echo "$SERVICE failed!"
|
||||
RETVAL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
@ -98,6 +111,3 @@ case "$1" in
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user