Monday, 2022-05-16

opendevreviewRajat Dhasmana proposed openstack/glance stable/yoga: Disable import workflow in glance cinder jobs  https://review.opendev.org/c/openstack/glance/+/84174704:17
opendevreviewRajat Dhasmana proposed openstack/glance master: Override GLANCE_USE_IMPORT_WORKFLOW in cinder jobs  https://review.opendev.org/c/openstack/glance/+/84183707:05
*** abhishekk is now known as akekane|home08:31
*** akekane|home is now known as abhishekk08:31
opendevreviewRajat Dhasmana proposed openstack/glance master: Override GLANCE_USE_IMPORT_WORKFLOW in cinder jobs  https://review.opendev.org/c/openstack/glance/+/84183708:31
opendevreviewMerged openstack/glance-tempest-plugin master: Implement API protection testing for metadef resource types  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279209:40
opendevreviewMerged openstack/glance-tempest-plugin master: Implement API protection testing for metadef properties  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/80279409:41
opendevreviewRajat Dhasmana proposed openstack/glance master: Override GLANCE_USE_IMPORT_WORKFLOW in cinder jobs  https://review.opendev.org/c/openstack/glance/+/84183710:38
*** whoami-rajat__ is now known as whoami-rajat10:40
dansmithabhishekk: I can work on a fix14:47
abhishekkdansmith, ack, thank you!14:47
abhishekk(but if you have any important work in hand then I can proceed after 30 mins)14:48
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Fix list namespaces test for parallelism  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/84191015:00
dansmithabhishekk: untested ^ because I don't have a stack running right now, but I think it'll work15:00
abhishekkthat was quicker than expected15:01
abhishekkdansmith, I think you need to modify expected to remove those which are not included in actual?15:05
abhishekkI will try to test it in local env15:06
dansmithoh, actual and expected are reversed in normal meaning15:06
abhishekkyeah15:07
abhishekkhttps://paste.opendev.org/show/bGtZqY5c1gqU7DP6MpYp/15:07
opendevreviewDan Smith proposed openstack/glance-tempest-plugin master: Fix list namespaces test for parallelism  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/84191015:08
dansmithI'm not sure what that paste is, but ^ just uses the other name, that should work right?15:09
dansmithI'm in a call now, but I'll try to get a stack up so I can test15:09
abhishekkI will try to test it15:09
dansmithack15:10
whoami-rajatabhishekk, hey, the rbac job on glance gate is failing consistently and specifically the test_list_namespaces test https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_46a/841837/3/check/glance-secure-rbac-protection-functional/46acdec/testr_results.html15:31
whoami-rajatmaybe this is a fix for that https://review.opendev.org/c/openstack/glance-tempest-plugin/+/84191015:32
abhishekkdansmith, failing with, line #44, TypeError: string indices must be integers15:50
abhishekkalso after fixing it, still failing with 404 not found15:52
dansmithabhishekk: ack, just got off a call, have to tend to something urgent and then I'll poke at it locally16:04
abhishekkit does work with, https://paste.opendev.org/show/bV7M43td0jRaVRS0Drl2/16:04
abhishekksure16:04
abhishekktake your time16:04
dansmithabhishekk: that's not a full diff so I can't even tell where you're applying that.. to assertListNamespaces?16:08
abhishekkyes16:08
abhishekksorry for that16:08
dansmiththat's on top of my patch?16:08
dansmithor instead?16:09
abhishekkinstead16:13
abhishekkin your patch you are just modifying for project_ns16:13
abhishekkwe are also creating namespace for alternate_project called as alt_ns16:14
dansmithokay, but there you're just filtering both lists so you're only checking the union of the two,16:14
dansmithso I was going for a more "any of them that look like they belong to us should be checked16:14
dansmithalthough maybe that's bad in case a namespace is left from a previous run or someone has a legitimately-named pre-existing ns16:15
dansmithabhishekk: if you want your approach, push it up and we can review in context16:15
abhishekkcan I push it to your PS?16:15
dansmithsure16:15
abhishekkcool16:15
opendevreviewAbhishek Kekane proposed openstack/glance-tempest-plugin master: Fix list namespaces test for parallelism  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/84191016:36
dansmithokay I'm confused now16:46
dansmiththe 404 is actually coming from the list call itself16:46
dansmithnothing to do with our assert loop right?16:47
dansmithand since we're just checking that "namespace is in resp" we shouldn't care about extra namespaces that are shown16:47
dansmithbecause I don't think your list filtering does anything.. it removes things we didn't create from expected_ns, but...we don't assert anything about those namespaces, just that the ones we created are in there16:48
dansmithand we're 404ing in our list:16:48
dansmithresp = self.do_request('list_namespaces',16:48
dansmithmaybe this is a bug in the server?16:49
dansmithlike maybe internally list is returning all, and then we try to do a get on each one to have the details, one is deleted by another test, and we 404?16:49
dansmithwe're catching NotFound in the list and returning HTTPNotFound,16:52
dansmithbut that makes no sense right?16:52
dansmithNotFound for a list operation should mean "you got the wrong url"16:52
dansmithhttps://github.com/openstack/glance/blob/d7fa7a0321ea5a56ec130aa0bd346749459ccaf2/glance/api/v2/metadef_namespaces.py#L124-L12516:53
abhishekkI have just tested that in one execution I am getting 25 namespaces in response16:57
abhishekkThat comment might make sense16:58
abhishekkWe are creating 4 namespaces for each test, 2 public and private for project A and 2 for project B16:58
abhishekkthe test never fails for admin16:59
dansmithokay, but.. do you see my point? we're getting a 404 from the server during list..17:00
abhishekkFor Member and Reader execution, 1 private namespace of other project will not be accessible and it is raising 40417:00
dansmiththe client (the test) isn't doing anything wrong17:00
abhishekk403 wrapped with 404 17:00
abhishekkyes17:01
dansmithoh, permission problem underneath you mean17:01
dansmiththat makes sense because I don't see where we're doing any db ops other than the list in the api17:01
abhishekkyes17:02
dansmithack, but either way, the test is okay and is uncovering a legit server bug I think17:02
dansmiththe lock or running single-threaded just covers it up17:02
abhishekkright17:03
dansmithcan we repro this in a deterministic test that creates things that will trigger a 403? that way we can make sure this doesn't regress17:03
dansmithmaybe with alt_persona17:05
abhishekkhow it will trigger 403 since we converting it to 404 at server side17:05
dansmithno, I mean reproduce the behavior (the 404 for 403 reasons)17:05
abhishekkok17:05
abhishekklet me try it17:05
abhishekkit is failing for Admin as well :/17:10
dansmithhrm, doesn't that go against the assertion that it's a 403 under the covers?17:10
abhishekkyes17:13
dansmithabhishekk: maybe we should revert (or skip so pranli doesn't kill us) and open a bug since it's a server problem anyway?17:14
dansmith*pranali17:14
abhishekkI think lets skip 3 list tests at the moment17:15
dansmithdid you get a test that repros? or are you testing manually?17:16
abhishekkI am testing manually17:18
dansmithokay17:18
abhishekkhttps://paste.opendev.org/show/bUYhj2mYlSLS9VGvluuQ/17:20
abhishekkthis is the log of failing reader list namespace test17:20
abhishekkand here you can see it is asserting for public namespace of Admin test class17:21
abhishekkwhich might already have been deleted17:21
abhishekkmight >> surely17:21
dansmithyep17:21
dansmithyou're running in parallel there though, how do you know surely?17:22
abhishekkbecause before this test, {3} glance_tempest_plugin.tests.rbac.v2.metadefs.test_objects.ProjectAdminTests.test_update_object [1.159995s] ... ok17:22
abhishekk it was executed17:22
dansmithsure but you don't know when the cleanup was run, since those are deleted during addCleanup right?17:23
abhishekkyes, I think cleanup runs right after test exits17:24
dansmithwell, maybe that's synchronous with the test anyway,17:24
dansmithbut still, I don't think you can say when the actual test is running and failed,17:24
dansmithbecause the test runner is collecting results from threads17:24
abhishekkhmm17:25
dansmithbut regardless,17:25
dansmithI think you should hack your glance to raise on NotFound so you can see what the underlying error was17:25
dansmithi.e. disable the handler from my github link above and then re-repro17:25
abhishekkok17:26
dansmithand if you still get 404, then something underneath is raising the HTTPNotFound, which could be api_policy17:26
abhishekk50017:28
dansmithright17:28
dansmithbecause it's not caught, but the log should have the deets now right?17:28
abhishekkhttps://paste.opendev.org/show/bpYXn0KCAFIxt0NDJSZR/17:29
dansmiththe glance log17:30
abhishekkack17:30
abhishekkhttps://paste.opendev.org/show/b6aSzdafOJOLbH7Fggrp/17:32
abhishekkthis is expected,right17:33
dansmithisn't this what I was theorizing earlier?17:37
dansmithwe do a list, and then we do a get() on each item,17:37
dansmiththe list returns all, but the get() returns notfound because we should not be able to get each one?17:37
abhishekkyes17:37
dansmithi.e. db enforcing policy17:37
abhishekkso in test we should wrap this in NotFound try catch and ignore the error with comment?17:38
dansmithno, because the test is legitimately doing a list and expecting to only see its own resources,17:38
dansmithbut the server is erroneously returning NotFound (which you should never get from a list operation) because it's trying to show some resources you don't own17:39
dansmithoh, sorry, hang on17:40
dansmiththe server is actually hitting the deleted namespace, not the permission issue right?17:41
abhishekkyes17:41
dansmithL113 is the actual "no result" from the db when getting by name17:41
abhishekkwhich is created by other test17:41
dansmithso the server needs to ignore that case, and not error the whole list operation17:41
abhishekkyeah, 17:41
abhishekkI think that is the right solution17:42
abhishekk*approach17:42
abhishekkI think you will add better note than me :D17:42
dansmithoh and this is not even erroring on namespaces, but on the rs_type17:44
abhishekklance.common.exception.MetadefNamespaceNotFound: Metadata definition namespace=b7761601321344e4a80c392673953d9e_public_ProjectAdminTests was not found.17:46
abhishekkMay 16 17:21:31 akekane devstack@g-api.service[3692]: ERROR17:46
abhishekkwhere do you see rs_type :o17:46
dansmithMay 16 17:21:31 akekane devstack@g-api.service[3692]: ERROR glance.common.wsgi   File "/opt/stack/glance/glance/api/v2/metadef_namespaces.py", line 101, in index17:47
dansmithMay 16 17:21:31 akekane devstack@g-api.service[3692]: ERROR glance.common.wsgi     repo_rs_type_list = rs_repo.list(filters=filters)17:47
abhishekkyes17:47
abhishekkand from there inside it is calling get for namespace17:47
dansmiththe rs_type listing attempts to fetch the namespace (again) and that's what is failing17:48
dansmithright17:48
opendevreviewDan Smith proposed openstack/glance master: WIP: Fix failing namespace list for rs_type  https://review.opendev.org/c/openstack/glance/+/84197017:48
dansmithabhishekk: try this ^ ?17:48
abhishekkack17:48
abhishekkit helped17:52
dansmith...bug?17:53
dansmither ...but?17:53
abhishekkyeah, bug17:54
abhishekkthis is getting more and more confusing17:55
dansmithabhishekk: ?18:12
abhishekkaround18:12
dansmithwhat is "more and more confusing" ? did it fix it or is something else broken?18:13
abhishekkthe question is why it is failing only while filtering rs_types (might be we are not calling and not at line 9018:14
abhishekkit fixes it18:14
dansmithI assume it's because we've pulled the list, a namespace gets deleted, and then we try to iterate that list and do get() on each one right?18:15
abhishekkyes18:15
abhishekksorted18:16
abhishekkI have ran WIP continuously (more than 100) and it not failing now18:17
dansmithokay about to push with test18:17
abhishekkhave you reported a bug?18:18
abhishekkmay be we should backport it as well18:18
dansmithno, can you while I finish this?18:18
abhishekkack18:19
dansmithif you need to go I can do it18:19
abhishekkjust a minute18:19
abhishekkhttps://bugs.launchpad.net/glance/+bug/197363118:23
abhishekkand for these many days I thought this issue is because we are running it parallel and not 1 by 1 :D18:24
dansmith... that is why right?18:25
opendevreviewDan Smith proposed openstack/glance master: Fix failing namespace list delete race  https://review.opendev.org/c/openstack/glance/+/84197018:25
abhishekkyeah18:26
abhishekknice test18:29
dansmithI dunno about nice, but.. it works :)18:31
abhishekk:D18:31
abhishekkI will keep watch from mobile18:31
abhishekksigning out for the day18:31
dansmithack18:31
abhishekkgood day o/~18:31
dansmitho/18:31

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