Skip to content

Ad-hoc scripts

This section describes different ad-hoc scripts used by Waldur developers.

Restore CPU/GPU/RAM usages for a month

Sometimes, Waldur can have issues with data correctness. They can be caused by different circumstansies, e.g. problems with data syncronization between Waldur backend and service provider software. In order to resolve these issues, a user can restore usage data with script.

Generate openmetrics file with usages for several months

If a user needs to create openmetrics file with usages, e.g. for historical data backfilling in Prometheus, the can be used.

Prolong expired projects

If a user needs to prolong an expired project with remote resources, this script should be used. It can:

  1. automatically detect projects with pending update requests
  2. approve the requests
  3. set state OK for terminating resources both in a local Waldur and remote one

Note: the script must be executed in a local Waldur instance

If a user needs to remove a tenant with all related objects (instances, volumes, backups, etc.) manually, this script should be used. It removes all the tenants with names from tenant_names list using an OpenStack administrator project. Please, replace <main-tenant-uuid> (line 13) with the corresponding UUID of the admin tenant in Waldur.

Last update: 2023-01-09