cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject git commit: updated refs/heads/4.5 to 9e82365
Date Mon, 23 Mar 2015 10:57:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 a80522acf -> 9e8236509


CLOUDSTACK-7948: Two VOLUME.DELETE Events are being registered instead of one - On Destroying
a User VM belonging to a Project

(cherry picked from commit 27fa8a94532bab0713cb813699afedfa70a5287b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9e823650
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9e823650
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9e823650

Branch: refs/heads/4.5
Commit: 9e82365099757b092ebbf5c7fd764caa62fc2c33
Parents: a80522a
Author: Damodar <damoder.reddy@citrix.com>
Authored: Fri Nov 21 15:21:30 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Mar 23 16:27:39 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/listener/VolumeStateListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e823650/server/src/com/cloud/storage/listener/VolumeStateListener.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/listener/VolumeStateListener.java b/server/src/com/cloud/storage/listener/VolumeStateListener.java
index 9fd1423..9a739ba 100644
--- a/server/src/com/cloud/storage/listener/VolumeStateListener.java
+++ b/server/src/com/cloud/storage/listener/VolumeStateListener.java
@@ -82,7 +82,7 @@ public class VolumeStateListener implements StateListener<State, Event,
Volume>
               UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE, vol.getAccountId(),
vol.getDataCenterId(), vol.getId(), vol.getName(), vol.getDiskOfferingId(), null, vol.getSize(),
                       Volume.class.getName(), vol.getUuid(), vol.isDisplayVolume());
             }
-          } else if (transition.getToState() == State.Destroy) {
+          } else if (transition.getToState() == State.Destroy && vol.getVolumeType()
!= Volume.Type.ROOT) { //Do not Publish Usage Event for ROOT Disk as it would have been published
already while destroying a VM
             UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_DELETE, vol.getAccountId(),
vol.getDataCenterId(), vol.getId(), vol.getName(),
                     Volume.class.getName(), vol.getUuid(), vol.isDisplayVolume());
           } else if (transition.getToState() == State.Uploaded) {


Mime
View raw message