)]}'
{"specs/mitaka/approved/shared-resource-handling.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7c21e0877808ed56089b43b5f4ad650eca3a738","unresolved":false,"context_lines":[{"line_number":37,"context_line":"with a very complex set of changes and data relationships. The problem we"},{"line_number":38,"context_line":"originally set out to solve is that hosts that share a resource don\u0027t know when"},{"line_number":39,"context_line":"their shared resource changes, and so will continue to report an incorrect"},{"line_number":40,"context_line":"amount until their next periodic call to update_available_resource()."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_662aaf80","line":40,"updated":"2015-11-09 21:27:34.000000000","message":"Well, no, the problem was that the reporting was inaccurate because all compute nodes report the same usage, which makes the reporting (actual usage X num compute nodes).","commit_id":"ced96e5335c8fbe530dabe2b1afe76ef3ca086e9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7c21e0877808ed56089b43b5f4ad650eca3a738","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"We would then add a metadata key to that aggregate to mark it as a"},{"line_number":63,"context_line":"shared-resource aggregate. We can bikeshed the key name, but for now let\u0027s just"},{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_067de36d","line":64,"updated":"2015-11-09 21:27:34.000000000","message":"As mentioned in the resource-providers spec, this implementation of course would not support generic resource pools nor would it support more than one resource pool usable by a compute node.","commit_id":"ced96e5335c8fbe530dabe2b1afe76ef3ca086e9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7c21e0877808ed56089b43b5f4ad650eca3a738","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_c67d9b1d","line":68,"updated":"2015-11-09 21:27:34.000000000","message":"Hmm, I\u0027m not sure having the scheduler calculate all hosts sharing a resource pool on every call to select_destinations() is a scalable proposal... did you really mean that compute nodes would talk to each other and not the scheduler talking to compute nodes?","commit_id":"ced96e5335c8fbe530dabe2b1afe76ef3ca086e9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7c21e0877808ed56089b43b5f4ad650eca3a738","unresolved":false,"context_lines":[{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_a6ff37a9","line":69,"updated":"2015-11-09 21:27:34.000000000","message":"But the scheduler doesn\u0027t currently do calculation of available resources. The resource tracker on the compute node does that by setting the local_gb_used value during the update_available_resource() method and saving the compute node object to the database. The scheduler simply reads this information -- and this information is what is incorrect, because the compute node (and the virt driver itself) has no knowledge that the local disk is not local but rather shared.\n\nThe scheduler really doesn\u0027t have a whole lot to do with the resource reporting problem, actually.","commit_id":"ced96e5335c8fbe530dabe2b1afe76ef3ca086e9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c7c21e0877808ed56089b43b5f4ad650eca3a738","unresolved":false,"context_lines":[{"line_number":109,"context_line":"Performance Impact"},{"line_number":110,"context_line":"------------------"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"There will be a small cost to the scheduler calling the db\u0027s aggregate_get_by_host() method on each call to see if there are other hosts that share a resource with the selected one. In the case where hosts do share resources, there will also be a cost for messaging other hosts in the shared resource aggregate to have them update themselves."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Other deployer impact"},{"line_number":115,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da85f559_a645f7b3","line":112,"updated":"2015-11-09 21:27:34.000000000","message":"Actually, the scheduler *already* calls AggregateList.get_all() on each call to select_destinations(), so there\u0027s no additional cost on that one. :)\n\nHowever, if we take your proposal from the paragraph above, there would be a big performance impact from having the scheduler call out to all the compute hosts sharing a storage pool each time select_destinations() was called. Which is why I kind of think that\u0027s not what you intended...","commit_id":"ced96e5335c8fbe530dabe2b1afe76ef3ca086e9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":37,"context_line":"with a very complex set of changes and data relationships. The problem we"},{"line_number":38,"context_line":"originally set out to solve is that hosts that share a resource don\u0027t know when"},{"line_number":39,"context_line":"their shared resource changes, and so will continue to report an incorrect"},{"line_number":40,"context_line":"amount until their next periodic call to update_available_resource()."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_a145e1b3","line":40,"updated":"2015-11-09 21:35:38.000000000","message":"Well, no, the problem was that the reporting was inaccurate because all compute nodes report the same usage, which makes the reporting (actual usage X num compute nodes).","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf30e6cb1ffbb9a02bb627377e7cb063f34163f8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"with a very complex set of changes and data relationships. The problem we"},{"line_number":38,"context_line":"originally set out to solve is that hosts that share a resource don\u0027t know when"},{"line_number":39,"context_line":"their shared resource changes, and so will continue to report an incorrect"},{"line_number":40,"context_line":"amount until their next periodic call to update_available_resource()."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_cd1b3c72","line":40,"in_reply_to":"da85f559_172aef2c","updated":"2015-11-10 21:27:41.000000000","message":"The problem I am trying to solve is the os-simple-tenant-usage API extension which sums all the local_gb_used and local_gb values in all compute nodes and reports an inaccurate value for both total and used disk.\n\nI understand that there is the separate problem of the shared resource only being updated in the compute_nodes table on each periodic call to the RT\u0027s update_available_resource(), but I don\u0027t feel it\u0027s as big of a problem since a) the system \"fixes\" itself every interval and b) the problem would only manifest itself in pack-first deployments that had extreme rates of instance launches. If that is the problem you are trying to solve with this solution, then I\u0027m afraid the solution of notifying from the scheduler all compute hosts sharing a resource pool whenever anything consumes from that pool is not going to perform well anyway.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":37,"context_line":"with a very complex set of changes and data relationships. The problem we"},{"line_number":38,"context_line":"originally set out to solve is that hosts that share a resource don\u0027t know when"},{"line_number":39,"context_line":"their shared resource changes, and so will continue to report an incorrect"},{"line_number":40,"context_line":"amount until their next periodic call to update_available_resource()."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_172aef2c","line":40,"in_reply_to":"da85f559_a145e1b3","updated":"2015-11-09 22:25:44.000000000","message":"But that would never affect a scheduling request, would it? Each host says \"I have N GB available\", and that\u0027s true for the request. The problem comes when the next request still thinks that the other nodes that share the resource still have the previous amount.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Imagine that the Nova deployment had a collection of compute nodes that"},{"line_number":54,"context_line":"did *not* provide instances with any local disk, and instead used a shared"},{"line_number":55,"context_line":"storage pool for housing the instance\u0027s ephemeral disks."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"We would first create a host aggregate that contained all such compute"},{"line_number":58,"context_line":"nodes::"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_211011a8","line":55,"updated":"2015-11-09 21:35:38.000000000","message":"As mentioned in the resource-providers spec, this implementation of course would not support generic resource pools nor would it support more than one resource pool usable by a compute node.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"We would then add a metadata key to that aggregate to mark it as a"},{"line_number":63,"context_line":"shared-resource aggregate. We can bikeshed the key name, but for now let\u0027s just"},{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_61f29971","line":64,"updated":"2015-11-09 21:35:38.000000000","message":"What would the shared_resource value look like? Would it be the total amount of capacity of the shared disk?","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"We would then add a metadata key to that aggregate to mark it as a"},{"line_number":63,"context_line":"shared-resource aggregate. We can bikeshed the key name, but for now let\u0027s just"},{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_578cf734","line":64,"in_reply_to":"da85f559_61f29971","updated":"2015-11-09 22:25:44.000000000","message":"I was thinking it would be something like \"disk\" or \"ram\", i.e., the resource type. The point is that the value isn\u0027t important; it\u0027s that it serves to flag a host as part of a shared resource aggregate, and ties nicely with the existing db method aggregate_get_by_host(context, host, key\u003dNone). We can then get the other hosts in the aggregate to notify them of the shared resource change.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_417af5f2","line":68,"updated":"2015-11-09 21:35:38.000000000","message":"Hmm, I\u0027m not sure having the scheduler calculate all hosts sharing a resource pool on every call to select_destinations() is a scalable proposal... did you really mean that compute nodes would talk to each other and not the scheduler talking to compute nodes?","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf30e6cb1ffbb9a02bb627377e7cb063f34163f8","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_2d68c8b8","line":68,"in_reply_to":"da85f559_37b7f3d9","updated":"2015-11-10 21:27:41.000000000","message":"Right, but if all hosts are in an aggregate because they all shared the same shared disk storage for ephemerals, then in effect you have the scheduler contacting all compute nodes on every request to launch an instance that has any amount of local disk.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_37b7f3d9","line":68,"in_reply_to":"da85f559_417af5f2","updated":"2015-11-09 22:25:44.000000000","message":"It would only check the selected host, not all hosts. If it isn\u0027t part of such an aggregate, nothing happens differently than it does now. If it is, the other hosts in the aggregate are notified.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_c16ee52e","line":69,"updated":"2015-11-09 21:35:38.000000000","message":"But the scheduler doesn\u0027t currently do calculation of available resources. The resource tracker on the compute node does that by setting the local_gb_used value during the update_available_resource() method and saving the compute node object to the database. The scheduler simply reads this information -- and this information is what is incorrect, because the compute node (and the virt driver itself) has no knowledge that the local disk is not local but rather shared.\n\nThe scheduler really doesn\u0027t have a whole lot to do with the resource reporting problem, actually.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_1702ef6f","line":69,"in_reply_to":"da85f559_c16ee52e","updated":"2015-11-09 22:25:44.000000000","message":"No, the scheduler isn\u0027t telling the hosts how much stuff they have, it\u0027s telling them that one of their resources has changed, and letting the host determine its current availability as it does now. This just removes the wait for the periodic update by the hosts.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"},{"line_number":73,"context_line":"the scheduler handles all resource claiming directly."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_6135b9f5","line":73,"updated":"2015-11-09 21:35:38.000000000","message":"I don\u0027t see anywhere where you are changing *what* gets stored in compute_nodes.local_gb_used nor *how* the total amount of disk available is reported (i.e. the os-simple-tenant-usage API extension)\n\nhttp://developer.openstack.org/api-ref-compute-v2-ext.html#ListUsage","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"},{"line_number":73,"context_line":"the scheduler handles all resource claiming directly."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_b778c3c5","line":73,"in_reply_to":"da85f559_6135b9f5","updated":"2015-11-09 22:25:44.000000000","message":"OK, let me explain differently: the compute node (via the RT) queries its driver for the current available resources. So a host with a shared 100GB storage would think it has 100GB available to itself. Then another host on the same shared resource uses 20GB. Until it runs update_available_resource() again, the first host still thinks it has 100GB, which is incorrect. When update_available_resource() runs, it will now see that it only has 80GB available, and will update that in the compute_node object. That\u0027s the current state of affairs.\n\nWhat I am proposing is telling all affected hosts to run update_available_resource() now (when a shared resource changes), instead of waiting for the periodic task to run. This way the time that the host is reporting an incorrect amount is kept to a minimum.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cf30e6cb1ffbb9a02bb627377e7cb063f34163f8","unresolved":false,"context_lines":[{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"},{"line_number":73,"context_line":"the scheduler handles all resource claiming directly."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_4d242c5f","line":73,"in_reply_to":"da85f559_b778c3c5","updated":"2015-11-10 21:27:41.000000000","message":"OK, I understand you better now. As mentioned above, I don\u0027t believe this problem will be effectively solved by this solution.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aff50832e4d8096261a24e43b9b7c3a7b2cc5056","unresolved":false,"context_lines":[{"line_number":113,"context_line":"aggregate_get_by_host() method on each call to see if there are other hosts"},{"line_number":114,"context_line":"that share a resource with the selected one. In the case where hosts do share"},{"line_number":115,"context_line":"resources, there will also be a cost for messaging other hosts in the shared"},{"line_number":116,"context_line":"resource aggregate to have them update themselves."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Other deployer impact"},{"line_number":119,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_215ed176","line":116,"updated":"2015-11-09 21:35:38.000000000","message":"Actually, the scheduler *already* calls AggregateList.get_all() on each call to select_destinations(), so there\u0027s no additional cost on that one. :)\n\nHowever, if we take your proposal from the paragraph above, there would be a big performance impact from having the scheduler call out to all the compute hosts sharing a storage pool each time select_destinations() was called. Which is why I kind of think that\u0027s not what you intended...","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5a53421e44ce1422f9bbb821ff61d1a6b627fa87","unresolved":false,"context_lines":[{"line_number":113,"context_line":"aggregate_get_by_host() method on each call to see if there are other hosts"},{"line_number":114,"context_line":"that share a resource with the selected one. In the case where hosts do share"},{"line_number":115,"context_line":"resources, there will also be a cost for messaging other hosts in the shared"},{"line_number":116,"context_line":"resource aggregate to have them update themselves."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"Other deployer impact"},{"line_number":119,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"da85f559_f73babe9","line":116,"in_reply_to":"da85f559_215ed176","updated":"2015-11-09 22:25:44.000000000","message":"The additional call would only happen if the host selected is part of an aggregate for shared resources. Otherwise, no change from the current behavior.","commit_id":"46f0fb6fe132192ecac4ae8672ad144996543a7e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":36,"context_line":"also implements the direct claiming of resources by the scheduler, and does so"},{"line_number":37,"context_line":"with a very complex set of changes and data relationships. The problem we"},{"line_number":38,"context_line":"originally set out to solve is that hosts that share a resource don\u0027t know when"},{"line_number":39,"context_line":"their shared resource changes, and so will continue to report an incorrect"},{"line_number":40,"context_line":"amount until their next periodic call to update_available_resource()."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_0b48755a","line":40,"range":{"start_line":39,"start_character":35,"end_line":40,"end_character":37},"updated":"2015-11-10 09:25:21.000000000","message":"I don\u0027t feel that having periodic runs for updating stats is a problem because that\u0027s just a matter of having an optimistic scheduler able to quickly provide a decision even if it sometimes needs retries.\n\nLike Jay said, the main problem is related to the reporting where the list of resources usage is related to only one compute node","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    nova host-aggregate-create ..."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"We would then add a metadata key to that aggregate to mark it as a"},{"line_number":63,"context_line":"shared-resource aggregate. We can bikeshed the key name, but for now let\u0027s just"},{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_cb782d92","line":62,"range":{"start_line":62,"start_character":14,"end_line":62,"end_character":50},"updated":"2015-11-10 09:25:21.000000000","message":"so I\u0027m not really cool with that because adding a metadata key is really a deployment choice mostly used either for having a aggregated value (like ratios) or for segregating your cloud.\n\nHere, the semantics is a bit different and could confuse the deployer. It should rather be a new API I guess, like we have for Server Groups","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"We would then add a metadata key to that aggregate to mark it as a"},{"line_number":63,"context_line":"shared-resource aggregate. We can bikeshed the key name, but for now let\u0027s just"},{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_2b6a19b4","line":64,"range":{"start_line":64,"start_character":11,"end_line":64,"end_character":26},"updated":"2015-11-10 09:25:21.000000000","message":"nit: since a compute node has many resources, only saying \u0027shared_resource\u0027 is not enough IMHO.","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":64,"context_line":"called it \"shared_resource\"."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"When the scheduler selects a host, it checks to see if it is part of a host"},{"line_number":67,"context_line":"aggregate that has the \"shared_resource\" metadata key, and if so, sends a"},{"line_number":68,"context_line":"message to the other hosts to re-calculate their available resources by the"},{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_0bb6353d","line":68,"range":{"start_line":67,"start_character":59,"end_line":68,"end_character":26},"updated":"2015-11-10 09:25:21.000000000","message":"I\u0027m very against having a scheduler notifying compute nodes to recalculate their resources because there are many problems with that:\n\n- it\u0027s a design problem where possibly the compute RPC API could be called by something else but the conductor\n- it could have some race conditions (the ones that I hate, not the ones creating retries) where two schedulers could notify the same compute node with contradictory values (like \"eh, this is the right amount\" \"no, *this* is the right amount\")\n- the scheduler doesn\u0027t own the values. Since it\u0027s an optimistic scheduler, it can be wrong. What\u0027s accurate is what the compute nodes provide, not what the scheduler provides.","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":69,"context_line":"claimed amount. This could be done be adding a new method to"},{"line_number":70,"context_line":"nova/compute/rpcapi.py, or by adding an additional handler to the existing"},{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"},{"line_number":73,"context_line":"the scheduler handles all resource claiming directly."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_4b93dda3","line":73,"range":{"start_line":72,"start_character":69,"end_line":73,"end_character":43},"updated":"2015-11-10 09:25:21.000000000","message":"Having the scheduler claiming for the resources is not something we agreed yet and what I\u0027m a bit relunctant to have, because we previously agreed in the past to have a scheduler which could make wrong decisions (but fast).\n\nThat specific scheduler concept of claims should be tackled in a specific spec where we could really define what is a scheduler claim and what is not.","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1805a8203f646d235a426a3d4d81eff69da67331","unresolved":false,"context_lines":[{"line_number":71,"context_line":"external_instance_event() method. Alternatively, the compute_node objects for"},{"line_number":72,"context_line":"those hosts could be updated directly, but that seems like it should wait until"},{"line_number":73,"context_line":"the scheduler handles all resource claiming directly."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Alternatives"},{"line_number":77,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"da85f559_2b745966","line":74,"updated":"2015-11-10 09:25:21.000000000","message":"So, I\u0027m pretty opposed with that idea for the conceptual reason that the scheduler doesn\u0027t own the resource usage - it\u0027s the RT which does that. \nNotifying Compute nodes to refresh their usage doesn\u0027t really fix the problem that some heterogenous resource aren\u0027t attached to a specific compute node, but rather to either a collection of nodes or something else\n\nWhat I like with Jay\u0027s spec is that the model allows to define its own semantics of resource calculation, whatever the resource is.","commit_id":"8a4f5a43ddb06d8f1a788a2ac1eb03ce2ef31b71"}]}
