Manually replicate Desktone Tenant Appliances

DB replication re init process
The following steps are to be performed on both tenant appliances in the HA set.
Also as a safety measure please verify time sync first and correct it if needed.

1. Stop the dtService service on both tenant appliances: service dtService stop

2.  Stop the slon daemons on both tenant appliances: killall slon

3.  Open a psql session to the fdb database on each tenant node: psql -U admin fdb

4.  Purge the _slony schema: drop schema _slony cascade;

5.  Exit from the psql session: \q

6.  Open a psql session to the edb database on each tenant node: psql -U admin edb

7.  Purge the _slony schema: drop schema _slony cascade;

8.  Exit from the psql session: \q

9.  Reinitialize the master DB by connecting to the JMX console of an SP appliance with a web browser:
https://<sp appliance address>/dt-console
Credentials can be determined by logging into service center and selecting ‘general’

10.  Click on the UpgradeManager MBean (under com.desktone)

11.  Invoke the initSlonyForOrg() method to the FDB, it takes 2 params as specified below (will return “true” when successful)

P1.  orgId ( The org ID is the number associated to the tenant and can be viewed from Service Center tenant page)
P2  * leave blank
P3.  “fabric” (without the quotes)

12.  Invoke the initSlonyForOrg() method to the EDB, it takes 3 params as specified below (will return “true” when successful)

P1.  orgId ( The org ID is the number associated to the tenant and can be viewed from Service Center tenant page)
P2  DC ID (run following command from tenant Desktone appliance:  cat /usr/local/desktone/.datacenter_id)
P3.  “element” (without the quotes)

13. Reboot both tenant Desktone appliances: shutdown -r now

After restart verify that a master DB is selected and that it is not stating both are master. In the deskone log you should find a message similar to the following.

2012-06-27 13:49:32,030 INFO  [com.desktone.elementmgr.datasource.EdbDatasourceOptimizer]-[timerFactory] Attempting to determine slony master datasource.
2012-06-27 13:49:32,030 INFO  [com.desktone.server.datasource.DataSourceRefresh]-[timerFactory] Datasource for edb at 169.254.6.107 already exists
2012-06-27 13:49:32,062 INFO  [com.desktone.server.datasource.DataSourceRefresh]-[timerFactory] Datasource for edb at 169.254.6.106 already exists
2012-06-27 13:49:32,091 INFO  [com.desktone.elementmgr.datasource.EdbDatasourceOptimizer]-[timerFactory] No changes to the master datasource will be made, the most optimal ‘169.254.6.107’ is already in use.
2012-06-27 13:49:32,091 INFO  [com.desktone.elementmgr.datasource.EdbDatasourceOptimizer]-[timerFactory] saveHostsToPropFile: masterHost = 169.254.6.107 allHosts = [169.254.6.107, 169.254.6.106]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: