You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/05/27 10:51:20 UTC

[jira] [Commented] (CLOUDSTACK-2689) Create volume after upgrade from snapshot taken in 2.2.14 deletes the snapshot physically from sec. storage.

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667639#comment-13667639 ] 

ASF subversion and git services commented on CLOUDSTACK-2689:
-------------------------------------------------------------

Commit a688d631047ae7dc70a4c4d8c5330dec1dc1cd95 in branch refs/heads/master from [~nitinme]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=a688d63 ]

CLOUDSTACK-2689
Create volume after upgrade from snapshot taken in 2.2.14 deletes the snapshot physically from sec. storage. Added DB upgrade sql to make swift_id NULL if they are set to 0

                
> Create volume after upgrade from snapshot taken in 2.2.14 deletes the snapshot physically from sec. storage.
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2689
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2689
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Nitin Mehta
>
> In pre 3.0 release for any install be it fresh or upgraded the swift_id is 0 bcz the swift_id is long and not the Java object Long and so by default gets set to 0 instead of NULL in the DB. Now the code assumes that the snapshot is present in swift and can be deleted from sec. storage after any operation on the snapshot by checking the condition snapshot.getSwiftId() != null.It should have checked for snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0.
> Why this not an issue in fresh installs for 3.0 series ?
> I think in 3.0 we added all the code for swift.
> There was also a code change for Action which made swift_id as JAVA Long and so for fresh installs in 3.0 series swift_id was NULL in the DB by default and hence these operations succeeded without deleting snapshot physically from sec. storage. But for any upgraded version from 2.2.8 onwards (when swift_id got first introduced) this would be 0 and since we check only for SwiftId() != null we will delete the snapshot from sec. storage.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira