Skip to content

WMAgent

Diego Ballesteros edited this page May 16, 2013 · 19 revisions

WMAgent

The Basics

The WMAgent software is the working unit of the production system, in a nutshell its functions are:

  • Splitting WorkQueueElements into smaller work units, known as jobs.
  • Creating jobs and controlling the flow of data according for the tasks defined in the WMSpec of a requests.
  • Submitting jobs to a batch system (e.g. HTCondor, LSF).
  • Tracking the submitted jobs and keeping account of their outcome.
  • Registering the produced data into the CMS catalogs (i.e. DBS2/3, PhEDEx).

The WMAgent relies in two external services for its operation:

  • A relational database to keep the WMAgent state, known as WMBS.
  • A non-relation database for monitoring and document storage, the current implementation uses CouchDB.

The WMAgent is made up of threaded WMComponents which function independently and use WMBS and CouchDB as their sources of information, some of them interact with external services such as PhEDEx, ReqMgr, DBS, WorkQueue, SiteDB.

The next sections will describe in some detail each one of the databases and components in the system.

The Databases

WMBS (Workload Management Bookkeeping System)

WMBS is a relational database which contains most of the operational information of the WMAgent, it is strictly required for the operation of any of the WMComponents and it's absence will trigger a immediate crash in any of them.

WMCore supports WMBS with Oracle or MySQL as the RDBMS and it most cases they execute the same queries, however some of the queries require different versions according to the RDBMS.

Developer note: When writing queries in WMCore for relational databases, try to write a single compatible query for MySQL and Oracle. Exceptions are: Insertions/Deletion/Table creation or cases where using specific features makes the query much more efficient, specially for Oracle which is used for WMAgents handling higher loads.

The tables in WMBS can be divided in four categories:

WMBS_

BossAir

ResourceControl

DBSBuffer

CouchDB

The WMComponents

WorkQueueManager

JobCreator

JobSubmitter

JobStatusLite

JobUpdater

JobTracker

ErrorHandler

RetryManager

JobAccountant

DBSUpload

DBS3Upload

PhEDExInjector

TaskArchiver

AnalyticsDataCollector

WMBSService

AlertGenerator

AlertProcessor

Clone this wiki locally