16:00:19 #startmeeting keystone 16:00:20 Meeting started Tue Jun 19 16:00:19 2018 UTC and is due to finish in 60 minutes. The chair is lbragstad. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:21 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:23 o/ 16:00:24 The meeting name has been set to 'keystone' 16:00:28 o/ 16:00:32 #link https://etherpad.openstack.org/p/keystone-weekly-meeting 16:00:36 agenda ^ 16:00:40 o/ 16:00:45 o/ 16:00:52 ping ayoung, breton, cmurphy, dstanek, gagehugo, hrybacki, knikolla, lamt, lbragstad, lwanderley, kmalloc, rodrigods, samueldmq, spilla, aselius, dpar, jdennis, ruan_he, wxy, sonuk 16:01:06 o/ 16:01:26 i'll be mostly lurking as I'm in another meeting 16:01:50 we have a lot to talk about today 16:02:09 we'll give folks another minute or two though and then get started 16:03:21 #topic announcements 16:03:27 real quick 16:03:36 if you haven't seen yet, we're starting to get a bunch of things in flight 16:03:56 (e.g. default roles, unified limits, capability lists, mfa receipts) 16:04:12 plenty of things to review if you're looking for something 16:04:53 since I don't see kmalloc yet, we'll wait for him before jumping into the unified limits topics 16:05:05 hrybacki: do you want to go through your topics in the mean time? 16:05:21 sure 16:05:24 #topic Ensure default roles breaking folks 16:05:47 So, I more or less wanted to ask if we should review ^^ 16:05:54 #link https://review.openstack.org/#/c/572243/ default roles implementation 16:06:14 it sounds like lbragstad has been working with folks from sahara/horizon to resolve the breakages 16:06:26 #link https://review.openstack.org/#/c/576056/ proposed revert 16:06:28 so is this just breaking the gate or is this going to affect users? 16:06:55 cmurphy: that's hard to say. Role implications concern me a bit more now 16:07:08 from what i've been seeing, it's mostly breaking on tests/infrastructure that makes assumptions about role names and casing 16:07:23 but users could also be making those assumptions 16:07:27 sure 16:07:28 right 16:07:54 I'm concerned that folks won't read the release notes, run the bootstrap, and have some implied roles they did not anticipate 16:08:18 to be fair, we can only protect against that kind of stuff so much IMO 16:08:19 we can't help people who don't read the release notes 16:08:31 but I have no idea how to research that. Is it generally accepted that people do read them / it's on them if they dont? 16:08:40 okay 16:08:57 related question: was this change on openstack-dev with the [all] tag in the email? 16:08:57 well that puts me at ease. Thanks for the push for more verbose reno cmurphy lbragstad 16:09:03 it's helps protect us (as bad as that sounds?) 16:09:22 i'm not worried any more about surprise implied roles, but i'm worried this bug with the duplicate role name is going to hit people 16:09:53 tosky: no, i don't think we anticipated it breaking people's CI 16:10:04 tosky: the approach and specification detailing all of this work has been socialized on the mailing lists since the Denver PTG last year 16:11:02 lbragstad: with the [all] tag? 16:11:11 tosky: no - we didn't use the all tag 16:11:20 if i would have expected these types of issues i would have 16:11:26 #link http://lists.openstack.org/pipermail/openstack-dev/2018-May/130207.html 16:11:56 please don't take it as what's not (it's just a statement), but when something changes in keystone it's pretty much going to hit someone 16:12:02 just a fact 16:13:33 o/ 16:13:33 lbragstad: that's all I had for that topic 16:13:51 well what's the plan though? 16:13:55 roll back? or? 16:13:56 ^ 16:13:59 are we doing the revert, or does the list of changes fix it? 16:14:01 IMO we have two options 16:14:11 1.) roll back and implement case sensitivity for roles 16:14:21 2.) push forward and help clarify assumptions about role names 16:14:58 I thought implementing case sensitivity for role names wasn't an option? 16:14:59 i'm in favor of 1 but i wonder if that will also break people 16:15:05 yeah 16:15:13 it could, it's also going to be involved 16:15:24 what a mess 16:15:26 hrybacki: it isn't if the behavior is already case-insentivie 16:15:40 and if we take that approach with role names, we also have to take it with project names and user names, etc..... 16:15:56 so far, was the fact the roles were not case-sensitive documented somewhere? 16:16:16 tosky: documented or not, behavior is our API contract 16:16:21 it's a behavior across keystone API - it's not specific to role names 16:16:29 and we should document it as well. 16:16:39 but changing behavior outside of a security issue is mostly off the table 16:17:05 (if we had all our expected behaviors documented more clearly, it would be a different thing) 16:17:08 ok - so sounds like we have an action item 16:17:20 well if it is an option to enforce the existing behavior across the board I'm a fan 16:17:43 FTR: In names for things, i like case preserving, but case-insensitive 16:17:49 in APIs. 16:17:57 keystone consideres POST /v3/projects {name: Foobar} and POST /v3/projects {name: foobar} a 409 16:18:12 because representing AUser and Auser and auser and auSer as all different things is somewhat painful 16:18:15 UX wise. 16:18:39 (not going to argue posix-isms though) 16:18:44 lbragstad: is that dependent on your database backend? or is it always? 16:18:55 kmalloc ++ on case preserving & case insensitive 16:18:59 i tested it with mysql 16:18:59 fine as documenting and forcing this, but consider that as a user I never realized this non-case-sensitivness of Keystone 16:19:04 i'm not sure about other backends 16:19:11 cmurphy: it is... default behavior in mysql. 16:19:14 it *could* be changed. 16:19:19 I've frequently seens and described roles like Member and member, with code to distinguish between both 16:19:24 so this will be a surprise for many people 16:19:27 tosky: as a maintainer i didn't realize it either ;) 16:19:36 oh 16:19:57 we would need to swap to varbinary or binary vs varchar etc to ensure case-sensitivity 16:20:15 does anyone want to take a shot at writing up a doc patch for our API reference to clarify these bits (for all name resources not just role names) 16:20:15 i am unsure about non-MySQL RDBMS varbinary vs varchar 16:20:52 or we could change collation 16:20:59 kmalloc: yeah i'm concerned that different database backends will cause different api behaviors 16:21:10 e.g. utf8mb4_0900_as_cs 16:21:17 but that is also MySQL-specific. 16:21:30 ^ that is the suggestion i've been stumbling across a lot 16:21:58 but it's operator specific, isn't is? 16:22:11 you can define the column with a collation 16:22:35 ah - so a migration at the very least 16:22:37 we could also encode something like that via our queries (will need to look into it) through the ORM 16:23:11 we could also implement this in business logic 16:23:23 (trying to remove ambiguity based on the backend being used) 16:23:51 for case-preserving but case-insensitive across all backends, we will need to do something like "lookup-name" and "display-name" 16:24:04 where we lower(lookup-name) 16:24:07 but that could still be considered backwards incompatible if someone is using a backend that supports case sensitive names 16:24:39 i'm ok with backwards incompat for "this is crazypants" 16:25:00 we're solidifying behavior (closest aligned with current "general" behavior) 16:25:29 we also have stuff like this in our tests - which is misleading https://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/unit/test_backend_sql.py#n296 16:25:36 #link https://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/unit/test_backend_sql.py#n296 16:26:02 well user is special because ldap right? 16:26:11 ftr, looks like PGSQL is case-sensitive by default for string comparison 16:26:12 s 16:26:19 but that looks like a sql specific test (given it's location) 16:26:23 unless you explicitly lower() in the query. 16:26:43 and we do the same thing for projects https://git.openstack.org/cgit/openstack/keystone/tree/keystone/tests/unit/test_backend_sql.py#n310 16:27:01 lbragstad: i assume that's because we want to enforce the same behavior between sql and ldap backends 16:27:24 did we used to allow ldap as a project backend? 16:27:31 cmurphy: long time ago 16:27:33 a long time ago we did - i think 16:27:40 so that's probably where that's from 16:27:54 i pulled up the commit - it was merge like four and a half years ago 16:27:55 cmurphy: used to be IDENTITY+ASSIGNMENT was one backend, then we still allowed LDAP assignment, then we split resource/killed ldap assignment 16:28:26 keystone used to have a single driver (barring token) back in... folsom? 16:28:30 essex 16:28:41 yeah 16:28:43 all or nothing. 16:28:52 ok so. 16:28:58 i think the options are: 16:29:11 1) Force Case Insensitivity across all backends [somehow] 16:29:20 2) Force Case Sensitivity across all backends [somehow] 16:29:27 3) Revert change. 16:29:40 4) document inconsistent behavior based upon backend and clarify what we expect 16:30:17 we know this had issues with various projects CI 16:30:27 but what's the worst case for end users 16:30:29 fwiw, we cater to MySQL. I am ok with forcing Case Insensitivity since that is our test-bed. 16:30:31 I lean toward 4 I think, the more I think about it the more I think that attempting to recreate the member and/or Member role is more going to be a CI problem than a regular user problem 16:30:49 i less ok with 2 and 3. 16:30:54 and if they do try to recreate it then it 409s and no harm done 16:31:01 ++ 16:31:03 i think 4 is going to happen in either case - documentation expansion. 16:31:09 sure 16:31:27 worst case a deployer already has Member and hrybacki already accounted for that in the patch that implements this 16:32:00 right, bootstrap itself isn't 409ing right? it's just the openstack role create Member afterward that does? 16:32:07 correct 16:32:21 we try/except role creation in bootstrap to explicitly handle conflicts 16:32:46 #link https://git.openstack.org/cgit/openstack/keystone/tree/keystone/cmd/bootstrap.py#n120 16:33:31 bootstrap is way smarter about that than it needs to be. 16:33:33 what's up with this though https://review.openstack.org/#/c/576163 16:33:35 lbragstad: but is that case insensitive? It attempts to pull the role based on role name 'member' not 'Member' 16:33:37 but it works to our benefit there. 16:33:40 why are those ones case sensitive? 16:34:02 cmurphy: JSON is case preserving. 16:34:11 and clients/etc all look for case 16:34:29 so Member and member match in MySQL String Comparison 16:34:35 https://launchpad.net/bugs/1777359 16:34:36 Launchpad bug 1777359 in OpenStack Dashboard (Horizon) "Unable to create a project from horizon on devstack" [Undecided,New] - Assigned to Lance Bragstad (lbragstad) 16:34:39 but anything in python wont match Member and member 16:34:55 frickler asked me to make some additional changes there so that the names were consistent 16:35:36 this is pushing me towards needing to support case [in]sensitivity directly in keystone 16:36:12 that sounds like a long term direction thing 16:36:14 and ... based upon emitting data (API) behavior, we might want to do case sensitive (wince) because we can't just lower() all names on output without potentially breaking a lot of things. 16:36:29 that we should apply in our api consistently for all resource names 16:37:19 and that is a migration to apply that, basically swap varchar -> varbinary or add collation to the queries 16:37:46 initially we can just document. 16:38:16 but i think we're going to need to be consistent in string matching not just let the DB be "smart enough" [and change behaviors] 16:38:48 #action gagehugo to propose a patch that clarifies the behavior with resource names and SQL-based deployments 16:38:59 (gagehugo volunteered in -keystone) 16:39:02 lol 16:39:08 yeah we should document regardless 16:39:28 ++ 16:39:44 #action spin up bug/task[trello] to work on long-term alignment on case-[in]sensitivity within our API (names/other filters specifically) 16:39:53 any other action items we need to deal with at the moment? 16:39:55 kmalloc: ++ 16:40:10 tosky: is there anything you'd like to see in addition to those? 16:40:56 it looks fine, thanks 16:41:19 (and of course please the support for people trying to understand what to fix and how to fix it) 16:41:53 i'll send a post with [all] today 16:41:59 to the -dev mailing list 16:42:43 let's circle back to the first topic quick if no one has anything else on this specific topci 16:43:15 #topic Unified Limits Update 16:43:37 kmalloc: raised some concerns about unified limits last week, and thought it would be good to go through them as a group 16:43:54 that way we're all on the same page as far as the plan forward goes 16:44:07 ok 16:44:26 if you look at the agenda there are some recommended and required changes for the limits backend 16:44:46 based upon my understanding after talking it through with lbragstad 16:45:09 1) we need to index columns we are matching/searching on (e.g. "name") otherwise it gets really ugly 16:45:37 to level set, we have two different tables, one for registered limits and the other for project-specific limits 16:46:00 2) a FK on a column that is not unique (very mysql-specific, in fact innodb-extension specific, doesn't work on other backends) means that any value in the column that matches is sufficient for the FK. 16:46:32 right now, we have name being non-unique and have a very complex FK between three columns to avoid conflicts. 16:47:10 my recommendation is go for data normalization: and eliminate duplicated data in the limit table, and FK to a specific registered_limit 16:47:24 instead of FK across to name, service, region[optional] 16:47:30 and duplicate the storage 16:48:03 the big change to the backend code is that the registered_limit would need to be looked up (based upon name, service, region) to find the right PK to use as the FK target in the limit table 16:48:17 in the etherpad i gave an example of a potential "new" limit model 16:49:11 and when we do the limit lookup, we do the SQLAlchemy joined load, and just build the ref from the registered limit (service_id, region, etc). 16:49:58 and override to_dict and make the model super smart on finding the right registered limit 16:50:07 for from_dict. 16:50:12 i know... this is super dense. 16:50:39 this is getting into something it took lbragstad and I 30-40 mins via video to hammer out the behaviors and potential issues. 16:50:58 * cmurphy trusts kmalloc is right 16:51:15 ++ 16:51:26 i think this will be good for performance in the long run, too 16:51:27 but tl;dr - we need indexes. we can also eliminate duplicated data and simplify the models with some in-code changes/model smarts. 16:51:58 i've tagged each item as recommended/required. the only absolutly required thing is adding indexes 16:52:07 the really hard part: data migration. 16:52:14 wxy|_: already has a patch up that starts this (thanks!) 16:52:20 https://review.openstack.org/#/c/576025 here is a WIP patch for the Recommendation. the Index, sql model and manage logic are still missing. 16:52:21 not duplicating sounds like a win 16:52:30 the simplest solution if we break apart and re-make the tables, drop all current data 16:52:37 and just create a new set of tables 16:52:42 #link https://review.openstack.org/#/c/576025 16:52:44 this is expirmental 16:52:51 the schema change is most done. 16:52:55 it is pretty much ok to do that. 16:53:08 but i'm also ok with preserving data if we cna migrate cleanly 16:53:16 wxy|_: you're doing an awesome job on this :) 16:53:26 ++ 16:53:39 it's experimental but dropping all data sounds like an overextension of the definition of experimental 16:53:46 kmalloc: lbragstad: really thanks for the recommendation. 16:53:49 i am also going to spin up a change to prevent new tables from having uuid PK columns. 16:53:59 unless there is a specific override set. 16:54:27 this change would have been a lot less painful if we also didn't need to change the PK. 16:54:48 (we don't, but uuid pks are bad(tm)) 16:55:25 anyway. in short, please review wxy's change. come bug me if you need insight into what we're doing and why 16:55:38 and can't divine it from the code changes. 16:56:11 kmalloc: maybe you could write up a little guidance on why no more uuid pks in https://docs.openstack.org/keystone/latest/contributor/ ? 16:56:21 so we don't keep making the mistake 16:56:34 sure. i'll also cover it in the error that is generated when a table is added with a uuid pk 16:56:51 ++ 16:56:52 we should walk through options for the migration though 16:57:18 and vet any options we have other that 'truncate limit; truncate registered_limit;' 16:57:29 s/that/than/ 16:57:31 sure. 16:57:55 whatever comes out of that discussion will be good context to include for justificiation 16:58:01 data migration is going to be ugly regardless. 16:58:03 (i've never done this before) 16:58:04 create new tables; copy data ; drop old tables; rename tables? 16:58:27 pretty much 16:58:28 ^ that's the approach we usually take 16:58:35 or: create new table, reference new table 16:58:41 eventually drop old table 16:58:47 (two minutes remaining) 16:59:10 we can continue this in -keystone, too 16:59:56 hrybacki: sorry we didn't get back around to your last topic 17:00:03 no worries lbragstad 17:00:15 is that something we can cover next week? 17:00:22 or is it time sensitive? 17:00:29 yeah, it can wait 17:00:32 ok 17:00:35 or I'll bring it up in channel as needed 17:00:39 i appreciate the time everyone 17:00:43 #endmeeting