You can decommission a datacenter.

Note: All commands should be run with root credentials.

Procedure

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