You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by deepti dohare <de...@citrix.com> on 2012/10/15 08:48:09 UTC

Review Request: Snapshot errors with multiple secondary storage in one zone.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/
-----------------------------------------------------------

Review request for cloudstack, Nitin Mehta and anthony xu.


Description
-------

Fixed CS-16263
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


This addresses bug CS-16263.


Diffs
-----

  api/src/com/cloud/agent/api/BackupSnapshotCommand.java 9476d7d 
  plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java d2db85c 
  scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8 
  server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java d89a6d9 

Diff: https://reviews.apache.org/r/7594/diff/


Testing
-------

Tested for following cases:
1. Snapshot Creation: 
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation: 
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2. 
Verified: Secondary mount point successfully created on Host-2.  
 


Thanks,

deepti dohare


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Sateesh Chodapuneedi <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review16630
-----------------------------------------------------------



api/src/com/cloud/agent/api/BackupSnapshotCommand.java
<https://reviews.apache.org/r/7594/#comment35303>

    prefix the private variable with _


- Sateesh Chodapuneedi


On Feb. 15, 2013, 6:31 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2013, 6:31 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7836b6d 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 22f4ba9 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java e06da75 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Chip Childers <ch...@sungard.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review17937
-----------------------------------------------------------

Ship it!


I applied this to master.

- Chip Childers


On Feb. 27, 2013, 9:29 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2013, 9:29 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7100497 
>   engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java cfd9f40 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 4a89806 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


RE: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Animesh Chaturvedi <an...@citrix.com>.
Please commit the patch

> -----Original Message-----
> From: anthony xu [mailto:noreply@reviews.apache.org] On Behalf Of
> anthony xu
> Sent: Thursday, March 14, 2013 11:49 AM
> To: Anthony Xu
> Cc: cloudstack; Deepti Dohare
> Subject: Re: Review Request: CLOUDSTACK-356 Snapshot errors with
> multiple secondary storage in one zone.
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/#review17902
> -----------------------------------------------------------
> 
> Ship it!
> 
> 
> Ship It!
> 
> - anthony xu
> 
> 
> On Feb. 27, 2013, 9:29 a.m., deepti dohare wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/7594/
> > -----------------------------------------------------------
> >
> > (Updated Feb. 27, 2013, 9:29 a.m.)
> >
> >
> > Review request for cloudstack and anthony xu.
> >
> >
> > Description
> > -------
> >
> > Fixed CLOUDSTACK-356
> > The issue is happening because of the multiple secondary storages, the
> secondary storage which is used first is getting mounted on the host resulting
> in failure of other snapshot using different secondary storage as it is not
> getting mounted on the host.
> > For eg:
> > 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage
> (sec1) is mounted on local path “/var/run/sr-mount/ on the host.
> > 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd,
> the secondary storage is mounted at mount path
> “/var/run/cloud_mount/dc_id/snapshots”.
> > 3. If other snapshot (for different volume) is created on different
> secondary storage (sec2), sec2 is not getting mounted on
> "/var/run/cloud_mount/dc_id/snapshots" path.
> >
> > The fix is to mount other secondary storages as well on the host. The local
> mount path in vmopsSnapshot.py is modified, instead of mounting on
> “/var/run/cloud_mount/dc_id/snapshots”,
> “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> >
> >
> > This addresses bug CLOUDSTACK-356.
> >
> >
> > Diffs
> > -----
> >
> >   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7
> >
> api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest
> .java ede86e9
> >
> api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandT
> est.java 7100497
> >
> engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMo
> tionStrategy.java cfd9f40
> >
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixReso
> urceBase.java 4a89806
> >   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18
> >   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e
> >
> > Diff: https://reviews.apache.org/r/7594/diff/
> >
> >
> > Testing
> > -------
> >
> > Tested for following cases:
> > 1. Snapshot Creation:
> > Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume
> ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> > Verified: multiple secondary storages are getting mounted on host.
> > Snapshots creation successful 2. Template Creation:
> > Verified: templates successfully created from the above snapshots 3.
> > Volume creation:
> > Verified: volumes successfully created from the above snapshots 4. VM
> > Migration Migrate i-1  from Host-1 to Host-2.
> > Verified: Secondary mount point successfully created on Host-2.
> >
> >
> >
> > Thanks,
> >
> > deepti dohare
> >
> >


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by anthony xu <an...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review17902
-----------------------------------------------------------

Ship it!


Ship It!

- anthony xu


On Feb. 27, 2013, 9:29 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2013, 9:29 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7100497 
>   engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java cfd9f40 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 4a89806 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


RE: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Animesh Chaturvedi <an...@citrix.com>.
Anthony can you review and submit the patch if satisfied

Animesh

> -----Original Message-----
> From: deepti dohare [mailto:noreply@reviews.apache.org] On Behalf Of
> deepti dohare
> Sent: Wednesday, February 27, 2013 1:30 AM
> To: Anthony Xu
> Cc: David Nalley; Nitin Mehta; Deepti Dohare; Sateesh Chodapuneedi;
> cloudstack; Min Chen
> Subject: Re: Review Request: CLOUDSTACK-356 Snapshot errors with
> multiple secondary storage in one zone.
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2013, 9:29 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Changes
> -------
> 
> Resolved Conflicts.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the
> secondary storage which is used first is getting mounted on the host resulting
> in failure of other snapshot using different secondary storage as it is not
> getting mounted on the host.
> 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage
> (sec1) is mounted on local path “/var/run/sr-mount/ on the host.
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd,
> the secondary storage is mounted at mount path
> “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary
> storage (sec2), sec2 is not getting mounted on
> "/var/run/cloud_mount/dc_id/snapshots" path.
> 
> The fix is to mount other secondary storages as well on the host. The local
> mount path in vmopsSnapshot.py is modified, instead of mounting on
> “/var/run/cloud_mount/dc_id/snapshots”,
> “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs (updated)
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7
> 
> api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest
> .java ede86e9
> 
> api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandT
> est.java 7100497
> 
> engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMo
> tionStrategy.java cfd9f40
> 
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixReso
> urceBase.java 4a89806
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation:
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume
> ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host.
> Snapshots creation successful 2. Template Creation:
> Verified: templates successfully created from the above snapshots 3.
> Volume creation:
> Verified: volumes successfully created from the above snapshots 4. VM
> Migration Migrate i-1  from Host-1 to Host-2.
> Verified: Secondary mount point successfully created on Host-2.
> 
> 
> 
> Thanks,
> 
> deepti dohare


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/
-----------------------------------------------------------

(Updated Feb. 27, 2013, 9:29 a.m.)


Review request for cloudstack and anthony xu.


Changes
-------

Resolved Conflicts. 


Description
-------

Fixed CLOUDSTACK-356
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


This addresses bug CLOUDSTACK-356.


Diffs (updated)
-----

  api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
  api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
  api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7100497 
  engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java cfd9f40 
  plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 4a89806 
  scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
  scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 

Diff: https://reviews.apache.org/r/7594/diff/


Testing
-------

Tested for following cases:
1. Snapshot Creation: 
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation: 
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2. 
Verified: Secondary mount point successfully created on Host-2.  
 


Thanks,

deepti dohare


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Nitin Mehta <Ni...@citrix.com>.
Deepti – Please find answers inline.

Only thing you need to fix is #2 below.

From: Deepti Dohare <de...@citrix.com>>
Reply-To: Deepti Dohare <de...@citrix.com>>
To: Anthony Xu <Xu...@citrix.com>>
Cc: "cloudstack-dev@incubator.apache.org<ma...@incubator.apache.org>" <cl...@incubator.apache.org>>, Deepti Dohare <de...@citrix.com>>, Nitin Mehta <ni...@citrix.com>>
Subject: Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7594/


On February 15th, 2013, 7:08 a.m., Nitin Mehta wrote:

#1 Fixing the path will potentially break the migration path. So you need to correct the sec. storage id for snapshots otherwise the user wont be able to restore the vm from the snapshot which is not good. This can be a very tricky problem to solve. But you need to fix it.
#2 I would advise you not to include the dc_id in the path. Since sec host id would be unique for the cloud.
#3 I am not completely convinced that this fix solves the problem. I know there is a bug of multiple sec. storage not having paths on the host and should be fixed but your example doesn't seem right to me.

1. I tested the patch for migration of VMs and it was working fine. Secondary mount point was successfully created on the destination host. Can you tell me the scenario where migration will fail, since the explanation is not clear to me. Or Do you mean migration from an older version of cloudstack to newer version. If so, this patch will work, since CloudStack will mount the secondary storage in the new mount point, and will get the parent vhd for snapshots.

I was talking CS migration and I think you need to paste the example of first snapshot being a different path and 2nd snapshot having a different path mounted. That makes it clear so this is not an issue here.


2. dc_id is there in the existing code of CloudStack. Are you saying instead of mount path:/var/run/cloud_mount/dc_id/snapshots/secHostid, /var/run/cloud_mount/secHostid/snapshots/ should be used. How will removing dc_id will help? dc_id with secondary storage id is also unique

How will keeping dc_id help ? To me this is a useless value with no significance bcz secondary id is unique by itself.



3. Can you please elaborate more on the 3rd point.

#3 is the same is #1 so that is clear. Just fix #2

- deepti


On February 15th, 2013, 6:31 a.m., deepti dohare wrote:

Review request for cloudstack and anthony xu.
By deepti dohare.

Updated Feb. 15, 2013, 6:31 a.m.

Description

Fixed CLOUDSTACK-356
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host.
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host.
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.



Testing

Tested for following cases:
1. Snapshot Creation:
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation:
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2.
Verified: Secondary mount point successfully created on Host-2.




Bugs: CLOUDSTACK-356
Diffs

 *   api/src/com/cloud/agent/api/BackupSnapshotCommand.java (a0ac8d7)
 *   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java (ede86e9)
 *   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java (7836b6d)
 *   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java (22f4ba9)
 *   scripts/vm/hypervisor/xenserver/vmopsSnapshot (6fb1b18)
 *   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot (f7b2e0e)
 *   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java (e06da75)

View Diff<https://reviews.apache.org/r/7594/diff/>


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by deepti dohare <de...@citrix.com>.

> On Feb. 15, 2013, 7:08 a.m., Nitin Mehta wrote:
> > #1 Fixing the path will potentially break the migration path. So you need to correct the sec. storage id for snapshots otherwise the user wont be able to restore the vm from the snapshot which is not good. This can be a very tricky problem to solve. But you need to fix it.
> > #2 I would advise you not to include the dc_id in the path. Since sec host id would be unique for the cloud.
> > #3 I am not completely convinced that this fix solves the problem. I know there is a bug of multiple sec. storage not having paths on the host and should be fixed but your example doesn't seem right to me.

1. I tested the patch for migration of VMs and it was working fine. Secondary mount point was successfully created on the destination host. Can you tell me the scenario where migration will fail, since the explanation is not clear to me. Or Do you mean migration from an older version of cloudstack to newer version. If so, this patch will work, since CloudStack will mount the secondary storage in the new mount point, and will get the parent vhd for snapshots.
2. dc_id is there in the existing code of CloudStack. Are you saying instead of mount path:/var/run/cloud_mount/dc_id/snapshots/secHostid, /var/run/cloud_mount/secHostid/snapshots/ should be used. How will removing dc_id will help? dc_id with secondary storage id is also unique
3. Can you please elaborate more on the 3rd point.


- deepti


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review16631
-----------------------------------------------------------


On Feb. 15, 2013, 6:31 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2013, 6:31 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7836b6d 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 22f4ba9 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java e06da75 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Nitin Mehta <ni...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review16631
-----------------------------------------------------------


#1 Fixing the path will potentially break the migration path. So you need to correct the sec. storage id for snapshots otherwise the user wont be able to restore the vm from the snapshot which is not good. This can be a very tricky problem to solve. But you need to fix it.
#2 I would advise you not to include the dc_id in the path. Since sec host id would be unique for the cloud.
#3 I am not completely convinced that this fix solves the problem. I know there is a bug of multiple sec. storage not having paths on the host and should be fixed but your example doesn't seem right to me. 

- Nitin Mehta


On Feb. 15, 2013, 6:31 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2013, 6:31 a.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
>   api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7836b6d 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 22f4ba9 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java e06da75 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/
-----------------------------------------------------------

(Updated Feb. 15, 2013, 6:31 a.m.)


Review request for cloudstack and anthony xu.


Changes
-------

Updating the patch (resolved trailing white spaces). The fix is for XenServer, I will create separate issue and investigate for Vmware and KVM as well.


Description
-------

Fixed CLOUDSTACK-356
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


This addresses bug CLOUDSTACK-356.


Diffs (updated)
-----

  api/src/com/cloud/agent/api/BackupSnapshotCommand.java a0ac8d7 
  api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java ede86e9 
  api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java 7836b6d 
  plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 22f4ba9 
  scripts/vm/hypervisor/xenserver/vmopsSnapshot 6fb1b18 
  scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
  server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java e06da75 

Diff: https://reviews.apache.org/r/7594/diff/


Testing
-------

Tested for following cases:
1. Snapshot Creation: 
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation: 
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2. 
Verified: Secondary mount point successfully created on Host-2.  
 


Thanks,

deepti dohare


RE: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Animesh Chaturvedi <an...@citrix.com>.
Deepti please respond tp Min's comment

> -----Original Message-----
> From: Min Chen [mailto:noreply@reviews.apache.org] On Behalf Of Min Chen
> Sent: Wednesday, February 13, 2013 1:57 PM
> To: Anthony Xu
> Cc: cloudstack; Min Chen; Deepti Dohare
> Subject: Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple
> secondary storage in one zone.
> 
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/#review16534
> -----------------------------------------------------------
> 
> 
> The fix for XenServer looks good. But I didn't see any change on other
> hypervisor like Vmware and KVM. Since BackupSnapshotCommand is also used
> in other hypervisor, what behavior will we see there?
> 
> - Min Chen
> 
> 
> On Jan. 8, 2013, 12:09 p.m., deepti dohare wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/7594/
> > -----------------------------------------------------------
> >
> > (Updated Jan. 8, 2013, 12:09 p.m.)
> >
> >
> > Review request for cloudstack and anthony xu.
> >
> >
> > Description
> > -------
> >
> > Fixed CLOUDSTACK-356
> > The issue is happening because of the multiple secondary storages, the
> secondary storage which is used first is getting mounted on the host resulting in
> failure of other snapshot using different secondary storage as it is not getting
> mounted on the host.
> > For eg:
> > 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage
> (sec1) is mounted on local path “/var/run/sr-mount/ on the host.
> > 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd,
> the secondary storage is mounted at mount path
> “/var/run/cloud_mount/dc_id/snapshots”.
> > 3. If other snapshot (for different volume) is created on different secondary
> storage (sec2), sec2 is not getting mounted on
> "/var/run/cloud_mount/dc_id/snapshots" path.
> >
> > The fix is to mount other secondary storages as well on the host. The local
> mount path in vmopsSnapshot.py is modified, instead of mounting on
> “/var/run/cloud_mount/dc_id/snapshots”,
> “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> >
> >
> > This addresses bug CLOUDSTACK-356.
> >
> >
> > Diffs
> > -----
> >
> >   api/src/com/cloud/agent/api/BackupSnapshotCommand.java 7ea7835
> >   api/test/src/com/cloud/agent/api/test/BackupSnapshotAnswerTest.java
> b3f2847
> >   api/test/src/com/cloud/agent/api/test/BackupSnapshotCommandTest.java
> a624148
> >
> plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourc
> eBase.java 36a12b1
> >   scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8
> >   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e
> >   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
> > 7ab464b
> >
> > Diff: https://reviews.apache.org/r/7594/diff/
> >
> >
> > Testing
> > -------
> >
> > Tested for following cases:
> > 1. Snapshot Creation:
> > Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume
> ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> > Verified: multiple secondary storages are getting mounted on host.
> > Snapshots creation successful 2. Template Creation:
> > Verified: templates successfully created from the above snapshots 3.
> > Volume creation:
> > Verified: volumes successfully created from the above snapshots 4. VM
> > Migration Migrate i-1  from Host-1 to Host-2.
> > Verified: Secondary mount point successfully created on Host-2.
> >
> >
> >
> > Thanks,
> >
> > deepti dohare
> >
> >


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by Min Chen <mi...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review16534
-----------------------------------------------------------


The fix for XenServer looks good. But I didn't see any change on other hypervisor like Vmware and KVM. Since BackupSnapshotCommand is also used in other hypervisor, what behavior will we see there?

- Min Chen


On Jan. 8, 2013, 12:09 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Jan. 8, 2013, 12:09 p.m.)
> 
> 
> Review request for cloudstack and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CLOUDSTACK-356
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CLOUDSTACK-356.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java 7ea7835 
>   api/test/src/com/cloud/agent/api/test/BackupSnapshotAnswerTest.java b3f2847 
>   api/test/src/com/cloud/agent/api/test/BackupSnapshotCommandTest.java a624148 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 36a12b1 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8 
>   scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 7ab464b 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>


Re: Review Request: CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/
-----------------------------------------------------------

(Updated Jan. 8, 2013, 12:09 p.m.)


Review request for cloudstack and anthony xu.


Changes
-------

updating the patch.


Summary (updated)
-----------------

CLOUDSTACK-356 Snapshot errors with multiple secondary storage in one zone.


Description
-------

Fixed CLOUDSTACK-356
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


This addresses bug CLOUDSTACK-356.


Diffs (updated)
-----

  api/src/com/cloud/agent/api/BackupSnapshotCommand.java 7ea7835 
  api/test/src/com/cloud/agent/api/test/BackupSnapshotAnswerTest.java b3f2847 
  api/test/src/com/cloud/agent/api/test/BackupSnapshotCommandTest.java a624148 
  plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java 36a12b1 
  scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8 
  scripts/vm/hypervisor/xenserver/xcposs/vmopsSnapshot f7b2e0e 
  server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java 7ab464b 

Diff: https://reviews.apache.org/r/7594/diff/


Testing
-------

Tested for following cases:
1. Snapshot Creation: 
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation: 
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2. 
Verified: Secondary mount point successfully created on Host-2.  
 


Thanks,

deepti dohare


RE: Review Request: Snapshot errors with multiple secondary storage in one zone.

Posted by Deepti Dohare <de...@citrix.com>.
A gentle reminder!



- Thanks,
   Deepti

From: deepti dohare [mailto:noreply@reviews.apache.org] On Behalf Of deepti dohare
Sent: Tuesday, October 16, 2012 11:34 AM
To: Anthony Xu; Nitin Mehta
Cc: cloudstack; David Nalley; Deepti Dohare
Subject: Re: Review Request: Snapshot errors with multiple secondary storage in one zone.

This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7594/


Review request for cloudstack, Nitin Mehta and anthony xu.
By deepti dohare.

Updated Oct. 16, 2012, 6:04 a.m.

Changes

Created a ticket on issues.apache.org: https://issues.apache.org/jira/browse/CLOUDSTACK-356


Description (updated)

Fixed CLOUDSTACK-356

The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host.

For eg:

1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host.

2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.

3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.



The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


Testing

Tested for following cases:

1. Snapshot Creation:

Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.

Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful

2. Template Creation:

Verified: templates successfully created from the above snapshots

3. Volume creation:

Verified: volumes successfully created from the above snapshots

4. VM Migration

Migrate i-1  from Host-1 to Host-2.

Verified: Secondary mount point successfully created on Host-2.



Bugs: CLOUDSTACK-356
Diffs

 *   api/src/com/cloud/agent/api/BackupSnapshotCommand.java (9476d7d)
 *   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java (d2db85c)
 *   scripts/vm/hypervisor/xenserver/vmopsSnapshot (80e21f8)
 *   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java (d89a6d9)

View Diff<https://reviews.apache.org/r/7594/diff/>



Re: Review Request: Snapshot errors with multiple secondary storage in one zone.

Posted by deepti dohare <de...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/
-----------------------------------------------------------

(Updated Oct. 16, 2012, 6:04 a.m.)


Review request for cloudstack, Nitin Mehta and anthony xu.


Changes
-------

Created a ticket on issues.apache.org: https://issues.apache.org/jira/browse/CLOUDSTACK-356


Description (updated)
-------

Fixed CLOUDSTACK-356
The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
For eg:
1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              

The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.


This addresses bug CLOUDSTACK-356.


Diffs
-----

  api/src/com/cloud/agent/api/BackupSnapshotCommand.java 9476d7d 
  plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java d2db85c 
  scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8 
  server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java d89a6d9 

Diff: https://reviews.apache.org/r/7594/diff/


Testing
-------

Tested for following cases:
1. Snapshot Creation: 
Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
2. Template Creation: 
Verified: templates successfully created from the above snapshots
3. Volume creation:
Verified: volumes successfully created from the above snapshots
4. VM Migration
Migrate i-1  from Host-1 to Host-2. 
Verified: Secondary mount point successfully created on Host-2.  
 


Thanks,

deepti dohare


Re: Review Request: Snapshot errors with multiple secondary storage in one zone.

Posted by David Nalley <da...@gnsa.us>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7594/#review12438
-----------------------------------------------------------


Can you make sure this is a bug on issues.apache.org/jira - bugs.cs.o is deprecated from a pojrect standpoint. 

- David Nalley


On Oct. 15, 2012, 6:48 a.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7594/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2012, 6:48 a.m.)
> 
> 
> Review request for cloudstack, Nitin Mehta and anthony xu.
> 
> 
> Description
> -------
> 
> Fixed CS-16263
> The issue is happening because of the multiple secondary storages, the secondary storage which is used first is getting mounted on the host resulting in failure of other snapshot using different secondary storage as it is not getting mounted on the host. 
> For eg:
> 1. When first incremental snapshot (eg Ssec1-1) is taken, secondary storage (sec1) is mounted on local path “/var/run/sr-mount/ on the host. 
> 2. Second incremental snapshot (Ssec1-2) is created, to get the parent vhd, the secondary storage is mounted at mount path “/var/run/cloud_mount/dc_id/snapshots”.
> 3. If other snapshot (for different volume) is created on different secondary storage (sec2), sec2 is not getting mounted on "/var/run/cloud_mount/dc_id/snapshots" path.                              
> 
> The fix is to mount other secondary storages as well on the host. The local mount path in vmopsSnapshot.py is modified, instead of mounting on “/var/run/cloud_mount/dc_id/snapshots”, “/var/run/cloud_mount/dc_id/snapshots/secHostid” mount path is used.
> 
> 
> This addresses bug CS-16263.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/BackupSnapshotCommand.java 9476d7d 
>   plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java d2db85c 
>   scripts/vm/hypervisor/xenserver/vmopsSnapshot 80e21f8 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java d89a6d9 
> 
> Diff: https://reviews.apache.org/r/7594/diff/
> 
> 
> Testing
> -------
> 
> Tested for following cases:
> 1. Snapshot Creation: 
> Host 1 has a vm i-1, volume ROOT-1 DATA-1, Host 2 has a vm i-2, volume ROOT-2 DATA-2, Taken recurring snapshot for 4 volumes.
> Verified: multiple secondary storages are getting mounted on host. Snapshots creation successful
> 2. Template Creation: 
> Verified: templates successfully created from the above snapshots
> 3. Volume creation:
> Verified: volumes successfully created from the above snapshots
> 4. VM Migration
> Migrate i-1  from Host-1 to Host-2. 
> Verified: Secondary mount point successfully created on Host-2.  
>  
> 
> 
> Thanks,
> 
> deepti dohare
> 
>