)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2ae82e7f2b943578bf6295aeb04a396abac067dd","unresolved":false,"context_lines":[{"line_number":15,"context_line":"other services, it is (as the name implies) only"},{"line_number":16,"context_line":"for internal Cinder operations."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Implements: blueprint cinder-internal-tenant"},{"line_number":19,"context_line":"Change-Id: I0c3263e71cf1a275a4538c35ebe1c7d750bb16e6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba3cc151_87e5010a","line":18,"updated":"2015-07-08 17:21:32.000000000","message":"Don\u0027t we need DocImpact here since we are adding new configuration options which are not trivial?","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fbf2bc41a5f5b5cd09792fbdd4d3188895a515be","unresolved":false,"context_lines":[{"line_number":15,"context_line":"other services, it is (as the name implies) only"},{"line_number":16,"context_line":"for internal Cinder operations."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Implements: blueprint cinder-internal-tenant"},{"line_number":19,"context_line":"Change-Id: I0c3263e71cf1a275a4538c35ebe1c7d750bb16e6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba3cc151_628a2bc1","line":18,"in_reply_to":"ba3cc151_87e5010a","updated":"2015-07-08 17:53:07.000000000","message":"Not sure, but you make a good point, I\u0027ll add one in for good measure.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"ea5979ad2c74eb17dc2d2056c2840ec07350a9c3","unresolved":false,"context_lines":[{"line_number":15,"context_line":"other services, it is (as the name implies) only"},{"line_number":16,"context_line":"for internal Cinder operations."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact: This adds new config steps that should"},{"line_number":19,"context_line":"be covered in the Cinder docs."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Implements: blueprint cinder-internal-tenant"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba3cc151_f8fb1579","line":18,"updated":"2015-07-09 14:19:26.000000000","message":"I agree with Gorka, just to make the commit message a little more verbose; though, it\u0027s not that big of a deal if they aren\u0027t added.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"42b4a59409ed4a80436219d85764c691a7666cb2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"other services, it is (as the name implies) only"},{"line_number":16,"context_line":"for internal Cinder operations."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact: This adds new config steps that should"},{"line_number":19,"context_line":"be covered in the Cinder docs."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Implements: blueprint cinder-internal-tenant"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba3cc151_7a9dc4ba","line":18,"updated":"2015-07-09 11:23:51.000000000","message":"Maybe adding the names of the options that have been added would have been nice.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a06f5a310f380b3efb3c0305394b5a977aeb95a4","unresolved":false,"context_lines":[{"line_number":15,"context_line":"other services, it is (as the name implies) only"},{"line_number":16,"context_line":"for internal Cinder operations."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact: This adds new config steps that should"},{"line_number":19,"context_line":"be covered in the Cinder docs."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Implements: blueprint cinder-internal-tenant"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a41bdd9_fa1d0410","line":18,"in_reply_to":"ba3cc151_f8fb1579","updated":"2015-07-13 03:04:31.000000000","message":"Done","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"}],"cinder/context.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"afc7fbba995f5e1cb9304e2ad04088a5ce8ec16b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from cinder import policy"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_ac210ca0","line":32,"updated":"2015-07-08 16:49:10.000000000","message":"IMO, it should be renamed to \u0027cinder_internal_project_id\u0027 or \u0027cinder_internal_tenant_id\u0027","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"93f96318e6460bab576a74e4a2b01057dea4f8b2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from cinder import policy"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_4ba33b43","line":32,"in_reply_to":"ba3cc151_22e2e3a0","updated":"2015-07-09 19:58:44.000000000","message":"Patrick, I understand you and won\u0027t block this patch if others is agree to merge it. It\u0027s just by IMHO, that using \u0027tenant_project_id\u0027 is not a good idea and could be confusing because tenant and project is almost the same.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fbf2bc41a5f5b5cd09792fbdd4d3188895a515be","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from cinder import policy"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_22e2e3a0","line":32,"in_reply_to":"ba3cc151_67979d90","updated":"2015-07-08 17:53:07.000000000","message":"So my reasoning for this is that the feature has been referred to as \u0027cinder internal tenant\u0027, and the property we need here is the request context\u0027s project_id. Then using a format of \u003cfeature\u003e_\u003cproperty\u003e, like \u0027cinder_internal_tenant_user_id\u0027, we get the \u0027cinder_internal_tenant_project_id\u0027. Initially I thought it was kind of weird too (and still do to some extent) but if its just \u0027cinder_internal_tenant_id\u0027 maybe there is more than one internal tenant and thats the id of it? Or if we go with \u0027cinder_internal_project_id\u0027 then it doesn\u0027t match up with the other one, or mention the name of the feature. IMO the shorter versions cause more confusion than the slightly redundant sounding \u0027cinder_internal_tenant_project_id\u0027.\n\nNow, all that being said, if enough folks want it named something else.. thats fine I\u0027m not super attached to this : )","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2ae82e7f2b943578bf6295aeb04a396abac067dd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from cinder import policy"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_67979d90","line":32,"in_reply_to":"ba3cc151_ac210ca0","updated":"2015-07-08 17:21:32.000000000","message":"I think it matches the naming used of the other option, so I\u0027m Ok with it as it is.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2ae82e7f2b943578bf6295aeb04a396abac067dd","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                              project_id\u003dproject_id,"},{"line_number":203,"context_line":"                              is_admin\u003dTrue)"},{"line_number":204,"context_line":"    else:"},{"line_number":205,"context_line":"        LOG.warning(_LW(\u0027Unable to get internal tenant context: Missing \u0027"},{"line_number":206,"context_line":"                        \u0027required config parameters.\u0027))"},{"line_number":207,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_87f741d2","line":205,"updated":"2015-07-08 17:21:32.000000000","message":"Just a warning?  I would consider this to be an error since wherever this is being called is actually needing it.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5e510d60825da897e488886b1a92a62e26ee8198","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                              project_id\u003dproject_id,"},{"line_number":203,"context_line":"                              is_admin\u003dTrue)"},{"line_number":204,"context_line":"    else:"},{"line_number":205,"context_line":"        LOG.warning(_LW(\u0027Unable to get internal tenant context: Missing \u0027"},{"line_number":206,"context_line":"                        \u0027required config parameters.\u0027))"},{"line_number":207,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_da2df08f","line":205,"in_reply_to":"ba3cc151_42be07af","updated":"2015-07-09 11:23:17.000000000","message":"Ok, I\u0027m convinced, warning seems like the most reasonable option.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"fbf2bc41a5f5b5cd09792fbdd4d3188895a515be","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                              project_id\u003dproject_id,"},{"line_number":203,"context_line":"                              is_admin\u003dTrue)"},{"line_number":204,"context_line":"    else:"},{"line_number":205,"context_line":"        LOG.warning(_LW(\u0027Unable to get internal tenant context: Missing \u0027"},{"line_number":206,"context_line":"                        \u0027required config parameters.\u0027))"},{"line_number":207,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_42be07af","line":205,"in_reply_to":"ba3cc151_87f741d2","updated":"2015-07-08 17:53:07.000000000","message":"I was torn on that, my rational for warning is in the case of the image-volume cache if we don\u0027t get the internal context we just don\u0027t use the cache and the volume is created the slow (normal) way. In this case warnings make sense all the way through because there wasn\u0027t really an error with creating the volume... its just a warning that the feature may not be working as you expect, but in the end the volume *was* created successfully.\n\nThen for a feature that absolutely needs to have this, well they can check if they got the context, and if not they can log an error or raise an exception. So its more up to the user of this util method to decide how to interpret the return value, but there is a warning to provide some clue as to what happened.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad669bb3d4f897e19716e7076112f363a2ff99e9","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"},{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_27d119ce","line":33,"updated":"2015-07-13 02:33:25.000000000","message":"One question here:\nIf both cinder_internal_tenant_project_id and cinder_internal_tenant_user_id are None as the default values for them, is it OK to use the get_internal_tenant_contex without any issue? Or we have to give some meaningful values to them.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"df4ab8e7158ce38fb7c854dcd6df8f57d93cc02c","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"},{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c7038d0e","line":33,"in_reply_to":"9a41bdd9_27d119ce","updated":"2015-07-13 02:45:02.000000000","message":"BTW, can this make it invisible to \"cinder list\"?","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"4236b77e8070ee8273055dd13c16c91f85804979","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"context_opts \u003d ["},{"line_number":32,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_project_id\u0027,"},{"line_number":33,"context_line":"               default\u003dNone,"},{"line_number":34,"context_line":"               help\u003d\u0027ID of the project which will be used as the Cinder \u0027"},{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"},{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_daafe0e1","line":33,"in_reply_to":"9a41bdd9_c7038d0e","updated":"2015-07-13 02:52:32.000000000","message":"If they are both None the helper method will return None, the caller can then decide how to interpret that and either throw an error or recover. They are hidden from cinder list for everyone except admins who can see other tenants volumes.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c4a73ad06213f4ce0824c2443d6357d7ccf4c4fc","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"},{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"},{"line_number":37,"context_line":"               default\u003dNone,"},{"line_number":38,"context_line":"               help\u003d\u0027ID of the user to be used in volume operations as the\u0027"},{"line_number":39,"context_line":"                    \u0027 Cinder internal tenant.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_87112556","line":38,"updated":"2015-07-10 04:08:55.000000000","message":"total nit, but it is nice to be consistent putting spaces at the beginning or end of the line.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a06f5a310f380b3efb3c0305394b5a977aeb95a4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                    \u0027internal tenant.\u0027),"},{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"},{"line_number":37,"context_line":"               default\u003dNone,"},{"line_number":38,"context_line":"               help\u003d\u0027ID of the user to be used in volume operations as the\u0027"},{"line_number":39,"context_line":"                    \u0027 Cinder internal tenant.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_1a26a868","line":38,"in_reply_to":"ba3cc151_87112556","updated":"2015-07-13 03:04:31.000000000","message":"Done","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"4addaac08f2917cdc3cf4292b2c6088b62bf593d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"},{"line_number":37,"context_line":"               default\u003dNone,"},{"line_number":38,"context_line":"               help\u003d\u0027ID of the user to be used in volume operations as the \u0027"},{"line_number":39,"context_line":"                    \u0027Cinder internal tenant.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_723fb425","line":39,"updated":"2015-07-17 23:35:02.000000000","message":"Is ID the correct thing to use, vs Name?  Not saying it is/isn\u0027t, just asking and thinking about it.\n\nAlso, IIFC an Admin need to create the tenant, then update the config file with that info, restart services right?\n\nIs it worth considering automating the creation of the tenant?  Is it even something that we should expose in the config file at that point as opposed to Cinder just starting up, looking for it and creating it if it\u0027s not there?","commit_id":"a78bb29b1f939067dc7ae8bf28393f10c045204f"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"ff6feef931c69f626872080cf4ed142d3de9802a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"},{"line_number":37,"context_line":"               default\u003dNone,"},{"line_number":38,"context_line":"               help\u003d\u0027ID of the user to be used in volume operations as the \u0027"},{"line_number":39,"context_line":"                    \u0027Cinder internal tenant.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_c29de65a","line":39,"in_reply_to":"9a41bdd9_723fb425","updated":"2015-07-18 22:51:57.000000000","message":"Is ID the right thing to use? Dunno... but its the easiest. The reason being that for something like creating a volume we need the tenant ID and user ID for the DB entry. My first cut at this took names and stuff (I think you saw this version before I split it out from the cache patchsets) and would do keystone calls and all that. To eliminate the need for having to do http calls to figure out the user/tenant ID\u0027s we just put them directly into the config file (instead of user name, tenant name, auth url, password).\n\nYou are correct that an admin would need to have created some tenant, update the config, and restart the services.\n\nSo I have looked into automating this, and tried out a few more things last night, but I\u0027ve come back to the conclusion that IMO this approach is my favorite at least as a starting point. Let me outline a few of the options I tested out and their pros and cons...\n\n1) Automatically generate the tenant and/or user: This means that cinder has code in here to actually make calls to keystone and generate a tenant and/or user as needed and somehow persist that info for future use. The pro\u0027s for include very little interaction for an admin setting up cinder, they don\u0027t have to do any keystone calls or manually set anything up. The con\u0027s are that we add in some additional code to use the keystone client to try and authenticate, create a tenant/project, and store the info somewhere. Lots of extra code compared with what is going on in this patchset. The other downside is that we need to have credentials, auth urls, etc in the config that are privileged enough to actually do those things.\n\n2) Automatically generate some tenant and/or user ID\u0027s but don\u0027t actually make them \u0027real\u0027: Since we only need to fill some spots in the database and never really need to validate that the cinder internal tenant is using a real keystone tenant or user we can just generate a couple of uuids, stash em somewhere and use those. The only drawback is that if someone does that and then decides they want to actually have it be a keystone user things get weird since they would need to then create them and put in config options like they do today in the current patchset. The pro\u0027s of this is that for someone who doesn\u0027t care but wants the features enabled it would \u0027just work\u0027. The con\u0027s primarily being that its almost exactly the same as what we have today, except now we need to store the credentials somewhere in cinder. Maybe not a bad option, but IMO isn\u0027t really that much more helpful. This one really could just be built on top of whats in this patchset if folks really want to just automate it.\n\n3) Piggy back on the service tenant/user: We already have to create a cinder user with the service tenant and setup that configuration stuff in cinder.conf. We then could just use this as the cinder internal tenant. The biggest draw back to this is that someone wouldn\u0027t really have the option to use some other special tenant if they wanted, and we have all the extra code complexity, maintenance burden, and overhead from option #1. This is primarily because we need the ID\u0027s and the current configuration (if you follow the official docs or what devstack will do) uses the names not ID\u0027s. This one is also not really a bad option, but IMO it might be a little fragile and makes a lot of assumptions on behalf of the admin.\n\n4) No automatic stuff, just two config options (AKA this patchset): I look at this as the bare minimum and least disruptive/costly of the bunch. There is not extra code for handling keystone auth, no overhead to do the HTTP calls to figure out the ID\u0027s, and no need to store anything in the cinder DB. The biggest downside, without a doubt, is that an admin would need to potentially create a new tenant and/or user and put their id\u0027s in  cinder.conf. The cool part though is that similar to #2 they don\u0027t even need to be real ID\u0027s, anything will do... but they *could* be real ones. They can even be the cinder service tenant/user that an admin will have to create anyway. Just two more config options to copy-paste values into.\n\n5...n) Combinations of any of the above with different twists or other options: No doubt we can do a bunch of stuff here to make this easy to configure, minimize overhead, abstract dependencies with keystone versions or different client libs, etc. I do however most of it as additional on top of a core set of functionality which is to be able to say to cinder via the config file \u0027don\u0027t do anything smart, just use this tenant ID and this user ID\u0027.\n\nAll that being said, I\u0027m no keystone wizard or have some direct brain-meld with every cinder admin ever, so my opinion on this may not be definitive. If someone has a better approach (that works) which will get this through and into L I\u0027m more than happy to run with it.","commit_id":"a78bb29b1f939067dc7ae8bf28393f10c045204f"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"a3ee901caab663df285b314d091928b02a224bc2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    cfg.StrOpt(\u0027cinder_internal_tenant_user_id\u0027,"},{"line_number":37,"context_line":"               default\u003dNone,"},{"line_number":38,"context_line":"               help\u003d\u0027ID of the user to be used in volume operations as the \u0027"},{"line_number":39,"context_line":"                    \u0027Cinder internal tenant.\u0027),"},{"line_number":40,"context_line":"]"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_55d19521","line":39,"updated":"2015-07-23 18:26:14.000000000","message":"s/as the/for the ?","commit_id":"fd71ce8bab5ea737588b03f6753550587e35519c"}],"cinder/tests/unit/test_context.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2ae82e7f2b943578bf6295aeb04a396abac067dd","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                         ctx.to_dict()[\"user_identity\"])"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @mock.patch(\u0027cinder.context.CONF\u0027)"},{"line_number":102,"context_line":"    def test_cinder_internal_context(self, mock_conf):"},{"line_number":103,"context_line":"        project_id \u003d \u0027ec729e9946bc43c39ece6dfa7de70eea\u0027"},{"line_number":104,"context_line":"        user_id \u003d \u0027c466a48309794261b64a4f02cfcc3d64\u0027"},{"line_number":105,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_87a18196","line":102,"updated":"2015-07-08 17:21:32.000000000","message":"These tests are perfect example for ddt usage, but I don\u0027t mind them being like this.","commit_id":"2b8c2893d82a31def6ee5e141be155a709812750"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad669bb3d4f897e19716e7076112f363a2ff99e9","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":116,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":117,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":118,"context_line":"        self.assertEqual(None, ctx)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @mock.patch(\u0027cinder.context.CONF\u0027)"},{"line_number":121,"context_line":"    def test_cinder_internal_context_missing_project(self, mock_conf):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_47ed3d8a","line":118,"updated":"2015-07-13 02:33:25.000000000","message":"assertIsNone will be more straightforward.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a06f5a310f380b3efb3c0305394b5a977aeb95a4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":116,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":117,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":118,"context_line":"        self.assertEqual(None, ctx)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @mock.patch(\u0027cinder.context.CONF\u0027)"},{"line_number":121,"context_line":"    def test_cinder_internal_context_missing_project(self, mock_conf):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_ba00dcab","line":118,"in_reply_to":"9a41bdd9_47ed3d8a","updated":"2015-07-13 03:04:31.000000000","message":"Done","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad669bb3d4f897e19716e7076112f363a2ff99e9","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":125,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":126,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":127,"context_line":"        self.assertEqual(None, ctx)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @mock.patch(\u0027cinder.context.CONF\u0027)"},{"line_number":130,"context_line":"    def test_cinder_internal_context_missing_all(self, mock_conf):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e702513e","line":127,"updated":"2015-07-13 02:33:25.000000000","message":"assertIsNone will be more straightforward.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a06f5a310f380b3efb3c0305394b5a977aeb95a4","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":125,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":126,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":127,"context_line":"        self.assertEqual(None, ctx)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    @mock.patch(\u0027cinder.context.CONF\u0027)"},{"line_number":130,"context_line":"    def test_cinder_internal_context_missing_all(self, mock_conf):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_5a2c304a","line":127,"in_reply_to":"9a41bdd9_e702513e","updated":"2015-07-13 03:04:31.000000000","message":"Done","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad669bb3d4f897e19716e7076112f363a2ff99e9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":134,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":135,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":136,"context_line":"        self.assertEqual(None, ctx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c7f94d4f","line":136,"updated":"2015-07-13 02:33:25.000000000","message":"assertIsNone will be more straightforward.","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a06f5a310f380b3efb3c0305394b5a977aeb95a4","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        mock_conf.cinder_internal_tenant_project_id \u003d project_id"},{"line_number":134,"context_line":"        mock_conf.cinder_internal_tenant_user_id \u003d user_id"},{"line_number":135,"context_line":"        ctx \u003d context.get_internal_tenant_context()"},{"line_number":136,"context_line":"        self.assertEqual(None, ctx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7a31f4a1","line":136,"in_reply_to":"9a41bdd9_c7f94d4f","updated":"2015-07-13 03:04:31.000000000","message":"Done","commit_id":"be4eab187049700c1e933b0829a0713134c66e7b"}]}
