Skip to content

Commit

Permalink
Send notifications when extending volume
Browse files Browse the repository at this point in the history
- Send resize.start when volume extension begins.
- Send resize.end with new size when volume extension ends.

Fixes: bug #1219106
Change-Id: I729da1604668080ec1a5d096df211aa55913dc48
  • Loading branch information
mgagne committed Sep 3, 2013
1 parent 432f819 commit e0bc432
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cinder/volume/manager.py
Expand Up @@ -795,6 +795,7 @@ def _consumed(name):
'd_quota': quotas['gigabytes']})
return

self._notify_about_volume_usage(context, volume, "resize.start")
try:
LOG.info(_("volume %s: extending"), volume['id'])
self.driver.extend_volume(volume, new_size)
Expand All @@ -812,3 +813,6 @@ def _consumed(name):
QUOTAS.commit(context, reservations)
self.db.volume_update(context, volume['id'], {'size': int(new_size),
'status': 'available'})
self._notify_about_volume_usage(
context, volume, "resize.end",
extra_usage_info={'size': int(new_size)})

0 comments on commit e0bc432

Please sign in to comment.