int32bit / cinder-quota-sync

Tool to sync OpenStack Cinder used quota with current usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cinder Quota Sync

What is it?

This project is inspired by project nova-quota-sync.

It's a small script that compares cinder quota usage information with the actual usage per resource (tenant).

It also provides an easy way to synchronize quotas in case of mismatch.

How to use it?

To see the available options run:

➜ python cinder_quota_sync.py -h
usage: cinder_quota_sync.py [-h] [--all] [--sync]
                            [--project_id PROJECT_ID] [--config CONFIG]

optional arguments:
  -h, --help            show this help message and exit
  --all                 show the state of all quota resources
  --sync                automatically sync all resources, PLEASE USE IT WITH
                        EXTREME CAUTION.
  --project_id PROJECT_ID
                        searches only project ID
  --config CONFIG       configuration file

Since it updates cinder DB, use it with extreme caution.

Examples

python cinder_quota_sync.py --config my_cinder.conf --all

show all quota usage

python cinder_quota_sync.py --config my_cinder.conf

show all quota usage

python cinder_quota_sync.py --sync

This will write data to DB.

python cinder_quota_sync.py --project_id "d945d5ce-cfb8-11e4-b9d6-1681e6b88ec1"

show project quota usage

Cinder versions supported

We use it in Mitaka, it may work well on higher version.

Bugs and Disclaimer

Bugs? Oh, almost certainly.

This tool was inspired by project nova-quota-sync and written to be used in our private cloud and it has been tested only in our environment.

Since it updates cinder DB use it with extreme caution.

About

Tool to sync OpenStack Cinder used quota with current usage

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.2%