Migration Guide

From 0.6.3 to unreleased/0.7.0

From 0.6.2 to 0.6.3

Update to sqlx 0.8.2

Use this command to update the sqlx-cli to 0.8.2

From 0.5.0 to 0.6.2

Auditor DB:

Apel plugin

From 0.4.0 to 0.5.0

Apel plugin

usage: migration-0_4_0-to-0_5_0.py [-h] -c CONFIG -d DB -j JSON

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Path to the config file
  -d DB, --db DB        Path to the time database file
  -j JSON, --json JSON  Path to the time JSON file

This already requires a config file with YAML format.

Docker container

The Auditor Docker container can now be used to run database migrations. For details, see the documentation.

If you run Auditor using the Docker container and provide an external config file, you need to change the way how you run the Docker container:

I.e., you need to add auditor as the first argument before pointing to the configuration file.

Development

Update to sqlx 0.7.4

Use this command to update the sqlx-cli to 0.7.4

From 0.3.0/0.3.1 to 0.4.0

AUDITOR

REST APIs

Auditor REST APIs are changed as shown in the table below.

ActionBeforeAfter
Health check/health_check (GET)/health_check (GET)
Add record/add (POST)/record (POST)
Update record/update (POST)/record (PUT)
Insert Bulk recordsDid not exist/records (PUT)
Get all records/get (GET)/records (GET)
Get records since/get/[started/stopped]/since/{date} (GET)/records?state=[started/stopped]&since={date} (GET)

/record endpoint handles single record operations such as adding one record, updating one record and querying one record.

/records endpoint handles multiple and bulk record operations such as inserting bulk records and querying multiple records.

Apel plugin

The config parameter site_name_mapping is removed and the structure of the config parameter sites_to_report is changed. sites_to_report is now a dictionary, where the keys are the site names as configured in the GOCDB, and the values are lists of the corresponding site names in the AUDITOR records.

Before:

sites_to_report = ["site_id_1", "site_id_2", "site_id_3"]
site_name_mapping = {"site_id_1": "SITE_A", "site_id_2": "SITE_A", "site_id_3": "SITE_B"}

After:

sites_to_report = {"SITE_A": ["site_id_1", "site_id_2"], "SITE_B": ["site_id_3"]}

Removed

/get_[started/stopped]_since endpoint is removed due to the introduction of advanced query. The auditor client and pyauditor client still contains the get_started_since and get_stopped_since functions but throws a deprecated warning if used.

Development

Update to sqlx 0.7.3

Use this command to update the sqlx-cli to 0.7.3

From 0.2.0 to 0.3.0

Slurm collector

New filter options for querying slurm jobs are available. Due to this, a new section job_filter has been introduced for the config file. The job_status field has been renamed to status and is now part of the job_filter section.

Before:

job_status:
  - "completed"
  - "failed"

After:

job_filter:
  status:
    - "completed"
    - "failed"

The new filter options are partition, user, group, and account and work similar to the status filter.

Priority plugin

The priority plugin now supports exporting metrics for the amount of provided resources and the updated priority to Prometheus. The metrics can be accessed via a GET request to the /metrics endpoint. Because the metrics endpoint provided by the Prometheus exporter needs to be available all the time, the architecture of the priority plugin has been changed. It now will run continuously. In most cases, it should be started as a systemd service.

The structure of the config file has changed. The addr and port options are now put under a common auditor section. The frequency of recalculation for the provided resources and priorities can now be controlled with the frequency field, which assumes that the number given is in seconds. It defaults to 1 hour (i.e. 3600s).

The Prometheus exporter can be configured in the prometheus section. It can be enabled and disabled with the enable field. The address and port of the HTTP server that serves the metrics can be set with the addr and port fields. The metrics list specifies the metrics that are exported. Right now the values ResourceUsage (for the amount of provided resources in the given duration) and Priority (for the calculated priority value) are supported. The prometheus section is optional. If it is not present, it has the same effect as setting enable to false.

Below, you find an example of the priority plugin configuration before and after the change.

AUDITOR

Standardized REST APIs

Auditor REST APIs are changed as shown in the table below.

ActionBeforeAfter
Health check/health_check (GET)/health_check (GET)
Add record/add (POST)/record (POST)
Update record/update (POST)/record (PUT)
Get all records/get (GET)/record (GET)
Get records since/get/[started/stopped]/since/{date} (GET)/record?state=[started/stopped]&since={date} (GET)

Development

Update to sqlx 0.7.2

Use this command to update the sqlx-cli to 0.7.2

From 0.1.0 to 0.2.0

Apel plugin

Auditor client

Auditor server

Docker containers

HTCondor plugin

Development

Update to sqlx 0.7.1

Use this command to update the sqlx-cli to 0.7.1