|
24 | 24 | import javax.inject.Inject; |
25 | 25 |
|
26 | 26 | import com.cloud.storage.Snapshot; |
| 27 | +import com.cloud.storage.Volume; |
27 | 28 | import com.cloud.utils.fsm.NoTransitionException; |
28 | 29 | import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; |
29 | 30 | import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; |
30 | 31 | import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; |
31 | 32 | import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; |
32 | 33 | import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; |
33 | 34 | import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; |
| 35 | +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; |
34 | 36 | import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao; |
35 | 37 | import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO; |
36 | 38 | import org.apache.commons.collections.CollectionUtils; |
@@ -209,6 +211,8 @@ public void updateOperationFailed(long snapshotId) throws NoTransitionException |
209 | 211 | for (SnapshotDataStoreVO snapshotStoreRef : snapshotStoreRefs) { |
210 | 212 | SnapshotInfo snapshotInfo = getSnapshot(snapshotStoreRef.getSnapshotId(), snapshotStoreRef.getDataStoreId(), snapshotStoreRef.getRole()); |
211 | 213 | if (snapshotInfo != null) { |
| 214 | + VolumeInfo volumeInfo = snapshotInfo.getBaseVolume(); |
| 215 | + volumeInfo.stateTransit(Volume.Event.OperationFailed); |
212 | 216 | ((SnapshotObject)snapshotInfo).processEvent(Snapshot.Event.OperationFailed); |
213 | 217 | snapshotInfo.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed); |
214 | 218 | } |
|
0 commit comments