)]}'
{"specs/mitaka/approved/resource-providers.rst":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":33,"context_line":"simply summing amounts across all compute nodes in its database. This ends up"},{"line_number":34,"context_line":"causing a number of problems [1] with usage and capacity amounts being"},{"line_number":35,"context_line":"incorrect."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Use Cases"},{"line_number":38,"context_line":"----------"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_05043c13","line":36,"updated":"2015-10-05 16:20:48.000000000","message":"I wonder about including volume locality requirements, and network segments (IP address availability sharded into segments, that map to subsets of compute) into this description, although thats more about follow on efforts really.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":33,"context_line":"simply summing amounts across all compute nodes in its database. This ends up"},{"line_number":34,"context_line":"causing a number of problems [1] with usage and capacity amounts being"},{"line_number":35,"context_line":"incorrect."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Use Cases"},{"line_number":38,"context_line":"----------"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_e48306cb","line":36,"in_reply_to":"7a2fa921_05043c13","updated":"2015-10-06 21:03:42.000000000","message":"Yup, I agree with John, we should leave some room for discussing about more than just compute resources","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":40,"context_line":"As a deployer that has chosen to use a shared storage solution for storing"},{"line_number":41,"context_line":"instance ephemeral disks, I want Nova and Horizon to report the correct"},{"line_number":42,"context_line":"usage and capacity information."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Project Priority"},{"line_number":45,"context_line":"-----------------"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_479f5cb4","line":43,"updated":"2015-10-06 21:03:42.000000000","message":"IMHO, we should also explain the scope of this spec by saying that this is only for discussing the model and how to persist it with the current resources, not for providing a way to have some other external resources at the moment","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":40,"context_line":"As a deployer that has chosen to use a shared storage solution for storing"},{"line_number":41,"context_line":"instance ephemeral disks, I want Nova and Horizon to report the correct"},{"line_number":42,"context_line":"usage and capacity information."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Project Priority"},{"line_number":45,"context_line":"-----------------"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_c194c338","line":43,"in_reply_to":"7a2fa921_479f5cb4","updated":"2015-10-29 01:02:47.000000000","message":"Well, the scope is both that as well as to fix the reporting inaccuracies of external shared resources.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    (3, \u0027disk_gb\u0027),"},{"line_number":68,"context_line":"    (4, \u0027pci_device_normal\u0027),"},{"line_number":69,"context_line":"    (5, \u0027pci_device_sriov_vf\u0027),"},{"line_number":70,"context_line":"    (6, \u0027numa_topology\u0027);"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"We are going to need a lookup table for the IDs of various resource"},{"line_number":73,"context_line":"providers in the system, too. We\u0027ll call this lookup table"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_e7b468f3","line":70,"updated":"2015-10-06 21:03:42.000000000","message":"you should just comment it\u0027s an example IMHO","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    (3, \u0027disk_gb\u0027),"},{"line_number":68,"context_line":"    (4, \u0027pci_device_normal\u0027),"},{"line_number":69,"context_line":"    (5, \u0027pci_device_sriov_vf\u0027),"},{"line_number":70,"context_line":"    (6, \u0027numa_topology\u0027);"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"We are going to need a lookup table for the IDs of various resource"},{"line_number":73,"context_line":"providers in the system, too. We\u0027ll call this lookup table"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_21a497a4","line":70,"in_reply_to":"7a2fa921_e7b468f3","updated":"2015-10-29 01:02:47.000000000","message":"As mentioned in the design summit session, I\u0027d actually love to have constants or an enum used for resource class identifiers.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e68344ed19b61f9f8fd676bf79eed482f2cce04","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":78,"context_line":"        uuid VARCAHR (64) NOT NULL,"},{"line_number":79,"context_line":"        INDEX (uuid)"},{"line_number":80,"context_line":"    );"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"We will want to populate this lookup table with a record for each"},{"line_number":83,"context_line":"compute node in the system, since compute nodes are providers of"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a1a9d01_9922ee00","line":80,"updated":"2015-10-01 15:35:30.000000000","message":"So this uses an uuid instead of a FK which leads me to believe that we will want to have providers other than compute nodes but I am not sure how that would work.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":78,"context_line":"        uuid VARCAHR (64) NOT NULL,"},{"line_number":79,"context_line":"        INDEX (uuid)"},{"line_number":80,"context_line":"    );"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"We will want to populate this lookup table with a record for each"},{"line_number":83,"context_line":"compute node in the system, since compute nodes are providers of"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_01ab9b75","line":80,"in_reply_to":"7a2fa921_455f940e","updated":"2015-10-29 01:02:47.000000000","message":"The resource_providers table uses an autoincrementing primary key for performance reasons, and a UUID lookup in order to allow a global namespace of identifiers across all providers of resources inside and outside of Nova.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":78,"context_line":"        uuid VARCAHR (64) NOT NULL,"},{"line_number":79,"context_line":"        INDEX (uuid)"},{"line_number":80,"context_line":"    );"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"We will want to populate this lookup table with a record for each"},{"line_number":83,"context_line":"compute node in the system, since compute nodes are providers of"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_455f940e","line":80,"in_reply_to":"9a1a9d01_9922ee00","updated":"2015-10-05 16:20:48.000000000","message":"I am certainly expecting cinder and neutron eventually.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":88,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"},{"line_number":89,"context_line":"    ALTER TABLE compute_nodes MODIFY COLUMN uuid uuid VARCHAR(64) NOT NULL;"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"And we will now add a record to the `resource_providers` table for"},{"line_number":92,"context_line":"each compute node in the system::"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_676db897","line":89,"updated":"2015-10-06 21:03:42.000000000","message":"I\u0027m a bit torn with that giving it\u0027s a very good thing to have an UUID for the indirection to resource_providers, I just care about how much it would cost regarding a big cloud and our upgrade online process...","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":88,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"},{"line_number":89,"context_line":"    ALTER TABLE compute_nodes MODIFY COLUMN uuid uuid VARCHAR(64) NOT NULL;"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"And we will now add a record to the `resource_providers` table for"},{"line_number":92,"context_line":"each compute node in the system::"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_61e7efe4","line":89,"in_reply_to":"7a2fa921_676db897","updated":"2015-10-29 01:02:47.000000000","message":"As mentioned in the session, we can do that actual data migration (i.e. the UPDATE compute_nodes SET uuid \u003d UUID4()) in the nova.objects.ComputeNode._from_db_object() method.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    INSERT INTO resource_pools (uuid, name, resource_class) VALUES"},{"line_number":114,"context_line":"    (UUID4(), \u0027my shared storage pool\u0027, 3);"},{"line_number":115,"context_line":"    # Note that 3 is the resource class for disk_gb"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"We would then need to indicate that this resource pool provides disk"},{"line_number":118,"context_line":"resources to the host aggregate containing our compute nodes. For this,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_f26e68c8","line":115,"updated":"2015-10-06 21:03:42.000000000","message":"I\u0027m a bit worried by having an incremental PK being exposed that way. Given you provide an UUID for the indirection to computes, why not an UUID for the resource class?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    INSERT INTO resource_pools (uuid, name, resource_class) VALUES"},{"line_number":114,"context_line":"    (UUID4(), \u0027my shared storage pool\u0027, 3);"},{"line_number":115,"context_line":"    # Note that 3 is the resource class for disk_gb"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"We would then need to indicate that this resource pool provides disk"},{"line_number":118,"context_line":"resources to the host aggregate containing our compute nodes. For this,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_01d95b21","line":115,"in_reply_to":"7a2fa921_f26e68c8","updated":"2015-10-29 01:02:47.000000000","message":"It\u0027s a performance choice. See my note above about having an Enum or constants list for resource classes.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":120,"context_line":"`host_aggregate_resource_pools`::"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    CREATE TABLE host_aggregate_resource_pools ("},{"line_number":123,"context_line":"        host_aggregate_id INT UNSIGNED NOT NULL,"},{"line_number":124,"context_line":"        resource_pool_id INT UNSIGNED NOT NULL,"},{"line_number":125,"context_line":"        PRIMARY KEY (host_aggregate_id, resource_pool_id),"},{"line_number":126,"context_line":"        INDEX (resource_pool_id)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_7221f8fa","line":123,"updated":"2015-10-06 21:03:42.000000000","message":"well, again, the aggregate PK is just an ID, not sure it\u0027s nice to have it for a relationship...","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":120,"context_line":"`host_aggregate_resource_pools`::"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    CREATE TABLE host_aggregate_resource_pools ("},{"line_number":123,"context_line":"        host_aggregate_id INT UNSIGNED NOT NULL,"},{"line_number":124,"context_line":"        resource_pool_id INT UNSIGNED NOT NULL,"},{"line_number":125,"context_line":"        PRIMARY KEY (host_aggregate_id, resource_pool_id),"},{"line_number":126,"context_line":"        INDEX (resource_pool_id)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_61fe0f6d","line":123,"in_reply_to":"7a2fa921_7221f8fa","updated":"2015-10-29 01:02:47.000000000","message":"I don\u0027t understand this.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"8f91f8ea3ebaa3baeac151fc58a74e10e12bb32a","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    CREATE TABLE host_aggregate_resource_pools ("},{"line_number":123,"context_line":"        host_aggregate_id INT UNSIGNED NOT NULL,"},{"line_number":124,"context_line":"        resource_pool_id INT UNSIGNED NOT NULL,"},{"line_number":125,"context_line":"        PRIMARY KEY (host_aggregate_id, resource_pool_id),"},{"line_number":126,"context_line":"        INDEX (resource_pool_id)"},{"line_number":127,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3a29b11f_1910a758","line":124,"updated":"2015-10-21 03:16:49.000000000","message":"the PK for resource_pool is a UUID not a UNT so something checking.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    CREATE TABLE host_aggregate_resource_pools ("},{"line_number":123,"context_line":"        host_aggregate_id INT UNSIGNED NOT NULL,"},{"line_number":124,"context_line":"        resource_pool_id INT UNSIGNED NOT NULL,"},{"line_number":125,"context_line":"        PRIMARY KEY (host_aggregate_id, resource_pool_id),"},{"line_number":126,"context_line":"        INDEX (resource_pool_id)"},{"line_number":127,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_81032b73","line":124,"in_reply_to":"3a29b11f_1910a758","updated":"2015-10-29 01:02:47.000000000","message":"Yes, nice catch. I\u0027ve corrected in the next version, thank you Tony!","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":141,"context_line":"        provider_id INT UNSIGNED NOT NULL,"},{"line_number":142,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (provider_id),"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_c5b884e8","line":143,"updated":"2015-10-05 16:20:48.000000000","message":"I do wonder if we want to also include the amount that is reported as free, which is different to what we expect that value to be.\n\nOr is the idea that this is generally static, and adding the reported free amount would violate that?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":141,"context_line":"        provider_id INT UNSIGNED NOT NULL,"},{"line_number":142,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (provider_id),"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_6d1b591c","line":143,"in_reply_to":"7a2fa921_c5b884e8","updated":"2015-10-06 21:03:42.000000000","message":"That\u0027s a bit difficult to provide a free amount for NUMA resources where they are not exactly discrete sets where we can just decrement IMHO, hence my point below about relating this BP with resource-objects","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":141,"context_line":"        provider_id INT UNSIGNED NOT NULL,"},{"line_number":142,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (provider_id),"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_dc902698","line":143,"in_reply_to":"7a2fa921_c5b884e8","updated":"2015-10-29 01:02:47.000000000","message":"The free (available) amount is a calculated field and does not need to be included in the table, since its value can always be determined by calculating inventories.total - allocations.used.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8c60acea550d433e9b4783f8111c23f84d903bde","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (provider_id),"},{"line_number":147,"context_line":"        INDEX (resource_class)"},{"line_number":148,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_a62bf481","line":145,"updated":"2015-10-28 08:06:33.000000000","message":"min_per_request maybe? megabytes is a unit","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (provider_id),"},{"line_number":147,"context_line":"        INDEX (resource_class)"},{"line_number":148,"context_line":"    );"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"The `min_unit` and `max_unit` fields shall store \"limits\" information for the"},{"line_number":151,"context_line":"type of resource. This information is necessary to ensure that a request for"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_922b7494","line":148,"updated":"2015-10-06 21:03:42.000000000","message":"Why not providing a relationship to blueprint resource-objects ?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":156,"context_line":"(the default), the compute node cannot accept requests for instances needing"},{"line_number":157,"context_line":"more than 8 vCPUs. So, while there may be 128 total vCPUs available on the"},{"line_number":158,"context_line":"compute node, the `min_unit` would be set to 1 and the `max_unit` would be"},{"line_number":159,"context_line":"set to `8` in order to prevent unacceptable matching of resources to requests."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"Each compute node will be have a set of records inserted into the `inventories`"},{"line_number":162,"context_line":"table, one record for each type of resource the compute node provides. The"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_050afcd2","line":159,"updated":"2015-10-05 16:20:48.000000000","message":"its news to me about that being a restriction for some hypervisors, but agreed with the overall need for that data.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":156,"context_line":"(the default), the compute node cannot accept requests for instances needing"},{"line_number":157,"context_line":"more than 8 vCPUs. So, while there may be 128 total vCPUs available on the"},{"line_number":158,"context_line":"compute node, the `min_unit` would be set to 1 and the `max_unit` would be"},{"line_number":159,"context_line":"set to `8` in order to prevent unacceptable matching of resources to requests."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"Each compute node will be have a set of records inserted into the `inventories`"},{"line_number":162,"context_line":"table, one record for each type of resource the compute node provides. The"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_bc3c4a94","line":159,"in_reply_to":"1a26ad4f_66fe256d","updated":"2015-10-29 01:02:47.000000000","message":"@edleafe: For min_unit, I was thinking about memory_mb resource class... Perhaps you didn\u0027t want someone to be able to launch an instance with less than 64mb of memory? In addition, the min_unit field is for the Ironic indivisible unit use case, where the whole bare metal node must be allocated at once, not split up. So, you would have something like:\n\n resource_class_id: \u003cMEMORY_MB\u003e\n total: 2048\n min_unit: 2048\n max_unit: 2048","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"88d9e660f93b7a6505d28af22984ff7e4522222d","unresolved":false,"context_lines":[{"line_number":156,"context_line":"(the default), the compute node cannot accept requests for instances needing"},{"line_number":157,"context_line":"more than 8 vCPUs. So, while there may be 128 total vCPUs available on the"},{"line_number":158,"context_line":"compute node, the `min_unit` would be set to 1 and the `max_unit` would be"},{"line_number":159,"context_line":"set to `8` in order to prevent unacceptable matching of resources to requests."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"Each compute node will be have a set of records inserted into the `inventories`"},{"line_number":162,"context_line":"table, one record for each type of resource the compute node provides. The"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_66fe256d","line":159,"in_reply_to":"7a2fa921_050afcd2","updated":"2015-10-28 22:59:55.000000000","message":"I certainly understand the need for the max, but could you provide a case where a min value would be needed?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"8f91f8ea3ebaa3baeac151fc58a74e10e12bb32a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":178,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":179,"context_line":"        allocated INT UNSIGNED NOT NULL,"},{"line_number":180,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3a29b11f_6b8a221d","line":180,"updated":"2015-10-21 03:16:49.000000000","message":"Ahh so allocated - used is the reserved amount?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":178,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":179,"context_line":"        allocated INT UNSIGNED NOT NULL,"},{"line_number":180,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_3cf7dad4","line":180,"in_reply_to":"1a26ad4f_06041115","updated":"2015-10-29 01:02:47.000000000","message":"@edleafe: Yeah, I went back and forth on this one, for the reason you cite above. After considering this further, I hve removed the allocated field entirely and kept this to simply used.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":178,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":179,"context_line":"        allocated INT UNSIGNED NOT NULL,"},{"line_number":180,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_bc63eab0","line":180,"in_reply_to":"3a29b11f_6b8a221d","updated":"2015-10-29 01:02:47.000000000","message":"@tonyb: Yes, that is what I was thinking originally, but I think edleafe is actually correct that it overly complicates things for no good reason, so I\u0027ve removed the allocated field in the next version of the spec.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"88d9e660f93b7a6505d28af22984ff7e4522222d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":178,"context_line":"        resource_class INT UNSIGNED NOT NULL,"},{"line_number":179,"context_line":"        allocated INT UNSIGNED NOT NULL,"},{"line_number":180,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_06041115","line":180,"in_reply_to":"3a29b11f_6b8a221d","updated":"2015-10-28 22:59:55.000000000","message":"I think that separating allocated and used in complicating this needlessly. When you claim a resource, it\u0027s used, as far as the rest of the system is concerned.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e68344ed19b61f9f8fd676bf79eed482f2cce04","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"},{"line_number":184,"context_line":"    );"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":187,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a1a9d01_34ede925","line":184,"updated":"2015-10-01 15:35:30.000000000","message":"both this and inventories don\u0027t seem generic enough to hold complex resources like NUMA and PCI devices but that can be worked around by having subclasses that know how to load themselves from other DB tables and answer the same questions (can_provide?).","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"},{"line_number":184,"context_line":"    );"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":187,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_fce2c29e","line":184,"in_reply_to":"1a26ad4f_863a6135","updated":"2015-10-29 01:02:47.000000000","message":"@edleafe: See above comment about the use of min_unit and max_unit to solve the Ironic use case.\n\n@ndipanov, @johnthetubaguy, @bauzas: I agree about the NUMA topology resource case, though. I\u0027m looking at how to store this information in the DB in an efficient manner. I have two options. Like Nikola mentioned, we could store the complex blob of resource information in a separate field like we do today for compute_nodes.numa_topology. Or we could explode the complex NUMA topology resource structure into the component integer pieces. Something like:\n\n CREATE TABLE numa_cells_inventories (\n     compute_node_id INT NOT NULL,\n     cell_id INT NOT NULL,\n     total_memory_kb INT NOT NULL,\n     total_sockets INT NOT NULL,\n     total_cores INT NOT NULL,\n     total_threads INT NOT NULL,\n     INDEX (compute_node_id)\n );\n\nOr we could add the individual NUMA component integer parts as resource classes:\n\n INSERT INTO resource_classes (id, name) VALUES\n (6, \u0027numa_sockets\u0027),\n (7, \u0027numa_cores\u0027),\n (8, \u0027numa_threads\u0027);\n\nand add the rough resource numbers to the inventories table. For example, say a compute node had 2 Xeon processors with 4 cores each and 8 threads, you would add the following to the inventories table:\n\n INSERT INTO inventories\n (compute_node_id, resource_class_id, total, min_unit, max_unit) VALUES\n ($CN_ID, 6, 2, 1, 2),\n ($CN_ID, 7, 8, 1, 4),\n ($CN_ID, 8, 16, 1, 8);\n\nThe scheduler would be able to determine which compute nodes had the required number of sockets, cores, and threads to meet a request using a simple query on the inventories and allocations table, looking at the numa_xxx resource class IDs and total/min_unit/max_unit fields. \n\nOf course, \"fitment\" and pinning could not be solved by these simple integer-based fields. For that, the scheduler would still need to pass a NUMATopology and NUMALimitsTopology object to one of the routines in nova/virt/hardware.py to actually determine placement of a particular pinning request onto an individual NUMA cell, but at least some basic \"does this compute node have the available sockets, cores, and threads for my request\" question could be answered by the above database schema.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"},{"line_number":184,"context_line":"    );"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":187,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_0d3f45d7","line":184,"in_reply_to":"7a2fa921_657c1021","updated":"2015-10-06 21:03:42.000000000","message":"Yeah again, that\u0027s why I think we should discuss about the relationship with http://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/resource-objects.html","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"88d9e660f93b7a6505d28af22984ff7e4522222d","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"},{"line_number":184,"context_line":"    );"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":187,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_863a6135","line":184,"in_reply_to":"9a1a9d01_34ede925","updated":"2015-10-28 22:59:55.000000000","message":"Agree with Nikola that resources cannot always be specified as ints. How would these be stored?\n\nAs I understand it, pre-sliced pizza should be a different resource type. We shouldn\u0027t make the same mistake that we did when trying to stuff bare metal concepts into the existing divisible compute resource model.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        INDEX (provider_id),"},{"line_number":182,"context_line":"        INDEX (consumer_id),"},{"line_number":183,"context_line":"        INDEX (resource_class)"},{"line_number":184,"context_line":"    );"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":187,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_657c1021","line":184,"in_reply_to":"9a1a9d01_34ede925","updated":"2015-10-05 16:20:48.000000000","message":"There are two key types of resources, pre-sliced pizza, and slice yourself pizza, this structure does seem to focus on the second sort of resources. But that is a good place to start, and can approximate the sliced pizza case.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"88d9e660f93b7a6505d28af22984ff7e4522222d","unresolved":false,"context_lines":[{"line_number":189,"context_line":"Let\u0027s assume that a cloud user has initiated a boot request for a server that"},{"line_number":190,"context_line":"needs 4 vCPUs, 16GB of RAM, and 200GB of disk."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"The scheduler will need to query the database to determine compute nodes that"},{"line_number":193,"context_line":"have the available resources to meet the request. Though this can be done in"},{"line_number":194,"context_line":"a single SQL statement, we will assume here that the scheduler will use its"},{"line_number":195,"context_line":"current naive implementation, which queries all resource usage information"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_4138b3d3","line":192,"updated":"2015-10-28 22:59:55.000000000","message":"So are we no longer trying to isolate the scheduler from needing access to the Nova database? That\u0027s fine with me, but it does represent a shift in direction.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":189,"context_line":"Let\u0027s assume that a cloud user has initiated a boot request for a server that"},{"line_number":190,"context_line":"needs 4 vCPUs, 16GB of RAM, and 200GB of disk."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"The scheduler will need to query the database to determine compute nodes that"},{"line_number":193,"context_line":"have the available resources to meet the request. Though this can be done in"},{"line_number":194,"context_line":"a single SQL statement, we will assume here that the scheduler will use its"},{"line_number":195,"context_line":"current naive implementation, which queries all resource usage information"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_9c95cee5","line":192,"in_reply_to":"1a26ad4f_4138b3d3","updated":"2015-10-29 01:02:47.000000000","message":"I\u0027ll reword the above. I am not (see below) proposing to change the way the filter scheduler works (i.e. pull all cmpute node records and iterate over them, applying filters (host_passes()) to those)","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":205,"context_line":"example from above, none of the compute nodes has any local disk storage that"},{"line_number":206,"context_line":"it can provide disk for the new instance. However, it belongs to a host"},{"line_number":207,"context_line":"aggregate that *does* have a shared storage pool attached to it that has"},{"line_number":208,"context_line":"available disk that it can provide."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"The scheduler would be looping through compute nodes and determining whether"},{"line_number":211,"context_line":"the node was able to provide the requested vCPUs, memory and disk. The"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_33894227","line":208,"updated":"2015-10-06 21:03:42.000000000","message":"I\u0027d like to see more :-) How do you think it could be related to HostState and the current filters ?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"88d9e660f93b7a6505d28af22984ff7e4522222d","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        else:"},{"line_number":226,"context_line":"            continue"},{"line_number":227,"context_line":"        if resources.DISK in cn_resources:"},{"line_number":228,"context_line":"            if not cn_resources[resources.DISK].has_room_for(200):"},{"line_number":229,"context_line":"                continue"},{"line_number":230,"context_line":"        else:"},{"line_number":231,"context_line":"            # Perhaps the compute node belongs to a host aggregate"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_665aa585","line":228,"updated":"2015-10-28 22:59:55.000000000","message":"OK, I\u0027ve thought about this since the design session discussion yesterday, and I think what seems off to me is that we are falling into the same \"special snowflake\" pattern by having the scheduler needing to know some of the nitty-gritty details of how the resources it is scheduling work on the inside.\n\nThe main rationale for creating resource objects is to get the logic out of the scheduler and into those objects, and yet we\u0027re not doing that here. In this example, the DISK object in cn_resources should be where the logic for handling shared storage goes, both for determining if it has enough, and (eventually) claiming the resources.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e68344ed19b61f9f8fd676bf79eed482f2cce04","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            # Perhaps the compute node belongs to a host aggregate"},{"line_number":232,"context_line":"            # that is attached to a shared storage pool that can"},{"line_number":233,"context_line":"            # service this request for disk? Let\u0027s check..."},{"line_number":234,"context_line":"            host_aggs \u003d compute_node.host_aggregates"},{"line_number":235,"context_line":"            for host_agg in host_aggs:"},{"line_number":236,"context_line":"                ha_resources \u003d host_agg.get_inventories()"},{"line_number":237,"context_line":"                if resources.DISK in ha_resources:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a1a9d01_745e0114","line":234,"updated":"2015-10-01 15:35:30.000000000","message":"So reading this code it seems that the host_aggregate is a level of indirection that does not make a lot of sense.\n\nWe can have con_resources be polimorphic in that inventories either belong to a provider or a pool. That way the API would be transparent here (you won\u0027t even need the else branch), and teh claim would go from the pool rather than an individual resource inventory, so all compute hosts would get \"claimed\"\n\nThat would also work for reporting (you just check if it\u0027s a pool that we are sharing with other providers and report accordingly) plus there is no need for admins to reorganize their cloud into aggregates.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fb872871ed6366bb05d73ea2e8e9c6c0dad9cd79","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            # Perhaps the compute node belongs to a host aggregate"},{"line_number":232,"context_line":"            # that is attached to a shared storage pool that can"},{"line_number":233,"context_line":"            # service this request for disk? Let\u0027s check..."},{"line_number":234,"context_line":"            host_aggs \u003d compute_node.host_aggregates"},{"line_number":235,"context_line":"            for host_agg in host_aggs:"},{"line_number":236,"context_line":"                ha_resources \u003d host_agg.get_inventories()"},{"line_number":237,"context_line":"                if resources.DISK in ha_resources:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a26ad4f_7cbb1273","line":234,"in_reply_to":"9a1a9d01_745e0114","updated":"2015-10-29 01:02:47.000000000","message":"I think you and ed are saying a similar thing here. I will give it a little more thought and see if that\u0027s a better way to go.","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":248,"context_line":"`allocations` table.  Assume that `$CN_ID` below is the ID of the compute node"},{"line_number":249,"context_line":"in the `resource_providers` table. Assume that `$RP_ID` is the ID of the shared"},{"line_number":250,"context_line":"storage pool that was attached to the host aggregate that this compute node"},{"line_number":251,"context_line":"belonged to. Assume that `$INST_ID` is the UUID of the launching instance.::"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    INSERT INTO allocations"},{"line_number":254,"context_line":"    (provider_id, consumer_id, resource_class, allocated, used) VALUES"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_7377ba3a","line":251,"updated":"2015-10-06 21:03:42.000000000","message":"That above would assume some sched claims, ie. a DB update from the sched right?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34fec2d14f0773a707aab192c152d00456188a35","unresolved":false,"context_lines":[{"line_number":259,"context_line":"Alternatives"},{"line_number":260,"context_line":"------------"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"We can continue to report incorrect usage information for shared storage pools."},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"Data model impact"},{"line_number":265,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_73aeda86","line":262,"updated":"2015-10-06 21:03:42.000000000","message":"Eh, at least some comments could be left for some alternative models :-)","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8e68344ed19b61f9f8fd676bf79eed482f2cce04","unresolved":false,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"* How will the initial set of new data objects be generated, for example if you"},{"line_number":281,"context_line":"  need to take into account existing instances, or modify other existing data"},{"line_number":282,"context_line":"  describe how that will work."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"REST API impact"},{"line_number":285,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a1a9d01_7624c9c5","line":282,"updated":"2015-10-01 15:35:30.000000000","message":"Lorem ipsum from here :)?","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b7e6e1a7e47e64ea0359e35c200f3fee25ce7a97","unresolved":false,"context_lines":[{"line_number":503,"context_line":"References"},{"line_number":504,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"[1] Bugs related to resource usage reporting and calculation:"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"* Hypervisor summary shows incorrect total storage (Ceph)"},{"line_number":509,"context_line":"  https://bugs.launchpad.net/nova/+bug/1387812"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a2fa921_d0d5a4b9","line":506,"updated":"2015-10-05 16:20:48.000000000","message":"good set of references, nice","commit_id":"22c75ecf2ad63144f8b5d29c99fb07057bc02ba8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":14,"context_line":"provided by a single compute node by introducing a new concept -- a resource"},{"line_number":15,"context_line":"provider -- that will allow Nova to accurately track and reserve resources"},{"line_number":16,"context_line":"regardless of whether the resource is being exposed by a single compute node"},{"line_number":17,"context_line":"or some shared pool or service."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"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":4,"id":"da85f559_735c8fed","line":17,"range":{"start_line":17,"start_character":20,"end_line":17,"end_character":30},"updated":"2015-11-10 16:45:47.000000000","message":"nit: given that we discussed at the summit about the possibility for Neutron guys to later use the resource-providers blueprint as a foundation for providing heterogenous resources to the scheduler, leaving just \u0027or service\u0027 is fine by me but a bit confusing : is it\n\n  shared (pool, service)\n\nor\n\n (shared pool, service)\n\n?\n\n(ie. the adjective \u0027shared\u0027 being also applicable to the substantive \u0027service\u0027 ?)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b5b259ac080a79d45f85522871ea94f2773e3278","unresolved":false,"context_lines":[{"line_number":14,"context_line":"provided by a single compute node by introducing a new concept -- a resource"},{"line_number":15,"context_line":"provider -- that will allow Nova to accurately track and reserve resources"},{"line_number":16,"context_line":"regardless of whether the resource is being exposed by a single compute node"},{"line_number":17,"context_line":"or some shared pool or service."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Problem description"},{"line_number":20,"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":4,"id":"7a740942_868fc974","line":17,"in_reply_to":"da85f559_735c8fed","updated":"2015-12-09 19:47:29.000000000","message":"I missed this discussion at the summit.  What specifically did you talk about with regards to \"Neutron heterogenous resources?\"  Do you have any links to share with anything written down?  I\u0027m just now taking an interest in this work from my own Neutron perspective.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"As a deployer that has chosen to use a shared storage solution for storing"},{"line_number":41,"context_line":"instance ephemeral disks, I want Nova and Horizon to report the correct"},{"line_number":42,"context_line":"usage and capacity information."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Proposed change"},{"line_number":45,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_661b38cb","line":42,"updated":"2015-11-11 12:20:48.000000000","message":"I like small scope, but I guess you also what the scheduler to have the correct information when making its decisions. But anyways, lets keep the scope small.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b5b259ac080a79d45f85522871ea94f2773e3278","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"As a deployer that has chosen to use a shared storage solution for storing"},{"line_number":41,"context_line":"instance ephemeral disks, I want Nova and Horizon to report the correct"},{"line_number":42,"context_line":"usage and capacity information."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Proposed change"},{"line_number":45,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_0659998e","line":42,"in_reply_to":"da85f559_661b38cb","updated":"2015-12-09 19:47:29.000000000","message":"Another use case to be considered is when an IP subnet (on a broadcast domain) is available only to a subset of compute nodes.  The pool of available IPs within the subnet is a resource that would only be available to that subset.\n\nI\u0027m not so interested in Nova and Horizon reporting usage and capacity as I am in the scheduler as John points out.\n\nThis could also affect live migration limiting the set of compute hosts to which an instance can be migrated to.  I imagine that the \"shared storage solution for storing instance ephemeral disk\" use case is analogous to this in many ways.\n\nI think Cinder probably has a similar use case in mind where access to a Cinder volume might be limited to a subset of hosts.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Add tables to the Nova database that represent the following concepts:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"`resource_classes` is a lookup table for different types of resources::"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    CREATE TABLE resource_classes ("},{"line_number":52,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_57a80d8d","line":49,"updated":"2015-11-11 20:49:05.000000000","message":"Nit: singular table names are the preferred style.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3b7f095b4787065da4f7240db492a776260d812","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Add tables to the Nova database that represent the following concepts:"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"`resource_classes` is a lookup table for different types of resources::"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    CREATE TABLE resource_classes ("},{"line_number":52,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba8a016a_409bcc72","line":49,"in_reply_to":"da85f559_57a80d8d","updated":"2015-11-17 15:23:02.000000000","message":"No, the SQLA object is singular, but the table name is plural :-)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b5b259ac080a79d45f85522871ea94f2773e3278","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    CREATE TABLE resource_providers ("},{"line_number":72,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":73,"context_line":"        uuid VARCAHR (64) NOT NULL,"},{"line_number":74,"context_line":"        UNIQUE INDEX (uuid)"},{"line_number":75,"context_line":"    );"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_792e02a7","line":73,"updated":"2015-12-09 19:47:29.000000000","message":"I\u0027m a little confused.  Is the uuid a reference to an attribute of some external entity (like a compute node)?  In your example, this uuid would match the uuid in the compute_nodes table, correct?  I find it confusing that it is called uuid in both tables.\n\nnit:*VARCHAR","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":77,"context_line":"We will want to populate this lookup table with a record for each"},{"line_number":78,"context_line":"compute node in the system, since compute nodes are providers of"},{"line_number":79,"context_line":"some types of resources. However, the `compute_nodes` table"},{"line_number":80,"context_line":"currently does not have a UUID column, so we will add one::"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":83,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d980acc1","line":80,"updated":"2015-11-11 20:49:05.000000000","message":"/me has a flashback to arguing for universal UUIDs... :)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":83,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"},{"line_number":84,"context_line":"    ALTER TABLE compute_nodes MODIFY COLUMN uuid uuid VARCHAR(64) NOT NULL;"},{"line_number":85,"context_line":"    CREATE UNIQUE INDEX uix_uuid (uuid);"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"And we will now add a record to the `resource_providers` table for"},{"line_number":88,"context_line":"each compute node in the system::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_739d6f58","line":85,"updated":"2015-11-10 16:45:47.000000000","message":"So we said during the Summit that the above SQL statement is not really an SQL data migration, but rather something which should be pythonized in the object save() call so that we follow the online data migration pattern, right? :-)\n\nI remember you saying \u0027my mind is just thinking in SQL language\u0027 :-)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":83,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"},{"line_number":84,"context_line":"    ALTER TABLE compute_nodes MODIFY COLUMN uuid uuid VARCHAR(64) NOT NULL;"},{"line_number":85,"context_line":"    CREATE UNIQUE INDEX uix_uuid (uuid);"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"And we will now add a record to the `resource_providers` table for"},{"line_number":88,"context_line":"each compute node in the system::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_86565c5a","line":85,"in_reply_to":"da85f559_739d6f58","updated":"2015-11-11 12:20:48.000000000","message":"Well there are two parts, the alter table in the schema migration, and the add uuid in the data migration.\n\nI think the not null has to happen in the following release of Nova to adding the uuid, with our current scheme.\n\nBut I am OK deferring that do the data model impact section.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3b7f095b4787065da4f7240db492a776260d812","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    ALTER TABLE compute_nodes ADD COLUMN uuid VARCHAR(64) NULL;"},{"line_number":83,"context_line":"    UPDATE compute_nodes SET uuid \u003d UUID4();"},{"line_number":84,"context_line":"    ALTER TABLE compute_nodes MODIFY COLUMN uuid uuid VARCHAR(64) NOT NULL;"},{"line_number":85,"context_line":"    CREATE UNIQUE INDEX uix_uuid (uuid);"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"And we will now add a record to the `resource_providers` table for"},{"line_number":88,"context_line":"each compute node in the system::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba8a016a_4072ec4a","line":85,"in_reply_to":"da85f559_86565c5a","updated":"2015-11-17 15:23:02.000000000","message":"Yeah, my point was just to clarify what should be done, in particular in terms of data migration and initial schema update (and how)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":88,"context_line":"each compute node in the system::"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    INSERT INTO resource_providers (uuid)"},{"line_number":91,"context_line":"    SELECT uuid FROM compute_nodes;"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"`resource_pools` is a simple table of resource providers that expose a pool"},{"line_number":94,"context_line":"of some resource class::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_13fae375","line":91,"updated":"2015-11-10 16:45:47.000000000","message":"again, I assume that should be done in ComputeNode.save() right?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"50a3c3539c51dcc9c02efe5145e7cc988c1ce342","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    INSERT INTO resource_providers (uuid)"},{"line_number":91,"context_line":"    SELECT uuid FROM compute_nodes;"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"`resource_pools` is a simple table of resource providers that expose a pool"},{"line_number":94,"context_line":"of some resource class::"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    CREATE TABLE resource_pools ("}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_8b7f8565","line":93,"updated":"2015-11-16 07:33:48.000000000","message":"I assume that \"is a simple table of resource providers\" means the resource_pools is also a kind of provider recorded by resource_providers, just like compute_nodes, is that right?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        resource_class_id INT UNSIGNED NOT NULL"},{"line_number":100,"context_line":"    );"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"Imagine that the Nova deployment had a collection of compute nodes that"},{"line_number":103,"context_line":"did *not* provide instances with any local disk, and instead used a shared"},{"line_number":104,"context_line":"storage pool for housing the instance\u0027s ephemeral disks."},{"line_number":105,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d321bbfc","line":102,"updated":"2015-11-10 16:45:47.000000000","message":"so at line 102, you stop explaining the main design and then you provide an example for shared storage pool, right?\n\nIf so, I\u0027d love to see a subsection explicit title here like \"Example for shared pool\"\n\nThat said, it has some impact for getting the hooks done at the API level when doing CRUD ops nope?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":106,"context_line":"We would first create a host aggregate that contained all such compute"},{"line_number":107,"context_line":"nodes::"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    nova host-aggregate-create ..."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"Then, we would create a resource pool for the shared storage::"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_f3a63f52","line":109,"range":{"start_line":109,"start_character":4,"end_line":109,"end_character":30},"updated":"2015-11-10 16:45:47.000000000","message":"so, while I totally get the idea of having a conceptual object for grouping the list of hosts in the case of a shared pool, I just wonder if the aggregate concept is the best one and should be left to operators.\n\nIf so, the below SQL query should actually be something done in the Compute API where the CRUD operations for aggregates are done, right? Ideally, I would see some DB API for that, and not just SQL queries...","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    INSERT INTO resource_pools (uuid, name, resource_class) VALUES"},{"line_number":114,"context_line":"    (UUID4(), \u0027my shared storage pool\u0027, 3);"},{"line_number":115,"context_line":"    # Note that 3 is the resource class for disk_gb"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"We would then need to indicate that this resource pool provides disk"},{"line_number":118,"context_line":"resources to the host aggregate containing our compute nodes. For this,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_533cebe1","line":115,"updated":"2015-11-10 16:45:47.000000000","message":"here, that should be a DB API method for inserting a row \n\n- I totally get that you think in SQL terms, but I feel that\u0027s very confusing for operators actually reviewing all the merged specs thanks to the RSS feed.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    CREATE TABLE aggregate_resource_pools ("},{"line_number":123,"context_line":"        aggregate_id INT UNSIGNED NOT NULL,"},{"line_number":124,"context_line":"        resource_pool_uuid VARCHAR(64) NOT NULL,"},{"line_number":125,"context_line":"        PRIMARY KEY (aggregate_id, resource_pool_uuid),"},{"line_number":126,"context_line":"        INDEX (resource_pool_id)"},{"line_number":127,"context_line":"    );"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_133742e4","line":125,"updated":"2015-11-10 16:45:47.000000000","message":"again, that should be at least a pythonized method (and again, I understand you)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    INSERT INTO aggregate_resource_pools"},{"line_number":133,"context_line":"    (aggregate_id, resource_pool_uuid) VALUES"},{"line_number":134,"context_line":"    (\u003chost_agg\u003e, \u003cresource_pool\u003e);"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"An `inventories` table records the amount of a particular resource that is"},{"line_number":137,"context_line":"provided by a particular resource provider::"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_076a981a","line":135,"updated":"2015-11-10 16:45:47.000000000","message":"So until that point, it\u0027s still about providing a way to have shared resources using aggregates. I\u0027m not opposed to the idea, but here we should then explicitly say that we go back to the main model quoted above.\n\nAgain, also reemphasizing that all the above needs more Pythonized discussion about where to place those specific insert calls in the code for that specific \u0027shared pool\u0027 example (which is based on providing an aggregate)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        numa_topology TEXT NULL,"},{"line_number":147,"context_line":"        INDEX (resource_provider_id),"},{"line_number":148,"context_line":"        INDEX (resource_class_id)"},{"line_number":149,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_87f2086e","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":21},"updated":"2015-11-10 16:45:47.000000000","message":"I lost the point. Why do you need to explicitly mention numa_topology ? I thought it was a resource_class nope?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":144,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        numa_topology TEXT NULL,"},{"line_number":147,"context_line":"        INDEX (resource_provider_id),"},{"line_number":148,"context_line":"        INDEX (resource_class_id)"},{"line_number":149,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_fe0eb68a","line":146,"range":{"start_line":146,"start_character":8,"end_line":146,"end_character":21},"in_reply_to":"da85f559_87f2086e","updated":"2015-11-11 20:49:05.000000000","message":"I wonder about this too. It was added to the earlier version of the spec.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b5b259ac080a79d45f85522871ea94f2773e3278","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        INDEX (resource_provider_id),"},{"line_number":148,"context_line":"        INDEX (resource_class_id)"},{"line_number":149,"context_line":"    );"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"The `min_unit` and `max_unit` fields shall store \"limits\" information for the"},{"line_number":152,"context_line":"type of resource. This information is necessary to ensure that a request for"},{"line_number":153,"context_line":"more or fewer resource that can be provided as a single unit will not be"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_d79fbd4e","line":150,"updated":"2015-12-09 19:47:29.000000000","message":"Let me see if I can map this to the use case that I have in mind, scheduling to a compute node attached to a broadcast domain with available IPs...\n\nFirst, I need a resource class:  (7, \"ip_address\") or something entered in to that table.\n\nNext, I need a resource pool:  (UUID4(), \u0027my broadcast domain 1\u0027, 7).  I assume that I would need to create a provider for each broadcast domain; is that correct?\n\nNext, I need to create host aggregates, one for each of the resource pools that I defined in the previous step.  I link those to resource pools in aggregate_resource_pools:\n\n  \u003chost_agg1\u003e, \u003cbroadcast domain 1\u003e\n  \u003chost_agg2\u003e, \u003cbroadcast domain 2\u003e\n  ...\n\nNow, I need inventories for each broadcast domain, right?  This is where I\u0027d say the total number of IPs available in that broadcast domain, right?  Say I\u0027ve got 200 IPs available.  This number represents the number of IP addresses available to compute instances only whether allocated or not, right?  If I understand correctly it is the sum of IP addresses used in the allocations table (below) and those still available for allocation to compute instances.  If that is correct then I think I see a problem here.\n\nThe issue is that Neutron tracks IP address usage and it doesn\u0027t have a notion of IP addresses that are set aside only for compute instances.  In other words, IP addresses can be consumed for purposes other than for compute instances (router ports, dns server, floating ip, etc).  What should happen to the total in the inventories row when that IP is consumed?  Does Neutron need to update Nova and change it?\n\nFinally, what is the resource provider in my case?  I don\u0027t know at this point how the provider works in to this use case.  I only know that it wouldn\u0027t be any compute node.  Did I miss what the provider is in your ephemeral disk example?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":157,"context_line":"(the default), the compute node cannot accept requests for instances needing"},{"line_number":158,"context_line":"more than 8 vCPUs. So, while there may be 128 total vCPUs available on the"},{"line_number":159,"context_line":"compute node, the `min_unit` would be set to 1 and the `max_unit` would be"},{"line_number":160,"context_line":"set to `8` in order to prevent unacceptable matching of resources to requests."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Each compute node will have a set of records inserted into the `inventories`"},{"line_number":163,"context_line":"table, one record for each type of resource the compute node provides. The"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_874e8894","line":160,"updated":"2015-11-10 16:45:47.000000000","message":"that\u0027s what the scheduler provides back to the conductor as a tuple when calling select_dests() right? I mean (host, node, limits)\n\nIf so, that means that the above needs to be mapped with the above. How can it be related ?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":157,"context_line":"(the default), the compute node cannot accept requests for instances needing"},{"line_number":158,"context_line":"more than 8 vCPUs. So, while there may be 128 total vCPUs available on the"},{"line_number":159,"context_line":"compute node, the `min_unit` would be set to 1 and the `max_unit` would be"},{"line_number":160,"context_line":"set to `8` in order to prevent unacceptable matching of resources to requests."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Each compute node will have a set of records inserted into the `inventories`"},{"line_number":163,"context_line":"table, one record for each type of resource the compute node provides. The"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_dee5f2a3","line":160,"in_reply_to":"da85f559_874e8894","updated":"2015-11-11 20:49:05.000000000","message":"No, I think the min/max is for the scheduler\u0027s benefit, and doesn\u0027t have to do with what it returns to conductor. It tells the scheduler \"I may have lots of these things, but you can only give out {max_unit} of them to any single request\"","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"58ad79ae8111cc3cbc3bed4a9d15f48e45ea46a5","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Each compute node will have a set of records inserted into the `inventories`"},{"line_number":163,"context_line":"table, one record for each type of resource the compute node provides. The"},{"line_number":164,"context_line":"`provider_id` field value shall be the ID from the `resource_providers` table"},{"line_number":165,"context_line":"for the compute node\u0027s UUID. For compute nodes that provide no local disk to"},{"line_number":166,"context_line":"instances, there will be no record for the resource class `3`, which is the"},{"line_number":167,"context_line":"`disk_gb` resource class."}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_94e61415","line":164,"updated":"2015-11-13 09:20:15.000000000","message":"s/The \u0027provider_id\u0027 field/The \u0027resource_provider_id\u0027 field/","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":166,"context_line":"instances, there will be no record for the resource class `3`, which is the"},{"line_number":167,"context_line":"`disk_gb` resource class."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"In order to track resources that have been assigned and used by some consumer"},{"line_number":170,"context_line":"of that resource, we need an `allocations` table. Records in this table"},{"line_number":171,"context_line":"indicate the amount of a particular resource that has been allocated to a given"},{"line_number":172,"context_line":"consumer of that resource from a particular resource provider::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_72679f25","line":169,"updated":"2015-11-10 16:45:47.000000000","message":"So, until that point, I agree with the above because it fixes the problem of shared pools or heterogenous resources.\n\nBeyond that point, I feel that the allocations table is unnecessary for that spec unless it\u0027s only used by the compute nodes and not by the scheduler, but your spec is very vague. \n\nFrankly, I feel that speaking of scheduler claims is a totally different spec (and scope) that shouldn\u0027t be tackled in that spec. Here, we want to focus on how to count resources (either as a set of resources or as single) by the RT, and how the Scheduler can read those resource usage, but we shouldn\u0027t go into the rabbit hole of changing where things are done.\nWe still have compute claims, let\u0027s keep them and make them explicit in the spec, ie. how instance_claim() can decrement the resource usage given that blueprint","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":166,"context_line":"instances, there will be no record for the resource class `3`, which is the"},{"line_number":167,"context_line":"`disk_gb` resource class."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"In order to track resources that have been assigned and used by some consumer"},{"line_number":170,"context_line":"of that resource, we need an `allocations` table. Records in this table"},{"line_number":171,"context_line":"indicate the amount of a particular resource that has been allocated to a given"},{"line_number":172,"context_line":"consumer of that resource from a particular resource provider::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_996a24b2","line":169,"in_reply_to":"da85f559_72679f25","updated":"2015-11-11 20:49:05.000000000","message":"I agree with Sylvain - this is covering future behavior changes that haven\u0027t been fully settled. Since we\u0027ve agreed that it\u0027s OK for the scheduler to work with stale data from time to time, it should just read the inventories, which will be updated by the resource providers.\n\nHaving said that, the problem now is how the inventory records for shared resources gets updated. The current design is that the resource provider (i.e., compute node) is the only entity that provides this information. Further below you mention a periodic script that will update the inventory for a Ceph storage; I think that it should be a primary part of this spec, and not an afterthought. Resource providers are responsible for keeping their inventories up-to-date.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"58ad79ae8111cc3cbc3bed4a9d15f48e45ea46a5","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":177,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":178,"context_line":"        resource_class_id INT UNSIGNED NOT NULL,"},{"line_number":179,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":180,"context_line":"        INDEX (resource_provider_id, resource_class_id),"},{"line_number":181,"context_line":"        INDEX (consumer_id),"},{"line_number":182,"context_line":"        INDEX (resource_class_id)"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_cbd076fa","line":179,"updated":"2015-11-13 09:20:15.000000000","message":"do we need \u0027numa_topology\u0027 field as in \u0027inventories\u0027?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"58ad79ae8111cc3cbc3bed4a9d15f48e45ea46a5","unresolved":false,"context_lines":[{"line_number":189,"context_line":"needs 4 vCPUs, 16GB of RAM, and 200GB of disk."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"The scheduler will need to query the database to determine compute nodes that"},{"line_number":192,"context_line":"have the available resources to meet the request. Though this can be done in"},{"line_number":193,"context_line":"a single SQL statement, we will assume here that the scheduler will use its"},{"line_number":194,"context_line":"current naive implementation, which queries all resource usage information"},{"line_number":195,"context_line":"for all compute nodes for each iteration of the placement algorithm::"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_41cf87b3","line":192,"updated":"2015-11-13 09:20:15.000000000","message":"The scheduler probably need support the old and the new way to consume resources after all compute node upgrade to the new code. That is really complex","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    SELECT resource_provider_id, resource_class_id, total, min_unit, max_unit"},{"line_number":198,"context_line":"    FROM inventories;"},{"line_number":199,"context_line":"    SELECT resource_provider_id, resource_class_id, SUM(used) as used"},{"line_number":200,"context_line":"    FROM allocations;"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"From this information, the scheduler would determine the resource providers"},{"line_number":203,"context_line":"that had enough vCPUs, memory and disk to satisfy the request. Continuing the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_b5edf1f0","line":200,"range":{"start_line":199,"start_character":0,"end_line":200,"end_character":21},"updated":"2015-11-10 16:45:47.000000000","message":"I don\u0027t see the benefit of the scheduler reading allocations - that\u0027s claim stuff and that\u0027s *for the moment* managed by the compute nodes. Please remove that notion from that spec.\n\nTo be clear, the Scheduler should read a state where RT claims would decrement the inventories, it shouldn\u0027t read the allocations table.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b5b259ac080a79d45f85522871ea94f2773e3278","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    SELECT resource_provider_id, resource_class_id, total, min_unit, max_unit"},{"line_number":198,"context_line":"    FROM inventories;"},{"line_number":199,"context_line":"    SELECT resource_provider_id, resource_class_id, SUM(used) as used"},{"line_number":200,"context_line":"    FROM allocations;"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"From this information, the scheduler would determine the resource providers"},{"line_number":203,"context_line":"that had enough vCPUs, memory and disk to satisfy the request. Continuing the"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a740942_774849cd","line":200,"in_reply_to":"da85f559_b5edf1f0","updated":"2015-12-09 19:47:29.000000000","message":"I don\u0027t understand the above comment.  The way I understood it, the inventories table held a \"total\" which was a count of the resources available, whether consumed or not.  It is the allocations table that consumes it.\n\n  available \u003d total - SUM(used)\n\nIs this not correct?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # to place this instance on."},{"line_number":250,"context_line":"        matches.add(compute_node)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"Once the set of compute nodes (the `matches` variable in the code above) is"},{"line_number":253,"context_line":"determined, the scheduler would sort the set according to its weighting"},{"line_number":254,"context_line":"algorithm and then pick the compute node to place the instance on."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"To \"claim\" the set of resources on this compute node for the requested"},{"line_number":257,"context_line":"instance, we would insert a record, one for each resource class in the request"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d56995bf","line":254,"range":{"start_line":252,"start_character":0,"end_line":254,"end_character":66},"updated":"2015-11-10 16:45:47.000000000","message":"So the above can be done without having allocations, right?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":251,"context_line":""},{"line_number":252,"context_line":"Once the set of compute nodes (the `matches` variable in the code above) is"},{"line_number":253,"context_line":"determined, the scheduler would sort the set according to its weighting"},{"line_number":254,"context_line":"algorithm and then pick the compute node to place the instance on."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"To \"claim\" the set of resources on this compute node for the requested"},{"line_number":257,"context_line":"instance, we would insert a record, one for each resource class in the request"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_f50ff92b","line":254,"updated":"2015-11-10 16:45:47.000000000","message":"So, my comment on L","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":254,"context_line":"algorithm and then pick the compute node to place the instance on."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"To \"claim\" the set of resources on this compute node for the requested"},{"line_number":257,"context_line":"instance, we would insert a record, one for each resource class in the request"},{"line_number":258,"context_line":"spec, into the `allocations` table.  Assume that `$CN_ID` below is the ID of"},{"line_number":259,"context_line":"the compute node in the `resource_providers` table. Assume that `$RP_ID` is the"},{"line_number":260,"context_line":"ID of the shared storage pool in the `resource_providers` table that was"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_15ff1d68","line":257,"range":{"start_line":257,"start_character":10,"end_line":257,"end_character":34},"updated":"2015-11-10 16:45:47.000000000","message":"see, this is vague. Who should do the insert?\nI know you really want to insert that record in the scheduler, but that shouldn\u0027t be part of that spec.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    ($CN_ID, \u0027$INST_ID\u0027, 1, 16),"},{"line_number":268,"context_line":"    ($RP_ID, \u0027$INST_ID\u0027, 1, 200);"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"Changes needed in `nova-manage`"},{"line_number":271,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"There will be a set of new `nova-manage` CLI commands that will allow a cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_156e3d01","line":270,"range":{"start_line":270,"start_character":0,"end_line":270,"end_character":31},"updated":"2015-11-10 16:45:47.000000000","message":"I was originally thinking (when reviewing the spec) of a new REST resource rather than nova-manage.\n\nI thought we were trying to avoid anytime possible to add more in nova-manage when it was possible to do so in the API ?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    ($CN_ID, \u0027$INST_ID\u0027, 1, 16),"},{"line_number":268,"context_line":"    ($RP_ID, \u0027$INST_ID\u0027, 1, 200);"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"Changes needed in `nova-manage`"},{"line_number":271,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"There will be a set of new `nova-manage` CLI commands that will allow a cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d1f0a0ff","line":270,"range":{"start_line":270,"start_character":0,"end_line":270,"end_character":31},"in_reply_to":"da85f559_156e3d01","updated":"2015-11-11 12:20:48.000000000","message":"+1 I think we need REST APIs for this, based on our current approach.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1c1719b29b5791942fde1766120a04b9e8ec62a2","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    ($CN_ID, \u0027$INST_ID\u0027, 1, 16),"},{"line_number":268,"context_line":"    ($RP_ID, \u0027$INST_ID\u0027, 1, 200);"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"Changes needed in `nova-manage`"},{"line_number":271,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"There will be a set of new `nova-manage` CLI commands that will allow a cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_6b07cf1d","line":270,"in_reply_to":"da85f559_2ba54746","updated":"2015-11-15 13:12:02.000000000","message":"Emm... my previous comment looks like wrong. The aggregate resource pool is more generic abstraction, as it isn\u0027t only used by shared storage, maybe also other shared resource.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    ($CN_ID, \u0027$INST_ID\u0027, 1, 16),"},{"line_number":268,"context_line":"    ($RP_ID, \u0027$INST_ID\u0027, 1, 200);"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"Changes needed in `nova-manage`"},{"line_number":271,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"There will be a set of new `nova-manage` CLI commands that will allow a cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_f95a50f1","line":270,"range":{"start_line":270,"start_character":0,"end_line":270,"end_character":31},"in_reply_to":"da85f559_d1f0a0ff","updated":"2015-11-11 20:49:05.000000000","message":"Agree. If you update nova-manage, it could call the REST API, but the API is the critical piece.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0708133b04ba7e04abb47a5406cf66615611734a","unresolved":false,"context_lines":[{"line_number":267,"context_line":"    ($CN_ID, \u0027$INST_ID\u0027, 1, 16),"},{"line_number":268,"context_line":"    ($RP_ID, \u0027$INST_ID\u0027, 1, 200);"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"Changes needed in `nova-manage`"},{"line_number":271,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"There will be a set of new `nova-manage` CLI commands that will allow a cloud"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_2ba54746","line":270,"in_reply_to":"da85f559_f95a50f1","updated":"2015-11-15 12:59:01.000000000","message":"How about we detect shared storage automatically? I have basic idea before. https://blueprints.launchpad.net/nova/+spec/tracking-shared-storage\n\nFor shared filesystem, we can create test file on it. For something like ceph, there should be a way.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":290,"context_line":"Will allow a script or administrator to update the capacity of a shared"},{"line_number":291,"context_line":"pool of resources. For example, a periodic script might check the output"},{"line_number":292,"context_line":"of `rados df` and call this command to update a shared resource pool"},{"line_number":293,"context_line":"representing a Ceph storage pool."},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"* `nova-manage host-aggregate-add-resource-pool $AGG_ID $POOL_ID`"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_71ec54f3","line":293,"updated":"2015-11-11 12:20:48.000000000","message":"I like how this helps reduce the scope.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":290,"context_line":"Will allow a script or administrator to update the capacity of a shared"},{"line_number":291,"context_line":"pool of resources. For example, a periodic script might check the output"},{"line_number":292,"context_line":"of `rados df` and call this command to update a shared resource pool"},{"line_number":293,"context_line":"representing a Ceph storage pool."},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"* `nova-manage host-aggregate-add-resource-pool $AGG_ID $POOL_ID`"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_99978447","line":293,"in_reply_to":"da85f559_71ec54f3","updated":"2015-11-11 20:49:05.000000000","message":"It should be a requirement that all resource providers have responsibility for keeping their inventory updated on a regular basis. We shouldn\u0027t rely on ad-hoc scripts.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":300,"context_line":"* `nova-manage host-aggregate-remove-resource-pool $AGG_ID $POOL_ID`"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"Will allow the cloud administrator to break the relationship between an"},{"line_number":303,"context_line":"existing host aggregate and a resource pool."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"Alternatives"},{"line_number":306,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_7003170e","line":303,"updated":"2015-11-10 16:45:47.000000000","message":"Okay, so that section does the matching between the raw SQL queries that you mention and the expected UX. I\u0027d rather see this section removed and that UX explained directly in the proposal (and possibly remove the SQL syntax in here anytime it was possible)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":300,"context_line":"* `nova-manage host-aggregate-remove-resource-pool $AGG_ID $POOL_ID`"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"Will allow the cloud administrator to break the relationship between an"},{"line_number":303,"context_line":"existing host aggregate and a resource pool."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"Alternatives"},{"line_number":306,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_b1407c35","line":303,"in_reply_to":"da85f559_7003170e","updated":"2015-11-11 12:20:48.000000000","message":"Meh, I am fine with the SQL, it works.\n\nAs long as we make the Data Model impact section very clear about when each of the changes will be made.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3b7f095b4787065da4f7240db492a776260d812","unresolved":false,"context_lines":[{"line_number":300,"context_line":"* `nova-manage host-aggregate-remove-resource-pool $AGG_ID $POOL_ID`"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"Will allow the cloud administrator to break the relationship between an"},{"line_number":303,"context_line":"existing host aggregate and a resource pool."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"Alternatives"},{"line_number":306,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba8a016a_0064e446","line":303,"in_reply_to":"da85f559_b1407c35","updated":"2015-11-17 15:23:02.000000000","message":"Fair enough, I just want to make clear that the SQL statements will actually be done using the object facade...\n\nSince operators are subscribing to the specs RSS feed, I\u0027m pretty concerned by making sure they understand the change ;-)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":312,"context_line":"or not. This has a number of disadvantages, though:"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"* We want to move *away* from using more configuration options for setting up"},{"line_number":315,"context_line":"  resources"},{"line_number":316,"context_line":"* There\u0027s no way to have more than one shared storage pool attached to a"},{"line_number":317,"context_line":"  compute node"},{"line_number":318,"context_line":"* This would assume only shared storage pools are resource providers. No"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_192dd4fd","line":315,"updated":"2015-11-11 20:49:05.000000000","message":"Running nova-manage commands is not any less of a burden.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":314,"context_line":"* We want to move *away* from using more configuration options for setting up"},{"line_number":315,"context_line":"  resources"},{"line_number":316,"context_line":"* There\u0027s no way to have more than one shared storage pool attached to a"},{"line_number":317,"context_line":"  compute node"},{"line_number":318,"context_line":"* This would assume only shared storage pools are resource providers. No"},{"line_number":319,"context_line":"  consideration of other shared resource providers like pools of network"},{"line_number":320,"context_line":"  resources (IPAM) or hardware (Intel RSA-like technology)"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_39e458df","line":317,"updated":"2015-11-11 20:49:05.000000000","message":"Not true; since the alternative proposal was to add a metadata *key* to mark the aggregate, the *value* could the link to the shared resource.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":317,"context_line":"  compute node"},{"line_number":318,"context_line":"* This would assume only shared storage pools are resource providers. No"},{"line_number":319,"context_line":"  consideration of other shared resource providers like pools of network"},{"line_number":320,"context_line":"  resources (IPAM) or hardware (Intel RSA-like technology)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"Data model impact"},{"line_number":323,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_b9d048f7","line":320,"updated":"2015-11-11 20:49:05.000000000","message":"Again, not true.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":368,"context_line":" * `memory_mb`"},{"line_number":369,"context_line":" * `memory_mb_used`"},{"line_number":370,"context_line":" * `local_gb`"},{"line_number":371,"context_line":" * `local_gb_used`"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"REST API impact"},{"line_number":374,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d11d0063","line":371,"updated":"2015-11-11 12:20:48.000000000","message":"Could we group all this into these three phases:\n\n1) what happens in schema migration\n\n2) what happens in the object (and we need to document the nova-manage command you will add to do the online data migration)\n\n3) what happens next release\n\nI think its much easier to review the upgrade impact in that way.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3b7f095b4787065da4f7240db492a776260d812","unresolved":false,"context_lines":[{"line_number":368,"context_line":" * `memory_mb`"},{"line_number":369,"context_line":" * `memory_mb_used`"},{"line_number":370,"context_line":" * `local_gb`"},{"line_number":371,"context_line":" * `local_gb_used`"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"REST API impact"},{"line_number":374,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba8a016a_80d774be","line":371,"in_reply_to":"da85f559_1962b43e","updated":"2015-11-17 15:23:02.000000000","message":"+1 thanks for explaining better than me :-)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":11189,"name":"yuntongjin","email":"yuntong.jin@intel.com","username":"yuntong"},"change_message_id":"fffbe1ef103b9a4175eaa4ede952c09c04f8ac34","unresolved":false,"context_lines":[{"line_number":368,"context_line":" * `memory_mb`"},{"line_number":369,"context_line":" * `memory_mb_used`"},{"line_number":370,"context_line":" * `local_gb`"},{"line_number":371,"context_line":" * `local_gb_used`"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"REST API impact"},{"line_number":374,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9a8ffd7b_e3d8ec55","line":371,"in_reply_to":"da85f559_d11d0063","updated":"2015-11-25 04:32:31.000000000","message":"+1","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":368,"context_line":" * `memory_mb`"},{"line_number":369,"context_line":" * `memory_mb_used`"},{"line_number":370,"context_line":" * `local_gb`"},{"line_number":371,"context_line":" * `local_gb_used`"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"REST API impact"},{"line_number":374,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_1962b43e","line":371,"in_reply_to":"da85f559_d11d0063","updated":"2015-11-11 20:49:05.000000000","message":"+1","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":374,"context_line":"---------------"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"None. It is deliberate that we do not want any user-facing REST API changes"},{"line_number":377,"context_line":"introduced in this patch series."},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"Security impact"},{"line_number":380,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_f03627e6","line":377,"updated":"2015-11-10 16:45:47.000000000","message":"So I missed the rationale about why we should prefer nova-manage bindings rather than an new REST resource","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":374,"context_line":"---------------"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"None. It is deliberate that we do not want any user-facing REST API changes"},{"line_number":377,"context_line":"introduced in this patch series."},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"Security impact"},{"line_number":380,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_39ce982e","line":377,"in_reply_to":"da85f559_91fbf8c0","updated":"2015-11-11 20:49:05.000000000","message":"me three","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"629f4fcdb2be691a90fdec398aaedbe6f82518c4","unresolved":false,"context_lines":[{"line_number":374,"context_line":"---------------"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"None. It is deliberate that we do not want any user-facing REST API changes"},{"line_number":377,"context_line":"introduced in this patch series."},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"Security impact"},{"line_number":380,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_91fbf8c0","line":377,"in_reply_to":"da85f559_f03627e6","updated":"2015-11-11 12:20:48.000000000","message":"me too.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":399,"context_line":"There will be additional SQL query that is executed at the start of each"},{"line_number":400,"context_line":"iteration of the scheduler\u0027s `select_destinations()` method at the same code"},{"line_number":401,"context_line":"point where the collection of host aggregates is retrieved with the"},{"line_number":402,"context_line":"`nova.objects.AggregateList.get_all()` method."},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"We will need to retrieve the inventory information for all host aggregates with"},{"line_number":405,"context_line":"the following SQL query, to be executed in a new"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_d99c2c10","line":402,"updated":"2015-11-11 20:49:05.000000000","message":"Do you expect this to change often? Can it be cached?","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"50a3c3539c51dcc9c02efe5145e7cc988c1ce342","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    SELECT"},{"line_number":409,"context_line":"        a.id as aggregate_id,"},{"line_number":410,"context_line":"        prov.id as provider_id,"},{"line_number":411,"context_line":"        inv.resource_class_id,"},{"line_number":412,"context_line":"        inv.total as inv_total,"},{"line_number":413,"context_line":"        inv.min_unit as inv_min_unit,"},{"line_number":414,"context_line":"        inv.max_unit as inv_max_unit,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_ebf2d199","line":411,"updated":"2015-11-16 07:33:48.000000000","message":"Note that resource_pools also has a field *resource_class_id*.\n\nWhat if rp.resource_class_id doesn\u0027t match inv.resource_class_id, does that mean bad things happened?\n\nOr rp.resource_class_id is simply unnecessary? None of the methods will query \"class_id\" without accessing inventories.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"50a3c3539c51dcc9c02efe5145e7cc988c1ce342","unresolved":false,"context_lines":[{"line_number":419,"context_line":"    INNER JOIN resource_pools rp"},{"line_number":420,"context_line":"        ON arp.resource_pool_id \u003d rp.id"},{"line_number":421,"context_line":"    INNER JOIN resource_providers prov"},{"line_number":422,"context_line":"        ON rp.resource_provider_id \u003d prov.id"},{"line_number":423,"context_line":"    INNER JOIN inventories inv"},{"line_number":424,"context_line":"        ON prov.id \u003d inv.resource_provider_id"},{"line_number":425,"context_line":"    LEFT JOIN allocations alloc"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_08ee3bb4","line":422,"updated":"2015-11-16 07:33:48.000000000","message":"nit: Table \u0027resource_pool\u0027 does not have the field *resource_provider_id*, it only has *uuid*.(ref: line 73)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":447,"context_line":"more tables in the database to represent resource and inventory information."},{"line_number":448,"context_line":"However, handling quantitative resources of both shared and local classes will"},{"line_number":449,"context_line":"be handled using the exact same code paths. And, long term, this work will"},{"line_number":450,"context_line":"allow a split-out scheduler to actually return claims over resources and free"},{"line_number":451,"context_line":"the resource tracker from a whole lot of work."},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"Implementation"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_10a64b10","line":450,"range":{"start_line":450,"start_character":0,"end_line":450,"end_character":69},"updated":"2015-11-10 16:45:47.000000000","message":"that hasn\u0027t been agreed yet :-)","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"cab70021fc1ac33159acaf172f05449e24f2c9de","unresolved":false,"context_lines":[{"line_number":448,"context_line":"However, handling quantitative resources of both shared and local classes will"},{"line_number":449,"context_line":"be handled using the exact same code paths. And, long term, this work will"},{"line_number":450,"context_line":"allow a split-out scheduler to actually return claims over resources and free"},{"line_number":451,"context_line":"the resource tracker from a whole lot of work."},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"Implementation"},{"line_number":454,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_3951b836","line":451,"updated":"2015-11-11 20:49:05.000000000","message":"I like getting that out of the resource tracker, but instead of moving it to the scheduler, I think the resource objects should be responsible for updating/persisting themselves. But that\u0027s another spec...","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":464,"context_line":"  PaulMurray"},{"line_number":465,"context_line":"  lxsli"},{"line_number":466,"context_line":"  edleafe"},{"line_number":467,"context_line":"  ndipanov"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"Work Items"},{"line_number":470,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_70d47746","line":467,"updated":"2015-11-10 16:45:47.000000000","message":"nit :meh, I don\u0027t see the point of having so much people listed in here. Just keep your name, and we\u0027ll see how to decouple that spec later on.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"89657157cd7025a10b047062c39edcefc63c2bda","unresolved":false,"context_lines":[{"line_number":469,"context_line":"Work Items"},{"line_number":470,"context_line":"----------"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"TODO"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"Dependencies"},{"line_number":475,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da85f559_9056bbd0","line":472,"updated":"2015-11-10 16:45:47.000000000","message":"that\u0027s a very important section IMHO, because it helps reviewers to understand the sequence of tasks.","commit_id":"1603821b953ec9032603a4510c2e84c260aed7ed"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd159c2aaffd50198878b10dae4de8c3e4fa0703","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":76,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":79,"context_line":"        INDEX (resource_provider_id),"},{"line_number":80,"context_line":"        INDEX (resource_class_id)"},{"line_number":81,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba63e191_9dfdef70","line":78,"updated":"2016-01-18 19:05:13.000000000","message":"@cdent: In the compute-node-inventories spec I outline how the default for this field will be set. Basically, there is an allocation ratio for CPU and RAM that already is stored in the compute_nodes table. We would set the default to those values where appropriate and set the disk and other resource class defaults to 1.0.","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f0b18c8a71207016768687a36d3f16ca9d37e1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":76,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":79,"context_line":"        INDEX (resource_provider_id),"},{"line_number":80,"context_line":"        INDEX (resource_class_id)"},{"line_number":81,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa69d971_64d186fb","line":78,"updated":"2015-12-29 19:22:10.000000000","message":"Presumably somewhere in the stack this will need to constrain to have a default of 1?","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"17fb0d8acde2e079a418a8e9acdabf2ef6948901","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":114,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":115,"context_line":"        resource_class_id INT UNSIGNED NOT NULL,"},{"line_number":116,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":117,"context_line":"        INDEX (resource_provider_id, resource_class_id),"},{"line_number":118,"context_line":"        INDEX (consumer_id),"},{"line_number":119,"context_line":"        INDEX (resource_class_id)"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da6ed579_1c36dc03","line":116,"range":{"start_line":116,"start_character":13,"end_line":116,"end_character":16},"updated":"2016-01-12 07:17:59.000000000","message":"What about heterogeneous resources such as NUMA and PCI allocations? Maybe this needs to be explained in the spec.\n\nIMO the heterogeneous resource usage could be serialized by existing Serializer, tagged with class name and version to be stored in this allocations table, as the similar behavior used in RPC calls. In this way, scheduler can extract heterogeneous resources from resource provider directly.","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd159c2aaffd50198878b10dae4de8c3e4fa0703","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    The `consumer_id` field will be the UUID of the entity that is consuming"},{"line_number":128,"context_line":"    this resource. This will always be the Nova instance UUID until some future"},{"line_number":129,"context_line":"    point when the Nova scheduler may be broken out to support more than just"},{"line_number":130,"context_line":"    compute resources."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Alternatives"},{"line_number":133,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba63e191_bd02336e","line":130,"updated":"2016-01-18 19:05:13.000000000","message":"@cdent: Good question. That is answered in the compute-node-allocations spec that I am currently working on.","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f0b18c8a71207016768687a36d3f16ca9d37e1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    The `consumer_id` field will be the UUID of the entity that is consuming"},{"line_number":128,"context_line":"    this resource. This will always be the Nova instance UUID until some future"},{"line_number":129,"context_line":"    point when the Nova scheduler may be broken out to support more than just"},{"line_number":130,"context_line":"    compute resources."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Alternatives"},{"line_number":133,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa69d971_84cefa58","line":130,"updated":"2015-12-29 19:22:10.000000000","message":"Is there an existing plan for how to map consumer_id to other types of consumers (once we get to that world). If not, should we consider that here or am I being YAGNI?","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f0b18c8a71207016768687a36d3f16ca9d37e1","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"A number of data model changes will be needed."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"* New models for:"},{"line_number":148,"context_line":" * `ResourceProvider`"},{"line_number":149,"context_line":" * `InventoryItem`"},{"line_number":150,"context_line":" * `AllocationItem`"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa69d971_24db8e1d","line":147,"updated":"2015-12-29 19:22:10.000000000","message":"rst wants a blank line here","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f0b18c8a71207016768687a36d3f16ca9d37e1","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"* New database tables for all of the above"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Database migrations needed:"},{"line_number":155,"context_line":" * Addition of following tables into the schema:"},{"line_number":156,"context_line":"  * `resource_providers`"},{"line_number":157,"context_line":"  * `inventories`"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa69d971_44d8021e","line":154,"updated":"2015-12-29 19:22:10.000000000","message":"here","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"59f0b18c8a71207016768687a36d3f16ca9d37e1","unresolved":false,"context_lines":[{"line_number":152,"context_line":"* New database tables for all of the above"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Database migrations needed:"},{"line_number":155,"context_line":" * Addition of following tables into the schema:"},{"line_number":156,"context_line":"  * `resource_providers`"},{"line_number":157,"context_line":"  * `inventories`"},{"line_number":158,"context_line":"  * `allocations`"}],"source_content_type":"text/x-rst","patch_set":5,"id":"fa69d971_e4033675","line":155,"updated":"2015-12-29 19:22:10.000000000","message":"and here\n\nBecause it\u0027s fussy like that.","commit_id":"9b0fd687c99a28e5e3f941fc99b2465489fe444f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e420296ffc5ba6a698a0ded6f59c78abf5691f3c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"tables**. The tables will be populated with the work in the follow-up"},{"line_number":55,"context_line":"`compute-node-inventory`, `compute-node-allocations`, and"},{"line_number":56,"context_line":"`generic-resource-pools` blueprints."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"We are going to need a lookup table for the IDs of various resource"},{"line_number":59,"context_line":"providers in the system, too. We\u0027ll call this lookup table"},{"line_number":60,"context_line":"`resource_providers`::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_c785bfad","line":57,"updated":"2016-01-26 16:09:40.000000000","message":"By default, I suspect those tables are stored in the \"regular\" DB. So, I guess it would be an external lookup with the resource classes table, not a regular join ?","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e341cb850735a5a5cdb14644353a6354598d2d88","unresolved":false,"context_lines":[{"line_number":54,"context_line":"tables**. The tables will be populated with the work in the follow-up"},{"line_number":55,"context_line":"`compute-node-inventory`, `compute-node-allocations`, and"},{"line_number":56,"context_line":"`generic-resource-pools` blueprints."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"We are going to need a lookup table for the IDs of various resource"},{"line_number":59,"context_line":"providers in the system, too. We\u0027ll call this lookup table"},{"line_number":60,"context_line":"`resource_providers`::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_cc471f4a","line":57,"in_reply_to":"9a68dd71_c785bfad","updated":"2016-01-26 16:54:59.000000000","message":"Still an open question but can be discussed in the implementation reviews.","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"d551ccd89e9b9d45fc5092e8d0181cdc6b24aed1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":64,"context_line":"        uuid VARCHAR (64) NOT NULL,"},{"line_number":65,"context_line":"        UNIQUE INDEX (uuid)"},{"line_number":66,"context_line":"    );"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"An `inventories` table records the amount of a particular resource that is"},{"line_number":69,"context_line":"provided by a particular resource provider::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_7c483d2e","line":66,"updated":"2016-01-20 14:11:25.000000000","message":"This uuid is \u0027external\u0027 id of the resource provider in the system, yes? It has similar issues to the consumer_id note below. Do we need to be able to pair this up with a resource_class_id to be able to find the actual thing that is using the uuid as its identifier? Or is querying in that direction something we will never need to do?\n\n(I\u0027ve often wanted a grand unified uuid registry for openstack... :) )","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e420296ffc5ba6a698a0ded6f59c78abf5691f3c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":76,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":79,"context_line":"        INDEX (resource_provider_id),"},{"line_number":80,"context_line":"        INDEX (resource_class_id)"},{"line_number":81,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_472f8ff6","line":78,"updated":"2016-01-26 16:09:40.000000000","message":"since it\u0027s not null, you could have some way to express overprovisioning for resources like PCI VFs ?","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f70f204b3625f5db09b880c9ac09e28ff1f5e2ed","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":76,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":79,"context_line":"        INDEX (resource_provider_id),"},{"line_number":80,"context_line":"        INDEX (resource_class_id)"},{"line_number":81,"context_line":"    );"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_4c0d6f36","line":78,"in_reply_to":"9a68dd71_472f8ff6","updated":"2016-01-26 16:54:01.000000000","message":"See below","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e420296ffc5ba6a698a0ded6f59c78abf5691f3c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"particular class of resource that the provider is willing to tolerate. This"},{"line_number":85,"context_line":"information is currently stored only for CPU and RAM in the"},{"line_number":86,"context_line":"`cpu_allocation_ratio` and `ram_allocation_ratio` fields in the `compute_nodes`"},{"line_number":87,"context_line":"table."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"The `min_unit` and `max_unit` fields shall store \"limits\" information for the"},{"line_number":90,"context_line":"type of resource. This information is necessary to ensure that a request for"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_075e7776","line":87,"updated":"2016-01-26 16:09:40.000000000","message":"re: my previous comment, it means that we assume 1.0 being the default for the other resource classes ?","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f70f204b3625f5db09b880c9ac09e28ff1f5e2ed","unresolved":false,"context_lines":[{"line_number":84,"context_line":"particular class of resource that the provider is willing to tolerate. This"},{"line_number":85,"context_line":"information is currently stored only for CPU and RAM in the"},{"line_number":86,"context_line":"`cpu_allocation_ratio` and `ram_allocation_ratio` fields in the `compute_nodes`"},{"line_number":87,"context_line":"table."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"The `min_unit` and `max_unit` fields shall store \"limits\" information for the"},{"line_number":90,"context_line":"type of resource. This information is necessary to ensure that a request for"}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_8c03670d","line":87,"in_reply_to":"9a68dd71_075e7776","updated":"2016-01-26 16:54:01.000000000","message":"That has been addressed in the Nova Midcycle session, we\u0027ll be setting 1.0 for all the other fields.","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"da468ebc6f9faf9731befe39bdc34f0c8dcb998a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        INDEX (resource_provider_id, resource_class_id),"},{"line_number":118,"context_line":"        INDEX (consumer_id),"},{"line_number":119,"context_line":"        INDEX (resource_class_id)"},{"line_number":120,"context_line":"    );"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":123,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":6,"id":"9a68dd71_2c3a7be8","line":120,"updated":"2016-01-27 09:09:46.000000000","message":"Still not sure if this is good enough to avoid NUMA races.","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"680e0f6ac50396b5670fa594ca9472adc3cc57ba","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        INDEX (resource_provider_id, resource_class_id),"},{"line_number":118,"context_line":"        INDEX (consumer_id),"},{"line_number":119,"context_line":"        INDEX (resource_class_id)"},{"line_number":120,"context_line":"    );"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"When a consumer of a particular resource claims resources from a provider,"},{"line_number":123,"context_line":"a record is inserted into to the `allocations` table."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a5de9d1_e6beded3","line":120,"in_reply_to":"9a68dd71_2c3a7be8","updated":"2016-01-27 09:35:26.000000000","message":"OK, so I get this now, I am cool with the plan here.","commit_id":"2788d1d42a18cee6ac0f0c3abd4395d3ee809783"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8863ebb40bed1ca57c89ffbfa1f6659e994df7b2","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        total INT UNSIGNED NOT NULL,"},{"line_number":76,"context_line":"        reserved INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":79,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":80,"context_line":"        INDEX (resource_provider_id),"},{"line_number":81,"context_line":"        INDEX (resource_class_id)"}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a5de9d1_5541610a","line":78,"updated":"2016-01-28 09:51:49.000000000","message":"I think we should have a step amount here, to limit people from asking for 65MB if the minimum increment is 64MB. Similar for disk -- letting them choose some uneven number of megabytes of disk could become a fragmentation problem.","commit_id":"6c6c7dbd506aea862554539fe95a8cf76a453d48"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"964d5b234ce56f45db9750844f1fc12c6adf55f4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        reserved INT UNSIGNED NOT NULL,"},{"line_number":77,"context_line":"        min_unit INT UNSIGNED NOT NULL,"},{"line_number":78,"context_line":"        max_unit INT UNSIGNED NOT NULL,"},{"line_number":79,"context_line":"        step_unit INT UNSIGNED NOT NULL,"},{"line_number":80,"context_line":"        allocation_ratio FLOAT NOT NULL,"},{"line_number":81,"context_line":"        INDEX (resource_provider_id),"},{"line_number":82,"context_line":"        INDEX (resource_class_id)"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a5de9d1_0ebbd3e6","line":79,"updated":"2016-01-28 11:38:06.000000000","message":"Presumably a value of \u00271\u0027 means \"I don\u0027t care\".","commit_id":"a185c021df929aa709e5c8bb7011db4129c51522"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"964d5b234ce56f45db9750844f1fc12c6adf55f4","unresolved":false,"context_lines":[{"line_number":121,"context_line":"to ensure that a user can only request disk resources in 10G increments, with"},{"line_number":122,"context_line":"nothing less than 5G and nothing more than 1TB. For the `DISK_GB` resource"},{"line_number":123,"context_line":"class, the operator would set the inventory of the shared storage pool to a"},{"line_number":124,"context_line":"`min_unit` of 5, a `max_unit` of 1000, and a `step_size` of 10."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"In order to track resources that have been assigned and used by some consumer"},{"line_number":127,"context_line":"of that resource, we need an `allocations` table. Records in this table"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a5de9d1_ce829b00","line":124,"updated":"2016-01-28 11:38:06.000000000","message":"I guess my comment above could go here.","commit_id":"a185c021df929aa709e5c8bb7011db4129c51522"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f358662581738f9dff55bbd9958a1dad21a23f70","unresolved":false,"context_lines":[{"line_number":121,"context_line":"to ensure that a user can only request disk resources in 10G increments, with"},{"line_number":122,"context_line":"nothing less than 5G and nothing more than 1TB. For the `DISK_GB` resource"},{"line_number":123,"context_line":"class, the operator would set the inventory of the shared storage pool to a"},{"line_number":124,"context_line":"`min_unit` of 5, a `max_unit` of 1000, and a `step_size` of 10."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"In order to track resources that have been assigned and used by some consumer"},{"line_number":127,"context_line":"of that resource, we need an `allocations` table. Records in this table"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a5de9d1_f13e5ad9","line":124,"updated":"2016-01-28 12:03:28.000000000","message":"from irc: alaski: my understanding of min_unit is that it is the least you can take, max_unit is the most and step_size is unrelated: it is simply that request_size % step_size must equal 0","commit_id":"a185c021df929aa709e5c8bb7011db4129c51522"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"da423487a05640cd5967892eb5d806b2341fe9e2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"to ensure that a user can only request disk resources in 10G increments, with"},{"line_number":122,"context_line":"nothing less than 5G and nothing more than 1TB. For the `DISK_GB` resource"},{"line_number":123,"context_line":"class, the operator would set the inventory of the shared storage pool to a"},{"line_number":124,"context_line":"`min_unit` of 5, a `max_unit` of 1000, and a `step_size` of 10."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"In order to track resources that have been assigned and used by some consumer"},{"line_number":127,"context_line":"of that resource, we need an `allocations` table. Records in this table"}],"source_content_type":"text/x-rst","patch_set":8,"id":"7a5de9d1_d1ab1e88","line":124,"in_reply_to":"7a5de9d1_ce829b00","updated":"2016-01-28 11:57:11.000000000","message":"The implication here is that the steps are \"min_unit + n * step_size\". Is that the intention?  I\u0027m looking at this example and either min_unit or max_unit can\u0027t be used because the step_size limits min/max to 10/1000 or to 5/995.  Or I\u0027m completely misunderstanding.","commit_id":"a185c021df929aa709e5c8bb7011db4129c51522"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a65d7286f3be0bc3544805d2ee9f2cd78268f2b5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    CREATE TABLE allocations ("},{"line_number":141,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":142,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":144,"context_line":"        resource_class_id INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (resource_provider_id, resource_class_id),"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7a5de9d1_551633a8","line":143,"updated":"2016-01-28 13:57:16.000000000","message":"There was some in-midcycle discussion about the challenge this causes when consumer_id is not an instance uuid.  In an audit situation where it\u0027s necessary to reconcile actual consumption with reported consumption it will be much more difficult to do if the resource in consumer_id can\u0027t easily be mapped back to an instance.  This is a concern if the consumer_id is a port because it\u0027s not easy to map the port back to an instance without getting that info from Neutron.\n\nIt\u0027s not a blocker to this work but it is an expressed concern and should be kept in mind as this effort moves forward.","commit_id":"858f8272f62fd8f3d96fbe44552382f25d20689c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"254e84fbab3ad6c226093788bec968ffc2ee2b48","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    CREATE TABLE allocations ("},{"line_number":141,"context_line":"        id INT UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY,"},{"line_number":142,"context_line":"        resource_provider_id INT UNSIGNED NOT NULL,"},{"line_number":143,"context_line":"        consumer_id VARCHAR(64) NOT NULL,"},{"line_number":144,"context_line":"        resource_class_id INT UNSIGNED NOT NULL,"},{"line_number":145,"context_line":"        used INT UNSIGNED NOT NULL,"},{"line_number":146,"context_line":"        INDEX (resource_provider_id, resource_class_id),"}],"source_content_type":"text/x-rst","patch_set":10,"id":"7a5de9d1_984aa2ab","line":143,"in_reply_to":"7a5de9d1_551633a8","updated":"2016-01-28 14:13:16.000000000","message":"+1\n\nI have a feeling we need this for the audit, but I don\u0027t want to block on that.","commit_id":"858f8272f62fd8f3d96fbe44552382f25d20689c"}]}
