)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Hierarchical Unified Limits"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec talks about that how the hierarchical unified limits"},{"line_number":10,"context_line":"will work in Keystone and its coustomer."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ibfb2ba2ffb0115fa7cf81d30bf9a025652d9ba42"},{"line_number":13,"context_line":"bp: unified-limits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf659307_ba3b7bcf","line":10,"range":{"start_line":10,"start_character":30,"end_line":10,"end_character":39},"updated":"2018-03-26 16:22:43.000000000","message":"consumer or customer?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Hierarchical Unified Limits"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec talks about that how the hierarchical unified limits"},{"line_number":10,"context_line":"will work in Keystone and its coustomer."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ibfb2ba2ffb0115fa7cf81d30bf9a025652d9ba42"},{"line_number":13,"context_line":"bp: unified-limits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf659307_56c8c820","line":10,"range":{"start_line":10,"start_character":30,"end_line":10,"end_character":39},"in_reply_to":"bf659307_ba3b7bcf","updated":"2018-03-28 03:52:51.000000000","message":"consumer","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"f73076df1af4330a523ae23b9c6b0f16b7e831ed","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lance Bragstad \u003clbragstad@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-06-06 22:16:02 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Hierarchical Unified Limits"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This spec talks about that how the hierarchical unified limits"},{"line_number":10,"context_line":"will work in Keystone and its consumers."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"5f7c97a3_cecc22bd","line":7,"updated":"2018-06-08 21:16:46.000000000","message":"Please match the title of the spec, and specifically say 2 level quota limits.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"}],"doc/source/index.rst":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":22,"context_line":"   :glob:"},{"line_number":23,"context_line":"   :maxdepth: 1"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"   specs/keystone/queens/*"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Backlog:"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_9a3237f1","line":25,"updated":"2018-03-26 16:22:43.000000000","message":"We\u0027ll need to update this part here. Similar to what was done here - https://review.openstack.org/#/c/541903/\n\nThere are several specifications that are making this same change, we should be able to land one soon and then just rebase the rest.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"}],"specs/keystone/rocky/hierarchical-unified-limits.rst":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Keystone exposed a bunch of APIs about registered limits and project limits"},{"line_number":21,"context_line":"CRUD in Queens. But there are still some problem should be considered. It"},{"line_number":22,"context_line":"includes:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"* What kinds of hierarchical limit model should Keystone support?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_1a75c795","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":14},"updated":"2018-03-26 16:22:43.000000000","message":"We could include a link to the specification [0].\n\n[0] http://specs.openstack.org/openstack/keystone-specs/specs/keystone/queens/limits-api.html","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Keystone exposed a bunch of APIs about registered limits and project limits"},{"line_number":21,"context_line":"CRUD in Queens. But there are still some problem should be considered. It"},{"line_number":22,"context_line":"includes:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"* What kinds of hierarchical limit model should Keystone support?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_d68938ca","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":14},"in_reply_to":"bf659307_1a75c795","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":28,"context_line":"* How to ensure the limit system is not broken when the deployment\u0027s quota"},{"line_number":29,"context_line":"  model is changed to another one?"},{"line_number":30,"context_line":"* How to ensure the limit system is not broken when the customers change their"},{"line_number":31,"context_line":"  limit backend from local to Keystone?"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"We must solve these problems or at least give users some conclusion and"},{"line_number":34,"context_line":"suggestion. So this spec will mainly talk about the questions mentioned above."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_baae1be5","line":31,"range":{"start_line":31,"start_character":21,"end_line":31,"end_character":26},"updated":"2018-03-26 16:22:43.000000000","message":"local?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":60,"context_line":"Different limit model can be used for different use case or deployment"},{"line_number":61,"context_line":"environment. It\u0027s hard to say which is the perfect or best one. But we should"},{"line_number":62,"context_line":"decide a default model for Keystone. Now the `Flatland` model which is"},{"line_number":63,"context_line":"non-hierarchical has been landed. But what about the hierarchical one? Maybe we"},{"line_number":64,"context_line":"should discuss it during the PTG?"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"It should be clear that other models which are not listed above are also"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_dad98f83","line":63,"range":{"start_line":63,"start_character":26,"end_line":63,"end_character":32},"updated":"2018-03-26 16:22:43.000000000","message":"nit: implemented*","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":60,"context_line":"Different limit model can be used for different use case or deployment"},{"line_number":61,"context_line":"environment. It\u0027s hard to say which is the perfect or best one. But we should"},{"line_number":62,"context_line":"decide a default model for Keystone. Now the `Flatland` model which is"},{"line_number":63,"context_line":"non-hierarchical has been landed. But what about the hierarchical one? Maybe we"},{"line_number":64,"context_line":"should discuss it during the PTG?"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"It should be clear that other models which are not listed above are also"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_11f49af1","line":63,"range":{"start_line":63,"start_character":26,"end_line":63,"end_character":32},"in_reply_to":"bf659307_dad98f83","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to use its own check logic."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"When delete a registered/project limits, keystone should check the hierarchical"},{"line_number":86,"context_line":"limit tree as well to ensure the model will not be broken. 403 error should be"},{"line_number":87,"context_line":"return if the limit model will be broken."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Should Keystone expose the model to customers? How?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_dac2ef85","line":86,"range":{"start_line":86,"start_character":59,"end_line":86,"end_character":62},"updated":"2018-03-26 16:22:43.000000000","message":"nit:\n\n  403 Forbidden","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to use its own check logic."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"When delete a registered/project limits, keystone should check the hierarchical"},{"line_number":86,"context_line":"limit tree as well to ensure the model will not be broken. 403 error should be"},{"line_number":87,"context_line":"return if the limit model will be broken."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Should Keystone expose the model to customers? How?"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_71edd623","line":86,"range":{"start_line":86,"start_character":59,"end_line":86,"end_character":62},"in_reply_to":"bf659307_dac2ef85","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e114aa5f6b76bf3594926111ac80019f330384e5","unresolved":false,"context_lines":[{"line_number":112,"context_line":"**Response Parameters**"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"* ``name`` - The current limit model name."},{"line_number":115,"context_line":"* ``description`` - The detail description of the limit model. It shoul"},{"line_number":116,"context_line":"  include: what\u0027s the limit model, how does it work. Tips or key points about"},{"line_number":117,"context_line":"  the model."},{"line_number":118,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_5a0f0fdf","line":115,"range":{"start_line":115,"start_character":66,"end_line":115,"end_character":71},"updated":"2018-02-26 10:32:43.000000000","message":"should","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":112,"context_line":"**Response Parameters**"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"* ``name`` - The current limit model name."},{"line_number":115,"context_line":"* ``description`` - The detail description of the limit model. It shoul"},{"line_number":116,"context_line":"  include: what\u0027s the limit model, how does it work. Tips or key points about"},{"line_number":117,"context_line":"  the model."},{"line_number":118,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_31f75ef8","line":115,"range":{"start_line":115,"start_character":66,"end_line":115,"end_character":71},"in_reply_to":"3fa0c359_5a0f0fdf","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e114aa5f6b76bf3594926111ac80019f330384e5","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"**Request Parameters**"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"* ``limit-id`` - The id for the specified limit."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"**Request filter**"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_5a286f31","line":149,"range":{"start_line":149,"start_character":2,"end_line":149,"end_character":15},"updated":"2018-02-26 10:32:43.000000000","message":"where is the \u0027limit-id\u0027 used?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"**Request Parameters**"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"* ``limit-id`` - The id for the specified limit."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"**Request filter**"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_31451e18","line":149,"range":{"start_line":149,"start_character":2,"end_line":149,"end_character":15},"in_reply_to":"3fa0c359_5a286f31","updated":"2018-03-28 03:52:51.000000000","message":"It should be removed.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":251,"context_line":"The main flow will be like::"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"  +--------+    +----------------------+   +--------------+      +--------+"},{"line_number":254,"context_line":"  |  User  |    |Customer(Such as Nova)|   |KeystoneClient|      |Keystone|"},{"line_number":255,"context_line":"  +--------+    +----------------------+   +--------------+      +--------+"},{"line_number":256,"context_line":"     | 1. Create a VM |                      |                    |"},{"line_number":257,"context_line":"     +----------------\u003e                      |                    |"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_7af083ca","line":254,"range":{"start_line":254,"start_character":44,"end_line":254,"end_character":58},"updated":"2018-03-26 16:22:43.000000000","message":"Do we want this to be keystoneclient or oslo.limit?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":251,"context_line":"The main flow will be like::"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"  +--------+    +----------------------+   +--------------+      +--------+"},{"line_number":254,"context_line":"  |  User  |    |Customer(Such as Nova)|   |KeystoneClient|      |Keystone|"},{"line_number":255,"context_line":"  +--------+    +----------------------+   +--------------+      +--------+"},{"line_number":256,"context_line":"     | 1. Create a VM |                      |                    |"},{"line_number":257,"context_line":"     +----------------\u003e                      |                    |"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_f146c621","line":254,"range":{"start_line":254,"start_character":44,"end_line":254,"end_character":58},"in_reply_to":"bf659307_7af083ca","updated":"2018-03-28 03:52:51.000000000","message":"oslo.limit ++","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e114aa5f6b76bf3594926111ac80019f330384e5","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"So what should we do in Rocky is:"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"1. Add limit support in KeystoneClient. Support client cache if needed."},{"line_number":287,"context_line":"2. Add the fetching limit support in the consumers. For example, in Nova, we\u0027ll"},{"line_number":288,"context_line":"   add a new way to fetch limit from keystone, not local database. Maybe a new"},{"line_number":289,"context_line":"   switch could be added to control the behavior."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_9ac03752","line":286,"range":{"start_line":286,"start_character":40,"end_line":286,"end_character":60},"updated":"2018-02-26 10:32:43.000000000","message":"what is a client cache and how can we know whether it\u0027s expired or not?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"So what should we do in Rocky is:"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"1. Add limit support in KeystoneClient. Support client cache if needed."},{"line_number":287,"context_line":"2. Add the fetching limit support in the consumers. For example, in Nova, we\u0027ll"},{"line_number":288,"context_line":"   add a new way to fetch limit from keystone, not local database. Maybe a new"},{"line_number":289,"context_line":"   switch could be added to control the behavior."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_71bcf6ba","line":286,"range":{"start_line":286,"start_character":40,"end_line":286,"end_character":60},"in_reply_to":"3fa0c359_9ac03752","updated":"2018-03-28 03:52:51.000000000","message":"when use oslo.limit, it can be done like keystonemiddleware does.\n1. use the same cache backed for keystone and oslo.limit.\n2. if oslo.limit doesn\u0027t use the same backend with keystone.Data consistence can be ensured of cause. But we can set a minimal time windoes for expiration.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":".. note::"},{"line_number":307,"context_line":"   In a real production environment, it\u0027s rare to change the running limit"},{"line_number":308,"context_line":"   model. So this command is just for emergence. Please aware that changing"},{"line_number":309,"context_line":"   the limit model is backward incompatibility."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"when the customers change their limit backend from local to Keystone"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_7a9e4364","line":308,"range":{"start_line":308,"start_character":38,"end_line":308,"end_character":47},"updated":"2018-03-26 16:22:43.000000000","message":"emergency*","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":306,"context_line":".. note::"},{"line_number":307,"context_line":"   In a real production environment, it\u0027s rare to change the running limit"},{"line_number":308,"context_line":"   model. So this command is just for emergence. Please aware that changing"},{"line_number":309,"context_line":"   the limit model is backward incompatibility."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"when the customers change their limit backend from local to Keystone"},{"line_number":312,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_da9f4f4e","line":309,"range":{"start_line":309,"start_character":22,"end_line":309,"end_character":47},"updated":"2018-03-26 16:22:43.000000000","message":"++ \n\nChanging a limit model in a running environment may be backwards incompatible.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":308,"context_line":"   model. So this command is just for emergence. Please aware that changing"},{"line_number":309,"context_line":"   the limit model is backward incompatibility."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"when the customers change their limit backend from local to Keystone"},{"line_number":312,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_7ac5e33b","line":311,"range":{"start_line":311,"start_character":51,"end_line":311,"end_character":56},"updated":"2018-03-26 16:22:43.000000000","message":"By local I assume we\u0027re referencing the limit implementations in other services, like nova, cinder, etc?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":308,"context_line":"   model. So this command is just for emergence. Please aware that changing"},{"line_number":309,"context_line":"   the limit model is backward incompatibility."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"when the customers change their limit backend from local to Keystone"},{"line_number":312,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_b68e04ce","line":311,"range":{"start_line":311,"start_character":51,"end_line":311,"end_character":56},"in_reply_to":"bf659307_7ac5e33b","updated":"2018-03-28 03:52:51.000000000","message":"yeah, I\u0027ll change the world to make it more clear","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e114aa5f6b76bf3594926111ac80019f330384e5","unresolved":false,"context_lines":[{"line_number":312,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"},{"line_number":315,"context_line":"own service. The limit data are stored in DB or configured by config options."},{"line_number":316,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":317,"context_line":"the exist quota limit data from consumers to Keystone smoothly? Here we"},{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_fad05b21","line":315,"range":{"start_line":315,"start_character":4,"end_line":315,"end_character":11},"updated":"2018-02-26 10:32:43.000000000","message":"services","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":312,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"},{"line_number":315,"context_line":"own service. The limit data are stored in DB or configured by config options."},{"line_number":316,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":317,"context_line":"the exist quota limit data from consumers to Keystone smoothly? Here we"},{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_91ac2a35","line":315,"range":{"start_line":315,"start_character":4,"end_line":315,"end_character":11},"in_reply_to":"3fa0c359_fad05b21","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":316,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":317,"context_line":"the exist quota limit data from consumers to Keystone smoothly? Here we"},{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"},{"line_number":319,"context_line":"this command, Keystone will get the consumers quota limit through REST request"},{"line_number":320,"context_line":"or config options, then write the data into keystone limit backend directly."},{"line_number":321,"context_line":"Once the data migration is done, consumers can change the fetching way from"},{"line_number":322,"context_line":"local to Keystone."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_9ad797ee","line":319,"updated":"2018-03-26 16:22:43.000000000","message":"Is keystone pulling limit information from other services here?","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":316,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":317,"context_line":"the exist quota limit data from consumers to Keystone smoothly? Here we"},{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"},{"line_number":319,"context_line":"this command, Keystone will get the consumers quota limit through REST request"},{"line_number":320,"context_line":"or config options, then write the data into keystone limit backend directly."},{"line_number":321,"context_line":"Once the data migration is done, consumers can change the fetching way from"},{"line_number":322,"context_line":"local to Keystone."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_116eda00","line":319,"in_reply_to":"bf659307_9ad797ee","updated":"2018-03-28 03:52:51.000000000","message":"yeah, use either REST request or read the service config file directly.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":23083,"name":"TommyLike","email":"tommylikehu@gmail.com","username":"TommyLike"},"change_message_id":"e114aa5f6b76bf3594926111ac80019f330384e5","unresolved":false,"context_lines":[{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"},{"line_number":319,"context_line":"this command, Keystone will get the consumers quota limit through REST request"},{"line_number":320,"context_line":"or config options, then write the data into keystone limit backend directly."},{"line_number":321,"context_line":"Once the data migration is done, consumers can change the fetching way from"},{"line_number":322,"context_line":"local to Keystone."},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_baa9737c","line":321,"range":{"start_line":321,"start_character":0,"end_line":321,"end_character":32},"updated":"2018-02-26 10:32:43.000000000","message":"what if the command partial succeed, I mean what if there are only some of the projects or services(Nova, Cinder or others) succeed to migrate their local quota records to Keystone.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":318,"context_line":"introduce a new keystone command tool `keystone-manage limit-migrate`. With"},{"line_number":319,"context_line":"this command, Keystone will get the consumers quota limit through REST request"},{"line_number":320,"context_line":"or config options, then write the data into keystone limit backend directly."},{"line_number":321,"context_line":"Once the data migration is done, consumers can change the fetching way from"},{"line_number":322,"context_line":"local to Keystone."},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_314afe7f","line":321,"range":{"start_line":321,"start_character":0,"end_line":321,"end_character":32},"in_reply_to":"3fa0c359_baa9737c","updated":"2018-03-28 03:52:51.000000000","message":"Will raise WARNING LOG for the failed ones. Operator should check them by hand.","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b5f59dfa9e906bce98a1d8dafd86f4df54296b41","unresolved":false,"context_lines":[{"line_number":392,"context_line":""},{"line_number":393,"context_line":"* Add limit model check for create/update/delete registered/project limits"},{"line_number":394,"context_line":"  APIs."},{"line_number":395,"context_line":"* At least one hierarchical limit model should be added into Keystone."},{"line_number":396,"context_line":"* Add the new API ``GET /limit_model``."},{"line_number":397,"context_line":"* Add the new ``show_hierachy`` parameter for limits."},{"line_number":398,"context_line":"* Add keystone client support for limits."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_5a301f57","line":395,"updated":"2018-03-26 16:22:43.000000000","message":"I think some of what\u0027s explained here is going to have some overlap with John\u0027s proposal [0]. We might have an opportunity to focus one of these specs a little more.\n\n[0] https://review.openstack.org/#/c/549766/","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"182eca6aa535b0dccb68413e9be7aa851efd96cd","unresolved":false,"context_lines":[{"line_number":392,"context_line":""},{"line_number":393,"context_line":"* Add limit model check for create/update/delete registered/project limits"},{"line_number":394,"context_line":"  APIs."},{"line_number":395,"context_line":"* At least one hierarchical limit model should be added into Keystone."},{"line_number":396,"context_line":"* Add the new API ``GET /limit_model``."},{"line_number":397,"context_line":"* Add the new ``show_hierachy`` parameter for limits."},{"line_number":398,"context_line":"* Add keystone client support for limits."}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf659307_63366de9","line":395,"in_reply_to":"bf659307_5a301f57","updated":"2018-03-28 03:52:51.000000000","message":"Done","commit_id":"8b2a88746bf760cceed6e5213c44aae6da2a1db4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d286800b41a2d740e72ba351c1328981638e6c4","unresolved":false,"context_lines":[{"line_number":88,"context_line":"limit tree as well to ensure the model will not be broken. 403 Forbidden error"},{"line_number":89,"context_line":"should be return if the limit model will be broken."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"Should Keystone expose the model to consumers? How?"},{"line_number":92,"context_line":"---------------------------------------------------"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Yes. Consumers should know what limit model is used in the current deployment."}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_a653cf38","line":91,"range":{"start_line":91,"start_character":0,"end_line":91,"end_character":51},"updated":"2018-04-02 19:40:17.000000000","message":"How should keystone expose the model to consumers?*","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a8188dae57f908198aa0c230a5f306923b49ac64","unresolved":false,"context_lines":[{"line_number":88,"context_line":"limit tree as well to ensure the model will not be broken. 403 Forbidden error"},{"line_number":89,"context_line":"should be return if the limit model will be broken."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"Should Keystone expose the model to consumers? How?"},{"line_number":92,"context_line":"---------------------------------------------------"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Yes. Consumers should know what limit model is used in the current deployment."}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_524ebbc1","line":91,"range":{"start_line":91,"start_character":0,"end_line":91,"end_character":51},"in_reply_to":"bf659307_a653cf38","updated":"2018-04-08 02:16:40.000000000","message":"Done","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d286800b41a2d740e72ba351c1328981638e6c4","unresolved":false,"context_lines":[{"line_number":144,"context_line":"used only be admin. If non-admin users use this filter, keystone should ignore"},{"line_number":145,"context_line":"the filter or return 403 Forbidden error."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"**Request:** ``GET /limits?show_hierarchy\u003dtrue``"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"**Request filter**"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_c627e3c9","line":147,"updated":"2018-04-02 19:40:17.000000000","message":"I assume we pull the project to fetch the limit for from the token context?","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a8188dae57f908198aa0c230a5f306923b49ac64","unresolved":false,"context_lines":[{"line_number":144,"context_line":"used only be admin. If non-admin users use this filter, keystone should ignore"},{"line_number":145,"context_line":"the filter or return 403 Forbidden error."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"**Request:** ``GET /limits?show_hierarchy\u003dtrue``"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"**Request filter**"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_d2440b77","line":147,"in_reply_to":"bf659307_c627e3c9","updated":"2018-04-08 02:16:40.000000000","message":"yeah, that\u0027s what oslo.limit will do. Actually I think these two APIs above can used for both operators and oslo.limit. I\u0027ll make it more clear in the next PS.","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d286800b41a2d740e72ba351c1328981638e6c4","unresolved":false,"context_lines":[{"line_number":275,"context_line":"     |                \u003c----------------------+                    |"},{"line_number":276,"context_line":"     |                |                      |                    |"},{"line_number":277,"context_line":"     |                +-----+                |                    |"},{"line_number":278,"context_line":"     |                |     |Calculate       |                    |"},{"line_number":279,"context_line":"     |                \u003c-----+                |                    |"},{"line_number":280,"context_line":"     |                |                      |                    |"},{"line_number":281,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_c610435a","line":278,"range":{"start_line":278,"start_character":29,"end_line":278,"end_character":38},"updated":"2018-04-02 19:40:17.000000000","message":"Another possibility to have the calculation done in oslo.limit. The interface for limit enforcement might only understand a couple of things:\n\n  def enforce(self, resource_name, current_quota, project_id):\n\nThe service would be on the hook for supplying the current quota for the project and marshaling the project_id from the token context. The library would collect relevant quota information and current model from keystone, and then make a decision.","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a8188dae57f908198aa0c230a5f306923b49ac64","unresolved":false,"context_lines":[{"line_number":275,"context_line":"     |                \u003c----------------------+                    |"},{"line_number":276,"context_line":"     |                |                      |                    |"},{"line_number":277,"context_line":"     |                +-----+                |                    |"},{"line_number":278,"context_line":"     |                |     |Calculate       |                    |"},{"line_number":279,"context_line":"     |                \u003c-----+                |                    |"},{"line_number":280,"context_line":"     |                |                      |                    |"},{"line_number":281,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_52fc7b3d","line":278,"range":{"start_line":278,"start_character":29,"end_line":278,"end_character":38},"in_reply_to":"bf659307_c610435a","updated":"2018-04-08 02:16:40.000000000","message":"++, I like your way. It decouple the structure well, like what oslo.policy does","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d286800b41a2d740e72ba351c1328981638e6c4","unresolved":false,"context_lines":[{"line_number":297,"context_line":"own services. The limit data are stored in DB or configured by config options."},{"line_number":298,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":299,"context_line":"the exist quota limit data from consumers themself to Keystone smoothly? Here"},{"line_number":300,"context_line":"we can introduce a new keystone command tool `keystone-manage limit_migrate`."},{"line_number":301,"context_line":"With this command, Keystone will get the consumers\u0027s quota limit through REST"},{"line_number":302,"context_line":"request or config options, then write the data into keystone limit backend"},{"line_number":303,"context_line":"directly. Once the data migration is done, consumers can change the fetching"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_867faba9","line":300,"updated":"2018-04-02 19:40:17.000000000","message":"This is going to require keystone to have dependencies on each service client library in order to fetch limits. Or keystone-manage is going to have to understand each possible service and its limit API in order to pull that data.\n\nEither way, this might be a very large piece of work that is going to be difficult to test properly. Once we get the data, we also have to map it to a model that makes sense in keystone. What happens if we don\u0027t have a model that supports the assumptions about the data we see?\n\nI\u0027m wondering if we\u0027re better off handling this elsewhere, either in documentation or in a separate project.","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a8188dae57f908198aa0c230a5f306923b49ac64","unresolved":false,"context_lines":[{"line_number":297,"context_line":"own services. The limit data are stored in DB or configured by config options."},{"line_number":298,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":299,"context_line":"the exist quota limit data from consumers themself to Keystone smoothly? Here"},{"line_number":300,"context_line":"we can introduce a new keystone command tool `keystone-manage limit_migrate`."},{"line_number":301,"context_line":"With this command, Keystone will get the consumers\u0027s quota limit through REST"},{"line_number":302,"context_line":"request or config options, then write the data into keystone limit backend"},{"line_number":303,"context_line":"directly. Once the data migration is done, consumers can change the fetching"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_f2ed8f8b","line":300,"in_reply_to":"bf659307_867faba9","updated":"2018-04-08 02:16:40.000000000","message":"agree that it\u0027s not a small job. maybe it can be moved to oslo.limit? a new command such as \"oslo-limit-migrate\".\n\nAnd whereever it exists, each service client lib are always required by this tool","commit_id":"a90f80b5c0e9df532f5ccaa14aca9eb804152cd1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Garbutt Limits"},{"line_number":50,"context_line":"* Stanek Model"},{"line_number":51,"context_line":"* Exit Ed Model"},{"line_number":52,"context_line":"* Make Chet Sad Model"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":".. note::"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_4916d8f3","line":52,"updated":"2018-04-10 21:05:13.000000000","message":"I doubt that we will formally reference any of these by the names above. Even \"Flatland\" is referenced as \u0027flat\u0027 in our documentation.\n\nInstead of listing all of these out, we can probably just include the links to the relevant context.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":49,"context_line":"* Garbutt Limits"},{"line_number":50,"context_line":"* Stanek Model"},{"line_number":51,"context_line":"* Exit Ed Model"},{"line_number":52,"context_line":"* Make Chet Sad Model"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":".. note::"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_c29ab660","line":52,"in_reply_to":"bf659307_4916d8f3","updated":"2018-04-11 04:01:54.000000000","message":"sure","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"we\u0027ll add a model called ``model`` under the ``limit`` folder. The model"},{"line_number":83,"context_line":"contains a base Class which has a check function, may named"},{"line_number":84,"context_line":"``def check_limit``, every limit model should override this function to adopt"},{"line_number":85,"context_line":"its own check logic."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"When delete a project limits, keystone should check the hierarchical limit tree"},{"line_number":88,"context_line":"as well to ensure the model will not be broken. 403 Forbidden error should be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_299e0463","line":85,"updated":"2018-04-10 21:05:13.000000000","message":"This section is diving into quite a few implementation details. To prevent misleading information in the event we decide to go a different direction, we can simply say:\n\n  Enforcement models will be maintained along side the\n  existing limit implementation. Each model will implement an\n  interface that enforces the business use cases for that\n  specific enforcement model.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":82,"context_line":"we\u0027ll add a model called ``model`` under the ``limit`` folder. The model"},{"line_number":83,"context_line":"contains a base Class which has a check function, may named"},{"line_number":84,"context_line":"``def check_limit``, every limit model should override this function to adopt"},{"line_number":85,"context_line":"its own check logic."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"When delete a project limits, keystone should check the hierarchical limit tree"},{"line_number":88,"context_line":"as well to ensure the model will not be broken. 403 Forbidden error should be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_42d466e9","line":85,"in_reply_to":"bf659307_299e0463","updated":"2018-04-11 04:01:54.000000000","message":"Done","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Expose a new API ``GET  /limits-model``. This API is used to get current limit"},{"line_number":105,"context_line":"model in Keystone."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Request:** ``GET /limits-model``"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_e9b7acd7","line":105,"updated":"2018-04-10 21:05:13.000000000","message":"Is this model going to always be specified by configuration (e.g. CONF.unified_limits.enforcement_model \u003d flat), or do we want to consider an API that operators can use to set this?","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":102,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"Expose a new API ``GET  /limits-model``. This API is used to get current limit"},{"line_number":105,"context_line":"model in Keystone."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"**Request:** ``GET /limits-model``"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_62dbaaec","line":105,"in_reply_to":"bf659307_e9b7acd7","updated":"2018-04-11 04:01:54.000000000","message":"I think it should be only specified by configuration. We can add the set support if there is the requirement in the future, such as specified model in the specified domain. But for the origin proposal, I suggest it\u0027s read only by APIs","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":118,"context_line":"**Response Parameters**"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"* ``name`` - The current limit model name."},{"line_number":121,"context_line":"* ``description`` - The detail description of the limit model. It should"},{"line_number":122,"context_line":"  include: what\u0027s the limit model, how does it work. Tips or key points about"},{"line_number":123,"context_line":"  the model."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_e98ecc25","line":121,"range":{"start_line":121,"start_character":4,"end_line":121,"end_character":15},"updated":"2018-04-10 21:05:13.000000000","message":"instead of a description, what about a link to official documentation describing the model?","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":118,"context_line":"**Response Parameters**"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"* ``name`` - The current limit model name."},{"line_number":121,"context_line":"* ``description`` - The detail description of the limit model. It should"},{"line_number":122,"context_line":"  include: what\u0027s the limit model, how does it work. Tips or key points about"},{"line_number":123,"context_line":"  the model."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_c26e36ff","line":121,"range":{"start_line":121,"start_character":4,"end_line":121,"end_character":15},"in_reply_to":"bf659307_e98ecc25","updated":"2018-04-11 04:01:54.000000000","message":"how about a brief introduction and a link to the official guide? Operators should at least know what\u0027s this the specified model mean.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"With the (current) default policy a user with a member role on a project can\u0027t"},{"line_number":147,"context_line":"GET its parent or child project. So the ``show_hierarchy`` filter should be"},{"line_number":148,"context_line":"used only be admin. If non-admin users use this filter, keystone should ignore"},{"line_number":149,"context_line":"the filter or return 403 Forbidden error."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"**Request:** ``GET /limits?show_hierarchy\u003dtrue``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_a9b1b4e3","line":148,"range":{"start_line":148,"start_character":10,"end_line":148,"end_character":12},"updated":"2018-04-10 21:05:13.000000000","message":"nit: by","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"With the (current) default policy a user with a member role on a project can\u0027t"},{"line_number":147,"context_line":"GET its parent or child project. So the ``show_hierarchy`` filter should be"},{"line_number":148,"context_line":"used only be admin. If non-admin users use this filter, keystone should ignore"},{"line_number":149,"context_line":"the filter or return 403 Forbidden error."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"**Request:** ``GET /limits?show_hierarchy\u003dtrue``"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_227db2b1","line":148,"range":{"start_line":148,"start_character":10,"end_line":148,"end_character":12},"in_reply_to":"bf659307_a9b1b4e3","updated":"2018-04-11 04:01:54.000000000","message":"Done","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":254,"context_line":"usage."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"How the customers, like Nova, Cinder or others, consume this feature?"},{"line_number":257,"context_line":"---------------------------------------------------------------------"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"The main flow will be like::"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_ff2afa7b","line":257,"updated":"2018-04-10 21:05:13.000000000","message":"I almost wonder if something like this wouldn\u0027t be better in the service developers section [0] of our documentation instead of a spec.\n\n[0] https://docs.openstack.org/keystone/latest/contributor/services.html","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":254,"context_line":"usage."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"How the customers, like Nova, Cinder or others, consume this feature?"},{"line_number":257,"context_line":"---------------------------------------------------------------------"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"The main flow will be like::"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_e231fa0c","line":257,"in_reply_to":"bf659307_ff2afa7b","updated":"2018-04-11 04:01:54.000000000","message":"yeah, it\u0027s better. This section is a oslo.limit spec rather than keystone one.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":306,"context_line":"How to ensure the limit system is not broken when upgrading?"},{"line_number":307,"context_line":"------------------------------------------------------------"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"When the consumers change their limit backend from self to Keystone"},{"line_number":310,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_3ffdd2b0","line":309,"updated":"2018-04-10 21:05:13.000000000","message":"I think this is another section that would be good to include in the external service developers documentation we have.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":306,"context_line":"How to ensure the limit system is not broken when upgrading?"},{"line_number":307,"context_line":"------------------------------------------------------------"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"When the consumers change their limit backend from self to Keystone"},{"line_number":310,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"Now the consumers, like Nova, Cinder and others, store the quota limit in their"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_a210e25a","line":309,"in_reply_to":"bf659307_3ffdd2b0","updated":"2018-04-11 04:01:54.000000000","message":"ditto. totally agree.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":313,"context_line":"own services. The limit data are stored in DB or configured by config options."},{"line_number":314,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":315,"context_line":"the exist quota limit data from consumers themselves to Keystone smoothly? Here"},{"line_number":316,"context_line":"we can introduce a new command tool for oslo.limit `oslo-limit-migrate`. With"},{"line_number":317,"context_line":"this command, oslo.limit will get the consumers\u0027s quota limit through REST"},{"line_number":318,"context_line":"request or config options, then write the data into keystone limit backend"},{"line_number":319,"context_line":"directly. Once the data migration is done, consumers can change the fetching"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_ffd51a1c","line":316,"range":{"start_line":316,"start_character":51,"end_line":316,"end_character":71},"updated":"2018-04-10 21:05:13.000000000","message":"If we did something like this, this would have to be run by operators, not service developers, right?\n\nThis is also going to be quite hard to implement I think. My fear this that there is going to be variation across deployments that makes supplying  something like this really tough.\n\nThis would require supporting a migration from every enforcement model in other services to every new enforcement model in keystone, right?","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":313,"context_line":"own services. The limit data are stored in DB or configured by config options."},{"line_number":314,"context_line":"So once the consumers try to use the unified limit in Keystone, how to migrate"},{"line_number":315,"context_line":"the exist quota limit data from consumers themselves to Keystone smoothly? Here"},{"line_number":316,"context_line":"we can introduce a new command tool for oslo.limit `oslo-limit-migrate`. With"},{"line_number":317,"context_line":"this command, oslo.limit will get the consumers\u0027s quota limit through REST"},{"line_number":318,"context_line":"request or config options, then write the data into keystone limit backend"},{"line_number":319,"context_line":"directly. Once the data migration is done, consumers can change the fetching"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_3d16334b","line":316,"range":{"start_line":316,"start_character":51,"end_line":316,"end_character":71},"in_reply_to":"bf659307_ffd51a1c","updated":"2018-04-11 04:01:54.000000000","message":"maybe it\u0027s too early to talk about this, I\u0027d like to backup it and we can revisit it once hierarchical limits are supported in Keystone and oslo.limit wroks well.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":317,"context_line":"this command, oslo.limit will get the consumers\u0027s quota limit through REST"},{"line_number":318,"context_line":"request or config options, then write the data into keystone limit backend"},{"line_number":319,"context_line":"directly. Once the data migration is done, consumers can change the fetching"},{"line_number":320,"context_line":"way from self to Keystone."},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"The command example::"},{"line_number":323,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_5fa2069c","line":320,"updated":"2018-04-10 21:05:13.000000000","message":"This section of the document might need to be broken up. We could tailor it specifically to service developers using a list of steps. For example, if cinder wanted to deprecate their limit implementation in favor of what we have in keystone, they would need to make sure we support an enforcement model that they support before converting. They\u0027d also need to write some code that handles limits in cinder, while checking if limits exist in keystone for the same resource to allow for compatibility. That would need to be supported for several releases before the limits support in a service could be deprecated or removed.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ca648ddb643ded3ca656abf8583926e72d86cdb1","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                   The service config file."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"When the deployment\u0027s quota model is changed to another one"},{"line_number":338,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Once the limit model in Keystone is changed to a new one, the limit model will"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_9f0dfe91","line":337,"updated":"2018-04-10 21:05:13.000000000","message":"Would we plan on implementing this in Rocky, even if we only have two enforcement models (flat and something else)?\n\nThis might be a good candidate to break out into it\u0027s own specification. Given this might not be a super common thing to do, I wouldn\u0027t be opposed to working on this for the Stein or even T releases.","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"43e095914419d889604a94bfb1411045f1c54746","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                   The service config file."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"When the deployment\u0027s quota model is changed to another one"},{"line_number":338,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Once the limit model in Keystone is changed to a new one, the limit model will"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf659307_4201c605","line":337,"in_reply_to":"bf659307_9f0dfe91","updated":"2018-04-11 04:01:54.000000000","message":"How about move it to backlog?","commit_id":"38b3d845487637693be4e9fa2e5a78add29216af"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":5,"context_line":" http://creativecommons.org/licenses/by/3.0/legalcode"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":"Hierarchical Unified Limits"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This is the second part for unified limits feature. It\u0027ll talk about"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_ae780ff8","line":8,"range":{"start_line":8,"start_character":0,"end_line":8,"end_character":27},"updated":"2018-04-30 22:37:00.000000000","message":"Since we possible for us to introduce another enforcement model that operates on hierarchies in the future, we might consider giving this a more descriptive name that is applicable to this specific model.\n\nStrict Hierarchy Enforcement Model, maybe?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Hierarchical Unified Limits"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This is the second part for unified limits feature. It\u0027ll talk about"},{"line_number":12,"context_line":"the hierarchical limit model and how will it work in Keystone."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"`bp unified-limits \u003chttps://blueprints.launchpad.net/keystone/+spec/unified-limits\u003e`_"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_2ecf1f80","line":11,"updated":"2018-04-30 22:37:00.000000000","message":"We could reference the first specification here:\n\n  This is a continuation of the specification done in the\n  Queens release for unified limits\n\n  .. _done: http://specs.openstack.org/openstack/keystone-specs/specs/keystone/queens/limits-api.html","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem Description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Keystone exposed a bunch of APIs about registered limits and project limits"},{"line_number":21,"context_line":"CRUD in Queens [0]_. But there are still some problem should be considered. It"},{"line_number":22,"context_line":"includes:"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_8ead0b9d","line":20,"range":{"start_line":20,"start_character":9,"end_line":20,"end_character":27},"updated":"2018-04-30 22:37:00.000000000","message":"nit: Keystone exposes an API for registered limits and project limits [0]_. This implementation laid the ground work for registering limits and associating limits to projects, along with a flat enforcement model. The specification introduces a hierarchical enforcement model and describes how it can be consumed by other services.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b34a5fba617011901940bb070840517eebd4fe72","unresolved":false,"context_lines":[{"line_number":32,"context_line":"using oslo.limit. Many clouds want to enforce limits between top level groups,"},{"line_number":33,"context_line":"but delegate the setting of detailed per project limits to an admin of each"},{"line_number":34,"context_line":"group. This spec details how that can be implemented."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Proposed Change"},{"line_number":37,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_1a67e753","line":35,"updated":"2018-05-01 14:53:21.000000000","message":"Honestly, I think we should attack a very simple a specific problem here.\n\nWe should then:\n* see how it fits in the propose system\n* see what users needs are still not satisfied\n* see how to deal with the next set of problems\n\nHere is the specific case I was thinking about:\n\nThere is a \"virtual organisation\" (VO) manager. The VO manager is usually a principal investigator (PI), a named person who is responsible for negotiating quotas and ensuring responsible usage of any resources used by that VO.\n\nKeystone is configured to use an external IdP proxy, the PI is responsible for authorizing users to access the resources owned by the VO. When leaving a project that users access must be correctly revoked. There is tooling in place to manage this process, including forms to request access, etc.\n\nNow this all works today, a single project for each VO. Quota is negotiated between the service provider and the PI.\n\nThe extra piece that we need to support is when the VO has multiple groups, each that should have some limit on their usage of the quota the VO has been given.\n\nGoing to a more specific level of detail, if the VO is allowed to use 10 Cores, it might say that none of three sub groups are allowed to use more than 5 Cores, and that is acceptable, assuming the system ensures the sum of all the VO\u0027s usage never exceeds 10 Cores.\n\nFor the simplest cases, no need to consider groups within the VO groups, lets keep it simple for this extension, just a two level hierarchy, single parent/child relationship.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"limit model can be used for different use case or deployment environment. It\u0027s"},{"line_number":45,"context_line":"hard to say which is the perfect or the best one. But we should decide a"},{"line_number":46,"context_line":"default model for Keystone. Now the `Flat` model which is non-hierarchical has"},{"line_number":47,"context_line":"been implemented. But what about the hierarchical one? A new hierarchy model"},{"line_number":48,"context_line":"base on CERN usage case will be posted in this spec. It should be the default"},{"line_number":49,"context_line":"one in Rocky. We may call it `Strict Hierarchy`."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"It should be clear that other models which are not mentioned in the `summary`_"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_ce08e392","line":48,"range":{"start_line":47,"start_character":55,"end_line":48,"end_character":51},"updated":"2018-04-30 22:37:00.000000000","message":"nit: This specification primarily targets a use-case for a hierarchical enforcement model put forth by CERN.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"default model for Keystone. Now the `Flat` model which is non-hierarchical has"},{"line_number":47,"context_line":"been implemented. But what about the hierarchical one? A new hierarchy model"},{"line_number":48,"context_line":"base on CERN usage case will be posted in this spec. It should be the default"},{"line_number":49,"context_line":"one in Rocky. We may call it `Strict Hierarchy`."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"It should be clear that other models which are not mentioned in the `summary`_"},{"line_number":52,"context_line":"are also welcome. If you have any new idea, please update a patch following"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_8e02eb6e","line":49,"range":{"start_line":49,"start_character":7,"end_line":49,"end_character":12},"updated":"2018-04-30 22:37:00.000000000","message":"Are we going to make it the default in Rocky or are we going to keep \u0027flat\u0027 as the default?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"The aim is to build a minimal limit hierarchy that can be used as a base"},{"line_number":66,"context_line":"to explore more complicated use cases. The problem is based around this case:"},{"line_number":67,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2017-February/111999.html"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Limits are applied at a top level to a small set of groups. The top level admin"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_6e34374b","line":66,"range":{"start_line":66,"start_character":72,"end_line":66,"end_character":76},"updated":"2018-04-30 22:37:00.000000000","message":"nit: we can format this as a link in rst\n\n  around this `use-case`.\n\n.. use-case: http://lists.openstack.org/pipermail/openstack-dev/2017-February/111999.html","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"to explore more complicated use cases. The problem is based around this case:"},{"line_number":67,"context_line":"http://lists.openstack.org/pipermail/openstack-dev/2017-February/111999.html"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Limits are applied at a top level to a small set of groups. The top level admin"},{"line_number":70,"context_line":"takes care to ensure the limits set do not exceed the total capacity of their"},{"line_number":71,"context_line":"cloud. Typically the allocation is based on how funding is split between the"},{"line_number":72,"context_line":"groups."}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_2e3e3f29","line":69,"range":{"start_line":69,"start_character":52,"end_line":69,"end_character":58},"updated":"2018-04-30 22:37:00.000000000","message":"By groups, do we mean the group resource? Or are we referring to group in a different context? Just wondering if this will cause confusion with the existing usage of \"groups\".","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":80,"context_line":"between different projects in the same group, without any need to change the"},{"line_number":81,"context_line":"assigned quota."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"When a group needs more quota than currently assigned, they talk to the top"},{"line_number":84,"context_line":"level administrator to apply for an increased share of resources, possibly by"},{"line_number":85,"context_line":"agreeing a lower quota with one of the other top level groups that don\u0027t"},{"line_number":86,"context_line":"currently use their full allocation."},{"line_number":87,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_ee47e7bb","line":84,"range":{"start_line":83,"start_character":72,"end_line":84,"end_character":19},"updated":"2018-04-30 22:37:00.000000000","message":"Do we expect this to be a system administrator, domain administrator, project administrator or something else?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":103,"context_line":"      H;"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"      Default [label\u003d\"Default (l\u003d10,False)\"];"},{"line_number":106,"context_line":"      A [label\u003d\"A (l\u003d20,True u\u003d1)\"];"},{"line_number":107,"context_line":"      B [label\u003d\"B (l\u003ddefault, u\u003d2)\"];"},{"line_number":108,"context_line":"      C [label\u003d\"C (l\u003d15,False u\u003d16)\", textcolor\u003d\"#ff0000\"];"},{"line_number":109,"context_line":"      D [label\u003d\"D (l\u003d25,False u\u003d0)\"];"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_ee584757","line":106,"range":{"start_line":106,"start_character":18,"end_line":106,"end_character":33},"updated":"2018-04-30 22:37:00.000000000","message":"nit: we could either expand the names l and u in the example to make for less guess work for readers\n\n  A [label\u003d\"A (limit\u003d20, True usage\u003d1)\"];\n\nor add a note prior to the example that says describes what the short-hand notation stands for.\n\nAlso, what does the boolean argument represent?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":113,"context_line":"      H [label\u003d\"H (default, u\u003d15)\", textcolor\u003d\"#ff0000\"];"},{"line_number":114,"context_line":"   }"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"It is worth observing that:"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"* Project C is over their limit, but either project A, B or D are still free to"},{"line_number":119,"context_line":"  create one more resource usage before hitting the resource limit imposed"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_2e24ffc5","line":116,"updated":"2018-04-30 22:37:00.000000000","message":"I like the blockdiag examples, especially when paired with the behavioral statements below. I wouldn\u0027t be opposed to breaking them out into separate diagrams that walk the reader through changes of state though.\n\nCertainly not necessary.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":122,"context_line":"* Project D has a limit that is larger than its parent\u0027s limit that applies to"},{"line_number":123,"context_line":"  the whole tree.  This is not allowed. The child\u0027s limit can\u0027t larger than"},{"line_number":124,"context_line":"  parent\u0027s."},{"line_number":125,"context_line":"* The limits of project E, F, G and H work as they do today i.e. They are all"},{"line_number":126,"context_line":"  independent of each other."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"Implementation structure"},{"line_number":129,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_79087f27","line":126,"range":{"start_line":125,"start_character":0,"end_line":126,"end_character":28},"updated":"2018-04-30 22:37:00.000000000","message":"It sounds like some projects are being processed using the flat model while others are adhering to strict hierarchy?\n\nIs that what the boolean is for in the limit example? I was under the impression that an enforcement model would apply to the entire deployment. I\u0027m happy to hear a use-case that needs more flexibility though.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"  parent\u0027s."},{"line_number":125,"context_line":"* The limits of project E, F, G and H work as they do today i.e. They are all"},{"line_number":126,"context_line":"  independent of each other."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"Implementation structure"},{"line_number":129,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_54454214","line":127,"updated":"2018-04-30 22:37:00.000000000","message":"If the interface for oslo.limit is:\n\n  def enforce(self, resource_usage, project_id):\n\nWhere resource_usage is the usage from the service of project B, and project_id is B\u0027s project ID, how is oslo.limit going to be able to give a yes/no about if it doesn\u0027t know the usage of the tree?\n\nWouldn\u0027t the service need to pass in all that information in order for oslo.limit to be able to determine if that resource can be created taking the entire tree into account?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Expose a new API ``GET  /limits-model``. This API is used to get current limit"},{"line_number":161,"context_line":"model in Keystone. This API is mainly used by *operators*."},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"**Request:** ``GET /limits-model``"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"**Response:**"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_2edabfe8","line":163,"range":{"start_line":163,"start_character":20,"end_line":163,"end_character":32},"updated":"2018-04-30 22:37:00.000000000","message":"I implemented this as\n\n  GET /v3/limits/model\n\nin the fix for bug 1765193. If this happens to get closer to landing than the implementation, we can update this later [0]. FWIW - the implementation also includes HEAD in addition to GET.\n\n[0] https://review.openstack.org/#/q/topic:bug/1765193+(status:open+OR+status:merged)","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":176,"context_line":"* ``name`` - The current limit model name."},{"line_number":177,"context_line":"* ``description`` - The detail description of the limit model. It should"},{"line_number":178,"context_line":"  include: what\u0027s the limit model, how does it work, tips or key points about"},{"line_number":179,"context_line":"  the model, the official guide links and so on."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":".. note::"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_6ee9977e","line":179,"range":{"start_line":179,"start_character":13,"end_line":179,"end_character":48},"updated":"2018-04-30 22:37:00.000000000","message":"I broke this out into its own attribute.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":".. code-block:: json"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    {"},{"line_number":192,"context_line":"        \"name\": \"Strict Hierarchy\","},{"line_number":193,"context_line":"        \"description\": \"A child may have no more quota than it\u0027s parent. The"},{"line_number":194,"context_line":"                        sum of all **direct children** is must be \u003c\u003d the"},{"line_number":195,"context_line":"                        parent. all children would have to have default quota"},{"line_number":196,"context_line":"                        equal to its parent\u0027s.\""},{"line_number":197,"context_line":"    }"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"2. Fetching project hierarchy"},{"line_number":200,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_ae948fe9","line":197,"range":{"start_line":191,"start_character":4,"end_line":197,"end_character":5},"updated":"2018-04-30 22:37:00.000000000","message":"This might need to be updated depending on how the implementation of this API shakes out [0], but over all I think the concept is looking good.\n\n[0] https://review.openstack.org/#/q/topic:bug/1765193+(status:open+OR+status:merged)","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"**Response Body:**"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":".. code-block:: javascript"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    {"},{"line_number":228,"context_line":"        \"hierarchical_limit_model\": \"Strict Hierarchy\","}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_8ea18b49","line":225,"range":{"start_line":225,"start_character":16,"end_line":225,"end_character":26},"updated":"2018-04-30 22:37:00.000000000","message":"does\n\n  .. code-block:: json\n\nnot work here?","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"416e9c24ae3a672dee62b90f8b3d66f67d4769f0","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                \"resource_name\": \"ram_mb\","},{"line_number":235,"context_line":"                \"resource_limit\": 10240,"},{"line_number":236,"context_line":"                \"default_limit\": 20480,"},{"line_number":237,"context_line":"                \"project_id\": aaa,"},{"line_number":238,"context_line":"                \"hierarchical_structure\":{"},{"line_number":239,"context_line":"                    \"sibling_projects\":["},{"line_number":240,"context_line":"                        {"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9f6a8fd7_0e8d7bd2","line":237,"range":{"start_line":237,"start_character":30,"end_line":237,"end_character":33},"updated":"2018-04-30 22:37:00.000000000","message":"These might fail actual JSON parsing since they aren\u0027t strings.","commit_id":"c8a4fead38e6b3755ef37ed2f5cd00cc7dfe1529"}],"specs/keystone/rocky/strict-two-level-enforcement-model.rst":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"835440c73d602c07250c3c19ddcc794e22e45ded","unresolved":false,"context_lines":[{"line_number":35,"context_line":"---------"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* As an operator, I want to be able to set the limit for a top-level project"},{"line_number":38,"context_line":"  and ensure it\u0027s usage never exceeds that limit, resulting in strict usage"},{"line_number":39,"context_line":"* As a user responsible for managing limits across projects, I want to be able"},{"line_number":40,"context_line":"  to set limits across child projects in a way that is flexible enough to allow"},{"line_number":41,"context_line":"  resources to flow between projects under a top-level project"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_4e75d3f9","line":38,"range":{"start_line":38,"start_character":13,"end_line":38,"end_character":17},"updated":"2018-05-18 09:02:51.000000000","message":"its\u0027","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e71269e2bbd8d5105ee265b33825720587983a52","unresolved":false,"context_lines":[{"line_number":35,"context_line":"---------"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* As an operator, I want to be able to set the limit for a top-level project"},{"line_number":38,"context_line":"  and ensure it\u0027s usage never exceeds that limit, resulting in strict usage"},{"line_number":39,"context_line":"* As a user responsible for managing limits across projects, I want to be able"},{"line_number":40,"context_line":"  to set limits across child projects in a way that is flexible enough to allow"},{"line_number":41,"context_line":"  resources to flow between projects under a top-level project"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_3b83ed58","line":38,"range":{"start_line":38,"start_character":13,"end_line":38,"end_character":17},"in_reply_to":"5f7c97a3_4e75d3f9","updated":"2018-05-18 19:49:20.000000000","message":"Done, fixed in https://review.openstack.org/#/c/569507/","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":11589,"name":"Harry Rybacki","email":"hrybacki@redhat.com","username":"hrybacki"},"change_message_id":"c27e65a97ad75a8781b3a109f9d877fdde44a1ea","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"This model implements limit validation in keystone that:"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* allows the sum of all child limits to exceed the limit of the parent, or tree"},{"line_number":61,"context_line":"  root"},{"line_number":62,"context_line":"* disallows a child limit from exceeding the parent limit"},{"line_number":63,"context_line":"* assumes registered limits as the default for projects that are not given a"},{"line_number":64,"context_line":"  project-specific override"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_aa6300b1","line":61,"range":{"start_line":60,"start_character":2,"end_line":61,"end_character":6},"updated":"2018-05-08 18:51:05.000000000","message":"It\u0027s obvious after reading through your (beautiful) examples below but upon first reading I understood this to say, \u0027Allows the sum of all child limits (and usages) of...\u0027","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"1aef388949b3f51edc33ab8b77f7eff4aa07551c","unresolved":false,"context_lines":[{"line_number":80,"context_line":"Enforcement Diagrams"},{"line_number":81,"context_line":"--------------------"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"The following diagrams illustrate the above behaviors. Assume the resource in"},{"line_number":84,"context_line":"question is ``cores``, and the default registered limit for ``cores`` is 10."},{"line_number":85,"context_line":"The labels in the diagrams below use shorthand notation for `limit` and `usage`"},{"line_number":86,"context_line":"as `l` and `u`, respectively."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":".. blockdiag::"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_084c57c6","line":86,"range":{"start_line":83,"start_character":0,"end_line":86,"end_character":29},"updated":"2018-05-24 22:01:04.000000000","message":"We should describe what A, B, and C represent. Projects, users, etc?","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"31fb92361fd3e65c52beb33ffd4caf8b5f7d4dda","unresolved":false,"context_lines":[{"line_number":80,"context_line":"Enforcement Diagrams"},{"line_number":81,"context_line":"--------------------"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"The following diagrams illustrate the above behaviors. Assume the resource in"},{"line_number":84,"context_line":"question is ``cores``, and the default registered limit for ``cores`` is 10."},{"line_number":85,"context_line":"The labels in the diagrams below use shorthand notation for `limit` and `usage`"},{"line_number":86,"context_line":"as `l` and `u`, respectively."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":".. blockdiag::"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_3395fa33","line":86,"range":{"start_line":83,"start_character":0,"end_line":86,"end_character":29},"in_reply_to":"5f7c97a3_084c57c6","updated":"2018-05-25 23:44:07.000000000","message":"Done","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"3e684625aa3202a11d7f6529570ad80cc5780df1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"The labels in the diagrams below use shorthand notation for `limit` and `usage`"},{"line_number":86,"context_line":"as `l` and `u`, respectively."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":".. blockdiag::"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"   blockdiag {"},{"line_number":91,"context_line":"      orientation \u003d portrait;"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"      A -\u003e B;"},{"line_number":94,"context_line":"      A -\u003e C;"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":97,"context_line":"      B [label\u003d\"B (u\u003d0)\"];"},{"line_number":98,"context_line":"      C [label\u003d\"C (u\u003d0)\"];"},{"line_number":99,"context_line":"   }"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Technically, both ``B`` and ``C`` can use up to 10 ``cores`` each and consume"},{"line_number":102,"context_line":"the entire limit for the tree. Resulting in:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_63ae7399","line":99,"range":{"start_line":88,"start_character":0,"end_line":99,"end_character":4},"updated":"2018-05-08 21:05:17.000000000","message":"These are very nice, makes digesting this much easier, good job!","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4952da991ab5178507cb17f5f8cdd6282e0df3ab","unresolved":false,"context_lines":[{"line_number":85,"context_line":"The labels in the diagrams below use shorthand notation for `limit` and `usage`"},{"line_number":86,"context_line":"as `l` and `u`, respectively."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":".. blockdiag::"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"   blockdiag {"},{"line_number":91,"context_line":"      orientation \u003d portrait;"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"      A -\u003e B;"},{"line_number":94,"context_line":"      A -\u003e C;"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":97,"context_line":"      B [label\u003d\"B (u\u003d0)\"];"},{"line_number":98,"context_line":"      C [label\u003d\"C (u\u003d0)\"];"},{"line_number":99,"context_line":"   }"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Technically, both ``B`` and ``C`` can use up to 10 ``cores`` each and consume"},{"line_number":102,"context_line":"the entire limit for the tree. Resulting in:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_be52c633","line":99,"range":{"start_line":88,"start_character":0,"end_line":99,"end_character":4},"in_reply_to":"5f7c97a3_08b50e7e","updated":"2018-05-16 14:35:53.000000000","message":"sdague introduced these to us in one of his original proposals for the hierarchical limit stuff :)","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1094f657233c6b90ca05ce4a9a337568232b2e7e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"The labels in the diagrams below use shorthand notation for `limit` and `usage`"},{"line_number":86,"context_line":"as `l` and `u`, respectively."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":".. blockdiag::"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"   blockdiag {"},{"line_number":91,"context_line":"      orientation \u003d portrait;"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"      A -\u003e B;"},{"line_number":94,"context_line":"      A -\u003e C;"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":97,"context_line":"      B [label\u003d\"B (u\u003d0)\"];"},{"line_number":98,"context_line":"      C [label\u003d\"C (u\u003d0)\"];"},{"line_number":99,"context_line":"   }"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Technically, both ``B`` and ``C`` can use up to 10 ``cores`` each and consume"},{"line_number":102,"context_line":"the entire limit for the tree. Resulting in:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_08b50e7e","line":99,"range":{"start_line":88,"start_character":0,"end_line":99,"end_character":4},"in_reply_to":"5f7c97a3_63ae7399","updated":"2018-05-15 20:26:33.000000000","message":"++ these diagrams are fantastic","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1094f657233c6b90ca05ce4a9a337568232b2e7e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"   }"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":118,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":119,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":120,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_484d4698","line":119,"range":{"start_line":118,"start_character":58,"end_line":119,"end_character":72},"updated":"2018-05-15 20:26:33.000000000","message":"I\u0027m sorry if I missed this somewhere else in the doc, but does this mean that oslo.limit will fetch the hierarchy from keystone and then call \"callback(project_id)\" to obtain the usage for each project, add them together and then check them against the limit of the child and then check against the limit of the parent? \n\nTo use the example, would oslo.limit do: if B.callback() + C.callback() \u003e A.limit then fail?","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"367af0bde16aada06082f43925cea21a92830d17","unresolved":false,"context_lines":[{"line_number":115,"context_line":"   }"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":118,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":119,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":120,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_53105200","line":119,"range":{"start_line":118,"start_character":58,"end_line":119,"end_character":72},"in_reply_to":"5f7c97a3_484d4698","updated":"2018-05-16 09:22:18.000000000","message":"yeah, I think so. All the sub-projects usage should be considered by default.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4952da991ab5178507cb17f5f8cdd6282e0df3ab","unresolved":false,"context_lines":[{"line_number":115,"context_line":"   }"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":118,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":119,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":120,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_de78e2c4","line":119,"range":{"start_line":118,"start_character":58,"end_line":119,"end_character":72},"in_reply_to":"5f7c97a3_53105200","updated":"2018-05-16 14:35:53.000000000","message":"Correct, the usage of A would also be checked. I touched on this a bit in a response below too, but this is primarily because one of the use cases from CERN was to ensure the SUM(A.usage, B.usage, C.usage) \u003c\u003d A.limit.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"437dc83c78ff6e6712ca0d4fdd183d91f26652a3","unresolved":false,"context_lines":[{"line_number":115,"context_line":"   }"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":118,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":119,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":120,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_297c3571","line":119,"range":{"start_line":118,"start_character":58,"end_line":119,"end_character":72},"in_reply_to":"5f7c97a3_de78e2c4","updated":"2018-05-16 21:36:40.000000000","message":"Understood. Thanks for the sanity check on that.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1094f657233c6b90ca05ce4a9a337568232b2e7e","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_b0d7654b","line":258,"updated":"2018-05-15 20:26:33.000000000","message":"Just thinking about this, the limit check will get expensive quickly, being that we have to query for usage per project and add them together in order to check the total usage against the parent limit.\n\nI was thinking, would we be able to provide a CONF option to toggle whether limit enforcement considers the hierarchy? The use case here is, what if an operator wants to use hierarchical quota limits for delegating quota management to sub-projects but does not require that limit enforcement consider the hierarchy? That is, sub-projects would be responsible for managing their own limits and the limit check would only consider the child/self limit.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7c93a5d6bd65c2d300e1eaf447de34cb1472b46a","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_a9e4c53d","line":258,"in_reply_to":"5f7c97a3_8950e90c","updated":"2018-05-16 21:39:54.000000000","message":"To try to clarify more, I was thinking that the hierarchical behavior for *setting* limits will be consistent and always on. And that the hierarchical behavior for *enforcing* would be able to be toggled.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"437dc83c78ff6e6712ca0d4fdd183d91f26652a3","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_8950e90c","line":258,"in_reply_to":"5f7c97a3_9e6b4a83","updated":"2018-05-16 21:36:40.000000000","message":"Right, the \"flat\" enforcement model works for the efficiency part but doesn\u0027t give the, \"I want to let Project A update quota limits for Project B, Project C, and Project D.\" It\u0027s about delegating the quota-update responsibility to others and not having it fall on only one \"admin\" project having to manage and update quota limits for an entire deployment.\n\nMaybe I\u0027m oversimplifying or missing something in the details, but I was thinking a config toggle could control whether oslo.limit a) does a sum of all adjacent children usages and checks against the self/child limit and checks against the parent limit or b) takes the usage of only the self/child and checks against the self/child limit. And that it would be a simple conditional branch.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2469b42890a8f619a73174fb4e201a56144e7d78","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_6f2f8da7","line":258,"in_reply_to":"5f7c97a3_a9e4c53d","updated":"2018-05-17 01:27:31.000000000","message":"Oh - I think I see what you mean with the \"flat\" enforcement model and retrofitting it for that case.\n\nIf we walk through the enforcement toggle example. Setting enforce\u003dTrue in the above example would prevent project C from claiming 10 cores since it puts the usage over the limit for the entire tree. If enforce\u003dFalse, then C would be able to claim usage of those 10 cores, putting the usage of the tree at 22, even though the limit of A is 20?","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"80bf08b4ba37f8cea60bdad35010684d37709488","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_d06b0182","line":258,"in_reply_to":"5f7c97a3_b0d7654b","updated":"2018-05-15 20:30:47.000000000","message":"\u003e Just thinking about this, the limit check will get expensive\n \u003e quickly, being that we have to query for usage per project and add\n \u003e them together in order to check the total usage against the parent\n \u003e limit.\n\nTo clarify myself here, the more children/siblings you have, the more expensive the limit check gets. Example: 10 child/sibling projects under the same parent would result in 10 separate usage queries to do one limit check -- operators must be mindful in how they set up their hierarchies.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4952da991ab5178507cb17f5f8cdd6282e0df3ab","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_9e6b4a83","line":258,"in_reply_to":"5f7c97a3_b38f6673","updated":"2018-05-16 14:35:53.000000000","message":"Yeah - this can certainly get expensive depending on the structure of the tree. I do think that we\u0027ll need to have something for deployments not looking for strict usage checks and Melanie\u0027s use case might be a good starting place for another enforcement model. We could also support this with the \"flat\" enforcement model, but it would require the operator to manually model limits in a hierarchical way. But, it would give you one usage check per project and avoid having to calculate everything for the entire tree.\n\nFor example, if B and C are siblings and both children of A an operator could do the following with \"flat\" enforcement:\n\n* UPDATE A.limit to 0 (forcing all usage to the children)\n* UPDATE B.limit to 6\n* UPDATE C.limit to 14\n\nWhenever calculating usage at the service, the project relationships are ignored, so allocating cores in C would only call self._list_cores_for_project(C.id) and base the usage check on that.\n\nIt\u0027s a little obtuse for the operator, but it would get around having to aggregate the results of the entire tree.\n\nWe could abstract that specific behavior into it\u0027s own model though, too. Which might make things more apparent? I\u0027m not sure which the best is, but deployments will have to opt into the strict-hierarchical model iff they want it and are ok with the performance. This model was primarily based on the use cases CERN had, and one of them was that the usage of the tree shouldn\u0027t exceed the limit of the parent. I struggle to find a way to do that without looping the projects involved through the callback \u003d/","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"367af0bde16aada06082f43925cea21a92830d17","unresolved":false,"context_lines":[{"line_number":255,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":256,"context_line":"      B [label\u003d\"B (l\u003d12, u\u003d12)\"];"},{"line_number":257,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#FF0000\"];"},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"Creating or updating a project with a limit that exceeds the limit of ``A`` is"},{"line_number":261,"context_line":"forbidden. Even though it is possible for the sum of all limits under ``A`` to"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_b38f6673","line":258,"in_reply_to":"5f7c97a3_d06b0182","updated":"2018-05-16 09:22:18.000000000","message":"I like this idea. The operation manage the hierarchical limit structure himself to ensure it works well by sub-projects. Then when this config option is set, the sub-projects can ignore their siblings but still works.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"37b2fd4cc20a86f87d780cf1b8dc12b8e51e1cd2","unresolved":false,"context_lines":[{"line_number":305,"context_line":"      A [label\u003d\"A (l\u003d6, u\u003d0)\", textcolor \u003d \"#00af00\"];"},{"line_number":306,"context_line":"   }"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"When we create project ``B``, which is a child or project ``A``, the limit API"},{"line_number":309,"context_line":"should ensure that project ``B`` doesn\u0027t assume the default of 10. Instead, we"},{"line_number":310,"context_line":"should obey the parent\u0027s limit since no single child limit should exceed the"},{"line_number":311,"context_line":"limit of the parent:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_fb6ed5c7","line":308,"range":{"start_line":308,"start_character":47,"end_line":308,"end_character":49},"updated":"2018-05-18 19:47:15.000000000","message":"of*","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e71269e2bbd8d5105ee265b33825720587983a52","unresolved":false,"context_lines":[{"line_number":305,"context_line":"      A [label\u003d\"A (l\u003d6, u\u003d0)\", textcolor \u003d \"#00af00\"];"},{"line_number":306,"context_line":"   }"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"When we create project ``B``, which is a child or project ``A``, the limit API"},{"line_number":309,"context_line":"should ensure that project ``B`` doesn\u0027t assume the default of 10. Instead, we"},{"line_number":310,"context_line":"should obey the parent\u0027s limit since no single child limit should exceed the"},{"line_number":311,"context_line":"limit of the parent:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_fb7c9573","line":308,"range":{"start_line":308,"start_character":47,"end_line":308,"end_character":49},"in_reply_to":"5f7c97a3_fb6ed5c7","updated":"2018-05-18 19:49:20.000000000","message":"Done, fixed in https://review.openstack.org/#/c/569507/","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"1094f657233c6b90ca05ce4a9a337568232b2e7e","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The ``verify`` method is similar to the ``enforce`` method in that it ensures"},{"line_number":426,"context_line":"the project isn\u0027t over its limit. This protects against race conditions between"},{"line_number":427,"context_line":"multple processes claiming usage within the same project."},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"Fetching project hierarchy"},{"line_number":430,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_903909a5","line":427,"updated":"2018-05-15 20:26:33.000000000","message":"Agreed there need to be two checks -- one before resource creation and one after, in order to address races. But, I am curious what the difference in implementation would be between \"enforce\" and \"verify\" (in nova, they are the same implementation).","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"437dc83c78ff6e6712ca0d4fdd183d91f26652a3","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The ``verify`` method is similar to the ``enforce`` method in that it ensures"},{"line_number":426,"context_line":"the project isn\u0027t over its limit. This protects against race conditions between"},{"line_number":427,"context_line":"multple processes claiming usage within the same project."},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"Fetching project hierarchy"},{"line_number":430,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_490c113b","line":427,"in_reply_to":"5f7c97a3_1e33ba63","updated":"2018-05-16 21:36:40.000000000","message":"Ah, I see -- enforce pulls the limit from keystone and the pulls usages and pass/fail. Then verify only has to pull the usages again and pass/fail. (Aside: Also noting that some consumers of oslo.limit won\u0027t want to do the verify step or at least have it be configurable. In nova, this is controlled by CONF.quota.recheck_quota but I wish I had named it CONF.quota.strict_quotas instead.)\n\nI kind of like this supervisor idea because it makes it clear that the use of verify leverages the same data that enforce did (resource, project, callback, I\u0027m not sure what \"claim\" is here).","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2469b42890a8f619a73174fb4e201a56144e7d78","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The ``verify`` method is similar to the ``enforce`` method in that it ensures"},{"line_number":426,"context_line":"the project isn\u0027t over its limit. This protects against race conditions between"},{"line_number":427,"context_line":"multple processes claiming usage within the same project."},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"Fetching project hierarchy"},{"line_number":430,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_6f046d7f","line":427,"in_reply_to":"5f7c97a3_490c113b","updated":"2018-05-17 01:27:31.000000000","message":"Oh - sure, that makes sense. The claim in this case is the number of things be claimed in the request. So, if someone wants to spin up 20 cores worth of instances in nova, the claim would be 20 if the registered limit in keystone was \"cores\".\n\nI figured having a claim argument could offload the calculation of the total resources in the request to oslo.limit, instead of forcing services to incrementally loop through each entity in the request one-by-one recalculating usage for the entire tree multiple times (wince).\n\nOn the supervisor (for lack of a better name), I suppose it is kind of nice to have the conditions of the limit your enforcing stashed away into an object of some kind. Is there ever a case where you\u0027d want to verify() a different set of arguments than what you enforced() earlier? For example, if I only have 4 cores left to claim in my project and I try to claim 6, would nova still give me the remaining 4 or would the entire request fail?\n\nIn that case, nova would have to handle that and build a new supervisor?\n\nOpen to suggestions here.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"367af0bde16aada06082f43925cea21a92830d17","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The ``verify`` method is similar to the ``enforce`` method in that it ensures"},{"line_number":426,"context_line":"the project isn\u0027t over its limit. This protects against race conditions between"},{"line_number":427,"context_line":"multple processes claiming usage within the same project."},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"Fetching project hierarchy"},{"line_number":430,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_f3407ea7","line":427,"in_reply_to":"5f7c97a3_903909a5","updated":"2018-05-16 09:22:18.000000000","message":"I think the main different is we don\u0027t need to fetch the limit from Keystone again in \"verify\". The main logic to check the \"usage\" and \"limit\" may be similar.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4952da991ab5178507cb17f5f8cdd6282e0df3ab","unresolved":false,"context_lines":[{"line_number":424,"context_line":""},{"line_number":425,"context_line":"The ``verify`` method is similar to the ``enforce`` method in that it ensures"},{"line_number":426,"context_line":"the project isn\u0027t over its limit. This protects against race conditions between"},{"line_number":427,"context_line":"multple processes claiming usage within the same project."},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"Fetching project hierarchy"},{"line_number":430,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_1e33ba63","line":427,"in_reply_to":"5f7c97a3_f3407ea7","updated":"2018-05-16 14:35:53.000000000","message":"Yeah - I wanted to have the difference between the two methods be apparent in what the pattern was, especially since it helps mitigate weird race conditions. Versus having someone wonder \"why are we getting the limit information if we already have it?\" or requiring a comment in the implementation (thinking of when more and more services start incorporating this).\n\nBut, at the same time, I agree that it doesn\u0027t make sense to have two methods with the same arguments. Does the verification check need everything we pass to the enforce check? Should enforce return something that we can call later to make sure we\u0027re still within quota? Does something like the following seem better?\n\n\n  def create_foobar(self, context, foobar):\n      claim \u003d 1\n      limit_supervisor \u003d LIMIT_ENFORCER.enforce(\n          \u0027foobars\u0027,\n          claim,\n          context.project_id,\n          self._list_foobars_for_project\n      )\n\n      # execute business logic\n      driver.create_foobar(foobar)\n\n      try:\n          limit_supervisor.verify()\n      except limit.UsageExceededLimitException():\n          driver.rollback(foobar)\n          raise\n\nOr, I suppose we could even do the same with enforce()\n\n  def create_foobar(self, context, foobar):\n      claim \u003d 1\n      limit_supervisor \u003d LIMIT_ENFORCER.create_supervisor(\n          \u0027foobars\u0027,\n          claim,\n          context.project_id,\n          self._list_foobars_for_project\n      )\n\n      limit_supervisor.enforce()\n\n      # execute business logic\n      driver.create_foobar(foobar)\n\n      try:\n          limit_supervisor.verify()\n      except limit.UsageExceededLimitException():\n          driver.rollback(foobar)\n          raise\n\nThat\u0027s just a construct for storing limit information and makes it so we don\u0027t have to pass it in every time.  Does this seem better or worse than just calling enforce twice?","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"3e684625aa3202a11d7f6529570ad80cc5780df1","unresolved":false,"context_lines":[{"line_number":526,"context_line":"Notifications Impact"},{"line_number":527,"context_line":"--------------------"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"None"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"Other End User Impact"},{"line_number":532,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_438337cd","line":529,"range":{"start_line":529,"start_character":0,"end_line":529,"end_character":4},"updated":"2018-05-08 21:05:17.000000000","message":"Will this generate any notifications for other services (if not keystone) when they overstep their limits?","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"4cbf7e1d7243a010f264286eb7d78498d3f1e8be","unresolved":false,"context_lines":[{"line_number":526,"context_line":"Notifications Impact"},{"line_number":527,"context_line":"--------------------"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"None"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"Other End User Impact"},{"line_number":532,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_90ee37b2","line":529,"range":{"start_line":529,"start_character":0,"end_line":529,"end_character":4},"in_reply_to":"5f7c97a3_438337cd","updated":"2018-05-11 08:56:37.000000000","message":"The services use olso.limit to check the limit and usage. oslo.limit get the limit from Keystone and check the usage locally and then return the result to the services. So here Keystone is the place where the limit came from, Keystone can\u0027t know the check is pass or not so that it can\u0027t send the notification as well.\n\nSo I think this should be the job for oslo.limit. Oslo.limit can Log something or send the notification.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"59021a8eb066562e8d48b8de67f68abaddb35141","unresolved":false,"context_lines":[{"line_number":526,"context_line":"Notifications Impact"},{"line_number":527,"context_line":"--------------------"},{"line_number":528,"context_line":""},{"line_number":529,"context_line":"None"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"Other End User Impact"},{"line_number":532,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"5f7c97a3_dde03f29","line":529,"range":{"start_line":529,"start_character":0,"end_line":529,"end_character":4},"in_reply_to":"5f7c97a3_90ee37b2","updated":"2018-05-11 15:39:42.000000000","message":"Ok, there won\u0027t be a notifications impact from keystone then.","commit_id":"615b339ca778f0a6244b878a58ee96e992c1e388"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"45f2df09380b87db666e8d49baf5b832cf0d9a73","unresolved":false,"context_lines":[{"line_number":12,"context_line":"enforcement model for limits associated to resources in a hierarchical project"},{"line_number":13,"context_line":"structure."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"`bp strict-two-level-model  \u003chttps://blueprints.launchpad.net/keystone/+spec/strict-two-level-model\u003e`_"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem Description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_b82aac29","line":15,"updated":"2018-06-05 14:20:22.000000000","message":"Strict 2 level is neither necessary nor sufficient.\n\nhttps://adam.younglogic.com/2018/05/tracking-quota/","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"This model:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* requires project hierarchy never exceeds a depth of two, meaning hierarchies"},{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_310b252c","line":53,"range":{"start_line":53,"start_character":2,"end_line":53,"end_character":57},"updated":"2018-06-05 08:46:18.000000000","message":"How do we enforce this?","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"This model:"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"* requires project hierarchy never exceeds a depth of two, meaning hierarchies"},{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_7f5de346","line":53,"range":{"start_line":53,"start_character":2,"end_line":53,"end_character":57},"in_reply_to":"5f7c97a3_310b252c","updated":"2018-06-05 10:07:50.000000000","message":"It would depend on the option \"max_project_tree_depth\" and the quota model which operators choose. the project depth should be \nthe min(max_project_tree_depth, quota_model), for example, using strict-two-level-enforcement-model, the limit is 2 by default--min(5, 2).\n\nSo the enforce check should be added during creating a new project: https://github.com/openstack/keystone/blob/master/keystone/resource/core.py#L78","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"The enforcement model should also raise an exception upon start up if the"},{"line_number":358,"context_line":"projects within keystone break the constraints expected by the model."},{"line_number":359,"context_line":"Attempting to start keystone with projects in a tree structure greater than two"},{"line_number":360,"context_line":"levels deep would result in a ``HTTP 500`` error. It would be unreasonable to"},{"line_number":361,"context_line":"allow keystone to run and make assumptions about projects that fall outside the"},{"line_number":362,"context_line":"constraints of the enforcement model. This clearly communicates a set project"},{"line_number":363,"context_line":"structure to operators at run time."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_fc2821ef","line":360,"range":{"start_line":359,"start_character":0,"end_line":360,"end_character":49},"updated":"2018-06-05 08:46:18.000000000","message":"What about after that?","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b99d45eb92ed4bca75ee2bb6e043853c8d7e502c","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"The enforcement model should also raise an exception upon start up if the"},{"line_number":358,"context_line":"projects within keystone break the constraints expected by the model."},{"line_number":359,"context_line":"Attempting to start keystone with projects in a tree structure greater than two"},{"line_number":360,"context_line":"levels deep would result in a ``HTTP 500`` error. It would be unreasonable to"},{"line_number":361,"context_line":"allow keystone to run and make assumptions about projects that fall outside the"},{"line_number":362,"context_line":"constraints of the enforcement model. This clearly communicates a set project"},{"line_number":363,"context_line":"structure to operators at run time."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_6c3e92ba","line":360,"range":{"start_line":359,"start_character":0,"end_line":360,"end_character":49},"in_reply_to":"5f7c97a3_51b3334e","updated":"2018-06-05 16:38:46.000000000","message":"I\u0027m realizing I misread the sentence, the first time I read it I interpreted it to mean what ayoung said, that it should just fail to start. A 500 isn\u0027t something that\u0027s returned on service start, it happens after the service is already started. A 500 doesn\u0027t make sense here - the service should just not start.\n\nMy question is about what happens after keystone has already started, is happy with its current project hierarchy, and then someone adds a new child project. It\u0027s too late to prevent keystone from starting. Is the 500 supposed to be sent in response to trying to create that child project? That is API-breaking and not end-user-friendly.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"11af31dd6d9ec3596f60670a7036707e9473f4d3","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"The enforcement model should also raise an exception upon start up if the"},{"line_number":358,"context_line":"projects within keystone break the constraints expected by the model."},{"line_number":359,"context_line":"Attempting to start keystone with projects in a tree structure greater than two"},{"line_number":360,"context_line":"levels deep would result in a ``HTTP 500`` error. It would be unreasonable to"},{"line_number":361,"context_line":"allow keystone to run and make assumptions about projects that fall outside the"},{"line_number":362,"context_line":"constraints of the enforcement model. This clearly communicates a set project"},{"line_number":363,"context_line":"structure to operators at run time."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_2ce2daa1","line":360,"range":{"start_line":359,"start_character":0,"end_line":360,"end_character":49},"in_reply_to":"5f7c97a3_6c3e92ba","updated":"2018-06-05 17:20:31.000000000","message":"I think:\n1. if Keystone refuse to start, then operators should change the limit model back to an available one (now, is flat), start Keystone, then fix the project structure problem.\n2. if Keystone raise 500 error, the operators can fix the problem at once, during the fixing, a new child project can\u0027t be created since it\u0027ll not pass the limit model check, a 403 error should be returned.\n\nBoth works. I\u0027m fine either.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"1c6b474356a65bfc98063b399c7ddbe9525fb315","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"The enforcement model should also raise an exception upon start up if the"},{"line_number":358,"context_line":"projects within keystone break the constraints expected by the model."},{"line_number":359,"context_line":"Attempting to start keystone with projects in a tree structure greater than two"},{"line_number":360,"context_line":"levels deep would result in a ``HTTP 500`` error. It would be unreasonable to"},{"line_number":361,"context_line":"allow keystone to run and make assumptions about projects that fall outside the"},{"line_number":362,"context_line":"constraints of the enforcement model. This clearly communicates a set project"},{"line_number":363,"context_line":"structure to operators at run time."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_51b3334e","line":360,"range":{"start_line":359,"start_character":0,"end_line":360,"end_character":49},"in_reply_to":"5f7c97a3_a20da036","updated":"2018-06-05 15:57:32.000000000","message":"Then Keystone should just refuse to start","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"The enforcement model should also raise an exception upon start up if the"},{"line_number":358,"context_line":"projects within keystone break the constraints expected by the model."},{"line_number":359,"context_line":"Attempting to start keystone with projects in a tree structure greater than two"},{"line_number":360,"context_line":"levels deep would result in a ``HTTP 500`` error. It would be unreasonable to"},{"line_number":361,"context_line":"allow keystone to run and make assumptions about projects that fall outside the"},{"line_number":362,"context_line":"constraints of the enforcement model. This clearly communicates a set project"},{"line_number":363,"context_line":"structure to operators at run time."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_a20da036","line":360,"range":{"start_line":359,"start_character":0,"end_line":360,"end_character":49},"in_reply_to":"5f7c97a3_fc2821ef","updated":"2018-06-05 10:07:50.000000000","message":"I think a LOG for operators is needed. It may tell operators what\u0027s the problem and the suggestion (delete some projects, try to use another limit model and so on).","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":430,"context_line":"Fetching project hierarchy"},{"line_number":431,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"The (current) default policy prevents users with a member role on a project"},{"line_number":434,"context_line":"from retrieving the entire project hierarchy. The library that needs the"},{"line_number":435,"context_line":"hierarchy to calculate usage must call the API as a project administrator or"},{"line_number":436,"context_line":"use a service user token. This API is used for both *operators* and"},{"line_number":437,"context_line":"*oslo.limit*."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_99f49f89","line":434,"range":{"start_line":433,"start_character":0,"end_line":434,"end_character":44},"updated":"2018-06-05 08:46:18.000000000","message":"So what will the policy on this new API call be?","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":430,"context_line":"Fetching project hierarchy"},{"line_number":431,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"The (current) default policy prevents users with a member role on a project"},{"line_number":434,"context_line":"from retrieving the entire project hierarchy. The library that needs the"},{"line_number":435,"context_line":"hierarchy to calculate usage must call the API as a project administrator or"},{"line_number":436,"context_line":"use a service user token. This API is used for both *operators* and"},{"line_number":437,"context_line":"*oslo.limit*."}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_223af097","line":434,"range":{"start_line":433,"start_character":0,"end_line":434,"end_character":44},"in_reply_to":"5f7c97a3_99f49f89","updated":"2018-06-05 10:07:50.000000000","message":"The API is still GET /limits. here we add a new filter \"show_hierarchy\u003dtrue\", so here we can check the user\u0027s role in code, I think the role can be \"admin\" or \"service\".","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":463,"context_line":"                \"region_id\": null,"},{"line_number":464,"context_line":"                \"resource_name\": \"ram_mb\","},{"line_number":465,"context_line":"                \"resource_limit\": 20480,"},{"line_number":466,"context_line":"                \"project_id\": \"\","},{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_39754b33","line":466,"range":{"start_line":466,"start_character":30,"end_line":466,"end_character":32},"updated":"2018-06-05 08:46:18.000000000","message":"Why is this empty?","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":463,"context_line":"                \"region_id\": null,"},{"line_number":464,"context_line":"                \"resource_name\": \"ram_mb\","},{"line_number":465,"context_line":"                \"resource_limit\": 20480,"},{"line_number":466,"context_line":"                \"project_id\": \"\","},{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_0226d4bb","line":466,"range":{"start_line":466,"start_character":30,"end_line":466,"end_character":32},"in_reply_to":"5f7c97a3_39754b33","updated":"2018-06-05 10:07:50.000000000","message":"Will add it back in the next PS.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","},{"line_number":470,"context_line":"                        \"project_id\": \"f7120b7c7efb4c2c8859441eafaa0c0f\","},{"line_number":471,"context_line":"                        \"region_id\": null,"},{"line_number":472,"context_line":"                        \"resource_limit\": 10240,"},{"line_number":473,"context_line":"                        \"resource_name\": \"ram_mb\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_f9035375","line":470,"updated":"2018-06-05 08:46:18.000000000","message":"Sort of confusing for a list named \"projects\" to have objects with both an id and project_id. Without the help of the below diagram (which API users won\u0027t have) it\u0027s also really not clear what these three objects are, are they limits for the project\u0027s ancestors? Siblings? Children?\n\nI\u0027m assuming we only want to allow this call for an administrator on project A to see the limits of the project\u0027s children, so maybe rename the list to \"children\"? Or \"subproject_limits\"? (\"child_limits\" doesn\u0027t really sit right...)","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"5f295b5b0aca31cc30194f835e21b2a028c5962a","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","},{"line_number":470,"context_line":"                        \"project_id\": \"f7120b7c7efb4c2c8859441eafaa0c0f\","},{"line_number":471,"context_line":"                        \"region_id\": null,"},{"line_number":472,"context_line":"                        \"resource_limit\": 10240,"},{"line_number":473,"context_line":"                        \"resource_name\": \"ram_mb\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_a60b5d29","line":470,"in_reply_to":"5f7c97a3_8ae2ed9f","updated":"2018-06-06 03:49:29.000000000","message":"Got your point. So every project in the same tree will fetch the same response.This makes sense as well.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f829c102e3962db37cf8c375192afbe84aba3788","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","},{"line_number":470,"context_line":"                        \"project_id\": \"f7120b7c7efb4c2c8859441eafaa0c0f\","},{"line_number":471,"context_line":"                        \"region_id\": null,"},{"line_number":472,"context_line":"                        \"resource_limit\": 10240,"},{"line_number":473,"context_line":"                        \"resource_name\": \"ram_mb\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_8ae2ed9f","line":470,"in_reply_to":"5f7c97a3_e2807849","updated":"2018-06-05 19:34:34.000000000","message":"My original thought behind this was to not have to explicitly say \"this is a sibling project\" or \"this is a child project\u0027s limit\", because I wanted that to be represented in the tree.\n\nWhat about s/projects/limits/ ? To me, it seems like we\u0027re relaying two pieces of information with this API. The first is the limits associated to the various projects. The second is the structure of those projects according to the source of truth.\n\nIf that is indeed what we\u0027re trying to do relay, can we do it with assumptions about the tree structure?\n\nhttp://paste.openstack.org/show/722754/","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                \"projects\": ["},{"line_number":468,"context_line":"                    {"},{"line_number":469,"context_line":"                        \"id\": \"7842e3ff904b48d89191e9b37c2d29af\","},{"line_number":470,"context_line":"                        \"project_id\": \"f7120b7c7efb4c2c8859441eafaa0c0f\","},{"line_number":471,"context_line":"                        \"region_id\": null,"},{"line_number":472,"context_line":"                        \"resource_limit\": 10240,"},{"line_number":473,"context_line":"                        \"resource_name\": \"ram_mb\","}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_e2807849","line":470,"in_reply_to":"5f7c97a3_f9035375","updated":"2018-06-05 10:07:50.000000000","message":"emm, i thought i used siblings and children here.\nActually my thought for the response body is like:\nhttp://paste.openstack.org/show/722711/\n\nNeed to get Lance\u0027s feedback.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"94040383575100eae20e636639e938e1de005417","unresolved":false,"context_lines":[{"line_number":550,"context_line":"It is also worth noting that both Registered Limits and Project Limits are not"},{"line_number":551,"context_line":"expected to change frequently. This means the data is safe to cache for some"},{"line_number":552,"context_line":"period of time. Caching has already been implemented internally to keystone,"},{"line_number":553,"context_line":"similar to how keystone caches responses for other resources. Caching can also"},{"line_number":554,"context_line":"be done client-side to avoid making frequent calls to keystone for relatively"},{"line_number":555,"context_line":"static limit information."},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"Other Deployer Impact"},{"line_number":558,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_1f02af0a","line":555,"range":{"start_line":553,"start_character":62,"end_line":555,"end_character":25},"updated":"2018-06-05 08:46:18.000000000","message":"I think this is going to be an important part of this and I\u0027m not totally comfortable with it being a sidenote like this. How is the cache going to be invalidated?\n\nWhat if something like this happens:\n\nadmin sets the TTL to e.g. 1 hour\non minute 1, admin decreases limit for the vcpu resource in keystone\non minute 2, user makes a nova request to add more vcpus that should bring them over the limit\nnova has cached limit, thinks that the request is valid\n\nI\u0027m okay with moving forward as-is but I don\u0027t think we should make the limits API non-experimental until we can be sure we won\u0027t have problems like this.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"84c73dc04de701e973d11a9cd7624efc497b8e40","unresolved":false,"context_lines":[{"line_number":550,"context_line":"It is also worth noting that both Registered Limits and Project Limits are not"},{"line_number":551,"context_line":"expected to change frequently. This means the data is safe to cache for some"},{"line_number":552,"context_line":"period of time. Caching has already been implemented internally to keystone,"},{"line_number":553,"context_line":"similar to how keystone caches responses for other resources. Caching can also"},{"line_number":554,"context_line":"be done client-side to avoid making frequent calls to keystone for relatively"},{"line_number":555,"context_line":"static limit information."},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"Other Deployer Impact"},{"line_number":558,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5f7c97a3_4d8f1d75","line":555,"range":{"start_line":553,"start_character":62,"end_line":555,"end_character":25},"in_reply_to":"5f7c97a3_1f02af0a","updated":"2018-06-05 10:07:50.000000000","message":"++, totally agree. we should consider it more.","commit_id":"9c6b157868644a97c52e1fb68ae2075c577f89d1"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a02da28ca396ec4274e544b7b04b868069a08583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_a745a445","updated":"2018-06-05 18:09:06.000000000","message":"I am not sure where to place information about storing the aggregate claim upwards (on the parents) in the tree.\n\nBasically in the case of\n\n     a\n     /\\\n    b  c\n\nWhen a claim is made on C we write the aggregate use to A. When a subsequent claim is made on B, we check A and the aggregate record of C (on A) and B\u0027s current use to make sure we haven\u0027t exceeded A\u0027s total quota or B allowed quota.\n\nThis simplifies and makes the \"lookup\" not expand to N projects where N is the total children of A, we only lookup A and do a sum() A and the aggregate records from each child.\n\nIn the extreme case [future] of a N depth tree\n\n      a\n      /\\\n     b  c\n    /\n   d\n\nWhen a claim on D is made, we write D\u0027s usage up to B, sum (B+D) and write an aggregate record to A.  Subsequent claim to C checks C, A+A_Child_aggregate (each child has an aggregate record). Workflow is the same as in the simple case.\n\nThis might all be a pure implementation detail not needed in the spec.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"408560b8e00c4faaa722c41a6a753c958bf11464","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_c73c6032","in_reply_to":"5f7c97a3_073fb887","updated":"2018-06-05 18:33:10.000000000","message":"This sounds like a nice idea in theory, but I have concerns about whether this will re-introduce the famed \"quota out-of-sync\" problem where cached usage can get out of sync with actual countable usage.\n\nFirst thing that comes to mind is that if we do it this way, services will also have to call oslo.limit during any delete of a resource in addition to during the create of a resource, so that the cached usage may be decremented.\n\nI think this will be the potentially unmaintainable part because there could be several separate places where resources are deleted and all of them would need to be sure to call oslo.limit, else things go out-of-sync.\n\nAnd in the nova case, one example where this used to be able to occur if nova-compute was down or was restarted _right_ before quota usage was about to be decremented by nova-compute (as the resource was deleted by nova-compute), and thus the decrement never happened, and quota usage went out-of-sync with actual usage.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"25dfc08962f9590138071c356312566c3ab68035","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_ed505b61","in_reply_to":"5f7c97a3_8a8f4d74","updated":"2018-06-05 19:57:08.000000000","message":"A \"bulk\"/paralell lookup could alleviate the issues with needing to write upwards (and even possibly handle the multi-depth future case better). The records would be the same count and we could pull the ids [add it to the hierarchy query in keystone] as a list and pass it into the \"hey get me all the info\". this doesn\u0027t solve some future issues and locks this model into something relational. \n\nI do think we\u0027re going to need to do some level of aggregation in the claim/release phases long term. I def. wont hold this up, i proposed this as an idea (and not part of the spec so it didn\u0027t hold things up) knowing we had width of tree issues and i wouldn\u0027t be surprised if we hit performance issues with it pretty soon on due to someone wanting a ton of children under a single project/domain.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"b067dff8cf63522394238e148ba7ecc144d15f1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_0db037dd","in_reply_to":"5f7c97a3_8a8f4d74","updated":"2018-06-05 19:50:12.000000000","message":"The out-of-sync problem seems to be more of a concern if we have to make sure we\u0027re tracking resource deletion among other states. It feels like you\u0027d need a safety net periodic job just to make sure things are recorded properly and the usage aggregates (?) reflect the current state of the system.\n\nI feel like that is also going to raise the bar for services looking to adopt this work. One of the primary requirements when we started these discussions last year was to make this as easy as possible for other services to consume. That said, we wanted keystone to be responsible for handling the project tree so that other services wouldn\u0027t need to grok that information.\n\nBut, it appears the cost of understanding a complex tree structure from a separate service is paid in more complicated aggregate resource usage tracking. Both seem to make adopting harder :(\n\nI\u0027m not sure what the right answer is, but Melanie brings up a good point.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"2f783c7469b8fd0f0eefcede4c457a24b1782760","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_073fb887","in_reply_to":"5f7c97a3_a745a445","updated":"2018-06-05 18:14:59.000000000","message":"To be clear, this is oslo.limit and service side details, not \"keystone server\" side.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"d8404d0da1daacde4e2c04d59c872f4b39dc1699","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_c7d8e0f1","in_reply_to":"5f7c97a3_c73c6032","updated":"2018-06-05 18:38:13.000000000","message":"Right, that is a concern, I am very worried that more than a very low number of children wide will introduce bad performance because a lookup of N children\u0027s quota [unless we can do bulk lookups?] is going to get pricy fast, especially in the case of \"sql.get_usage\u003cproject\u003e\" or even in a key-value-store.\n\n100s of projects in a single level is likely to get ugly... then again it\u0027ll be ugly in other ways within keystone to get the limit data itself.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"275d2ddce5e567a2332b3d04edbe1e69edfdeec6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_8a8f4d74","in_reply_to":"5f7c97a3_c7d8e0f1","updated":"2018-06-05 19:12:26.000000000","message":"I\u0027m worried about that too. I\u0027m not as concerned about 100s of projects in a single level (I hope that is not a thing people want to do and like you said, that will get ugly in other ways anyway), but more like, more than a few in a single level turns to very bad performance.\n\nOne thing I didn\u0027t think of that should have been obvious is that oslo.limit should do the per project lookups in parallel ... so maybe that alleviates most of the problem. I was originally thinking of it doing things serially for some reason.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c388a10a894121ee1b0c481a4119577f3618a29f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"5f7c97a3_9b5ec110","in_reply_to":"5f7c97a3_ed505b61","updated":"2018-06-05 21:19:25.000000000","message":"Yeah, I want us to be able to go that route later if we want to, so if we can design this in a way that \"not writing upward\" is the initial model and a future choosable model (via config option?) that writes upwards potentially could be added. (As discussed on IRC in #openstack-keystone today).\n\nI also wanted to note that the \"gotcha\" in nova with usage caching and the periodic quota usage sync (of the cache) was that it\u0027s not enough to sync only the projects involved in the various resource allocations that are naturally happening -- a sibling project out-of-sync with usage vs cache will mess up the quota checking for its siblings. So the scenario there is, project A goes out-of-sync and coincidentally no one creates resources with it for awhile, project B and C siblings get wrong quota enforcement because nothing has touched project A to get that periodic cache expiry refresh. So the only way to fix it was to do \"for each project that exists in nova, do quota refresh\".\n\nFinally, I think Lance mentioned it might be a good idea to start off with it being \"experimental\" as we gather feedback from people who start using it. We could try this in nova to start and see how it performs, getting feedback from operators at CERN and more.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f829c102e3962db37cf8c375192afbe84aba3788","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_aad569e7","line":57,"range":{"start_line":57,"start_character":42,"end_line":57,"end_character":51},"updated":"2018-06-05 19:34:34.000000000","message":"aggregate*","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a989370972691fc29184c01f73cc18905794ce24","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_aae1e92c","line":57,"range":{"start_line":57,"start_character":15,"end_line":57,"end_character":31},"updated":"2018-06-05 19:04:26.000000000","message":"change to \"overcommit\"","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"5f295b5b0aca31cc30194f835e21b2a028c5962a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_e69cf50f","line":57,"range":{"start_line":57,"start_character":42,"end_line":57,"end_character":51},"in_reply_to":"5f7c97a3_aad569e7","updated":"2018-06-06 03:49:29.000000000","message":"Done","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a989370972691fc29184c01f73cc18905794ce24","unresolved":false,"context_lines":[{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_4ad05554","line":58,"range":{"start_line":58,"start_character":51,"end_line":58,"end_character":67},"updated":"2018-06-05 19:04:26.000000000","message":"Same as above.\n\nSorry, my mistake when i wrote this bit, can be fixed in a followup.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f829c102e3962db37cf8c375192afbe84aba3788","unresolved":false,"context_lines":[{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_6a099193","line":58,"range":{"start_line":58,"start_character":2,"end_line":58,"end_character":13},"updated":"2018-06-05 19:34:34.000000000","message":"usage*\n\ntrying to keep the minimum amount of new terms as possible.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"5f295b5b0aca31cc30194f835e21b2a028c5962a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_6690e5ee","line":58,"range":{"start_line":58,"start_character":2,"end_line":58,"end_character":13},"in_reply_to":"5f7c97a3_6a099193","updated":"2018-06-06 03:49:29.000000000","message":"Done","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"a989370972691fc29184c01f73cc18905794ce24","unresolved":false,"context_lines":[{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":62,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_0aca5da0","line":59,"range":{"start_line":59,"start_character":29,"end_line":59,"end_character":45},"updated":"2018-06-05 19:04:26.000000000","message":"see above.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"5f295b5b0aca31cc30194f835e21b2a028c5962a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota oversubscription, i.e. the aggrecate quota limit (not"},{"line_number":58,"context_line":"  consumption) may exceed the limit of the parent. Oversubscription and"},{"line_number":59,"context_line":"  user-experience related to oversubscription is a leading factor for"},{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":62,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_26bc2d6b","line":59,"range":{"start_line":59,"start_character":29,"end_line":59,"end_character":45},"in_reply_to":"5f7c97a3_0aca5da0","updated":"2018-06-06 03:49:29.000000000","message":"Done","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f829c102e3962db37cf8c375192afbe84aba3788","unresolved":false,"context_lines":[{"line_number":60,"context_line":"  the strict two-level hierarchy."},{"line_number":61,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":62,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":63,"context_line":"  a user could consume the full amount of quota on each endpoint."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"This model implements limit validation in keystone that:"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"5f7c97a3_aaeec9b1","line":63,"updated":"2018-06-05 19:34:34.000000000","message":"Right now, the current design of unified limits is on a per-service basis. We don\u0027t have the underlying infrastructure to allocate limits per endpoint.","commit_id":"e06a5a206221c99e62daf57788445ec98321d942"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f55b2163ea95af81973abbf2e589abbc1cdb187e","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":125,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":126,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":127,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_cebe99ad","line":126,"range":{"start_line":126,"start_character":5,"end_line":126,"end_character":9},"updated":"2018-06-06 20:43:53.000000000","message":"project*","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4aa995856bc3fd1aa79121aa767254b77f716f33","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"If ``A`` attempts to claim two ``cores``, the usage check will fail because"},{"line_number":125,"context_line":"``oslo.limit`` will fetch the hierarchy from keystone and check the usage of"},{"line_number":126,"context_line":"each tree in the hierarchy by using the callback provided by the service to see"},{"line_number":127,"context_line":"that both ``B`` and ``C`` have 10 ``cores`` each:"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":".. blockdiag::"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_0e4fb1be","line":126,"range":{"start_line":126,"start_character":5,"end_line":126,"end_character":9},"in_reply_to":"5f7c97a3_cebe99ad","updated":"2018-06-06 22:18:55.000000000","message":"Done","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f55b2163ea95af81973abbf2e589abbc1cdb187e","unresolved":false,"context_lines":[{"line_number":176,"context_line":"   }"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Creating a grandchild of project ``A`` is forbidden because it violates the"},{"line_number":179,"context_line":"two-level hierarchy constraint. This is fundamental contraint of this design"},{"line_number":180,"context_line":"because it provides a very clear escalation path. When a request fails because"},{"line_number":181,"context_line":"the tree limit has been exceeded, a user has all the information they need to"},{"line_number":182,"context_line":"provide meaningful context in a support ticket (e.g. their project ID and the"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_eecef559","line":179,"range":{"start_line":179,"start_character":37,"end_line":179,"end_character":39},"updated":"2018-06-06 20:43:53.000000000","message":"is a *","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4aa995856bc3fd1aa79121aa767254b77f716f33","unresolved":false,"context_lines":[{"line_number":176,"context_line":"   }"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Creating a grandchild of project ``A`` is forbidden because it violates the"},{"line_number":179,"context_line":"two-level hierarchy constraint. This is fundamental contraint of this design"},{"line_number":180,"context_line":"because it provides a very clear escalation path. When a request fails because"},{"line_number":181,"context_line":"the tree limit has been exceeded, a user has all the information they need to"},{"line_number":182,"context_line":"provide meaningful context in a support ticket (e.g. their project ID and the"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_6ec5050a","line":179,"range":{"start_line":179,"start_character":37,"end_line":179,"end_character":39},"in_reply_to":"5f7c97a3_eecef559","updated":"2018-06-06 22:18:55.000000000","message":"Done","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"20558dddeb1e3b5a8e2b2963325cbde1a9aee920","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        with limit.Enforcer(claim, callback\u003dcallback, verify\u003dFalse):"},{"line_number":434,"context_line":"            driver.create_foobar(foobar)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"Future Library and Server Work"},{"line_number":437,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"``oslo.limit`` and ``keystone`` server will be enhanced in the future to utilize"},{"line_number":440,"context_line":"``etcd`` (or other shared data store) to represent limit data and cross-endpoint"},{"line_number":441,"context_line":"quota-usage. This is not explicitly in scope for this strict-two-level model and"},{"line_number":442,"context_line":"specification. It should be noted that the model should be able to consume the"},{"line_number":443,"context_line":"data from whatever store is used, not restricted to a local-only datastore."},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"Fetching project hierarchy"},{"line_number":446,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_0976d43f","line":443,"range":{"start_line":436,"start_character":0,"end_line":443,"end_character":75},"updated":"2018-06-06 15:25:39.000000000","message":"We maybe should move this into the other \"Future work\" section. Can be done as a followup.","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"4aa995856bc3fd1aa79121aa767254b77f716f33","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        with limit.Enforcer(claim, callback\u003dcallback, verify\u003dFalse):"},{"line_number":434,"context_line":"            driver.create_foobar(foobar)"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"Future Library and Server Work"},{"line_number":437,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"``oslo.limit`` and ``keystone`` server will be enhanced in the future to utilize"},{"line_number":440,"context_line":"``etcd`` (or other shared data store) to represent limit data and cross-endpoint"},{"line_number":441,"context_line":"quota-usage. This is not explicitly in scope for this strict-two-level model and"},{"line_number":442,"context_line":"specification. It should be noted that the model should be able to consume the"},{"line_number":443,"context_line":"data from whatever store is used, not restricted to a local-only datastore."},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"Fetching project hierarchy"},{"line_number":446,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^"}],"source_content_type":"text/x-rst","patch_set":14,"id":"5f7c97a3_6e4ae583","line":443,"range":{"start_line":436,"start_character":0,"end_line":443,"end_character":75},"in_reply_to":"5f7c97a3_0976d43f","updated":"2018-06-06 22:18:55.000000000","message":"Done","commit_id":"66dbc747af85861171579bc1e6bdd7f279c1310d"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"f73076df1af4330a523ae23b9c6b0f16b7e831ed","unresolved":false,"context_lines":[{"line_number":5,"context_line":" http://creativecommons.org/licenses/by/3.0/legalcode"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":8,"context_line":"Strict Two-Level Hierarchical Enforcement Model"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This specification describes the behaviors and use-cases of a strict"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_eed1de58","line":8,"updated":"2018-06-08 21:16:46.000000000","message":"Please put Quota or limits in the title.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"91318359c2bce6886b5c9cb31d077120a7cf616b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_30243aaf","line":59,"range":{"start_line":57,"start_character":1,"end_line":59,"end_character":68},"updated":"2018-06-07 13:53:48.000000000","message":"This is basically restating line 66?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"f3470a358a71a8ab2369e32068c2aab2c408b0f8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  are limited to parent and child relationships"},{"line_number":55,"context_line":"* requires each tree have a single parent, or tree root"},{"line_number":56,"context_line":"* allows parents, or tree roots, to have any number of children"},{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_23914447","line":59,"range":{"start_line":57,"start_character":1,"end_line":59,"end_character":68},"in_reply_to":"5f7c97a3_30243aaf","updated":"2018-06-08 02:36:40.000000000","message":"yes, it is.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"91318359c2bce6886b5c9cb31d077120a7cf616b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_95066020","line":62,"range":{"start_line":60,"start_character":0,"end_line":62,"end_character":65},"updated":"2018-06-07 13:53:48.000000000","message":"Limits are set per-region, how is that not sufficient?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"eff1e0546b95baca58bc58ee6721ff95b9bd3103","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_9e8c38d8","line":62,"range":{"start_line":60,"start_character":0,"end_line":62,"end_character":65},"in_reply_to":"5f7c97a3_30d3dad7","updated":"2018-06-07 18:46:48.000000000","message":"Specific request by Adam Young to call this out. Per-Region is one thing, Per-Endpoint has been a common request, we\u0027re just saying that it is an enhancement beyond the scope of this spec (future work) rather than included. Was a requirement to get past a hard -2, and it adds zero complexity to the spec/impl.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"23afd22d7e326d1cb66947978e478c8cccf8deab","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_30d3dad7","line":62,"range":{"start_line":60,"start_character":0,"end_line":62,"end_character":65},"in_reply_to":"5f7c97a3_70915246","updated":"2018-06-07 14:10:12.000000000","message":"I\u0027ll have to let Morgan step in and answer this bit.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d186cc48669a17b4b9b0962d4536a382a9dc02eb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"* allows quota overcommit, i.e. the aggregate quota limit (not usage) may"},{"line_number":58,"context_line":"  exceed the limit of the parent. Overcommit and user-experience related to"},{"line_number":59,"context_line":"  overcommit is a leading factor for the strict two-level hierarchy."},{"line_number":60,"context_line":"* does not directly solve sharing data across endpoints, e.g."},{"line_number":61,"context_line":"  each nova would not be aware of the other nova\u0027s quota consumption meaning"},{"line_number":62,"context_line":"  a user could consume the full amount of quota on each endpoint."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_70915246","line":62,"range":{"start_line":60,"start_character":0,"end_line":62,"end_character":65},"in_reply_to":"5f7c97a3_95066020","updated":"2018-06-07 13:55:07.000000000","message":"+1 seems like a feature actually, each end point gets its own limits.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"43e33462dd4556eb92a1188099151f15144555f2","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* allows the sum of all child limits to exceed the limit of the parent, or tree"},{"line_number":67,"context_line":"  root"},{"line_number":68,"context_line":"* disallows a child limit from exceeding the parent limit"},{"line_number":69,"context_line":"* assumes registered limits as the default for projects that are not given a"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_90be6efd","line":66,"range":{"start_line":66,"start_character":13,"end_line":66,"end_character":36},"updated":"2018-06-07 13:48:59.000000000","message":"Nit: This sum also needs to include the usage of the parent","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f4afd8756f3e2713b4f087e8f68be9571c34a432","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* allows the sum of all child limits to exceed the limit of the parent, or tree"},{"line_number":67,"context_line":"  root"},{"line_number":68,"context_line":"* disallows a child limit from exceeding the parent limit"},{"line_number":69,"context_line":"* assumes registered limits as the default for projects that are not given a"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_10825ec9","line":66,"range":{"start_line":66,"start_character":13,"end_line":66,"end_character":36},"in_reply_to":"5f7c97a3_90be6efd","updated":"2018-06-07 13:59:37.000000000","message":"The sum of the limits? I might be missing something here, but these are the rules for limit validation operations in keystone, which doesn\u0027t track usage(?)","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eed771e9ecb7e1eb6fee1776775b20a5f4f0c7e8","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"This model implements limit validation in keystone that:"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"* allows the sum of all child limits to exceed the limit of the parent, or tree"},{"line_number":67,"context_line":"  root"},{"line_number":68,"context_line":"* disallows a child limit from exceeding the parent limit"},{"line_number":69,"context_line":"* assumes registered limits as the default for projects that are not given a"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_bb67cbb7","line":66,"range":{"start_line":66,"start_character":13,"end_line":66,"end_character":36},"in_reply_to":"5f7c97a3_90be6efd","updated":"2018-06-07 14:24:57.000000000","message":"This is more describing code that isn\u0027t written, I see now. Yeah, its a repeat of line 60. Ignore this comment.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8444453d3a617dcbc921aeb9c309ee7d30d77bde","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      A -\u003e B;"},{"line_number":117,"context_line":"      A -\u003e C;"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":120,"context_line":"      B [label\u003d\"B (u\u003d10)\", textcolor \u003d \"#00af00\"];"},{"line_number":121,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#00af00\"];"},{"line_number":122,"context_line":"   }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_b015aae7","line":119,"range":{"start_line":119,"start_character":27,"end_line":119,"end_character":28},"updated":"2018-06-07 13:53:31.000000000","message":"Nit: I would go for u\u003d2 here, and u\u003d9 in B and C\n\nThat way we cover the parent usage case.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7685cece1e3c477bb97279bcf451bd4fb3c4cfd0","unresolved":false,"context_lines":[{"line_number":116,"context_line":"      A -\u003e B;"},{"line_number":117,"context_line":"      A -\u003e C;"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d0)\"];"},{"line_number":120,"context_line":"      B [label\u003d\"B (u\u003d10)\", textcolor \u003d \"#00af00\"];"},{"line_number":121,"context_line":"      C [label\u003d\"C (u\u003d10)\", textcolor \u003d \"#00af00\"];"},{"line_number":122,"context_line":"   }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_5619ae85","line":119,"range":{"start_line":119,"start_character":27,"end_line":119,"end_character":28},"in_reply_to":"5f7c97a3_b015aae7","updated":"2018-06-07 15:13:04.000000000","message":"Done","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8444453d3a617dcbc921aeb9c309ee7d30d77bde","unresolved":false,"context_lines":[{"line_number":134,"context_line":"      A -\u003e B;"},{"line_number":135,"context_line":"      A -\u003e C;"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d2)\", textcolor \u003d \"#FF0000\"];"},{"line_number":138,"context_line":"      B [label\u003d\"B (u\u003d10)\"];"},{"line_number":139,"context_line":"      C [label\u003d\"C (u\u003d10)\"];"},{"line_number":140,"context_line":"   }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_d0e5c60b","line":137,"range":{"start_line":137,"start_character":27,"end_line":137,"end_character":28},"updated":"2018-06-07 13:53:31.000000000","message":"If you did the above, you would be doing u\u003d4 here.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7685cece1e3c477bb97279bcf451bd4fb3c4cfd0","unresolved":false,"context_lines":[{"line_number":134,"context_line":"      A -\u003e B;"},{"line_number":135,"context_line":"      A -\u003e C;"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"      A [label\u003d\"A (l\u003d20, u\u003d2)\", textcolor \u003d \"#FF0000\"];"},{"line_number":138,"context_line":"      B [label\u003d\"B (u\u003d10)\"];"},{"line_number":139,"context_line":"      C [label\u003d\"C (u\u003d10)\"];"},{"line_number":140,"context_line":"   }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_761cea76","line":137,"range":{"start_line":137,"start_character":27,"end_line":137,"end_character":28},"in_reply_to":"5f7c97a3_d0e5c60b","updated":"2018-06-07 15:13:04.000000000","message":"Done","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"91318359c2bce6886b5c9cb31d077120a7cf616b","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_5083f656","line":365,"updated":"2018-06-07 13:53:48.000000000","message":"This still doesn\u0027t solve the problem of what should happen when keystone is already started and a grandchild project is added.\n\n* We can\u0027t change the project API to just start rejecting project creation\n* We shouldn\u0027t start emitting 500s for limit requests\n* The behavior of the calculation is now undefined\n\nWhat\u0027s the plan?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b2908fe546302a3fb2c6c12f4d2580b8cf32fc7d","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_ea5a4a81","line":365,"in_reply_to":"5f7c97a3_2ad28235","updated":"2018-06-07 15:43:22.000000000","message":"Okay, the missing information for me was that setting max_project_tree_depth\u003d2 is required and that is what will prevent project creation below the second level. That should be explicitly called out, because as it\u0027s phrased now, it seems like the only check is a scan of the database, not a scan of the config.\n\nThe last bulletpoint was assuming that it was possible to create the third level, and if that was the case it would cause undefined behavior.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"1744fcd443e310321d3d54453149de89b5dd9fd6","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_d5a36aff","line":365,"in_reply_to":"5f7c97a3_4f4ee7c1","updated":"2018-06-07 22:34:00.000000000","message":"I wasn\u0027t suggestion not to do the database scan. I agree with you that both are needed. I was calling out that only one of those is currently pointed out in the spec.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7685cece1e3c477bb97279bcf451bd4fb3c4cfd0","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_2ad28235","line":365,"in_reply_to":"5f7c97a3_5083f656","updated":"2018-06-07 15:13:04.000000000","message":"\u003e This still doesn\u0027t solve the problem of what should happen when\n \u003e keystone is already started and a grandchild project is added.\n \u003e \n \u003e * We can\u0027t change the project API to just start rejecting project\n \u003e creation\n\nDon\u0027t we already do this?\n\nhttps://git.openstack.org/cgit/openstack/keystone/tree/keystone/conf/default.py?id\u003dd596a4ea9f0b0d9255f21bbd4c3757eec6017669#n70\n\nhttp://paste.openstack.org/raw/722904/\n\n \u003e * We shouldn\u0027t start emitting 500s for limit requests\n\nI removed the bit about 500s. Instead I tried to rework this to that it\u0027s clear that keystone will refuse to start if things are not configured properly.\n\n \u003e * The behavior of the calculation is now undefined\n \u003e \n \u003e What\u0027s the plan?\n\nI\u0027m not sure I understand the last bullet point.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eed771e9ecb7e1eb6fee1776775b20a5f4f0c7e8","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_90474ebd","line":365,"in_reply_to":"5f7c97a3_5083f656","updated":"2018-06-07 14:24:57.000000000","message":"very good point...\n\nMaybe projects that violate the tree are forced to have a quota of zero? But that feels strange...","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"a648da92f352233c50a346192f525f2cca901645","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_85529211","line":365,"in_reply_to":"5f7c97a3_631bbcc9","updated":"2018-06-08 13:54:48.000000000","message":"Done, and thanks for the clarification. I\u0027ve clarified that in the next patch set.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"f3470a358a71a8ab2369e32068c2aab2c408b0f8","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_631bbcc9","line":365,"in_reply_to":"5f7c97a3_d5a36aff","updated":"2018-06-08 02:36:40.000000000","message":"Colleen\u0027s commend should be addressed in the following patch as well.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"eff1e0546b95baca58bc58ee6721ff95b9bd3103","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_f95546fb","line":365,"in_reply_to":"5f7c97a3_ea5a4a81","updated":"2018-06-07 18:46:48.000000000","message":"I\u0027m of the opinion we should deprecate that option and let the limit model enforce/handle the limit. Just set it to \"sane\" defaults (~10?) That said, We already have the limits and capabilities to limit the max depth(s), so we emit the right errors (as Lance highlighted)","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21067f4cbde37649eb2b607a5f5d4ea6d380e3a2","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If keystone is configured to use the ``strict-two-level`` enforcement model and"},{"line_number":364,"context_line":"current project structure within keystone violates the two-level project"},{"line_number":365,"context_line":"constraint, keystone should fail to start. To aid operators, we can develop a"},{"line_number":366,"context_line":"``keystone-manage`` command, to check the hierarchical structure of the"},{"line_number":367,"context_line":"projects in the deployment and warn operators if keystone is going to fail to"},{"line_number":368,"context_line":"start. This gives operators the ability to check and fix their project"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_4f4ee7c1","line":365,"in_reply_to":"5f7c97a3_f95546fb","updated":"2018-06-07 21:25:25.000000000","message":"I\u0027m of the opinion we need a database scan on startup and checking the config. Only because I can:\n\n - assume the default depth of 5\n - create a tree hierarchy depth of 5\n - set max_tree_depth to 2 \n - employ strict-two-level enforcement model\n - start keystone\n\nIf we only check the configuration value of that option, keystone will technically start. What does it do with the projects that are already in a tree structure greater than two levels deep?\n\nWouldn\u0027t we also need to check that the existing projects in the deployment don\u0027t exceed that requirement to avoid that situation?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"91318359c2bce6886b5c9cb31d077120a7cf616b","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                        \"resource_name\": \"ram_mb\","},{"line_number":497,"context_line":"                        \"service_id\": \"e02156d4fa704d02ac11de4ddba81044\""},{"line_number":498,"context_line":"                    }"},{"line_number":499,"context_line":"                ]"},{"line_number":500,"context_line":"            }"},{"line_number":501,"context_line":"        ]"},{"line_number":502,"context_line":"    }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_10cb3ea5","line":499,"updated":"2018-06-07 13:53:48.000000000","message":"So is the idea that people need to be able to call the projects API in order to get the hierarchy in order to make sense of this information?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b2908fe546302a3fb2c6c12f4d2580b8cf32fc7d","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                        \"resource_name\": \"ram_mb\","},{"line_number":497,"context_line":"                        \"service_id\": \"e02156d4fa704d02ac11de4ddba81044\""},{"line_number":498,"context_line":"                    }"},{"line_number":499,"context_line":"                ]"},{"line_number":500,"context_line":"            }"},{"line_number":501,"context_line":"        ]"},{"line_number":502,"context_line":"    }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_eab6ca8a","line":499,"in_reply_to":"5f7c97a3_0ab8e6e2","updated":"2018-06-07 15:43:22.000000000","message":"I guess not, I was thinking of the more complicated models from https://review.openstack.org/#/c/441203, I guess in this model it\u0027s enough to just know the sum of the parent and children, and projects already know their parents\u0027 ID.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7685cece1e3c477bb97279bcf451bd4fb3c4cfd0","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                        \"resource_name\": \"ram_mb\","},{"line_number":497,"context_line":"                        \"service_id\": \"e02156d4fa704d02ac11de4ddba81044\""},{"line_number":498,"context_line":"                    }"},{"line_number":499,"context_line":"                ]"},{"line_number":500,"context_line":"            }"},{"line_number":501,"context_line":"        ]"},{"line_number":502,"context_line":"    }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_0ab8e6e2","line":499,"in_reply_to":"5f7c97a3_10cb3ea5","updated":"2018-06-07 15:13:04.000000000","message":"Maybe I\u0027m missing something. Is there any other information a service needs to make usage enforcement decisions that isn\u0027t included in this response?","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"f3470a358a71a8ab2369e32068c2aab2c408b0f8","unresolved":false,"context_lines":[{"line_number":496,"context_line":"                        \"resource_name\": \"ram_mb\","},{"line_number":497,"context_line":"                        \"service_id\": \"e02156d4fa704d02ac11de4ddba81044\""},{"line_number":498,"context_line":"                    }"},{"line_number":499,"context_line":"                ]"},{"line_number":500,"context_line":"            }"},{"line_number":501,"context_line":"        ]"},{"line_number":502,"context_line":"    }"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_a3fd543c","line":499,"in_reply_to":"5f7c97a3_eab6ca8a","updated":"2018-06-08 02:36:40.000000000","message":"If I understand correctly, for the model which is more than two level, this structure may work as well. \nexample: http://paste.openstack.org/show/722941/","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"91318359c2bce6886b5c9cb31d077120a7cf616b","unresolved":false,"context_lines":[{"line_number":559,"context_line":"period of time. Caching has already been implemented internally to keystone,"},{"line_number":560,"context_line":"similar to how keystone caches responses for other resources. Caching can also"},{"line_number":561,"context_line":"be done client-side to avoid making frequent calls to keystone for relatively"},{"line_number":562,"context_line":"static limit information."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"Other Deployer Impact"},{"line_number":565,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_100edee4","line":562,"updated":"2018-06-07 13:53:48.000000000","message":"My comment about caching implementation is not addressed.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eed771e9ecb7e1eb6fee1776775b20a5f4f0c7e8","unresolved":false,"context_lines":[{"line_number":559,"context_line":"period of time. Caching has already been implemented internally to keystone,"},{"line_number":560,"context_line":"similar to how keystone caches responses for other resources. Caching can also"},{"line_number":561,"context_line":"be done client-side to avoid making frequent calls to keystone for relatively"},{"line_number":562,"context_line":"static limit information."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"Other Deployer Impact"},{"line_number":565,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_dbcac74d","line":562,"in_reply_to":"5f7c97a3_100edee4","updated":"2018-06-07 14:24:57.000000000","message":"It does feel like we could easily screw this up...\n\nI am tempted to say we should worry more about keeping the simpler cases fast. i.e. maybe token says if the project is part of a limit tree or not.\n\nHaving said that, in the past we made quotas terrible due to premature optimization, so I am tempted to say go for correctness, in a way that doesn\u0027t break existing use cases.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"7685cece1e3c477bb97279bcf451bd4fb3c4cfd0","unresolved":false,"context_lines":[{"line_number":559,"context_line":"period of time. Caching has already been implemented internally to keystone,"},{"line_number":560,"context_line":"similar to how keystone caches responses for other resources. Caching can also"},{"line_number":561,"context_line":"be done client-side to avoid making frequent calls to keystone for relatively"},{"line_number":562,"context_line":"static limit information."},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"Other Deployer Impact"},{"line_number":565,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5f7c97a3_5630ce07","line":562,"in_reply_to":"5f7c97a3_dbcac74d","updated":"2018-06-07 15:13:04.000000000","message":"I\u0027ve added a bit more to this in a follow on patch. Let me know if I still need to rework it.","commit_id":"cfc09c08b9160e253e616d3ce63797df0f6fc63b"}]}
