Skip to content

ResourceStatus System installation in v6r7

andresailer edited this page Dec 7, 2015 · 14 revisions

This document describes the basic steps to install, configure, activate and start using the ResourceStatus system of DIRAC.

Setup for BASIC USAGE

WARNING: If you have doubts about the success of any step, DO NOT ACTIVATE RSS.

WARNING: REPORT FIRST to the DIRAC FORUM !

0.- CS Configuration

The configuration for RSS sits under the following path on the CS following the usual /Operations section convention:

/Operations/Defaults/ResourceStatus

Please, make sure you have the following schema:

/Operations/Defaults/ResourceStatus
    /Config
      State        = InActive
      Cache        = 300
      CacheHistory = 24
      RecordLogs   = Active
      /StatusTypes
          default = all
          StorageElement = ReadAccess,WriteAccess,CheckAccess,RemoveAccess

For a more detailed explanation, take a look to the official documentation: http://diracgrid.org/files/docs/AdministratorGuide/Systems/ResourceStatus/configuration.html .

1.- Fresh DB

Needs a fresh DB installation. ResourceStatusDB and ResourceManagementDB are needed. Information on former ResourceStatusDB can be discarded. Delete the old database tables. If there is no old database, just install a new one, either using the dirac-admin-sysadmin-cli or directly from the machine as follows:

$ dirac-install-db ResourceStatusDB
$ dirac-install-db ResourceManagementDB

2.- Generate DB tables

The DB tables will be created when the services are started for the first time.

3.- Run service(s)

RSS - basic - needs the following services to be up and running: ResourceStatusSystem/ResourceStatus, ResourceStatusSystem/ResourceManagement please install them using the dirac-admin-sysadmin-cli command, and make sure it is running.:

install service ResourceStatusSystem ResourceManagement
install service ResourceStatusSystem ResourceStatus

In case of any errors, check that you have the information about DataBase 'Host' in the configuration file.

The host(s) running the RSS services or agents need the 'SiteManager' property.

4.- Populate tables

First check that your user has 'SiteManager' privilege, otherwise it will be "Unauthorized query" error. Let's do it one by one to make it easier:

$ dirac-rss-sync --element Site -o LogLevel=VERBOSE
$ dirac-rss-sync --element Resource -o LogLevel=VERBOSE
$ dirac-rss-sync --element Node -o LogLevel=VERBOSE

You can check the DB. You will find there are 4 times StorageElements on the ResourceStatus table ( if you are still using the default config of step 0 ). If not, please report and DO NOT ACTIVATE RSS.

5.- Initialize Statuses for StorageElements

Copy over the values that we had on the CS for the StorageElements:

$ dirac-rss-sync --init -o LogLevel=VERBOSE

WARNING: If the StorageElement does not have a particular StatusType declared

WARNING: on the CS, this script will set it to Banned. If that happens, you will

WARNING: have to issue the dirac-rss-status script over the elements that need

WARNING: to be fixed.

6.- Set statuses by HAND

In case you entered the WARNING ! on point 4, you may need to identify the status of your StorageElements. Try to detect the Banned SEs using the following:

$ dirac-rss-list-status --element Resource --elementType StorageElement --status Banned

If is there any SE to be modified, you can do it as follows:

$ dirac-rss-set-status --element Resource --name CERN-USER --statusType ReadAccess --status Active --reason "Why not?"
# This matches all StatusTypes
$ dirac-rss-set-status --element Resource --name CERN-USER --status Active --reason "Why not?"

7.- Activate RSS

If you did not see any problem, activate RSS by setting the CS option:

/Operations/Defaults/ResourceStatus/Config/State = Active

8.- Agents

There are few agents that are required:

  • SummarizeLogsAgent

Please, install them and make sure they are up and running. Old agents, like the *InspectorAgent(s) can be safely removed.

Clone this wiki locally