Thursday, 2021-03-04

*** tosky has quit IRC00:11
openstackgerritMerged openstack/glance master: Add administrator docs for distributed-import  https://review.opendev.org/c/openstack/glance/+/77807200:46
*** zzzeek has quit IRC01:38
*** zzzeek has joined #openstack-glance01:39
*** rcernin has joined #openstack-glance01:53
openstackgerritXuan Yandong proposed openstack/glance master: remove unicode in code  https://review.opendev.org/c/openstack/glance/+/76898403:05
openstackgerritXuan Yandong proposed openstack/glance master: Remove __unicode__() from Exception  https://review.opendev.org/c/openstack/glance/+/76970403:05
*** rcernin has quit IRC03:06
openstackgerritYuehuiLei proposed openstack/glance-specs master: Add xena directory for specs  https://review.opendev.org/c/openstack/glance-specs/+/77860803:11
*** rcernin has joined #openstack-glance03:24
*** rcernin has quit IRC03:26
*** rcernin has joined #openstack-glance03:27
*** lpetrut has joined #openstack-glance03:27
*** whoami-rajat has joined #openstack-glance04:20
openstackgerritLance Bragstad proposed openstack/glance master: Implement project personas for image actions  https://review.opendev.org/c/openstack/glance/+/76475404:22
openstackgerritLance Bragstad proposed openstack/glance master: Update default policies for task API  https://review.opendev.org/c/openstack/glance/+/76320804:22
openstackgerritLance Bragstad proposed openstack/glance master: Make secure RBAC protection job voting  https://review.opendev.org/c/openstack/glance/+/77825804:22
openstackgerritLance Bragstad proposed openstack/glance master: DNM: Make sure protection tests protect against policy regressions  https://review.opendev.org/c/openstack/glance/+/77860904:22
*** Underknowledge has quit IRC04:40
*** Underknowledge has joined #openstack-glance04:40
lbragstadabhishekk jokke dansmith ^ those should encapsulate everything we talked about today04:41
abhishekklbragstad, ack, will go through the irc communication and patches04:42
lbragstadsounds good - i'll catch up with you in about 7 hours04:42
lbragstadthe first patch in the chain is failing randomly, so you may need to do some rechecking04:43
lbragstadeverything up through 778258 passed tempest, functional, py38, and pep8 locally04:44
abhishekkack04:44
abhishekkwill keep eye on them04:45
abhishekkgood night o/~04:45
lbragstadawesome - thanks!04:45
lbragstado/04:45
*** lpetrut has quit IRC04:47
*** ratailor has joined #openstack-glance04:49
*** udesale has joined #openstack-glance05:13
*** gyee has quit IRC05:20
*** yoctozepto has quit IRC06:00
openstackgerritXuan Yandong proposed openstack/glance master: Remove __unicode__() from Exception  https://review.opendev.org/c/openstack/glance/+/76970406:01
*** yoctozepto has joined #openstack-glance06:02
*** zzzeek has quit IRC06:03
*** zzzeek has joined #openstack-glance06:16
*** zzzeek has quit IRC06:25
*** zzzeek has joined #openstack-glance06:43
*** zzzeek has quit IRC06:44
*** zzzeek has joined #openstack-glance06:45
*** rcernin has quit IRC07:00
*** rcernin has joined #openstack-glance07:14
*** ajitha has joined #openstack-glance07:15
*** lpetrut has joined #openstack-glance07:22
*** takamatsu has joined #openstack-glance07:24
*** rcernin has quit IRC07:30
*** ralonsoh has joined #openstack-glance07:37
*** rcernin has joined #openstack-glance07:55
*** lpetrut has quit IRC07:56
*** rcernin has quit IRC08:00
*** hoonetorg has quit IRC08:03
*** rcernin has joined #openstack-glance08:12
*** rcernin has quit IRC08:17
*** rajinir_ has joined #openstack-glance08:29
*** tosky has joined #openstack-glance08:36
*** rajinir has quit IRC08:43
*** rajinir_ is now known as rajinir08:43
*** lpetrut has joined #openstack-glance08:51
*** hoonetorg has joined #openstack-glance08:55
*** rcernin has joined #openstack-glance09:13
*** rcernin has quit IRC09:17
*** zzzeek has quit IRC10:35
*** zzzeek has joined #openstack-glance10:35
*** k_mouza has joined #openstack-glance10:59
*** rcernin has joined #openstack-glance11:08
*** rcernin has quit IRC11:13
*** udesale_ has joined #openstack-glance11:21
*** udesale has quit IRC11:25
*** legochen has quit IRC11:53
*** tkajinam has quit IRC11:56
*** rcernin has joined #openstack-glance12:24
*** rcernin has quit IRC12:29
*** ratailor has quit IRC12:38
*** rcernin has joined #openstack-glance12:48
*** rcernin has quit IRC12:53
openstackgerritLance Bragstad proposed openstack/glance-tempest-plugin master: Increase oslo.policy logging for protection tests  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/77835613:43
abhishekkjokke, rosmaita, smcginnis, dansmith, lbragstad glance weekly meeting in 5 minutes at #openstack-meeting13:54
abhishekksee you there13:54
* lbragstad nods13:55
*** legochen has joined #openstack-glance14:16
*** legochen has quit IRC14:21
dansmithabhishekk: do you know about gerrit dashboards? might just be a little less work than hand-editing the etherpad (although you seem to be super fast and accurate at doing so)?14:45
dansmithhere's a start at your wallaby one: https://bit.ly/3qmRMSY14:45
abhishekklooking14:46
abhishekkdansmith, interesting14:48
*** rcernin has joined #openstack-glance14:49
abhishekkHow can we add other remaining patches, just by adding it to query parameters?14:49
dansmithanyway, I can flesh that out to the rest of the stuff if you want, but if you'd rather just track it in the etherpad, that's cool. just wanted to point it out in case you didn't know14:49
dansmithabhishekk: yeah, I can do it14:50
abhishekkdansmith, I will use both14:50
abhishekketherpad to track todo things and dashboard for open reviews14:50
dansmithack14:51
abhishekkthank you14:51
*** rcernin has quit IRC14:54
dansmithabhishekk: maybe you can +W this so I don't have to add it to the list :) https://review.opendev.org/c/openstack/glance/+/77529914:55
abhishekkyeah14:56
dansmithabhishekk: I put the url at the top of the etherpad.. I *think* that's everything14:58
abhishekkcool14:58
abhishekkawesome, thank you15:00
dansmithnp15:01
*** jmlowe has quit IRC15:06
*** jmlowe has joined #openstack-glance15:08
*** belmoreira has joined #openstack-glance15:11
*** lpetrut has quit IRC15:36
openstackgerritDan Smith proposed openstack/glance master: DNM: Check nova-ceph-glance with new policy defs  https://review.opendev.org/c/openstack/glance/+/77873615:49
dansmithlbragstad: abhishekk: I think ^ this will get nova to run with glance and ceph using the new defaults so we can see if anything breaks15:49
lbragstadawesome15:50
lbragstadare we expecting that to pass because the ansible playbook overrides the copy_image policy to be open?15:51
lbragstadbecause i think that's how i understood things15:51
dansmithI'm expecting it to fail because (unless it changed) you're defaulting set_image_location to false15:51
dansmithbut yes, the copy_image override should still work, as expected, and override the default you're choosing15:51
dansmithbut there are lots of nova interactions other than that which are important to validate15:52
*** gyee has joined #openstack-glance15:52
lbragstadoh - got it, that's an admin-only policy now15:52
dansmithcopy_image is, yeah15:52
lbragstadand set_image_location15:53
dansmithset_image_location is not right?15:53
dansmiththat's the whole point15:53
lbragstadhttps://review.opendev.org/c/openstack/glance/+/764754/24/glance/policies/image.py@18815:53
dansmithgoing back to before defaults in code, it was "", and I think now it's rule:default right?15:53
dansmithlbragstad: right, you're *changing* it to admin15:54
dansmithbut it's _currently_ not-admin15:54
lbragstadyes - correct15:54
dansmithso I expect nova to break on top of these patches, that's what I want to validate15:54
dansmithbecause I think your patches need to _not_ flip it to admin15:54
dansmithif we do that, we should do it separately with appropriate signaling15:54
lbragstadand that's because nova uses the user token to set the image location - depending on what nova has access to and what's copied into glance?15:55
dansmithwell, yes to the first part15:56
dansmithwhen nova does a snapshot, it creates a thing in rbd and then just "tells" glance about it via set_image_location15:56
lbragstadok - cool, git it15:56
lbragstadgot it*15:56
lbragstadi think this is the 3rd or 4th time you've explained this to me15:57
dansmithit has some fallback routines for that code, so I'm also a little worried it will "work" but will have copied a ton of data around to make it seamless, even though we don't want it to15:57
dansmithso I will have to do some deep inspection of the logs15:57
dansmithlbragstad: it's okay, it's complicated, and I'm sure you've explained policy things to me at least that many times :)15:57
dansmithjust noticed I said "setting to false" above when I meant "admin"16:03
* dansmith is in too many parallel things16:03
abhishekkdansmith, ack16:08
abhishekkdansmith, do we need to set glance config parameter to True as well?16:09
dansmithabhishekk: this isn't enforce_scope, just enforce_new_defaults, so I think we're good no? lbragstad ?16:10
dansmithisn't enforce_scope the one we have the extra flag for?16:10
abhishekkenforce_secure_rbac this one?16:10
abhishekkhttps://review.opendev.org/c/openstack/glance/+/776588/8/glance/cmd/api.py#11116:11
dansmithah dang, okay16:12
lbragstadnice catch abhishekk16:12
abhishekk:)16:12
openstackgerritDan Smith proposed openstack/glance master: DNM: Check nova-ceph-glance with new policy defs  https://review.opendev.org/c/openstack/glance/+/77873616:13
abhishekkperfect16:13
*** lpetrut has joined #openstack-glance16:36
*** lpetrut_ has joined #openstack-glance16:38
*** lpetrut_ has quit IRC16:38
*** lpetrut has quit IRC16:42
openstackgerritDan Smith proposed openstack/glance master: Enable second glance worker for import testing  https://review.opendev.org/c/openstack/glance/+/77062916:48
*** rcernin has joined #openstack-glance16:50
*** rcernin has quit IRC16:55
*** belmoreira has quit IRC17:09
openstackgerritLance Bragstad proposed openstack/glance-tempest-plugin master: Add tests for image membership, deactivation, and reactivation  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/77574217:18
lbragstadi'm having ^ depend on a tempest fix to get the legacy and secure rbac jobs working again17:19
lbragstadi also pulled the copy_image tests out of that patch17:19
lbragstadi'm going to add those back in a separate commit, like we did with the system-scope tests17:19
abhishekkack17:21
abhishekkone more dependency :D17:22
openstackgerritLance Bragstad proposed openstack/glance-tempest-plugin master: Add base tests case for copy_image test  https://review.opendev.org/c/openstack/glance-tempest-plugin/+/77875617:23
*** udesale_ has quit IRC17:47
* abhishekk signing out for the day, will be keeping eye on nova-ceph-rbac result if pushed again17:58
dansmithlbragstad: I'm not sure what rebasing you mean,18:07
dansmithand I'm also not sure what got pushed that kicked that out of check18:07
lbragstaddidn't you nova patch fail because https://review.opendev.org/c/openstack/glance/+/778609/1 failed ahead of it?18:08
lbragstaddidn't your*18:09
*** ralonsoh has quit IRC18:09
dansmithit didn't even start running18:10
dansmithI guess I'm not sure what the point of that patch is, I was just trying to be above all your proposed changes18:10
lbragstadhttps://review.opendev.org/c/openstack/glance/+/778609/1 is just showing that the protection tests catch policy regressions18:11
lbragstadi can abandon it now that it's kind of proven it's point18:11
dansmithokay I thought maybe that was going to be come a revert-to-current-default patch18:14
dansmithI would think that my test would still run on top of it, but I will rebase18:14
lbragstadabandoned18:15
openstackgerritDan Smith proposed openstack/glance master: Add glance functional protection tests to check and gate  https://review.opendev.org/c/openstack/glance/+/77807918:15
openstackgerritDan Smith proposed openstack/glance master: Implement project personas for image actions  https://review.opendev.org/c/openstack/glance/+/76475418:15
openstackgerritDan Smith proposed openstack/glance master: Update default policies for task API  https://review.opendev.org/c/openstack/glance/+/76320818:15
openstackgerritDan Smith proposed openstack/glance master: DNM: Check nova-ceph-glance with new policy defs  https://review.opendev.org/c/openstack/glance/+/77873618:15
dansmithah crap18:15
dansmithdid I revert something of yours? I didn't rebase everything, I just moved it down the stack18:16
lbragstadhttps://review.opendev.org/c/openstack/glance/+/764754/24..25 looks fine18:16
dansmithI didn't see that you pushed anything else up on that, so I dunno why it re-pushed them all18:16
dansmithokay18:16
lbragstadps24 contained all the important updates we talked about yesterday18:17
lbragstadhttps://review.opendev.org/c/openstack/glance/+/778258/4 didn't get rebased though?18:17
dansmithwell, since I didn't intend to move the bottom ones, I was trying to be peer to that18:18
lbragstadah - got it18:18
openstackgerritLance Bragstad proposed openstack/glance master: Make secure RBAC protection job voting  https://review.opendev.org/c/openstack/glance/+/77825818:18
* lbragstad backs away slowly 18:19
dansmithheh18:21
*** rcernin has joined #openstack-glance18:50
*** rcernin has quit IRC18:56
*** mgagne has quit IRC18:56
*** mgagne has joined #openstack-glance18:57
*** whoami-rajat has quit IRC18:59
*** rcernin has joined #openstack-glance19:12
*** rcernin has quit IRC19:17
dansmithlbragstad: I have good news and bad news19:41
lbragstadbad news first pls19:41
dansmithMar 04 11:40:18 guaranine devstack@g-api.service[2967241]: DEBUG glance.api.v2.images [None req-c1ca94a6-4f24-4442-a6db-e3a0e478024c demo demo] User not permitted to update image 'a3a73bd3-3b89-4a58-8d6d-d8e209335a76' {{(pid=2967241) update /opt/stack/glance/glance/api/v2/images.py:570}}19:41
dansmith(actually it's all bad news)19:41
lbragstadoh good19:42
lbragstad:)19:42
dansmiththat's what happens when nova tries to snapshot, glance refuses with the new defaults19:42
dansmithwithout enforce_new_defaults=True, the same thing works19:42
dansmithnow for the worse (but not really for you) news,19:42
lbragstadok - so it works because we're applying a logic OR in oslo.policy without enforce_new_defaults = True19:42
dansmitheverything is pretty silent about it.. so nova shows "uploading snapshot ...." then goes back to ACTIVE, but.. no image ever shows up19:43
dansmithso kinda silent fail19:43
dansmithtest should fail because it'll never find an image (assuming, hopefully, that it checks for an image)19:43
openstackgerritMerged openstack/glance master: Cleanup remaining tenant terminology in glance API docs  https://review.opendev.org/c/openstack/glance/+/77529919:43
dansmithlbragstad: right, expected that it would work with enforce_new_defaults=False19:43
lbragstadhmm19:44
lbragstadso - iiuc glance is supposedly returning a 403 to nova somewhere, but that's not really bubbling up to the end user (should it?)19:45
dansmithright, so that's a UX issue, but not sure it's really solvable.. have to look and see what nova has in the way of ways to signal a failure to upload a snapshot19:45
dansmithhowever,19:45
dansmiththe salient point for the rbac work is, I think we need to keep a default of "project_member" for set/get_image_location for the moment19:45
lbragstadyeah - it seems that way19:46
dansmithi.e. not have your patch change the default19:46
* lbragstad pulls up the change19:46
lbragstadget_image_location looks good, no?19:47
lbragstadhttps://review.opendev.org/c/openstack/glance/+/764754/25/glance/policies/image.py@17219:47
dansmithahh, nova does kinda report it: | createImage | req-c1ca94a6-4f24-4442-a6db-e3a0e478024c | Error   | 2021-03-04T19:40:12.000000 | 2021-03-04T19:40:20.000000 |19:47
dansmithso I guess we're good on that19:48
lbragstadhttps://review.opendev.org/c/openstack/glance/+/764754/25/glance/policies/image.py@187 is the problem because the snapshotting process can't update the snapshot location?19:48
dansmithyeah, project_reader should be fine for that19:48
dansmithyes19:48
dansmithlemme comment on that real quick for posterity19:48
lbragstadok - so my patch needs to do set_image_location: base.ADMIN_OR_PROJECT_MEMBER instead of set_image_location: role:admin19:49
dansmithyup19:51
dansmithjobs are running on that DNM patch, so I'll defer testing the copy_image thing and just wait for that to finish19:51
dansmithif it breaks, every nova boot will fail, and if not (expected) only the snapshot tests will fail19:52
lbragstadok - cool19:53
dansmithso, hold off on any change to that patch a little while, so we can get that report which is being generated right now19:54
lbragstadok - i have the changes prepped locally19:54
dansmithsupposedly ~40m remaining, so shouldn't be too long19:55
*** rcernin has joined #openstack-glance20:00
dansmithokay I think the bottom one on each stack should be headed in after they finish check20:02
openstackgerritDan Smith proposed openstack/glance master: Enable second glance worker for import testing  https://review.opendev.org/c/openstack/glance/+/77062920:14
dansmithoh the carnage is real20:15
lbragstadthe rbac series to ultimately waiting on a tempest fix20:19
*** k_mouza has quit IRC20:19
dansmiths/to/is/ ?20:19
dansmiththere's a lot of fail in this nova ceph rbac job20:19
dansmithseems like more than just snapshots, but need to wait for the report to tell for sure20:19
lbragstadyeah - s/to/is/ my typing is garbage lately20:20
lbragstadi assume you're watching the stream?20:22
dansmithyup20:23
dansmithoh, I see, that tempest fix is blocking the bottom two going in20:27
lbragstadright20:28
*** rcernin has quit IRC20:43
dansmithpretty much teh failz: https://956d0fa1451be9107b7b-16c03009b76be00de1a48ecc1775c29e.ssl.cf5.rackcdn.com/778736/3/check/nova-ceph-multistore-rbac/5642b55/testr_results.html20:49
lbragstadoh boy20:50
*** k_mouza has joined #openstack-glance20:50
dansmithhttps://zuul.opendev.org/t/openstack/build/5642b55feb7f44df84a91b3a1b2e2a22/log/controller/logs/screen-n-cpu.txt#3480520:51
lbragstadshould i push that set_image_location change up now? i think we should be good and we're not concerned about bumping something out of the check queue, are wel?20:51
dansmithso yeah, copy is not working20:51
dansmithyou can yeah20:51
openstackgerritLance Bragstad proposed openstack/glance master: Implement project personas for image actions  https://review.opendev.org/c/openstack/glance/+/76475420:52
openstackgerritLance Bragstad proposed openstack/glance master: Update default policies for task API  https://review.opendev.org/c/openstack/glance/+/76320820:52
openstackgerritLance Bragstad proposed openstack/glance master: Make secure RBAC protection job voting  https://review.opendev.org/c/openstack/glance/+/77825820:52
dansmithlbragstad: so... this is the policy file: https://956d0fa1451be9107b7b-16c03009b76be00de1a48ecc1775c29e.ssl.cf5.rackcdn.com/778736/3/check/nova-ceph-multistore-rbac/5642b55/controller/logs/etc/glance/policy.json20:52
dansmithshould that not override the default like it did before?20:52
lbragstadyes - it should20:52
dansmithhttps://zuul.opendev.org/t/openstack/build/5642b55feb7f44df84a91b3a1b2e2a22/log/controller/logs/screen-g-api.txt#37220:53
dansmithdoes enforce_new_defaults somehow break our reading of legacy json files instead of yaml?20:54
lbragstadi wouldn't expect it to?20:54
dansmithme either, but..20:54
dansmithoh, you know20:55
*** k_mouza has quit IRC20:55
dansmithI think we don't have that laid down during devstack, only after before we run tempest20:55
dansmithloads it here: https://zuul.opendev.org/t/openstack/build/5642b55feb7f44df84a91b3a1b2e2a22/log/controller/logs/screen-g-api.txt#92420:55
lbragstadglance gets bounced after that change though, right?20:56
dansmithyeah it's loading it, so ignore that concern20:57
dansmithI just forgot it happens late20:57
dansmithalso, looks like maybe we're actually not failing on the copy permission20:57
dansmithhttps://zuul.opendev.org/t/openstack/build/5642b55feb7f44df84a91b3a1b2e2a22/log/controller/logs/screen-g-api.txt#125520:58
dansmithare there policy changes to the task creation stuff maybe?20:59
dansmithah, maybe that is the copy_image failure actually21:00
lbragstadall of that stuff defaults to the admin api21:00
dansmiththat's what we log when we get a forbdden during task creation21:00
lbragstadexample copy_image debug21:00
lbragstadhttp://paste.openstack.org/raw/803239/21:00
lbragstadunfortunately - oslo.policy doesn't log the check string21:01
lbragstador what it's going to check all that stuff against21:01
lbragstadwhich would be useful in this situation21:01
dansmithnor the result right?21:01
lbragstadright21:01
dansmithso I think it's failing on add_task21:03
dansmithnot copy_image21:03
dansmith"You are not authorized to complete add_task action."21:03
lbragstadahhh - man21:04
lbragstadhttps://review.opendev.org/c/openstack/glance/+/763208/17/glance/policies/tasks.py21:04
dansmithI don't see you changing that21:04
dansmithoh, right next patch21:05
lbragstadhttps://review.opendev.org/c/openstack/glance/+/763208/14/glance/api/policy.py21:05
dansmithwas default before21:05
*** openstackgerrit has quit IRC21:05
lbragstadyeah21:06
lbragstadand it sounds like it has to be default to make basic workflows work21:06
lbragstadwait...21:06
lbragstadso - task_api_access is admin-only21:07
dansmithwell, without policy changes21:07
dansmithlbragstad: yeah, so tasks can be created or viewed via the tasks API directly, but some image actions (all of import) require creating tasks to get things done21:08
lbragstadhttps://review.opendev.org/c/openstack/glance/+/763208/14/glance/api/v2/tasks.py@22221:08
dansmithso it doesn't make sense to have one allowed and not add_task that it requires21:08
lbragstadok - so task_api_access is the policy that protects the actual API endpoint in glance21:08
lbragstadand add_task is the "internal" policy that's called within glance when various image actions happen21:09
*** rcernin has joined #openstack-glance21:09
dansmithseems like it21:10
lbragstadnoted21:10
dansmithit's pretty silly to have that "internal" policy element, when really the only reason for it is to break something21:10
dansmithprobably means it should never be anything other than "", and maybe removed in the future21:10
dansmithso, your changing of that add_task _should_ break image import (not just copy) for all non-admins21:11
dansmithdo we not see jobs failing with that?21:11
dansmithlooks like not, but I dunno why21:12
dansmiththis makes me worry the tempest import tests are using admin or something21:13
dansmitheverything is pretty silent about it.. so nova shows "uploading snapshot ...." then goes to21:14
dansmithoops21:14
dansmith    credentials = ['primary']21:14
dansmith^ this means regular user creds in tempest right?21:14
* lbragstad checks21:15
lbragstadi think so21:16
lbragstadhttps://github.com/openstack/tempest/blob/master/tempest/lib/common/dynamic_creds.py#L413-L41621:16
lbragstadhttps://github.com/openstack/tempest/blob/master/tempest/lib/common/dynamic_creds.py#L391-L39321:16
dansmithwe're definitely creating tasks in those tests normally on top of that patch,21:18
dansmithbut no policy debug to see it actually checking each element21:18
lbragstadhttps://review.opendev.org/c/openstack/glance/+/763208/17..19/glance/policies/tasks.py#2221:19
dansmithMar 04 05:08:41.380143 ubuntu-focal-rax-dfw-0023291708 glance-api[103543]: DEBUG oslo_policy.policy [None req-6fdc7cd8-f40f-4cd6-9bcf-3456754b8f05 tempest-ImportImagesTest-1217660846 tempest-ImportImagesTest-1217660846-project] enforce: rule="add_task" creds={"domain_id": null, "is_admin_project": true, "project_domain_id": "default", "project_id": "9234e039a85444c8abc290a43a3091d2", "roles": ["member", "reader"],21:20
dansmith "service_project_domain_id": null, "service_project_id": null, "service_roles": [], "service_user_domain_id": null, "service_user_id": null, "system_scope": null, "user_domain_id": "default", "user_id": "aa6f0f21efb84313b13eaed44cdcdd6a"} target={} {{(pid=103543) enforce /usr/local/lib/python3.8/dist-packages/oslo_policy/policy.py:992}}21:20
dansmiththis is where it runs the test in the ceph job which does have policy debug on21:20
dansmithdoes is_admin_project:True mean tempest is using admin creds for that test?21:20
dansmithmust not be, because the one that fails in the DNM is the same:21:21
dansmithMar 04 20:03:27.182566 ubuntu-focal-limestone-regionone-0023306141 glance-api[103126]: DEBUG oslo_policy.policy [None req-a52700a9-9335-4b69-ac0f-1f6a90483da8 tempest-DeleteServersAdminTestJSON-1328139312 tempest-DeleteServersAdminTestJSON-1328139312-project] enforce: rule="add_task" creds={"domain_id": null, "is_admin_project": true, "project_domain_id": "default", "project_id": "5aa94de242b747cf9e271ce40e42cb09", "roles":21:21
dansmith ["member", "reader"], "service_project_domain_id": null, "service_project_id": null, "service_roles": [], "service_user_domain_id": null, "service_user_id": null, "system_scope": null, "user_domain_id": "default", "user_id": "e38fbcdd53bf4bb1878fd2642829e3d9"} target={} {{(pid=103126) enforce /usr/local/lib/python3.8/dist-packages/oslo_policy/policy.py:992}}21:21
dansmithdo I don't get it21:23
dansmith*so21:23
dansmithlbragstad: the place where we are failing add_task is on a context that we get with this helper: https://github.com/openstack/glance/blob/ed930ec5123a618fea3a6e6e64bf2d6bfccf7312/glance/context.py#L75-L85, but only in the case of that copy_image delegation21:37
dansmithdoes that look right to you, or missing something that might cause us to fail when the user's context would have allowed it?21:37
dansmithactually, I think that's not actually true21:39
dansmithseems like we have to somehow have more privilege when we run the tempest tests than the user token we're using through nova21:45
dansmithso it surely seems like changing those task crud policies is required, I just don't know why the tempest tests aren't failing on that21:45
dansmithwhich concerns me21:45
lbragstadsorry - i got pulled into something else21:46
lbragstadback now though21:46
dansmithanyway, if you haven't updated that by the time I get back from a break I can do it21:46
dansmithokay21:46
dansmithwe're definitely getting past the copy_image check though21:46
lbragstadis_admin_project:True is weird21:47
dansmithagreed21:47
dansmithbut it's the same across both the one that works and the one that doesn't21:47
lbragstadit's a policy check that evaluates if context.roles contains 'admin'21:47
lbragstadis_admin_project is the legacy way of denoting a system-administrator21:48
lbragstadso - opting into the new defaults might be changing that21:48
lbragstadbecause is_admin_project obviously doesn't care about system-scope (i'm heavily speculating)21:48
*** rcernin has quit IRC21:49
dansmithI see that on the job that isn't using new defaults though21:49
lbragstadok - in the glance API, right?21:49
dansmithyes21:49
dansmithwe have two nearly identical jobs you can compare,21:49
dansmiththe nova-ceph-multistore run on your tasks patch, which has oslo_policy debug on,21:49
dansmithand then the -rbac version on my DNM patch on top21:50
lbragstadkeep in mind that https://github.com/openstack/glance/blob/master/glance/context.py#L66 runs on every single request21:50
dansmiththe latter has the new defaults, and fails lots of stuff, but former does not and does not21:50
dansmithlbragstad: I'll keep that in mind, but what is your point? :)21:51
lbragstadmm - i thought you were wondering why it was logged all the time, nevermind21:53
dansmithI really gotta look at not-a-computer for a while, I'll be more useful if I do that21:55
dansmithbbl21:56
lbragstadok - i just fixed a random pep8 issue21:57
lbragstadin the tasks policies patch21:57
lbragstadand i updated the internal policies to be more like what they were before (not admin-only)21:57
* lbragstad goes for a run21:58
*** ajitha has quit IRC22:24
*** rcernin has joined #openstack-glance22:29
*** takamatsu has quit IRC22:42
dansmithweird, I guess I commented on an old PS, sorry about that22:46
dansmithokay so I should rebase that DNM patch22:48
lbragstadthis probably isn't here or there, but22:51
lbragstadi was getting is_admin_project and context_is_admin confused22:51
lbragstadis_admin_project is in oslo.context.RequestContext and it's True by default22:52
lbragstadhttps://github.com/openstack/oslo.context/blob/master/oslo_context/context.py#L21322:52
lbragstadcontext_is_admin is a context-level policy check that uses oslo.policy to evaluate if context.roles contains 'admin'22:52
*** rcernin has quit IRC22:54
*** rcernin has joined #openstack-glance22:54
dansmiththat's not confusing at all22:54
dansmithnot sure what is_admin_project being true by default is about either22:55
* lbragstad prepares for story time22:55
lbragstadso - the is_admin_project thing was the original approach to solving admin-ness back in like 201622:56
lbragstadyour deployment would have an "admin" project that the operator would specify in config, and anyone with a role on that admin project would have is_admin_project:True in their context object22:56
dansmithwow22:57
lbragstadthen all the policies were supposed to be rewritten to use something like "publicize_image": "role:admin and is_admin_project:True"22:57
lbragstadinstead of something like "publicize_image": "role:admin and system_scope:all"22:57
*** takamatsu has joined #openstack-glance22:57
*** tkajinam has joined #openstack-glance22:57
lbragstadat the same time, we started mapping out the system-scope approach with a spec and presented both to operators at one of the forums22:59
lbragstadthen ultimately pivoted to the system-scope approach22:59
lbragstad(with one of the advantages being it would be easier to implement NIST constrained RBAC using a system-model instead of a separate project tree hierarchy, where projects are overloaded for service level-access)23:00
dansmithyeah, I was going to say that the project approach seems like a hack,23:01
dansmithbut I guess it's pretty much the same as unix with sudoers allowing @wheel, so...23:01
lbragstadbut "easier" is kind of a misnomer, because both approaches require a lot of work (as we're finding out now), but conceptually, overloading projects against with another responsibility caused hesitation23:02
lbragstads/against/again/23:02
dansmithsystem scope seems like better integration23:03
lbragstadwe also didn't know how to answer questions like "should your admin project be allowed to own resources?" "what happens if your admin project disappears?"23:03
dansmithyeah23:03
lbragstad"we should develop protections to prevent foot-gun incidents, right?"23:04
dansmith@wheel can (group-)own files, but.. not really a good example to follow23:04
lbragstadyeah23:05
lbragstadi guess putting resources in an admin project is kinda like that23:07
dansmithyeah23:09
dansmithokay, I'm stupid23:20
dansmithyou're not seeing the add_task failure on any of the other jobs because you're not turning on new defaults on those tempest runs23:21
dansmithI was equating the nova-ceph-multistore run on your patch with the one of mine above that turns that thing on, but they're not equal, obviously23:21
dansmithwhich is why the regular import tests _do_ fail in tempest in that job, in addition to all the nova stuff23:22
dansmithsee, I told you I needed a break :D23:22
lbragstadyeah - so your DNM patch failed because you were forcing the deployment into the new enforcement model23:22
lbragstadand that broke because i overly restricted the task policies (that are only used internally)23:23
dansmithright,23:23
lbragstadthe new hypothesis is that it will work on this new run23:24
dansmithso the version I pushed up on top of the updated task policy patch should give us another smoke test of anything else that may still be broken23:24
dansmithright, or whittle down to some other thing we haven't figured out yet :)23:24
lbragstadyeah - ok, that makes sense23:24
dansmithwhen that is done, I should turn that flag on for more tests that cover some other bases too and we can just use that as our canary23:25
lbragstad++23:25
dansmithso glad to have that sorted, I was worried that maybe we haven't been testing import as a regular user this whole time or something23:26
dansmiththere's still stuff failing in that job23:37
dansmithshould be finishing up soo23:37
dansmithssage': 'You are not authorized to complete download_image action.<br /><br />\n\n\n', 'code': '403 Forbidden', 'title': 'Forbidden'}23:37
lbragstadugh23:45
lbragstadi kept that as project-member23:45
lbragstadi originally proposed it as project-reader23:45
dansmithso maybe nova can't boot anything because it can't read the image?23:45
dansmithI dunno what exactly is failing just saw that shoot by23:45
dansmithit takes a long time to fail every tempest test, which is why it's still going :P23:46
lbragstadi think the only person who can't download an image is project readers23:49
lbragstadhttps://review.opendev.org/c/openstack/glance/+/764754/8/glance/policies/image.py23:49
lbragstadat least in the new world23:49
lbragstadunless a test is relying on that policy being open (or if that's assumed somewhere?)23:49
dansmithI wouldn't think so, but yeah I dunno23:49
dansmithseems like a lot of fail, like similar to last time, so something else must be going on23:50
lbragstadalright - i have to step away for a bit23:53
dansmithack23:54
lbragstadthanks for all the help with this dansmith - i feel like we've sussed out quite a bit23:55
dansmithyep, no prob!23:55
*** openstackgerrit has joined #openstack-glance23:58
openstackgerritDan Smith proposed openstack/glance master: DNM: Check some jobs with new policy defaults  https://review.opendev.org/c/openstack/glance/+/77873623:58

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