You can decommission a datacenter.
Note: All commands should be run with root credentials.
Procedure
-
Execute initial shutdown steps.
-
Take snapshots of all service provider and resource manager appliances.
-
Take snapshots of all tenant appliances for any Multi-DC system.
-
Shut down service provider, resource manager and tenant appliances in DC2 (target datacenter to be decommissioned).
-
-
Perform initial Tenant maintenance.
Complete the following steps on the remaining datacenter for all affected tenants.
-
Stop dtService on all tenant appliances:
service dtService stop -
Delete this file on all tenant appliances
/usr/local/desktone/release/active/conf/proxy.conf -
Terminate Slony Daemon Process on all tenant appliances:
killall slon -
Remove Slony Schema on all tenant appliances (both FDB and EDB):
drop schema _slony cascade; -
Remove DC2 IP addresses from this file, on the line starting “host=” :
/usr/local/desktone/release/active/conf/fdb.properties
-
-
Promote the Primary Service Provider and Tenant to be the primary across Datacenters.
-
Go to the psql prompt
-
Execute the following commands:
update appliance set capabilities = 199 where name=’<primarysp>’ update appliance set capabilities = 240 where name=’<primarytenant>’
-
-
Perform initial Service Provider maintenance on remaining Datacenter.
Perform the following steps on the remaining datacenter.
-
Stop dtService on all service provider appliances:
service dtService stop -
Stop dtService on all resource manager appliances:
service dtService stop -
Delete this file on all resource manager appliances if it exists:
/usr/local/desktone/release/active/conf/proxy.conf -
Terminate Slony Daemon Process on all service provider appliances:
killall slon -
Remove Slony Schema on all service provider appliances (both FDB):
drop schema _slony cascade; -
Remove DC2 IP addresses from this file found on the service provider appliances, on the line starting “host=” :
/usr/local/desktone/release/active/conf/fdb.properties
-
-
Clean up proxychains configuration.
Replace /etc/proxychains.conf with the clean version on all service provider, resource manager, and Multi-DC tenant appliances.
-
Clean up FDB (all commands should be run on the primary node).
-
On the service provider appliance:
select * from datacenter; -
From the previous query results, select the ID associated with the datacenter to be decommissioned and run the following commands on service provider FDB:
delete from billing_summary where datacenter_id='<prev_query_id>'; delete from datacenter where id='<prev_query_id>'; -
Run the same query from above on the tenant FDB that is being decommissioned.
-
-
Re-initialize slony on affected nodes.
-
Start slony daemons on service provider appliances:
/usr/local/desktone/scripts/start_slon_fdb.sh -
Start slony daemons on all affected tenant appliances:
/usr/local/desktone/scripts/start_slon_fdb.sh /usr/local/desktone/scripts/start_slon_edb.sh -
Restart memcached on service provider appliance:
service memcached restart -
Start dtService on Primary service provider node:
service dtService start -
Initialize FDB for service providers:
initSlonyForOrg(1000,<blank>,"fabric") -
Initialize FDB for all affected tenants:
initSlonyForOrg(orgId,<blank>,"fabric") -
Initialize EDB for all affected tenants:
initSlonyForOrg(orgId,remainingDCId,"element") -
Confirm slony table replication set is limited to 2 nodes on both tenant and service provider appliances (query should return 2 rows):
select * from _slony.sl_node;
Slony should now be initialized correctly and the socks proxy configurations should be removed.
-
-
Bring the system up.
-
Restart memcached on other service provider appliance (not primary):
service memcached restart -
Start dtService on other service provider appliance (not primary):
service dtService start -
Reboot the resource manager appliances:
reboot now -
Start dtService on tenant appliances:
service dtService start -
Confirm that customers can access their desktops on the affected tenant.
-
[optional] Attempt to expand a pool on the affected tenant.
-
Review Quota and Hypervisor Host Assignment on affected tenant.
-
-
When all systems appear to be functioning correctly, do the following:
- Delete the decommissioned datacenter’s appliances.
- Delete the existing datacenter’s appliance snapshots.
Was this page helpful?