Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-18 Thread Kuvaja, Erno
to be if such functionality is desired. - Erno From: Nikhil Komawar [mailto:nikhil.koma...@rackspace.com] Sent: 17 December 2014 20:34 To: OpenStack Development Mailing List (not for usage questions) Subject: Re: [openstack-dev] [glance] Option to skip deleting images in use? Guess that's

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-18 Thread Chris St. Pierre
, December 17, 2014 2:07 PM *To:* OpenStack Development Mailing List (not for usage questions) *Subject:* Re: [openstack-dev] [glance] Option to skip deleting images in use? I was assuming atomic increment/decrement operations, in which case I'm not sure I see the race conditions. Or is atomism

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-18 Thread Jay Pipes
*To:* OpenStack Development Mailing List (not for usage questions) *Subject:* Re: [openstack-dev] [glance] Option to skip deleting images in use? __ __ Guess that's a implementation detail. Depends on the way you go about using what's available now, I suppose

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-18 Thread Chris St. Pierre
Mailing List (not for usage questions) *Subject:* Re: [openstack-dev] [glance] Option to skip deleting images in use? __ __ Guess that's a implementation detail. Depends on the way you go about using what's available now, I suppose. __ __ Thanks

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-17 Thread Chris St. Pierre
That's unfortunately too simple. You run into one of two cases: 1. If the job automatically removes the protected attribute when an image is no longer in use, then you lose the ability to use protected on images that are not in use. I.e., there's no way to say, nothing is currently using this

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-17 Thread Nikhil Komawar
: Chris St. Pierre [chris.a.st.pie...@gmail.com] Sent: Wednesday, December 17, 2014 10:23 AM To: OpenStack Development Mailing List (not for usage questions) Subject: Re: [openstack-dev] [glance] Option to skip deleting images in use? That's unfortunately too simple. You run into one of two cases: 1

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-17 Thread Chris St. Pierre
:* Wednesday, December 17, 2014 10:23 AM *To:* OpenStack Development Mailing List (not for usage questions) *Subject:* Re: [openstack-dev] [glance] Option to skip deleting images in use? That's unfortunately too simple. You run into one of two cases: 1. If the job automatically removes the protected

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-17 Thread Nikhil Komawar
(not for usage questions) Subject: Re: [openstack-dev] [glance] Option to skip deleting images in use? I was assuming atomic increment/decrement operations, in which case I'm not sure I see the race conditions. Or is atomism assuming too much? On Wed, Dec 17, 2014 at 11:59 AM, Nikhil Komawar

[openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Chris St. Pierre
Currently, with delay_delete enabled, the Glance scrubber happily deletes whatever images you ask it to. That includes images that are currently in use by Nova guests, which can really hose things. It'd be nice to have an option to tell the scrubber to skip deletion of images that are currently in

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Jay Pipes
Just set the images to is_public=False as an admin and they'll disappear from everyone except the admin. -jay On 12/16/2014 03:09 PM, Chris St. Pierre wrote: Currently, with delay_delete enabled, the Glance scrubber happily deletes whatever images you ask it to. That includes images that are

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Chris St. Pierre
The goal here is protection against deletion of in-use images, not a workaround that can be executed by an admin. For instance, someone without admin still can't do that, and someone with a fat finger can still delete images in use. Don't lose your data is a fine workaround for taking backups,

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Jay Pipes
On 12/16/2014 04:23 PM, Chris St. Pierre wrote: The goal here is protection against deletion of in-use images, not a workaround that can be executed by an admin. For instance, someone without admin still can't do that, and someone with a fat finger can still delete images in use. Then set the

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Nikhil Komawar
+1 Thanks, -Nikhil From: Jay Pipes [jaypi...@gmail.com] Sent: Tuesday, December 16, 2014 4:33 PM To: openstack-dev@lists.openstack.org Subject: Re: [openstack-dev] [glance] Option to skip deleting images in use? On 12/16/2014 04:23 PM, Chris St. Pierre

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Fei Long Wang
Hi Chris, Are you looking for the 'protected' attribute? You can mark an image with 'protected'=True, then the image can't be deleted by accidentally. On 17/12/14 10:23, Chris St. Pierre wrote: The goal here is protection against deletion of in-use images, not a workaround that can be

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Chris St. Pierre
No, I'm looking to prevent images that are in use from being deleted. In use and protected are disjoint sets. On Tue, Dec 16, 2014 at 3:36 PM, Fei Long Wang feil...@catalyst.net.nz wrote: Hi Chris, Are you looking for the 'protected' attribute? You can mark an image with 'protected'=True,

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Nikhil Komawar
Development Mailing List (not for usage questions) Subject: Re: [openstack-dev] [glance] Option to skip deleting images in use? No, I'm looking to prevent images that are in use from being deleted. In use and protected are disjoint sets. On Tue, Dec 16, 2014 at 3:36 PM, Fei Long Wang feil

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Collins, Sean
On Tue, Dec 16, 2014 at 05:12:31PM EST, Chris St. Pierre wrote: No, I'm looking to prevent images that are in use from being deleted. In use and protected are disjoint sets. I have seen multiple cases of images (and snapshots) being deleted while still in use in Nova, which leads to some very,

Re: [openstack-dev] [glance] Option to skip deleting images in use?

2014-12-16 Thread Vishvananda Ishaya
A simple solution that wouldn’t require modification of glance would be a cron job that lists images and snapshots and marks them protected while they are in use. Vish On Dec 16, 2014, at 3:19 PM, Collins, Sean sean_colli...@cable.comcast.com wrote: On Tue, Dec 16, 2014 at 05:12:31PM EST,