The Factory Entry Daemons

Description

This document describes the internals of a glideinWMS Factory Entry Daemon.

Index

Glidein Factory Overview

A Glidein Factory is composed of a Factory daemon and several Factory Entry Daemons. Each Entry Daemon is autonomous; it advertises itself and processes the incoming requests.
See the picture below for a logical overview.




All daemons of a Glidein Factory share the same directory tree. The root of the tree contains the common startup and configuration files, while each entry point has a few additional configuration files on its own. Each entry point is completely described by these files on disk.

Program flow

The Factory Entry Daemon is based on the polling principle; it runs in an eternal loop as described in the picture below.


The configuration is read only once, at daemon startup, so a restart is needed for every configuration change.
However, the daemon does check the downtime file at every iteration, so a change to the downtime configuration file does not need any further action on the daemon.

Most stages are self explanatory, so they will not be described to further detail. However a few need more detail; in particular:

Find and perform work

This stage is composed of three logical parts, as shown in the picture below:

This stage requires two input fields, the configuration data and the downtime flag, and returns the request-specific job statistics.

It also communicates with external Condor daemons. To talk to them, it currently uses the condor command line tools:

The requests are inserted into the Condor Collector by the VO frontends. The picture below shows the format of the request as present in the Collector.

Advertise myself

The advertise stage advertises the existence of the Entry Daemon and its statistics to the Condor Collector.
Two classes of ClassAds are sent, one for the Entry Daemon itself, and one for every processed event. The two types of ClassAds are shown in the pictures below.







The current implementation uses a Condor provided command line tool, namely condor_advertise, for this task.

Write statistics

The write statistics stage converts the in-memory statistics into files in the Web exported monitoring area, as shown in the picture below.


The data is written both in a XML file and as entries in RRD archives.

The XML data can be used by other applications, while the RRD archives can be viewed using the provided HTML pages based on JavascriptRRD and Flot.

The current implementation will use the Python RRDTool library, if available. Else, it will fall back to the command line tool.

Source code distribution

The Factory Entry Daemons are implemented as python scripts, and they don't need to be pre-compiled.

The code is spread over several python modules, some specific to the factory other shared between different parts of the glideinWMS. A shell script is also used.
There are also some external dependencies, namely the rrdtool and M2Crypto python libraries and the Condor command line binaries.

The picture below shows the dependency tree.


glideFactoryEntry.py is executable.

The glideinWMS common libraries are in glideinWMS/lib directory.
The shell script is located in the root directory of the factory tree, copied there during the creation of the tree itself.

Configuration files

The Factory Entry Daemons have configuration files both in the root of the factory configuration tree as well as in the entry specific subdirectory. The configuration files in the root are common for all the entry points, while the ones in the entry subdirectory are specific to that Entry Daemon.

Warning: The configuration files should never be changed by hand. They are generated and maintained by a dedicated tool.

Shared configuration files

The configuration files in the root of the factory configuration tree are shared between all the Factory Entry Daemons.

The following files are used:

Entry-specific configuration files

The configuration files in the entry-specific subdirectory are used by only one Entry Daemon.

The following files are used:



Repository

CVSROOT

cvsuser@cdcvs.fnal.gov:/cvs/cd

Package(s)

glideinWMS/factory

Author(s)

Since Aug. 14th 2006 - Igor Sfiligoi (Fermilab Computing Division)