[Starlingx-discuss] Delete snapshot and volume
Michel Thebeau
michel.thebeau at windriver.com
Wed Oct 17 17:15:11 UTC 2018
Hi José,
Thanks for the nova boot command. I see that "nova boot --snapshot"
also creates a new volume and launches the instance from the new
volume. I agree that the snapshot is not in use by the instance. The
"openstack server show" and "nova show" commands list the new volume
created.
M
On 2018-10-17 12:48 p.m., Perez Carranza, Jose wrote:
> I was able to delete the snapshot even when 2 instances were launched from there following below steps:
>
> ===
> $ openstack image create --disk-format qcow2 --file /home/wrsroot/cirros-
> 0.4.0-x86_64-disk.img --public cirros
> $ openstack volume create --image cirros --availability-zone nova --size 1
> cirros-vol
> $ openstack volume snapshot create --name cirros-snap cirros-vol
> $ nova boot --flavor <flavor> --snapshot <snapshot-id> --nic net-id=<net_id> <instance-name>
> $ openstack snapshot delete cirros-snap
> ===
>
> So seems like the snapshot is not directly linked to the instance created.
>
> Regards,
> José
>
>
>> -----Original Message-----
>> From: Michel Thebeau [mailto:michel.thebeau at windriver.com]
>> Sent: Wednesday, October 17, 2018 11:22 AM
>> To: Alonso, Juan Carlos <juan.carlos.alonso at intel.com>; 'starlingx-
>> discuss at lists.starlingx.io' <starlingx-discuss at lists.starlingx.io>
>> Subject: Re: [Starlingx-discuss] Delete snapshot and volume
>>
>> Hi Juan Carlos,
>>
>> I had inquired internally at WR.
>>
>> My current understanding is that one does not "launch an instance from a
>> volume snapshot", except in the form presented by Horizon interface. In that
>> case, the behaviour of Horizon form is to create a volume from volume
>> snapshot and launch the instance from the new volume.
>>
>> In your email you listed CLI commands and the command you listed showed
>> that you launched the instance from volume, not from volume snapshot. So
>> there's no reason to believe the volume snapshot should be locked from
>> deletion.
>>
>> Moreover, it doesn't make sense for an instance to run from a volume
>> snapshot - that's not what a snapshot is. The snapshot itself should be a static
>> thing. You could probably have used the "openstack volume create --snapshot
>> ..." command option to create a volume from volume snapshot, and then
>> launch an instance from the new volume. The volume snapshot in this case
>> would not be locked from deletion, neither the original volume from which
>> the snapshot was based, but only the new volume you created.
>>
>> I hope this information is accurate and helpful :) I'll forward the response to
>> the guys I inquired with, and they can correct me here if anything I wrote is
>> amiss.
>>
>> M
>>
>>
>>
>> On 2018-10-17 11:47 a.m., Alonso, Juan Carlos wrote:
>>> Hello,
>>>
>>> Does anybody has faced the same behavior?
>>> I am wondering if it is possible to delete a snapshot, or not, when an instance
>> is up and running.
>>> In my site, I could, but need to know if this is correct or not.
>>>
>>> Regards.
>>> Juan Carlos Alonso
>>>
>>> From: Alonso, Juan Carlos
>>> Sent: Tuesday, October 16, 2018 3:14 PM
>>> To: starlingx-discuss at lists.starlingx.io
>>> Subject: [Starlingx-discuss] Delete snapshot and volume
>>>
>>> Hi,
>>>
>>> The test 211[1] indicates that an Image should be created, then a Volume
>> should be created from the image, then a Snapshot should be created from
>> the Volume and finally an Instance should be launch from the Snapshot.
>>> The test indicates that we try to delete the Snapshot and Volume while the
>> Instance is running, Snapshot nor Volume cannot be deleted.
>>> But when tried found that the Snapshot can be deleted, but the Volume
>> cannot.
>>> Is this behavior correct?
>>>
>>> Those are the commands I used:
>>>
>>> openstack image create --disk-format qcow2 --file /home/wrsroot/cirros-
>> 0.4.0-x86_64-disk.img --public cirros
>>> openstack volume create --image cirros --availability-zone nova --size 1
>> cirros-vol
>>> openstack volume snapshot create --name cirros-snap cirros-vol
>>> openstack server create --volume cirros-vol --flavor m1.small --availibility-
>> zone nova vm-cirros
>>>
>>> 1
>> https://wiki.openstack.org/wiki/StarlingX/stx.2018.10_Testplan_Instructions
>>> Regards.
>>> Juan Carlos Alonso
>>>
>>>
>>> _______________________________________________
>>> Starlingx-discuss mailing list
>>> Starlingx-discuss at lists.starlingx.io
>>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
>>
>> _______________________________________________
>> Starlingx-discuss mailing list
>> Starlingx-discuss at lists.starlingx.io
>> http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
More information about the Starlingx-discuss
mailing list