)]}'
{"specs/liberty/approved/resource-objects.rst":[{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e38188b84b54a0ee653995c83d3ccf44d6397053","unresolved":false,"context_lines":[{"line_number":168,"context_line":"- A set of classes that represent amounts of different types of"},{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_f91ba67e","line":171,"updated":"2015-06-08 14:12:47.000000000","message":"I don\u0027t see the difference between concrete amounts EG as listed by a hypervisor and a usage. The real difference seems to be between an amount/usage and a request, because a request is specified in abstract terms (N CPUs, not CPUs X+Y).","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4d7275193d01d4a31ee294b0f193e88a3f0484f1","unresolved":false,"context_lines":[{"line_number":168,"context_line":"- A set of classes that represent amounts of different types of"},{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_cb05a27a","line":171,"in_reply_to":"3afb71cf_2436aee6","updated":"2015-06-08 19:33:00.000000000","message":"The name \u0027usage\u0027 represents the available resources (i.e., total - used), while standard English would suggest that it is just the \"used up\" part. Perhaps a better word would be \u0027inventory\u0027?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"5b82f6680e102437b157cf422e029a1f624bb9bb","unresolved":false,"context_lines":[{"line_number":168,"context_line":"- A set of classes that represent amounts of different types of"},{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_9ce672e6","line":171,"in_reply_to":"3afb71cf_cb05a27a","updated":"2015-06-10 15:39:15.000000000","message":"+1 to inventory (after discussion)","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"d6455c2003ac84c286cb4a247ef6e206192095e9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"- A set of classes that represent amounts of different types of"},{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_2436aee6","line":171,"in_reply_to":"3afb71cf_f91ba67e","updated":"2015-06-08 16:26:21.000000000","message":"I agree that there seems to be little difference between \"amount of resource\" and \"usage of resource\".  If they were the same class then it would be simple to add/subtract \"usage\".","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e38188b84b54a0ee653995c83d3ccf44d6397053","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"},{"line_number":175,"context_line":"classes, and will enable Nova evolve, in a versioned manner, the way that it"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_544cbf6f","line":172,"updated":"2015-06-08 14:12:47.000000000","message":"What operations do these resource types offer? Do you have some examples of resource types please?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4d7275193d01d4a31ee294b0f193e88a3f0484f1","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"},{"line_number":175,"context_line":"classes, and will enable Nova evolve, in a versioned manner, the way that it"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_4b041249","line":172,"in_reply_to":"3afb71cf_4493eaa3","updated":"2015-06-08 19:33:00.000000000","message":"Examples:\n  VPS-type compute\n  Ironic nodes\n  PCI devices\n\nThese ResourceType classes would all have their own combination of various Amounts, and ways to define if a particular request can be satisfied.","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"5b82f6680e102437b157cf422e029a1f624bb9bb","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"},{"line_number":175,"context_line":"classes, and will enable Nova evolve, in a versioned manner, the way that it"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_1cade287","line":172,"in_reply_to":"3afb71cf_4b041249","updated":"2015-06-10 15:39:15.000000000","message":"From talking to Jay yesterday, I think he means simple resources here. He seems to be using resource and resource type synonymously. So a resource is EG RAM or VCPUs.","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"d6455c2003ac84c286cb4a247ef6e206192095e9","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  resources"},{"line_number":170,"context_line":"- A set of classes that represent usage of different types of"},{"line_number":171,"context_line":"  resources"},{"line_number":172,"context_line":"- A set of classes that represent different types of resources"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"These amount, usage, and resource type classes will be `nova.objects` object"},{"line_number":175,"context_line":"classes, and will enable Nova evolve, in a versioned manner, the way that it"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_4493eaa3","line":172,"in_reply_to":"3afb71cf_544cbf6f","updated":"2015-06-08 16:26:21.000000000","message":"Also a good question.  What would a \"resource\" classe provide that the \"resource amounts/usage\" class doesn\u0027t?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"21d005b53fe8a2c841e596f0adcf3e51d0691e17","unresolved":false,"context_lines":[{"line_number":190,"context_line":"A new conductor RPC API method `update_compute_node_resource_usages` method"},{"line_number":191,"context_line":"will be added that gets a `nova.objects.ComputeNode` object and a"},{"line_number":192,"context_line":"`nova.objects.ResourceUsageCollection` object and updates the compute node"},{"line_number":193,"context_line":"database record with the resource usage amounts/data coming from the resource"},{"line_number":194,"context_line":"tracker."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"Note that we do NOT propose any changes at this time to the database schema"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a016987_3d89d175","line":193,"updated":"2015-05-21 06:41:19.000000000","message":"Would this make more sense as a remotable object method on the nova.objects.ComputeNode object?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b1bfb925680948f83ec38837477dab31d4b0101a","unresolved":false,"context_lines":[{"line_number":190,"context_line":"A new conductor RPC API method `update_compute_node_resource_usages` method"},{"line_number":191,"context_line":"will be added that gets a `nova.objects.ComputeNode` object and a"},{"line_number":192,"context_line":"`nova.objects.ResourceUsageCollection` object and updates the compute node"},{"line_number":193,"context_line":"database record with the resource usage amounts/data coming from the resource"},{"line_number":194,"context_line":"tracker."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"Note that we do NOT propose any changes at this time to the database schema"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a016987_b44153ab","line":193,"in_reply_to":"7a016987_3d89d175","updated":"2015-05-21 14:26:25.000000000","message":"Yes, it does. This spec was written before we did the cleanups in the resource tracker around compute node objects. I will update. Thanks for the heads-up!","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"5b82f6680e102437b157cf422e029a1f624bb9bb","unresolved":false,"context_lines":[{"line_number":190,"context_line":"A new conductor RPC API method `update_compute_node_resource_usages` method"},{"line_number":191,"context_line":"will be added that gets a `nova.objects.ComputeNode` object and a"},{"line_number":192,"context_line":"`nova.objects.ResourceUsageCollection` object and updates the compute node"},{"line_number":193,"context_line":"database record with the resource usage amounts/data coming from the resource"},{"line_number":194,"context_line":"tracker."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"Note that we do NOT propose any changes at this time to the database schema"}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_3114404b","line":193,"in_reply_to":"7a016987_b44153ab","updated":"2015-06-10 15:39:15.000000000","message":"Looks like this will become simply compute_node.save()","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"308d65d9ed0e51b62b068f5f8a6b93f88522c96b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        raise NotImplementedError"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def has_room_for(self, amount_spec):"},{"line_number":273,"context_line":"        \"\"\"Determine if there is room to fit the supplied amount of resources."},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        :param amount_spec: `AmountSpec` to determine if there is room for."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_1050905c","line":272,"updated":"2015-06-08 15:23:43.000000000","message":"Seems pretty weird for a Usage to have_room_for something. Isn\u0027t that more like a resource pool?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4d7275193d01d4a31ee294b0f193e88a3f0484f1","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        raise NotImplementedError"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def has_room_for(self, amount_spec):"},{"line_number":273,"context_line":"        \"\"\"Determine if there is room to fit the supplied amount of resources."},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        :param amount_spec: `AmountSpec` to determine if there is room for."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_eb54de21","line":272,"in_reply_to":"3afb71cf_04bbb20f","updated":"2015-06-08 19:33:00.000000000","message":"You\u0027re misreading the names, because of the confusing terminology. Substitute \u0027inventory\u0027 for \u0027usage\u0027 and it makes a lot more sense.\n\nThe constraint question would be satisfied by having different Amount classes, and the request would reflect that.","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"d6455c2003ac84c286cb4a247ef6e206192095e9","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        raise NotImplementedError"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def has_room_for(self, amount_spec):"},{"line_number":273,"context_line":"        \"\"\"Determine if there is room to fit the supplied amount of resources."},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        :param amount_spec: `AmountSpec` to determine if there is room for."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_04bbb20f","line":272,"in_reply_to":"3afb71cf_1050905c","updated":"2015-06-08 16:26:21.000000000","message":"Yeah, seems like it would make more sense to ask whether the host resource \"has room for\" the desired usage.\n\nHow would we handle constraints on the resource?  (Like I want to allocate three host CPUs, but they have to be whole cores, not SMT threads.)  Would that be part of the amount_spec, or should we have another parameter?","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"d2c0557570bbc4f1b5b80eb53882ceaf721963ff","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\""},{"line_number":270,"context_line":"        raise NotImplementedError"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def has_room_for(self, amount_spec):"},{"line_number":273,"context_line":"        \"\"\"Determine if there is room to fit the supplied amount of resources."},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        :param amount_spec: `AmountSpec` to determine if there is room for."}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_42b870e5","line":272,"in_reply_to":"3afb71cf_eb54de21","updated":"2015-06-08 20:52:38.000000000","message":"Actually, the more that I think about this, the more I think that your confusion is well-founded. \"Usage\" is confusing, and should probably be named something else.\n\nEven the first line of the docstring for the UsageSpec class in https://review.openstack.org/#/c/128992/6/nova/objects/resources.py,cm L125 shows the potential for confusion: \"Represents the capacity and used amount of a resource\", which sort of implies that there should be a CapacitySpec to go along with the UsageSpec. It would be simpler to rename all of these \u0027usage*\u0027 things to be something clearer. I suggest \u0027inventory\u0027, but that\u0027s far from the only possibility.","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"21d005b53fe8a2c841e596f0adcf3e51d0691e17","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":" for resource_type, amount in request_spec.resources.items():"},{"line_number":293,"context_line":"    if compute_node.usages[resource_type].has_room_for(amount):"},{"line_number":294,"context_line":"        # do something... perhaps claim resources on the compute"},{"line_number":295,"context_line":"        # node, which might eventually call:"},{"line_number":296,"context_line":"        compute_node.usages[resource_type].update(amount)"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a016987_5dd24d5d","line":294,"updated":"2015-05-21 06:41:19.000000000","message":"it seems like either we\u0027d want to loop through and call has_room_for() on all the resources before claiming any of them, or else we should just try to claim all the resources and rollback if we can\u0027t get all of them.","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b1bfb925680948f83ec38837477dab31d4b0101a","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":" for resource_type, amount in request_spec.resources.items():"},{"line_number":293,"context_line":"    if compute_node.usages[resource_type].has_room_for(amount):"},{"line_number":294,"context_line":"        # do something... perhaps claim resources on the compute"},{"line_number":295,"context_line":"        # node, which might eventually call:"},{"line_number":296,"context_line":"        compute_node.usages[resource_type].update(amount)"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"7a016987_741e3bbc","line":294,"in_reply_to":"7a016987_5dd24d5d","updated":"2015-05-21 14:26:25.000000000","message":"Yes, I agree with you, however at the moment, it\u0027s the resource tracker that performs the actual Claim object construction, under a coarse-grained semaphore lock. This example code here would be running in the scheduler, which doesn\u0027t have the ability to create a Claim object. That said, I once proposed moving Claim object construction into the scheduler, which is what the comment above is referring to :)","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"5b82f6680e102437b157cf422e029a1f624bb9bb","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":" for resource_type, amount in request_spec.resources.items():"},{"line_number":293,"context_line":"    if compute_node.usages[resource_type].has_room_for(amount):"},{"line_number":294,"context_line":"        # do something... perhaps claim resources on the compute"},{"line_number":295,"context_line":"        # node, which might eventually call:"},{"line_number":296,"context_line":"        compute_node.usages[resource_type].update(amount)"},{"line_number":297,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"3afb71cf_742ce698","line":294,"in_reply_to":"7a016987_741e3bbc","updated":"2015-06-10 15:39:15.000000000","message":"I suggest update should call has_room_for and raise if it fails","commit_id":"de5aa27aec369109293f4375a9047912ee0705a6"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2d9a315016be2a385d88966e926c4171e81a8411","unresolved":false,"context_lines":[{"line_number":19,"context_line":"In Nova, we have a very loose way of modeling the resources that are"},{"line_number":20,"context_line":"consumed by virtual machine instances and provided by compute nodes."},{"line_number":21,"context_line":"The Flavor object has a number of static fields that correspond to amounts"},{"line_number":22,"context_line":"of simple resources like CPU, RAM and local disk. We use dictionaries"},{"line_number":23,"context_line":"of key/value pairs and JSON-serialized BLOBs of data to model other types"},{"line_number":24,"context_line":"of resources, like PCIe devices or NUMA cell layouts."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa32b979_5327ff63","line":22,"updated":"2015-06-16 13:26:39.000000000","message":"What did you do to the Oxford commas in this spec?!?  :)","commit_id":"0099bd4e974ab1fc549baa73f865fe86661cbe74"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"bb25888b4a65192a579dc431ed71077a8f3e4c7e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"resources that are consumed on the node. The `ResourceTracker.old_resources`"},{"line_number":28,"context_line":"attribute is a dictionary containing a clutter of nested dictionaries. Some of"},{"line_number":29,"context_line":"these nested dictionaries include the \u0027stats\u0027 dict for the extensible resource"},{"line_number":30,"context_line":"tracker; various \u0027pci_devices\u0027, \u0027pci_stats\u0027 and \u0027pci_passthrough_devices\u0027"},{"line_number":31,"context_line":"things; a \u0027numa_topology\u0027 blob that stores a JSON-serialized representation of"},{"line_number":32,"context_line":"an object in `nova.virt.hardware` and a \u0027metrics\u0027 dictionary with completely"},{"line_number":33,"context_line":"unstructured and undocumented key/value pairs. In addition to these, the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa32b979_ac5a0c4f","line":30,"updated":"2015-06-19 12:00:25.000000000","message":"FWIW, the \u0027stats\u0027 dict is not only used for the ERT, Ironic uses it intensively.","commit_id":"0099bd4e974ab1fc549baa73f865fe86661cbe74"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"bb25888b4a65192a579dc431ed71077a8f3e4c7e","unresolved":false,"context_lines":[{"line_number":397,"context_line":"- `detach-service-from-computenode`"},{"line_number":398,"context_line":"- `resource-objects` \u003c-- this blueprint"},{"line_number":399,"context_line":"- `request-spec-object`"},{"line_number":400,"context_line":"- `sched-select-destinations-use-request-spec-object`"},{"line_number":401,"context_line":"- `placement-spec-object`"},{"line_number":402,"context_line":"- `condition-objects`"},{"line_number":403,"context_line":"- `sched-placement-spec-use-resource-objects`"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa32b979_ff4bd85d","line":400,"updated":"2015-06-19 12:00:25.000000000","message":"note: this spec has been abandoned in favor of a global request-spec-object BP","commit_id":"0099bd4e974ab1fc549baa73f865fe86661cbe74"}]}
