)]}'
{"specs/rocky/approved/add-consumer-generation.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4bb1afc311dab17ab28979c3c833b052f4ab812d","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_3a070485","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"updated":"2018-04-11 17:25:05.000000000","message":"I don\u0027t understand. We don\u0027t support microversion \u003c1.8 any more in Nova so no *new* instances are ever created with an empty project and user ID.\n\nTherefore, the only thing we need to deal with w.r.t. the old \u003c1.8 microversion is *existing allocations that were created with a NULL project ID and user ID column and that new code is attempting to update those allocations*.\n\nIn that case, clearly there will be no record in consumers for that instance UUID (since there is a NULL project and user ID and therefore no record was created in the consumers table for it). The absence of a consumers table record for the instance UUID should simply just return a 409 Conflict IMHO saying the allocations cannot be modified.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"490e3654f9fafebaa16a094274e503d63df66ad8","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_2bd4981f","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_1080df45","updated":"2018-04-11 19:10:56.000000000","message":"An older service PUTs allocations at 1.1, so we create the consumer record. If a different service later PUTs allocations at 1.22+ with a generation of None, the presence of the consumer record will protect the original allocations from being overwritten. If we don\u0027t create the record, those allocations will be toast. We add it because the whole point of this is to get rid of accidental overwriting of allocations. This at least provides a small protection for the records created by the older service.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7354b6e886600e3f490cc8e9e399f86bb19a0371","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_069bc965","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_2b96d8f1","updated":"2018-04-11 19:53:17.000000000","message":"No, it wouldn\u0027t. A \u003e1.22 service PUTs allocations with a generation of None, and if there is no consumers record, you want to return a 409? That\u0027s going to be the case when Nova creates a VM. We would never be able to allocate.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b9cb48fd2d34c7fd7b42c8ac8db689473c39b722","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_2b96d8f1","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_2bd4981f","updated":"2018-04-11 19:28:55.000000000","message":"\"This at least provides a small protection for the records created by the older service.\"\n\nSo would simply returning a 409 if there was no consumers record.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4167c0eb3c6620537833550989ca1e8769de7a04","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_75c26d36","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_35d39562","updated":"2018-04-11 17:54:50.000000000","message":"That is NOT true. We don\u0027t need to support *modifying* allocations that do not have project and user ID, which is what the consumer generation is about.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"406a22a9699c34d4b009a8980b3e6705f3ace481","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_7a049c18","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_3a070485","updated":"2018-04-11 17:35:33.000000000","message":"\u003e I don\u0027t understand. We don\u0027t support microversion \u003c1.8 any more in\n \u003e Nova so no *new* instances are ever created with an empty project\n \u003e and user ID.\n\nBut we do support \u003c1.8 in placement. I could have written something (non-nova) against 1.1 that I haven\u0027t updated. You still claim to support microversion 1.1, so I keep using it.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b33332411cb8807741a5803e9e5f653a3a170787","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_1080df45","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_557f29df","updated":"2018-04-11 18:18:54.000000000","message":"I am saying that the microversion that adds support for a consumer generation field is specifically intended to allow for allocations to be modified by multiple concurrent callers. The 1.1 microversion that added the PUT /allocations/{consumer_id} has (and will continue to have even after the new consumer generation microversion is added) the behaviour of completely overwriting the allocations for a consumer.\n\nThe old 1.1 microversion doesn\u0027t supply a project or user, and the consumers record doesn\u0027t get created. And that is totally fine. Above, it says that \"always succeeds, and new consumer record created\". And I think that is incorrect. The existing behaviour of calling PUT /allocations/{consumer_id} with microversion 1.1 means that no user ID and project ID will be supplied in the request. Therefore no consumer record is or should be created.\n\nFurthermore, I do not see a reason to overcomplicate the AllocationList object with a \"enforce_consumer_generation\" field (that isn\u0027t really a field...) when we can determine if the consumer generation \"needs to be enforced\" by the simple presence of a record in the consumers table for that consumer UUID. If it\u0027s not there, we know the allocation was created using an old-ass microversion and we should simply disallow the call to update PUT /allocations/{consumer_id} with the new microversion, instead forcing the user (signalled with a 400 or 409) to retry the PUT /allocations/{consumer_id} with the *old* microversion, thereby forcing the user to use the *old* behaviour of \"overwrite the allocations for this consumer with whatever I have just sent\".","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"283cc6b2fb650ad196f8cf6486c67fc59d1404d0","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_557f29df","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_75c26d36","updated":"2018-04-11 17:59:43.000000000","message":"I don\u0027t get this. Are you saying that if we\u0027ve got an allocation with no user/project that we don\u0027t need to support modifying it by clients with a later microversion?\n\nOr are you saying that if we create an allocation with a later one, we don\u0027t need to support modifying it by clients with an older microversion?","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"074d0f8d40ef7b5e8728427105729459b215c422","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"When there is no existing consumer record:"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"* Old microversion: always succeeds, and new consumer record created."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"* New microversion, CG \u003d None: Success. Since there is no existing record,"},{"line_number":73,"context_line":"  passing None indicates that the caller\u0027s view of the state of the consumer"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_35d39562","line":70,"range":{"start_line":70,"start_character":2,"end_line":70,"end_character":69},"in_reply_to":"bf659307_7a049c18","updated":"2018-04-11 17:44:53.000000000","message":"Yeah to what Dan said. We need to be able to support allocations without combinations of consumer generation or user_id or project_id for eternity as there\u0027s no plan to ever raise the minimum microversion.","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4bb1afc311dab17ab28979c3c833b052f4ab812d","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":".. note:: The history behind this is somewhat murky."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    Prior to microversion 1.8, the consumer table didn\u0027t exist: consumers were"},{"line_number":102,"context_line":"    (and to some extent, still are) just UUIDs in the allocation table."},{"line_number":103,"context_line":"    Microversion 1.8 introduced project_id and user_id, which became the only"},{"line_number":104,"context_line":"    reason for the consumer table to exist. We could have made those fields"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_fa3d0c8e","line":101,"range":{"start_line":101,"start_character":35,"end_line":101,"end_character":43},"updated":"2018-04-11 17:25:05.000000000","message":"consumers","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4bb1afc311dab17ab28979c3c833b052f4ab812d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    Prior to microversion 1.8, the consumer table didn\u0027t exist: consumers were"},{"line_number":102,"context_line":"    (and to some extent, still are) just UUIDs in the allocation table."},{"line_number":103,"context_line":"    Microversion 1.8 introduced project_id and user_id, which became the only"},{"line_number":104,"context_line":"    reason for the consumer table to exist. We could have made those fields"},{"line_number":105,"context_line":"    nullable and created the database entry anyway when processing allocations"},{"line_number":106,"context_line":"    at older microversions; but instead we decided to make the fields"},{"line_number":107,"context_line":"    non-nullable and avoid creating the record (since it would have just"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_ba4b1429","line":104,"range":{"start_line":104,"start_character":19,"end_line":104,"end_character":27},"updated":"2018-04-11 17:25:05.000000000","message":"consumers","commit_id":"84d10fd3963871c51717a0aee8e6179201e04ea0"}]}
