Install DCache Gratia Probes

1.0 About this Document

This document describes how you can setup the Gratia Storage and Transfer probes for dCache based Storage Element.

2.0 Requirements

2.1 Host and OS

  1. OS is Red Hat Enterprise Linux 5, 6, 7, and variants (see details...).
  2. EPEL repos enabled
  3. Root access
  4. Preferably, the probe should be installed on the dCache admin node. If you need to install it on another node, make sure to configure the postgres database running on dCache admin node to allow remote access from node on which probe is installed.

2.2 Certificates

Certificate User that owns certificate Path to certificate
Host certificate root /etc/grid-security/hostcert.pem
/etc/grid-security/hostkey.pem

You will also need a copy of CA certificates (see below).

3.0 Why do I need these probes?

If you have a dCache based Storage Element, you should install these probes. The probes report storage related information to the central Gratia collector.
  • The dCache-transfer probe reports the details of each file transfer into or out of a dCache file server.
  • The dCache-storage probe is responsible for reporting storage capacity and storage usage to the central Gratia collector. The information reported is:
    • The storage capacity and amount used for each dCache pool.
    • The storage capacity and amount used for each SRM Space reservation.

4.0 Installation

Install the Yum Repositories required by OSG

The OSG RPMs currently support Red Hat Enterprise Linux 5, 6, 7, and variants (see details...).

OSG RPMs are distributed via the OSG yum repositories. Some packages depend on packages distributed via the EPEL repositories. So both repositories must be enabled.

Install EPEL

  • Install the EPEL repository, if not already present. Note: This enables EPEL by default. Choose the right version to match your OS version.
    # EPEL 5 (For RHEL 5, CentOS 5, and SL 5) 
    [root@dCache-admin ~]$ curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
    [root@dCache-admin ~]$ rpm -Uvh epel-release-latest-5.noarch.rpm
    # EPEL 6 (For RHEL 6, CentOS 6, and SL 6) 
    [root@dCache-admin ~]$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
    # EPEL 7 (For RHEL 7, CentOS 7, and SL 7) 
    [root@dCache-admin ~]$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    WARNING: if you have your own mirror or configuration of the EPEL repository, you MUST verify that the OSG repository has a better yum priority than EPEL (details). Otherwise, you will have strange dependency resolution (depsolving) issues.

Install the Yum priorities package

For packages that exist in both OSG and EPEL repositories, it is important to prefer the OSG ones or else OSG software installs may fail. Installing the Yum priorities package enables the repository priority system to work.

  1. Choose the correct package name based on your operating systemís major version:

    • For EL 5 systems, use yum-priorities
    • For EL 6 and EL 7 systems, use yum-plugin-priorities
  2. Install the Yum priorities package:

    [root@dCache-admin ~]$ yum install PACKAGE

    Replace PACKAGE with the package name from the previous step.

  3. Ensure that /etc/yum.conf has the following line in the [main] section (particularly when using ROCKS), thereby enabling Yum plugins, including the priorities one:

    plugins=1
    NOTE: If you do not have a required key you can force the installation using --nogpgcheck; e.g., yum install --nogpgcheck yum-priorities.

Install OSG Repositories

  1. If you are upgrading from OSG 3.1 (or 3.2) to OSG 3.2 (or 3.3), remove the old OSG repository definition files and clean the Yum cache:

    [root@dCache-admin ~]$ yum clean all
    [root@dCache-admin ~]$ rpm -e osg-release

    This step ensures that local changes to *.repo files will not block the installation of the new OSG repositories. After this step, *.repo files that have been changed will exist in /etc/yum.repos.d/ with the *.rpmsave extension. After installing the new OSG repositories (the next step) you may want to apply any changes made in the *.rpmsave files to the new *.repo files.

  2. Install the OSG repositories using one of the following methods depending on your EL version:

    1. For EL versions greater than EL5, install the files directly from repo.grid.iu.edu:

      [root@dCache-admin ~]$ rpm -Uvh URL

      Where URL is one of the following:

      Series EL6 URL (for RHEL 6, CentOS 6, or SL 6) EL7 URL (for RHEL 7, CentOS 7, or SL 7)
      OSG 3.2 https://repo.grid.iu.edu/osg/3.2/osg-3.2-el6-release-latest.rpm N/A
      OSG 3.3 https://repo.grid.iu.edu/osg/3.3/osg-3.3-el6-release-latest.rpm https://repo.grid.iu.edu/osg/3.3/osg-3.3-el7-release-latest.rpm
    2. For EL5, download the repo file and install it using the following:

      [root@dCache-admin ~]$ curl -O https://repo.grid.iu.edu/osg/3.2/osg-3.2-el5-release-latest.rpm
      [root@dCache-admin ~]$ rpm -Uvh osg-3.2-el5-release-latest.rpm

For more details, please see our yum repository documentation.

Install the CA Certificates: A quick guide

You must perform one of the following yum commands below to select this host's CA certificates.

Set of CAs CA certs name Installation command (as root)
OSG osg-ca-certs yum install osg-ca-certs Recommended
IGTF igtf-ca-certs yum install igtf-ca-certs
None* empty-ca-certs yum install empty-ca-certs --enablerepo=osg-empty
Any** Any yum install osg-ca-scripts

* The empty-ca-certs RPM indicates you will be manually installing the CA certificates on the node.
** The osg-ca-scripts RPM provides a cron script that automatically downloads CA updates, and requires further configuration.

HELP NOTE
If you use options 1 or 2, then you will need to run "yum update" in order to get the latest version of CAs when they are released. With option 4 a cron service is provided which will always download the updated CA package for you.

HELP NOTE
If you use services like Apache's httpd you must restart them after each update of the CA certificates, otherwise they will continue to use the old version of the CA certificates.
For more details and options, please see our CA certificates documentation.

4.1 Installing dCache Gratia probes

[root@dCache-admin ~]$ yum install dcache-gratia-probe

5.0 Configuration

To configure dCache transfer probe you will need to modify the configuration file /etc/gratia/dCache-transfer/ProbeConfig as follows

    CollectorHost="gratia-osg-itb.opensciencegrid.org:80"
    SSLHost="gratia-osg-itb.opensciencegrid.org:443"
    SSLRegistrationHost="gratia-osg-itb.opensciencegrid.org:80"
    UserVOMapFile="/var/lib/osg/user-vo-map"
    SiteName="YOUR SITE NAME"
    Grid="OSG-ITB"
    EnableProbe="1"
     DBHostName="ADMIN NODE"
note If you are installing on dCache admin node you don't need to change DBHostName (localhost is a default)

To configure dCache storage probe you will need to modify the configuration file /etc/gratia/dCache-storage/ProbeConfig as follows

    CollectorHost="gratia-osg-itb.opensciencegrid.org:80"
    SSLHost="gratia-osg-itb.opensciencegrid.org:443"
    SSLRegistrationHost="gratia-osg-itb.opensciencegrid.org:80"
    UserVOMapFile="/var/lib/osg/user-vo-map"
    SiteName="YOUR SITE NAME"
    Grid="OSG-ITB"
    EnableProbe="1"
    InfoProviderUrl="http://ADMIN NODE:2288/info"
warning In above configuration, please use ITB for testing

You will also need to configure /etc/gums/gums-client.properties in order to accurately collect grid resource usage and metrics by VO for transfer submitted using grid proxies or where voms proxy information is not available.

gums.location=https://GUMS_HOST:8443/gums/services/GUMSAdmin
gums.authz=https://GUMS_HOST:8443/gums/services/GUMSXACMLAuthorizationServicePort
warning if you are not using a default port (8443) you have to change it as well.

6.0 Start

To start the Gratia transfer probe for dCache

[root@dCache-admin ~]$ service  gratia-dcache-transfer start
Starting gratia-dcache-transfer:                           [  OK  ]
The Gratia storage probe for dCache is a cronjob. The cron file is located at /etc/cron.d/gratia-probe-dCache-storage.cron. If you want to test it immediately (instead of waiting for cron to run), run the storage probe manually as follows
[root@dCache-admin ~]$ /usr/share/gratia/dCache-storage/dCache-storage_meter.cron.sh

7.0 Stop

To stop the Gratia transfer probe for dCache

[root@dCache-admin ~]$ service  gratia-dcache-transfer stop
Stop gratia-dcache-transfer:                           [  OK  ]
To stop the Gratia storage probe for dCache, comment the cron job in file /etc/cron.d/gratia-probe-dCache-storage.cron as follows
#0 * * * * root "perl -e 'sleep rand 3600' && /usr/share/gratia/dCache-storage/dCache-storage_meter.cron.sh"

8.0 Test

First make sure that Gratia transfer probe for dCache is running
[root@dCache-admin ~]$  ps auxww|grep gratia-dcache-transfer
root      2680  2.3  0.2 174584 11080 ?        S    14:32   0:19 /usr/bin/python /usr/share/gratia/dCache-transfer/gratia-dcache-transfer
Check the log files, located under /var/log/gratia Verify that you can see the reports in gratia collector you have specified in configuration. Be aware that it could some delay due to Collector being under heavy load is possible. So, be patient.

To access the information about Gratia transfer probe for dCache, go to http://[gratia_host]:[gratia_port]/gratia-reporting/, click on "Custom SQL Query" on the left site menu frame, and enter the following query into provided text box

select * from MasterTransferSummary where ProbeName like 'dCache-transfer:dcache_adminhost';
click on "Execute Query" and you will see the total number of transfers per user.

To access the information about the Gratia storage probe for dCache, go to http://[gratia_host]:[gratia_port]/gratia-reporting/, click on "Custom SQL Query" on the left site menu frame, and enter the following query into provided text box

select * from StorageElement where ProbeName like 'dCache-storage:dcache_adminhost';

Click on "Execute Query" and you will see the storage information.

To check ITB Gratia collector click here ITB Gratia. To check OSG Gratia collector click here OSG Gratia.

Topic revision: r15 - 07 Feb 2017 - 20:18:16 - BrianBockelman
Hello, TWikiGuest!
Register

 
TWIKI.NET

TWiki | Report Bugs | Privacy Policy

This site is powered by the TWiki collaboration platformCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors..