Sitename Change Procedure for FTS 2.*
What is it?
This is the procedure for changing the name of a site (BDII sitename) in the channel definition table.
It is a transparent procedure for which the daemons can remain running.
In the case where you do not already have the newsite name in the local
services.xml
cache, you can refresh the cache from BDII manually and restart the agent daemons (again, this should cause no downtime to the service).
When to use it?
If a site changes the sitename under which it publishes its resources in the BDII.
Procedure
- Run this procedure once on agent box, where you have your YAIM
site-info.def
file available.
- Download the script below, or RPM if you prefer (the script is in
/usr/bin/
).
- Know the "old" sitename that you want to change, and the "new" sitename that is being published.
- This procedure needs to be synchronised with the propagation of the sitename change in the BDII and with the local cache of this on the FTS servers (
/opt/glite/etc/services.xml
). Check your services.xml
file for the new sitename. If necessary, you can refresh the file from the BDII by running manually and restarting the agent daemons. This should be done on all of your agent nodes:
/etc/cron.daily/glite-sd2cache-cron
service transfer-agents restart
- Check that the new sitename is indeed in the
services.xml
cache file before proceeding (e.g. grep BNL-ATLAS /opt/glite/etc/services.xml
).
- (example) Run the tool with a dry run (
-d
) as:
[root@ftsxxx ~]# ./fts-site-rename.sh -o BNL-LCG2 -n BNL-ATLAS -s /etc/lcg-quattor-site-info.def -d
Sourcing /etc/lcg-quattor-site-info.def...
Looking for FTA_GLOBAL_DB_USER... found!
Looking for FTA_GLOBAL_DB_PASSWORD... found!
Looking for FTA_GLOBAL_DB_CONNECTSTRING... found!
Looking for sqlplus binary...found!
This will affect the following channels:
CERN-BNL
BNL-CERN
The site name <BNL-LCG2> will be changed to <BNL-ATLAS> for these channels.
Do you want to proceed with the change [DRYRUN, changes will NOT be applied!] (y/n)? y
DRYRUN: Printing SQL to run...
UPDATE t_channel SET source_site = 'BNL-ATLAS' WHERE source_site='BNL-LCG2';
UPDATE t_channel SET dest_site = 'BNL-ATLAS' WHERE dest_site='BNL-LCG2';
COMMIT;
- This will print the SQL that will be run - optionally, stop here and run the SQL manually on your database.
- Run the tool for real, and it will make the change to your database:
[root@ftsxxx ~]# ./fts-site-rename.sh -o BNL-LCG2 -n BNL-ATLAS -s /etc/lcg-quattor-site-info.def
Sourcing /etc/lcg-quattor-site-info.def...
Looking for FTA_GLOBAL_DB_USER... found!
Looking for FTA_GLOBAL_DB_PASSWORD... found!
Looking for FTA_GLOBAL_DB_CONNECTSTRING... found!
Looking for sqlplus binary...found!
This will affect the following channels:
CERN-BNL
BNL-CERN
The site name <BNL-LCG2> will be changed to <BNL-ATLAS> for these channels.
Do you want to proceed with the change (y/n)? y
Making change...
1 row updated.
1 row updated.
Commit complete.
Problems
Please report any problems to
fts-support@cern.ch
.