Thanks, Chris So, ideally, I would write a snapshot strategy and interrogate in the incoming volume, make sure it's one of mine, then return that I can handle reverting.
If it's not one of mine, I can run the default logic that's provided from the class my strategy extends. Sounds about right? On Thu, Aug 28, 2014 at 1:42 PM, Chris Suich <csui...@gmail.com> wrote: > Hey Mike - I can provide a bit of background here. When working on my > snapshot strategy, we knew that reverting single volumes was possible, but > recognized that it may not be for all storage vendors or hypervisors (since > hypervisors essentially have their own snapshot strategy). Additionally, > some hypervisors (such as XenServer, IIRC) do not recommend reverting > individual volumes, although it is possible - they recommend making a new > volume from the snapshot and replacing the old volume with the new one. > > The revert button will only show up if the snapshot strategy reports that > it can handle reverting the volume. > > > On Thu, Aug 28, 2014 at 2:20 AM, Mike Tutkowski < > mike.tutkow...@solidfire.com> wrote: > > > For those who are interested in this, it appears you have to write a > > SnapshotStrategy implementation and override the canHandle method (this > is > > the default implementation, which is provided by the > > XenserverSnapshotStrategy class): > > > > @Override > > > > public StrategyPriority canHandle(Snapshot snapshot, > SnapshotOperation > > op) { > > > > if (op == SnapshotOperation.REVERT) { > > > > return StrategyPriority.CANT_HANDLE; > > > > } > > > > > > return StrategyPriority.DEFAULT; > > > > } > > > > That being the case, the revert button won't show up under "standard" > > operation. > > > > > > On Thu, Aug 28, 2014 at 12:12 AM, Mike Tutkowski < > > mike.tutkow...@solidfire.com> wrote: > > > > > Actually, it looks like you can revert a volume to a snapshot, if the > > > underlying storage supports such an operation. > > > > > > I hadn't been explicitly setting this "revertable" field and it appears > > to > > > default to "false" and the GUI then doesn't show the button. > > > > > > > > > On Wed, Aug 27, 2014 at 11:55 PM, Mike Tutkowski < > > > mike.tutkow...@solidfire.com> wrote: > > > > > >> Hi, > > >> > > >> Under the Storage tab in the GUI, we can take a snapshot of a volume > > >> (assuming the underlying storage plug-in supports that operation). > > >> > > >> When I examine the options of the created snapshots, I see the > snapshot > > >> can be deleted (as you'd expect), but I don't see a "revert volume to > > >> snapshot" option. > > >> > > >> Can someone tell me what the history is behind that? Is it intentional > > >> that the only way a volume snapshot (really a backup) can be utilized > > is by > > >> creating a template or a volume from it? > > >> > > >> Thanks! > > >> > > >> -- > > >> *Mike Tutkowski* > > >> *Senior CloudStack Developer, SolidFire Inc.* > > >> e: mike.tutkow...@solidfire.com > > >> o: 303.746.7302 > > >> Advancing the way the world uses the cloud > > >> <http://solidfire.com/solution/overview/?video=play>*(tm)* > > >> > > > > > > > > > > > > -- > > > *Mike Tutkowski* > > > *Senior CloudStack Developer, SolidFire Inc.* > > > e: mike.tutkow...@solidfire.com > > > o: 303.746.7302 > > > Advancing the way the world uses the cloud > > > <http://solidfire.com/solution/overview/?video=play>*(tm)* > > > > > > > > > > > -- > > *Mike Tutkowski* > > *Senior CloudStack Developer, SolidFire Inc.* > > e: mike.tutkow...@solidfire.com > > o: 303.746.7302 > > Advancing the way the world uses the cloud > > <http://solidfire.com/solution/overview/?video=play>*(tm)* > > > > > > -- > Chris Suich > 919-334-8193 > csui...@gmail.com > -- *Mike Tutkowski* *Senior CloudStack Developer, SolidFire Inc.* e: mike.tutkow...@solidfire.com o: 303.746.7302 Advancing the way the world uses the cloud <http://solidfire.com/solution/overview/?video=play>*™*