-
Notifications
You must be signed in to change notification settings - Fork 16
New user
Different PanDA users may have distinct requirements and preferences for how the pilot should operate. To support this flexibility, the pilot implements a plugin-based architecture that separates user-specific functionality from the core pilot framework. This design allows users to customize pilot behavior without modifying the main codebase.
- Create a new directory under pilot/users/ corresponding to the new user.
- The name of this directory will serve as the user label.
- When launching the pilot, specify this label using the --pilot-user NAME option.
This mechanism ensures that user-specific logic is cleanly encapsulated and easily maintained, while the core pilot framework remains consistent and stable.
The pilot utilizes a standard configuration file located at pilot/util/default.cfg. This file defines a wide range of parameters (for example, Pilot.pandaserver) whose values typically remain static across runs.
In addition to the configuration file, the pilot can be launched with various command-line options that determine its behavior at startup. These options are fixed for the duration of the pilot’s execution and cannot be modified while it is running. For a complete list and description of available options, refer to the Pilot Options documentation
The pilot ships with a generic user plugin that serves as a reference implementation. It provides default hooks the pilot expects and demonstrates how to customize behavior safely without touching the core framework. A user should copy this plugin to a new directory (e.g., pilot/users/atlas/) and adapt only what’s necessary.
generic/
__init__.py
common.py
container.py
copytool_definitions.py
cpu.py
diagnose.py
jobdata.py
jobmetrics.py
loopingjob_definitions.py
memory.py
monitoring.py
proxy.py
setup.py
utilities.py
-
common.py- Payload and workflow helpers. Central helpers that the pilot calls to prepare and run the user payload. Customize when you need to change how the payload command is assembled, what gets validated, or which auxiliary utilities run. Typical responsibilities:- Build the payload command (including proxy export, transform setup, utility commands).
- Validate job inputs/outputs; perform sanity checks and cleanup of redundant files.
- Inject utility commands to run before/with/after the payload (e.g., sidecar monitors).
- Small policy/gating decisions (e.g., time floors, debug toggles).
-
container.py- Containerization logic. Customize if you need site-specific images, mount layouts, GPU/CPU flags, or environment preparation inside the container. Everything related to running payloads in a container:- Decide whether to use a container, and if so, which image/platform to select.
- Build the full container wrapper command (mounts, env, user proxy handling, workdir, entrypoint).
- Provide stage-in/stage-out container helpers and integration with environment setup tools (e.g., asetup/ALRB).
-
copytool_definitions.py- Copy tool support. Extend if you add or tune copy tools or need alternate finalization rules/locations. Housekeeping for data movement: - Helper functions used by copy tools (e.g., moving files to their final destination, path resolution).
-
cpu.py- CPU/core accounting. Adapt if your site has special core counting rules or needs to record additional CPU metrics. Lightweight helpers for CPU usage:- Determine core counts actually used by the payload and reconcile with requested counts.
-
diagnose.py- Payload diagnostics. Extend if you want richer pattern detection, site-specific error signatures, or tailored triage messages. Post-run analysis utilities:- Parse and interpret payload logs, extract relevant pilot log snippets, and return focused diagnostics.
-
jobdata.py- Job parameter processing. Customize if you need to rewrite parameters, enforce naming schemes, or inject site defaults. Input parameter filters and post-processing:- Pre-filter job parameters before execution.
- Post-filter after job preparation to align with site conventions or pilot expectations.
- Provide clear failure semantics when job data is missing.
-
jobmetrics.py— Metrics emission. Extend to add site-specific metrics or to integrate with local accounting. Compose and return job metrics (e.g., CPU, I/O, memory) for monitoring/accounting systems. -
loopingjob_definitions.py— Looping job policy. Adjust thresholds or file pruning rules to match your operational policy. Controls detection and handling of looping (runaway) jobs:- Decide if detection is allowed and what cleanup/removal of unwanted files to perform.
-
memory.py— Memory-use checks. Tune for local memory enforcement rules or site alerting. Guardrails for memory usage:- Decide if memory verification is enabled and how usage is measured/reported.
-
monitoring.py— Lightweight monitors. Add site telemetry or export small heartbeat files, but keep this lightweight. Hooks for fast/periodic monitoring tasks to run alongside the payload. -
proxy.py— User proxy management. Customize for local trust stores, robot proxies, or VO-specific role logic. Everything around X.509/VOMS proxies:- Verify proxy validity and attributes (e.g., VO role), retrieve/refresh proxies when needed, and expose a proxy dictionary.
-
setup.py— Environment & transform setup. Modify if your site uses different transform distribution, mirror priorities, or alternative setup stacks. Pre-payload setup helpers:- Download/resolve analysis transforms, select valid base URLs, and integrate with environment tools (e.g., ALRB).
- Determine setup timing and priorities from queue/site configuration.
-
utilities.py— Small utilities. Defines utility tools that can be run before, during of after the payload. Miscellaneous helpers:- Pre-cleanup of workspace, CPU architecture probing, and other small cross-cutting helpers.
-
__init__.py— Package marker. Declares the plugin package; no user customization normally required.
For a more advanced implementation, see especially the ATLAS plugin.
- Introduction
- Pilot Architecture
- Project Structure
- Pilot Workflows
- Event service
- Metadata
- Signal Handling
- Error Codes
- Containers
- Special Algorithms
- Timing Measurements
- Data Transfers
- Copy Tools
- Direct Access
- Fallback Mechanism in Unified PanDA Queues
- Memory Monitoring
- Job Metrics
- Pilot release procedure
- Core count