If you have completed an upgrade or had an upgrade fail, you can roll back your environment to the previous version.
The steps below are for performing a manual rollback. This is only necessary in cases where automated rollback fails.
Note: There are known issues related to this procedure. See the Known Issues section of the release notes for more information.
Procedure
- Roll back service provider (SP) appliances.
- Power off all appliances running the new version ('green' appliances).
- Power on all appliance running the old version ('blue' appliances).
- Reset database on both appliances.
- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following commands as root on both appliances:
DB_NAME='fdb'; PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5) psql -U admin ${DB_NAME} -c "BEGIN;SET TRANSACTION read write; ALTER DATABASE ${DB_NAME} SET default_transaction_read_only='off'; COMMIT;"
service dtService restart
- If the 'blue' SP appliances are running version 18.1 or later, run the following command as root on both appliances:
/usr/local/desktone/scripts/reset_db_access_mode.sh 1000 'restart'
- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following commands as root on both appliances:
- Roll back resource manager (RM) appliances.
- Power off all appliances running the new version ('green' appliances).
- Power on all appliance running the old version ('blue' appliances).
- Roll back tenant (TA) and desktop manager (DM) appliances.
- Power off all appliances running the new version ('green' appliances).
- Power on all appliance running the old version ('blue' appliances).
- Reset database on appliances.
- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following command as root on all TA and DM appliances. Run once for each database, replacing
XXX
with the name of the database (fdb
,edb
, andavdb
for TA appliances;edb
andavdb
for DM appliances).DB_NAME='XXX'; PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5) psql -U admin ${DB_NAME} -c "BEGIN;SET TRANSACTION read write; ALTER DATABASE ${DB_NAME} SET default_transaction_read_only='off'; COMMIT;"
- If the 'blue' SP appliances are running version 18.1 or later, run the following command as root on the primary SP appliance with the appropriate tenant OrgId:
/usr/local/desktone/scripts/reset_db_access_mode.sh 'TENANT_ORG_ID'
- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following command as root on all TA and DM appliances. Run once for each database, replacing
- Restore the 'blue' appliance eth1 IP by running the following command as root on the primary SP appliance. Run once for each TA or DM appliance, replacing
BACKBONE_IP
with the backbone IP of the appliance.BLUE_APPLIANCE_ETH1='BACKBONE_IP'; export PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5); BLUE_APPLIANCE_ID=$(psql -U admin fdb -t --no-align -c "select appliance_id from network_interface where ip_address='${BLUE_APPLIANCE_ETH1}'"); psql -U admin fdb -c "WITH NIC_IDS AS (select id from network_interface where adapter_name IN ('eth1', 'standby') and appliance_id= '${BLUE_APPLIANCE_ID}') UPDATE network_interface SET adapter_name=(CASE ip_address WHEN '${BLUE_APPLIANCE_ETH1}' THEN 'eth1' ELSE 'standby' END) WHERE id IN (SELECT id from NIC_IDS)"
- Restore the platform version and manifest version for the tenant organization by running the following command as root on the primary SP appliance with the appropriate values for
TENANT_ORG_ID
,BLUE_PLATFORM_VERSION
, andBLUE_MANIFEST_VERSION
.- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following command:
TENANT_ORG_ID='XXXX' BLUE_PLATFORM_VERSION=‘X.X.X'; PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5) psql -U admin fdb -c "UPDATE appliance SET version='${BLUE_PLATFORM_VERSION}' WHERE org_id=${TENANT_ORG_ID}"
- If the 'blue' SP appliances are not running version 9.0.0 or 9.0.1, run the following command:
TENANT_ORG_ID='XXXX' BLUE_PLATFORM_VERSION=‘X.X.X' BLUE_MANIFEST_VERSION='X.X.X.XXXX.X'; PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5) psql -U admin fdb -c "UPDATE appliance SET version='${BLUE_PLATFORM_VERSION}', manifest_version='${BLUE_MANIFEST_VERSION}' WHERE org_id=${TENANT_ORG_ID}”
- If the 'blue' SP appliances are running version 9.0.0 or 9.0.1, run the following command:
- If you had the App Volumes Manager console enabled before the upgrade, re-enable it by running the following command as root on the primary SP appliance with the appropriate value for
ORG_ID
.PGPASSWORD=$(sed -n 1p /root/.pgpass | cut -d: -f5) psql -U admin fdb -c "UPDATE organization SET avmui_enabled='t' where id='ORG_ID’"
- Restart dtService by running the following on each TA and DM appliance.
service dtService restart