QA:Testcase OpenStack ceilometer metering glance

From FedoraProject

Revision as of 15:16, 2 April 2013 by Eglynn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

By default glance notifications are simply discarded (via the so-called noop notification strategy). So the first step is to ensure that these notifications are routed via the qpid AMQP provider instead:

 sudo openstack-config --set /etc/glance/glance-api.conf DEFAULT notifier_strategy qpid
 sudo service openstack-glance-api restart

Then use the ceilometer CLI to display the image.* meters:

 ceilometer meter-list
 +--------------+-------+--------------------------------------+---------+----------------------------------+
 | Name         | Type  | Resource ID                          | User ID | Project ID                       |
 +--------------+-------+--------------------------------------+---------+----------------------------------+
 | image        | gauge | c0c77c78-90ad-40d1-b552-d98eeb8840ef |         | 14b14be2016d4ce8b2d8a13578e279b0 |
 | image.size   | gauge | c0c77c78-90ad-40d1-b552-d98eeb8840ef |         | 14b14be2016d4ce8b2d8a13578e279b0 |
 | image.update | delta | c0c77c78-90ad-40d1-b552-d98eeb8840ef |         | 14b14be2016d4ce8b2d8a13578e279b0 |
 | image.upload | delta | c0c77c78-90ad-40d1-b552-d98eeb8840ef |         | 14b14be2016d4ce8b2d8a13578e279b0 |
 +--------------+-------+--------------------------------------+---------+----------------------------------+

Choose an image and download it:

 IMAGE_ID=$(glance image-list | awk '/ active / {print $2}' | head -1)
 glance image-download $IMAGE_ID | wc -c

Check that the corresponding image.download meter reflects the volume of image data downloaded:

 ceilometer sample-list -c image.download -r $IMAGE_ID

Then download again and note the availability of an additional sample point:

 glance image-download $IMAGE_ID > /dev/null
 ceilometer sample-list -c image.download -r $IMAGE_ID