)]}'
{"nova/conf/scheduler.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9514509e76c2c1cab9bed14367652acf5f459cb1","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                default\u003dFalse,"},{"line_number":159,"context_line":"                help\u003d\"\"\""},{"line_number":160,"context_line":"This setting causes the scheduler to add a required trait of"},{"line_number":161,"context_line":"`allows-tenant-$tenant_id` to requests so that placement will only"},{"line_number":162,"context_line":"return hosts with that trait applied."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"If this is enabled, all tenants will require hosts with that trait applied"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_55e32aa5","line":161,"range":{"start_line":161,"start_character":1,"end_line":161,"end_character":25},"updated":"2018-02-15 18:38:35.000000000","message":"presumably CUSTOM_ALLOWS_TENANT_${tenant_id.upper()}","commit_id":"ff287e9d248d186d6ee31e83ccee708687754c37"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a643fcd888ce13bd5000094afbea27a4d82578b3","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                default\u003dFalse,"},{"line_number":159,"context_line":"                help\u003d\"\"\""},{"line_number":160,"context_line":"This setting causes the scheduler to add a required trait of"},{"line_number":161,"context_line":"`allows-tenant-$tenant_id` to requests so that placement will only"},{"line_number":162,"context_line":"return hosts with that trait applied."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"If this is enabled, all tenants will require hosts with that trait applied"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_9523f2be","line":161,"range":{"start_line":161,"start_character":1,"end_line":161,"end_character":25},"in_reply_to":"3fa0c359_55e32aa5","updated":"2018-02-15 18:40:11.000000000","message":"Oh yeah, thanks. I don\u0027t love that I have to upper() the tenant id, but I assume that\u0027ll be okay for our purposes.","commit_id":"ff287e9d248d186d6ee31e83ccee708687754c37"}],"nova/scheduler/request_filter.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9514509e76c2c1cab9bed14367652acf5f459cb1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"TENANT_METADATA_KEY \u003d \u0027filter_tenant_id\u0027"},{"line_number":24,"context_line":"TENANT_TRAIT_KEY \u003d \u0027allows-tenant-%(tenant_id)s\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def require_tenant_aggregate(ctxt, request_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_154b6287","line":24,"range":{"start_line":24,"start_character":20,"end_line":24,"end_character":47},"updated":"2018-02-15 18:38:35.000000000","message":"Maybe I\u0027m forgetting some code path that\u0027ll automatically convert\n\n allows-tenant-12345678-abcd-abcd-abcd-12345678abcd\n\nto\n\n CUSTOM_ALLOWS_TENANT_12345678_ABCD_ABCD_ABCD_12345678ABCD\n\n...but it\u0027s gonna need to look like the latter by the time it gets to the GET /allocation_candidates request.","commit_id":"ff287e9d248d186d6ee31e83ccee708687754c37"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a643fcd888ce13bd5000094afbea27a4d82578b3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":"TENANT_METADATA_KEY \u003d \u0027filter_tenant_id\u0027"},{"line_number":24,"context_line":"TENANT_TRAIT_KEY \u003d \u0027allows-tenant-%(tenant_id)s\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def require_tenant_aggregate(ctxt, request_spec):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_351e9e70","line":24,"range":{"start_line":24,"start_character":20,"end_line":24,"end_character":47},"in_reply_to":"3fa0c359_154b6287","updated":"2018-02-15 18:40:11.000000000","message":"No, you\u0027re right, I was just papering over those requirements in my head.","commit_id":"ff287e9d248d186d6ee31e83ccee708687754c37"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9514509e76c2c1cab9bed14367652acf5f459cb1","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        return"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    tenant_key \u003d TENANT_TRAIT_KEY % {\u0027tenant_id\u0027: request_spec.project_id}"},{"line_number":65,"context_line":"    # FIXME(danms): Do I need to search for a free traitN here?"},{"line_number":66,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:%s\u0027 % tenant_key] \u003d \u0027required\u0027"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_f5bb566f","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":63},"updated":"2018-02-15 18:38:35.000000000","message":"No.\n\nBut now that I see this written down, I\u0027m not completely sure it will work in scenarios where the root compute node RP doesn\u0027t provide any resources for the request (e.g. certain NUMA models).  Clearly it needs to, but we need to figure out the limits of where this wrinkle applies, and write some test cases to prove it.","commit_id":"ff287e9d248d186d6ee31e83ccee708687754c37"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b221d2a649147352c59bdcb0a600f584ca1bced4","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    if not CONF.scheduler.limit_tenants_to_placement_trait:"},{"line_number":62,"context_line":"        return"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    key \u003d TENANT_TRAIT_KEY % {\u0027tenant_id\u0027: request_spec.project_id}"},{"line_number":65,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:\u0027 + key.upper()] \u003d \u0027required\u0027"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_e7040d81","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":66},"updated":"2018-02-15 19:14:13.000000000","message":"Sorry, this needs to be washed more than just by upcasing, since traits can only take [A-Z_]\n\nWhich, since I\u0027ve just found out the project_id may not even be a UUID, is kind of a show-stopper.  We would have to sanitize away anything that\u0027s not a letter, which could (theoretically) lead to collisions.","commit_id":"fd9a76f79a9cfbc8ae3b1847dcf25329da15a24a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4d3abbf396e2fedb39e636507fb3ead4aa828d98","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    if not CONF.scheduler.limit_tenants_to_placement_trait:"},{"line_number":62,"context_line":"        return"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    key \u003d TENANT_TRAIT_KEY % {\u0027tenant_id\u0027: request_spec.project_id}"},{"line_number":65,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:\u0027 + key.upper()] \u003d \u0027required\u0027"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_cae0f8fd","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":66},"in_reply_to":"3fa0c359_47038110","updated":"2018-02-15 19:48:44.000000000","message":"D\u0027oh, sorry, numbers are fine.","commit_id":"fd9a76f79a9cfbc8ae3b1847dcf25329da15a24a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ed4abdb8f36e20af36df5c5a7f6981a834b91f5c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    if not CONF.scheduler.limit_tenants_to_placement_trait:"},{"line_number":62,"context_line":"        return"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    key \u003d TENANT_TRAIT_KEY % {\u0027tenant_id\u0027: request_spec.project_id}"},{"line_number":65,"context_line":"    request_spec.flavor.extra_specs[\u0027trait:\u0027 + key.upper()] \u003d \u0027required\u0027"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa0c359_47038110","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":66},"in_reply_to":"3fa0c359_e7040d81","updated":"2018-02-15 19:26:09.000000000","message":"Oh jeez, no numbers? Then we can\u0027t even use the uuid.","commit_id":"fd9a76f79a9cfbc8ae3b1847dcf25329da15a24a"}]}
