Wednesday, 2021-09-08

opendevreviewEric Xie proposed openstack/glance master: Remove single quotes in excetion message  https://review.opendev.org/c/openstack/glance/+/80782706:40
opendevreviewPranali Deore proposed openstack/glance-tempest-plugin master: Add protection testing for metadef namespaces  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80090208:47
opendevreviewPranali Deore proposed openstack/glance-tempest-plugin master: Add protection testing for metadef namespaces  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80090210:29
*** tosky is now known as Guest670215:22
*** tosky_ is now known as tosky15:22
opendevreviewDan Smith proposed openstack/glance master: [uwsgi] Add missing pefetch periodic job  https://review.opendev.org/c/openstack/glance/+/80393716:02
abhishekksorry I was not around today16:54
dansmithabhishekk: I pushed up that prefetcher thing16:57
dansmithnot sure if we have any real tests for that or not16:57
abhishekkyep, looking at that16:57
dansmithI added some that actually run it enough I think, but..16:57
abhishekkNo we don't have "real" functional test for it16:57
dansmithokay16:57
abhishekkjust one thing, should we pass authorization_layer=false to get_image_factory and get_repo ?17:01
abhishekkhttps://review.opendev.org/c/openstack/glance/+/803937/2/glance/tests/unit/test_image_cache.py#53817:01
dansmithoh I guess, but doesn't really matter I don't think17:01
opendevreviewDan Smith proposed openstack/glance master: [uwsgi] Add missing pefetch periodic job  https://review.opendev.org/c/openstack/glance/+/80393717:02
abhishekksuper fast :D17:03
dansmithmeh :)17:04
dansmithabhishekk: anyway, not saying we should merge this still this cycle, just wanted to get it done17:04
abhishekkdansmith, ack, I need to run some manual operations on it, but overall it looks good to me17:04
dansmithcool, that would be good to test it for real for sure17:05
abhishekkand I think new unit tests looks solid as well  17:05
dansmithyou know,17:05
dansmithif we added a new thing to the cache api, we could force a synchronous cache run and maybe test this from tempest17:05
dansmithsome people might like that too17:06
abhishekkgood idea17:06
dansmithI don't really mean synchronous, but.. immediate17:06
abhishekkyep, i think that will make this cache work full proof as well17:07
dansmithcertainly some people will want to queue an image and then say "okay now go cache it, don't wait an hour"17:07
abhishekkI have opted for that earlier, but we definitely discuss this during Yoga PTG17:08
dansmithack17:09
dansmithnova's cache api is more directed, FWIW17:09
abhishekkok17:09
dansmithyou don't really queue an image and have it maintain the image in the cache when it runs the next time17:09
dansmithyou say "cache this image now" and it tells the computes to do it now, then if you don't re-request it often enough, it will age out of the cache like any other image we would cache as a result of a boot17:10
dansmithit's a little different use-case for glance, but it's much less complicated too :)17:10
dansmither, pva17:10
dansmither, nova's api I mean.. there's no extra bookkeeping17:11
abhishekkright17:11
abhishekkthe glance cache workflow also includes some incomplete, pending operations I guess which are not required any more IMO17:12
abhishekkincomplete and invalid cache operations those are ambiguous IMO17:13
dansmithpresumably the former means "in progress" and the latter means "I couldn't do that" ?17:14
dansmithbut from the api, I thought there was only queued and cached...17:14
abhishekkright17:14
abhishekksimilar to prefetcher we also need to move cache-cleaner and cache-pruner under API as periodic jobs17:15
dansmithoh, those are separate/17:16
abhishekkyes :D17:16
abhishekkand probably broken as well17:16
dansmithheh17:17
dansmithhmm, so if you don't run the cache cleaner your cache will eventually just fill up?17:17
abhishekkyes17:18
dansmithsweet!17:18
dansmithwell, in that case,  hope it works :)17:19
abhishekkunless you delete those using glance-cache-manage 17:19
dansmithabhishekk: isn't this an api behavioral change? https://review.opendev.org/c/openstack/glance/+/80496617:25
abhishekklooking17:25
dansmithsomeone with current code that thinks they can create/delete tags by just passing the desired set will now find they're not actually removing tags17:27
abhishekkI think we are setting image status to killed if upload fails 17:27
dansmithI definitely agree that the API should have been that way in the past, but since it wasn't (and we don't have microversions!) this would just be a breaking change17:28
abhishekkoops this is about tags17:28
dansmithyeah17:29
abhishekkI think this is by mistake and not documented anywhere as well17:29
dansmithabhishekk: it's documented by virtue of the current behavior17:29
abhishekkthat it will erase existing set of tags and replaces it with new 17:29
dansmithright, but in the absence of documentation, the behavior is what people will code to :)17:30
abhishekkack17:30
abhishekkfrankly, I was not familiar with metadef before and really don't know the correct behavior in this case17:31
abhishekkjust found that if you create single tag then it will not replace the old one, but if you create multiple at a time it will erase all existing tags 17:32
dansmithwell, correct behavior or not, the way it behaves now is what people may be relying on17:32
abhishekkhmm17:32
dansmith"If an API’s behavior isn’t adequately documented, then developers using the API have no choice but to go by what they observe the behavior to be. A change that will violate those observations is a change that requires a version."17:33
dansmithfrom: https://specs.openstack.org/openstack/api-wg/guidelines/api_interoperability.html#interoperability17:33
dansmith(examples section, example of "it's not documented")17:33
dansmithnow, I know that glance doesn't have microversions to allow a change like this, but I think that means you opt to not change it unless it's security or correctness related17:34
abhishekkack, thanks then in that case it is a behavioral change17:34
dansmithokay I can comment17:34
abhishekkSo, if we want to correct it then, we need to deprecate this API and add new one ?17:35
dansmithwell, one way to handle this is to add a parameter with the default that matches the current behavior17:35
abhishekkor let it be as it is until someone complains17:35
dansmithso ?append=False17:35
dansmithpass ?append=True when you want to append to the current set of tags17:35
abhishekkyep, that sounds better17:36
dansmithyou can make the glanceclient take the new behavior, that's no problem17:36
dansmithbut the REST API should not change unless asked17:36
abhishekkI liked this idea17:36
abhishekkpositive scenarios are working as expected with recent cache-prefetcher patch17:40
dansmithon the killed thing,17:40
dansmithI think we only set that if we fail the signature check,17:40
abhishekkright17:40
dansmithwhich is probably not what we want anyway (maybe cruft?)17:40
dansmitheverything else goes back to queued17:40
dansmithpresumably based on the bug, once it goes to killed it's just invisible to the uploader?17:41
dansmithor maybe they can still GET it but not list?17:41
abhishekkI think it will br invisible to uploader17:42
dansmithso that's broken  and we should make it go back to queued right?17:42
dansmithhttps://docs.openstack.org/glance/wallaby/user/statuses.html17:42
dansmiththis ^ shows that only happens with v117:42
dansmithso right now they can't even see that it goes to killed state, which means it just looks like a bug to them and not even a violation of the docs17:43
abhishekkyep, I think this should be set back to queued17:45
opendevreviewDan Smith proposed openstack/glance master: Make signature verification go back to 'queued'  https://review.opendev.org/c/openstack/glance/+/80793217:49
dansmiththere was actually a unit test (!), running functional now17:50
abhishekkalso I can see some tests where we are setting image status to kille if location add/update fails17:50
dansmithdo you want a separate bug for just the "image should not go to killed" thing or is the related-bug enough?17:50
abhishekkrelated is enough17:50
dansmith\o/17:51
abhishekktest_location_add_not_permitted_status_killed17:51
abhishekkSo I think this test also needs to be removed now17:53
abhishekktest_location_replace_not_permitted_status_killed17:53
dansmithis it checking for killed specifically in the api or just checking against a set of valid states?17:53
abhishekkAPI17:54
dansmithit's checking (active, queued)17:54
dansmithso the test isn't really wrong, but it might not be possible in real life anymore17:55
dansmithso I dunno that it needs to be removed really, but whatever you want :)17:55
abhishekkack17:56
abhishekkI think let it be there, I will have some one to work on look at 'killed' presence in v2 API and clean it at once17:57
abhishekkso again, may be I am silly but the API WG thing should be applicable here or not ?17:59
dansmithyou could argue it for sure, but that's why I asked if the user can see that it went to killed18:00
dansmithif they can, then yes, probably18:00
dansmithbut if they can't then it's just disappearing18:00
abhishekkIts definitely not in the list18:01
dansmithbut also, the docs clearly show it goes to queued for v2, and does for every other situation18:01
dansmithin the tags case, the behavior change will result in the wrong thing happening (i.e. tags being left on the image that the caller intended to remove)18:01
dansmithin this case, I don't think you could argue that having the image disappear and leak in the database is what they expected based on previous behavior :)18:02
abhishekk++18:02
dansmithalso,18:03
dansmiththe guidelines say that versions are not needed to keep wrong behavior 18:03
dansmithmeaning if something is currently returning 500, you don't need to continue to return 500 on old microversions, because that's clearly error behavior18:03
abhishekkyep, makes sense18:04
* abhishekk signing out for the day18:54
*** timburke__ is now known as timburke20:04
opendevreviewMerged openstack/glance master: Add missing parameters for the healthcheck middleware  https://review.opendev.org/c/openstack/glance/+/80456320:39
opendevreviewMerged openstack/glance master: Add missing [oslo_reports] options  https://review.opendev.org/c/openstack/glance/+/80456920:39
opendevreviewDan Smith proposed openstack/glance master: Reproduce bug #1932337  https://review.opendev.org/c/openstack/glance/+/79688520:51
opendevreviewDan Smith proposed openstack/glance master: Fix failed cinder store migration for non-owners  https://review.opendev.org/c/openstack/glance/+/79688720:51
-opendevstatus- NOTICE: The Gerrit service on review.opendev.org is going offline momentarily for a host migration and zuul upgrade, downtime should be only a few minutes.21:05
opendevreviewDan Smith proposed openstack/glance master: Reproduce bug #1932337  https://review.opendev.org/c/openstack/glance/+/79688521:21
opendevreviewDan Smith proposed openstack/glance master: Fix failed cinder store migration for non-owners  https://review.opendev.org/c/openstack/glance/+/79688721:21

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