GDMP Heartbeat Monitor

In order to find out if two full GDMP installations work properly and over a long period of time, a GDMP Heartbeat Monitor setup exists that constantly creates and transfers files between two GDMP hosts. In
principle, the Heartbeat Monitor consists of a few scripts that use two existing GDMP installations.
 

1 Installation and Configuration Instructions
2 How GDMD heart beat works

1 Installation and Configuration Instructions


1) get the gdmp heart beat tar file:
   gdmp_hb_scripts.tar.gz or http://home.fnal.gov/~muzaffar/gdmp/gdmp_hb_scripts.tar.gz or

2) unpack the tar file:
 > gunzip -c gdmp_hb_scripts.tar.gz | tar xvf -
 > cd gdmp_hb_scripts

3) Install the scripts:
 > ./sbin/install-scripts.pl

4) Setup GDMP Heart Beat:
  You need do either (a) or (b)
  a) edit the gdmp_hb_scripts/etc/gdmphb.conf file and set the GDMP_INSTALL_DIR environment variable
  OR
  b) set the GDMP_CONFIG_FILE environment variable to point to a valid gdmp.conf file or any VO

  Once you have done either (a) or (b) then run the gdmp_hb_setup.pl script
  >  ./sbin/gdmp_hb_setup.pl

  gdmp_hb_setup.pl will create a new VO called "gdmphb" and creates the file <gdmp>/etc/gdmphb/gdmp.conf. It will automatically set all the variables needed and you don't have to edit it e.g a gdmp.conf file.
For VO gdmphb would look like

GDMP_SHARED_CONF=/opt/gdmp/install/gdmp3.0/etc/gdmp.shared.conf
GDMP_VIRTUAL_ORG=gdmphb
GDMP_CONFIG_DIR=${GDMP_INSTALL_DIR}/etc/${GDMP_VIRTUAL_ORG}
GDMP_TMP_DIR=${GDMP_INSTALL_DIR}/tmp/${GDMP_VIRTUAL_ORG}
GDMP_VAR_DIR=${GDMP_INSTALL_DIR}/var/${GDMP_VIRTUAL_ORG}
GDMP_SERVICE_NAME=host/shahzad.fnal.gov
GDMP_GRID_MAPFILE=/opt/gdmp/install/gdmp3.0/etc/grid-security/grid-mapfile
GDMP_SERVER_PROXY=/opt/gdmp/install/gdmp3.0/etc//gdmp_server.proxy
GDMP_PRIVATE_CONF=/opt/gdmp/install/gdmp3.0/etc//gdmp.private.conf
GDMP_STORAGE_DIR=/home/gdmp_data/flatfile/gdmphb/file
GDMP_HB_PATH=/home/muzaffar/gdmp_hb_scripts/sbin/..
GDMP_STAGE_FROM_MSS=${GDMP_HB_PATH}/bin/gdmp_hb_stage_from_mss.pl
GDMP_STAGE_TO_MSS=${GDMP_HB_PATH}/bin/gdmp_hb_stage_to_mss.pl
GDMP_NOTIFICATION_FOR_REPLICATE_GET=
GDMP_NOTIFICATION_FOR_PUBLISH_CATALOGUE=${GDMP_HB_PATH}/bin/gdmp_hb_replicate.pl
GDMP_OBJY_STORAGE_DIR=/home/gdmp_data/objyfile/gdmphb/objy
OO_FD_BOOT=${GDMP_OBJY_STORAGE_DIR}/test.boot
GDMP_DEFAULT_NEW_FDID=12345

All you have to do is to make sure that the other gdmp heart beat side  also have installed gdmp heart beat scripts.

5) set the environment variable GDMP_CONFIG_FILE to
<gdmp>/etc/gdmphb/gdmp.conf

6) run gdmp_host_subscribe to subscribe to remote gdmp hosts from where you want to transfer gdmp heart beat files.

7) remote sites which wants to  participate in gdmp heart beat setup should also subscribe their gdmp
   hosts to your site.
   Note: pls before running gdmp_host_subscribe make sure that the GDMP_CONFIG_FILE environment variable is set to <gdmp>/etc/gdmphb/gdmp.conf

8) edit the gdmp_hb_scripts/etc/gdmphb.conf file and add missing variables. Normally you only need to provide MAIL_ADDRESS so that you can get email when grid-proxy is going to expire.

9) Start the ./bin/gdmp_hb_publish.pl script which will start registering and publishing files which would be transferred automatically by remote sites.

Additional note:
Please note that one should also add the host name from where he/she want to transfer files in the gdmp_hb_scripts/etc/host.access file. For example, our GDMP heart beat is subscribed to 2 GDMP hosts gallo.fnal.gov and testbed008.cern.ch then gdmp_hb_scripts/etc/host.access should have these two lines:
 

gallo.fnal.gov
testbed008.cern.ch


If one wants to allow all hosts which exist in fnal.gov doamin, one should have any of the followig line in the host.access file

fnal.gov
or
fnal\.gov
or
.*.fnal.gov


Any valid regular perl expression in host.access file is acceptable.

2 How GDMD heart beat works


Each GDMP Heart Beat site has a dummy file (automatically created for you when you run the gdmp_hb_setup.pl). gdmp_hb_publish.pl creates a unique link in GDMP_STORAGE_DIR for this file
and then registers that link and publishes it to other hosts. When remote sites receives this published information, then GDMP will start the gdmp_hb_replicate.pl which will transfer this file. GDMP will then make a backup of this file if not already taken and deletes the transferred file. As each site is going to publish the same file again and again with different names, only one backup is enough. This backup will be copied by
gdmp_hb_stage_from_mss.pl into GDMP_STORAGE_DIR when someone make request for file staging.
gdmp_hb_stage_to_mss.pl is actually used to take the backup. When a file is successfully transferred,
GDMP calls gdmp_hb_stage_to_mss.pl which take the backup for the transferred file if not already taken.

Consequentlt, GDMP heart beat will not only test the functionality of register,
publish and replicate but it also utilises the GDMP_NOTIFICATION_FOR_PUBLISH_CATALOGUE,
GDMP_STAGE_FROM_MSS and GDMP_STAGE_TO_MSS scripts. Since GDMP heart beat uses its own VO, this will not  interfer with other VO's files.

The European Organization for Nuclear Research
Feedback and questions concerning this site should be directed to
the WP2 mailinglist EDG-WP2@cern.ch
Last updated October 1, 2002