Monday, 2021-06-21

rosmaitadansmith: around?13:12
dansmithyup13:26
dansmithrosmaita: sorry I see I missed a ping in a meeting just now13:30
rosmaitadansmith: np, Luzi had a question, but she put it on the agenda for the glance meeting on thursday13:31
dansmithrosmaita: okay, can we discuss in either of the reviews?13:31
rosmaitadansmith: probably, here's what the issue is: https://meetings.opendev.org/meetings/image_encryption/2021/image_encryption.2021-06-21-13.00.log.html#l-2113:34
dansmithokay where's the non-lite spec?13:36
rosmaitahttps://specs.openstack.org/openstack/glance-specs/specs/victoria/approved/glance/image-encryption.html13:36
dansmithright, okay, but this lite spec is specifically about the interaction between glance and barbican right?13:38
dansmithmy comments about what to do in the error path relate more specifically to that part itself13:38
rosmaitawell, the spec-lite is to decouple the barbican part from the glance part13:38
rosmaitaand go ahead and do the glance part first13:39
dansmithwell, right, but that's where we get into the problem of allowing it to be so decoupled that we may (as the user expects) or may not have told barbican that a key is in use13:40
rosmaitayeah, the spec-lite is basically how to do this without having the ability to tell barbican a key is in use13:40
rosmaitabecause even with a key registered as in use, the owner can still delete the key13:41
*** abhishekk is now known as akekane|home13:41
rosmaitaso i think getting the error conditions worked out is important13:41
dansmithsure, but at least you're accounting for them so they're deleting "against medical advice" right13:41
rosmaita(as you pointed out)13:41
rosmaitaright, so the medical advice part will be an enhancement13:41
dansmithyeah, but the user won't be able to tell whether they have a glance/barbican configuration that does the accounting or not right?13:42
rosmaitawell, they should assume no accounting13:43
dansmithyou mean assume until it's implemented, right?13:43
rosmaitayes, the problem is there isn't an ETA for implementation13:44
dansmithyeah, I understand13:44
rosmaitaand i would really like to see tempest tests for this, because i imagine there are some design holes that haven't been foreseen yet13:44
dansmithjust thinking that in two years when there is, glance uses it, people get used to the fact that it happens, and then don't realize that "cluster 127 hasn't been updated, I didn't realize, so I thought I was deleting an unused key"13:44
dansmithso if there's some flag we can design in to "delete against medical advice" and always require it now, because we can't guarantee the accounting, or something like that13:45
dansmiththat would be safer and more future proof13:45
rosmaitawell, we could do what cinder does13:45
dansmithor "create this image and don't obsess over the accounting"13:46
rosmaitahttps://specs.openstack.org/openstack/glance-specs/specs/train/approved/glance/barbican-secret-deletion-support.html13:47
rosmaitaexcept the deletion policy would be "false" by default13:48
rosmaitadoesn't solve the problem of end users deleting in-use secrets, though13:48
dansmithI guess it seems like glance should try to be internally consistent, so if you take the create image case as an example:13:50
dansmithThe user is asking glance to create an image which uses an encryption key.. there are two behaviors you could assert here:13:50
dansmith1. Glance should not create (or leave) the image if it can't register itself as a consumer13:51
dansmith2. Glance should ignore a register_as_consumer() failure and prioritize the image creation13:51
dansmithif you let the user opt into either behavior, then we can do #2 today, and reject all attempts for #1 since we can't do that thing13:52
dansmiththen in two years, #2 is still valid, and #1 becomes valid once we can13:52
dansmithand you can make #2 the default if you don't provide the onfail=delete flag or whatever13:52
rosmaitathat seems reasonable13:52
*** akekane|home is now known as abhishekk13:55
abhishekkrosmaita, jokke_, kindly go through policy refactoring spec as well13:58
abhishekkhttps://review.opendev.org/c/openstack/glance-specs/+/79675313:58
rosmaitaabhishekk: ack13:59
abhishekkthanks 13:59
abhishekkdansmith, I have one question related to quota14:02
abhishekkafter implementing the usage API14:02
abhishekkcan we restrict the import operation if it is committing over quota?14:03
dansmithabhishekk: you mean the actual import call after stage?14:04
abhishekkyes14:04
dansmithmy code should already do that, because it now sets image.size when you stage, so import can consider that14:04
dansmithbut I wrote it so long ago, I can barely remember :/14:04
abhishekkack, I can understand :D14:05
dansmithabhishekk: https://review.opendev.org/c/openstack/glance/+/788077/15/glance/async_/flows/api_image_import.py line 87514:07
dansmithbut I'm only doing that for copy_image I guess,14:08
dansmithso we should be able to open that to all of them I think, because of: https://review.opendev.org/c/openstack/glance/+/788075/1114:08
abhishekkyeah14:09
dansmither, that's enforcing stage_total14:10
abhishekkalso this is different check14:10
abhishekkyeah14:10
dansmithbut same difference for size on glance-direct14:10
abhishekkimage_size_total14:10
abhishekkWhat I am saying is in current implementation14:11
abhishekk1. suppose image_size_total is 10 GB14:11
abhishekk2. We have 9 GB filled14:11
abhishekk3. Image ins stage is of 2 GB14:12
abhishekkIN this case current import operation will allow this import call and next will be rejected14:12
abhishekkNow after your usage API call, at point 3 is it possible to reject call there only?14:12
dansmithwell, we can't really reject the api call because get_flow() happens async (which was a problem for the locking before you know)14:14
dansmithbut we can prevent the actual import yes14:14
abhishekkack, just wanted to know the possibility14:15
dansmithyup, this is a good catch14:15
dansmiththere are far too many ways to create an image in glance :)14:16
abhishekk:D14:17
abhishekkthank you rosmaita for review 14:25
rosmaitanp14:26
dansmithabhishekk: okay so looking through the tests, I remember now.. We do stop import at the api layer once you're over your size_quota, but not if you will go over it with the next operation14:38
dansmithmaking it behave more like upload14:38
dansmithbut I think that since we know the size at that point, we might as well do what you describe.. the unfortunate part is that right now our check returns a 413 to the user immediately, 14:39
dansmithand afterwards they will get a 20x and then have to poll the task14:39
dansmithlemme get you a link14:39
dansmithhttps://review.opendev.org/c/openstack/glance/+/788055/14/glance/tests/functional/v2/test_images.py L709714:40
abhishekklooking14:40
dansmithwe should still keep that check so that if you went over your size for some other reason, we still get the 413 if we know you're already over14:40
dansmithso I will add another scenario to those tests to trigger that as well14:40
abhishekksounds good14:42
dansmithabhishekk: sorry that took longer than expected because I had to move some things up in the stack.. here comes:15:46
abhishekkno problem at all15:47
opendevreviewDan Smith proposed openstack/glance master: Refactor SynchronousAPIBase for more cases  https://review.opendev.org/c/openstack/glance/+/78806515:47
opendevreviewDan Smith proposed openstack/glance master: Update image.size after conversion  https://review.opendev.org/c/openstack/glance/+/78809115:47
opendevreviewDan Smith proposed openstack/glance master: Make image stage set image.size  https://review.opendev.org/c/openstack/glance/+/78807515:47
opendevreviewDan Smith proposed openstack/glance master: Drop lower-constraints jobs  https://review.opendev.org/c/openstack/glance/+/78276815:47
opendevreviewDan Smith proposed openstack/glance master: Add unified quotas infrastructure  https://review.opendev.org/c/openstack/glance/+/78805415:47
opendevreviewDan Smith proposed openstack/glance master: Enforce keystone limits for image upload  https://review.opendev.org/c/openstack/glance/+/78805515:47
opendevreviewDan Smith proposed openstack/glance master: Add user_get_staging_usage() to DB API  https://review.opendev.org/c/openstack/glance/+/78807615:47
opendevreviewDan Smith proposed openstack/glance master: Add image_stage_total quota enforcement  https://review.opendev.org/c/openstack/glance/+/78807715:47
opendevreviewDan Smith proposed openstack/glance master: Add user_get_image_count() to DB API  https://review.opendev.org/c/openstack/glance/+/78832615:47
opendevreviewDan Smith proposed openstack/glance master: Add image_count_total quota enforcement  https://review.opendev.org/c/openstack/glance/+/78832715:47
opendevreviewDan Smith proposed openstack/glance master: Add user_get_uploading_count() to DB API  https://review.opendev.org/c/openstack/glance/+/79424515:47
opendevreviewDan Smith proposed openstack/glance master: Add image_count_uploading quota enforcement  https://review.opendev.org/c/openstack/glance/+/79424715:47
opendevreviewDan Smith proposed openstack/glance master: Add unified quotas documentation  https://review.opendev.org/c/openstack/glance/+/79467215:47
opendevreviewDan Smith proposed openstack/glance master: ULTRAWIP: Example usage API  https://review.opendev.org/c/openstack/glance/+/79486015:47
abhishekkJust making sure the chain is right, I can see merged patch on the top of all patches15:54
dansmithprobably just because I rebased on master15:57
abhishekkok16:00
abhishekkhttps://review.opendev.org/c/openstack/glance/+/788055/14..15/glance/async_/flows/api_image_import.py16:00
abhishekkline #75316:00
abhishekkany specific reason to restore image status to queued and not uploading16:01
dansmithdomain proxy won't let us go back to uploading :(16:01
dansmithsee the comment in the test I added for that16:01
abhishekkIt will be confusing to have image with status queued and size also set.16:01
dansmithhttps://review.opendev.org/c/openstack/glance/+/788055/14..15/glance/tests/functional/v2/test_images.py16:02
dansmithL713016:02
dansmithI agree, and it's also wasteful to require re-staging16:02
dansmiththis is similar to the policy check problems, where the business logic is embedded deep in the stack, such that even import can't revert a state16:03
abhishekkI think in staging we have a check to check file size and restage if it does not match16:03
dansmiththe API can enforce state transition restrictions, but doing it so deep is problematic16:03
abhishekkagree, onion always makes you cry :D16:03
dansmithabhishekk: yikes, what if I stage a different 4.0000GiB image and you just take the old one?16:03
abhishekkhmm16:04
abhishekkand also that check is for copy-image import method only16:10
abhishekkI guess we can make the check global and use checksum verification as well (as an enhancement)16:10
* abhishekk going for dinner break16:19
opendevreviewDan Smith proposed openstack/glance master: Add unified quotas infrastructure  https://review.opendev.org/c/openstack/glance/+/78805417:57
opendevreviewDan Smith proposed openstack/glance master: Enforce keystone limits for image upload  https://review.opendev.org/c/openstack/glance/+/78805517:57
opendevreviewDan Smith proposed openstack/glance master: Add user_get_staging_usage() to DB API  https://review.opendev.org/c/openstack/glance/+/78807617:57
opendevreviewDan Smith proposed openstack/glance master: Add image_stage_total quota enforcement  https://review.opendev.org/c/openstack/glance/+/78807717:57
opendevreviewDan Smith proposed openstack/glance master: Add user_get_image_count() to DB API  https://review.opendev.org/c/openstack/glance/+/78832617:57
opendevreviewDan Smith proposed openstack/glance master: Add image_count_total quota enforcement  https://review.opendev.org/c/openstack/glance/+/78832717:57
opendevreviewDan Smith proposed openstack/glance master: Add user_get_uploading_count() to DB API  https://review.opendev.org/c/openstack/glance/+/79424517:57
opendevreviewDan Smith proposed openstack/glance master: Add image_count_uploading quota enforcement  https://review.opendev.org/c/openstack/glance/+/79424717:57
opendevreviewDan Smith proposed openstack/glance master: Add unified quotas documentation  https://review.opendev.org/c/openstack/glance/+/79467217:57
opendevreviewDan Smith proposed openstack/glance master: ULTRAWIP: Example usage API  https://review.opendev.org/c/openstack/glance/+/79486017:57

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!