Skip to content
Browse files

move commit on delete to the right place

  • Loading branch information...
1 parent c3dda5c commit 27f37b0b5b88841a3780aca70bfd6f3efcd878c6 @grze grze committed
View
2 clc/modules/cluster-manager/src/main/java/com/eucalyptus/blockstorage/VolumeManager.java
@@ -385,12 +385,12 @@ public DetachVolumeResponseType detach( DetachVolumeType request ) throws Eucaly
EntityWrapper<Volume> db = EntityWrapper.get( Volume.class );
try {
vol = db.getUnique( Volume.named( ctx.getUserFullName( ).asAccountFullName( ), request.getVolumeId( ) ) );
+ db.commit( );
} catch ( EucalyptusCloudException e ) {
LOG.debug( e, e );
db.rollback( );
throw new EucalyptusCloudException( "Volume does not exist: " + request.getVolumeId( ) );
}
- db.commit( );
if ( !RestrictedTypes.filterPrivileged( ).apply( vol ) ) {
throw new EucalyptusCloudException( "Not authorized to detach volume " + request.getVolumeId( ) + " by " + ctx.getUser( ).getName( ) );
}

0 comments on commit 27f37b0

Please sign in to comment.
Something went wrong with that request. Please try again.