cernops/cinder-quota-sync

Name: cinder-quota-sync

Owner: CERN Operations

Description: Script to check and sync quota usages in an OpenStack Cinder database

Created: 2017-07-20 12:45:41.0

Updated: 2018-05-04 09:48:12.0

Pushed: 2018-03-12 12:05:02.0

Homepage:

Size: 7

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Cinder Quota Sync

What is it?

cinder-quota-sync is a simple script that compares for a Cinder database the quota usage with the actual usage (on a per resource and project basis).

It also allows to synchronize quotas in case of mismatches.

How to use it?

$ python cinder-quota-sync –help

usage: cinder-quota-sync [-h] [–config CONFIG] [–nosync] [–sync]

                     (--list_projects | --project_id PROJECT_ID)

optional arguments:

-h, –help show this help message and exit

–config CONFIG configuration file

–nosync never sync resources (no interactive check)

–sync always sync resources (no interactive check)

–list_projects get a list of all projects in the database

–project_id PROJECT_ID

                    project to check
Examples

Check a project (with interactive check before syncing):

$ python cinder-quota-sync –project_id ed189d6c-5356-4378-8e98-14b7f7153607

Check a project (don't sync, just display):

$ python cinder-quota-sync –nosync –project_id ed189d6c-5356-4378-8e98-14b7f7153607

Check a project (sync, don't ask for confirmation):

$ python cinder-quota-sync –sync –project_id ed189d6c-5356-4378-8e98-14b7f7153607

List all project which have entries in the Cinder database

$ python cinder-quota-sync –list_projects

Cinder versions supported

Tested with Ocata.

Bugs and Disclaimer

Bugs? Oh, almost certainly.

This tool was written to be used in the CERN Cloud Infrastructure and it has been tested only in our environment.

Since it updates the Cinder database: use with extreme caution.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.