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

2014-12-18 Thread Chris St. Pierre
eds to track the original >> state of protected flag, image id and use count. 3 column table and >> couple of API calls. Lets not at least make it any more complicated >> than it needs to be if such functionality is desired.____ >> >> __ __ >> >> __-__Ern

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

2014-12-18 Thread Jay Pipes
lto: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 a implementation deta

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

2014-12-18 Thread Chris St. Pierre
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 a implementation

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

2014-12-18 Thread Kuvaja, Erno
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 tha

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

2014-12-17 Thread Nikhil Komawar
iling 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 assuming too much? On Wed, Dec 17, 2014 at 11:59 AM,

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

2014-12-17 Thread Chris St. Pierre
t. 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. Yo

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 case

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 i

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 wrote: > On Tue, Dec 16, 2014 at 05:12:31PM EST, Chris St. Pierre wrote: >> No, I'

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 v

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

2014-12-16 Thread Nikhil Komawar
Stack 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

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 wrote: > Hi Chris, > > Are you looking for the 'protected' attribute? You can mark an image with > 'protected'=True, then the image ca

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 execute

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 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 p

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, b

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 c

[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