You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Nitin Mehta (JIRA)" <ji...@apache.org> on 2013/06/12 11:20:20 UTC

[jira] [Updated] (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:all-tabpanel ]

Nitin Mehta updated CLOUDSTACK-2689:
------------------------------------

    Assignee: Nitin Mehta
    
> 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
>            Assignee: 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