)]}'
{"specs/newton/approved/resource-providers-scheduler-db-filters.rst":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":25,"context_line":"passing the host state object to the collection of"},{"line_number":26,"context_line":"`nova.scheduler.filters.Filter` objects that are enabled for the deployment."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Many of these scheduler filters do nothing more than calculate the amount of a"},{"line_number":29,"context_line":"particular resource that a compute node has available to it and return `False`"},{"line_number":30,"context_line":"if the amount requested is greater than the available amount of that type of"},{"line_number":31,"context_line":"resource."}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_67189e85","line":28,"range":{"start_line":28,"start_character":0,"end_line":28,"end_character":31},"updated":"2016-04-04 18:52:37.000000000","message":"well, all of them check the HostState but approximatly 50% of them just verify an attribute rather than consuming a resource amount (eg. ImagePropsFilter, IsolatedHostsFilter, TypeFilter...)\n\nSome others are consuming a resource amount, but also check aggregates in the HostState.\n\nTBH, instead of saying \"many of\", you should rather say which ones you would like to deprecate and use a SQL clause instead.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Having to return all compute node records in the entire deployment is"},{"line_number":34,"context_line":"extremely wasteful and this inefficiency gets worse the larger the deployment"},{"line_number":35,"context_line":"is. The filter loop is essentially implementing a `SQL` `WHERE` clause, but in"},{"line_number":36,"context_line":"Python instead of a more efficient database query."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_42874861","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":71},"updated":"2016-04-04 18:52:37.000000000","message":"well, I agree with it being a WHERE clause, but Python is probably easier to understand and look at, rather than a SQL statement for that.\n\nThe filters are very nice for operators wanting to provide their own out-of-tree verifications. Having for example the ImagePropsFilter modified as a WHERE clause could be a bit more obfuscating, I fear :(","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Having to return all compute node records in the entire deployment is"},{"line_number":34,"context_line":"extremely wasteful and this inefficiency gets worse the larger the deployment"},{"line_number":35,"context_line":"is. The filter loop is essentially implementing a `SQL` `WHERE` clause, but in"},{"line_number":36,"context_line":"Python instead of a more efficient database query."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_c26fd890","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":50},"updated":"2016-04-04 18:52:37.000000000","message":"Well, I trust you on that given your benchmarks, but I don\u0027t really think it\u0027s a problem for operators. At least, I never heard them complaining about the Python filters performance, compared to DB access.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"14b23d8678849ab4a94fa0d9769e2c0528a73ae1","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Having to return all compute node records in the entire deployment is"},{"line_number":34,"context_line":"extremely wasteful and this inefficiency gets worse the larger the deployment"},{"line_number":35,"context_line":"is. The filter loop is essentially implementing a `SQL` `WHERE` clause, but in"},{"line_number":36,"context_line":"Python instead of a more efficient database query."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_ceee55ec","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":50},"in_reply_to":"1a122d0e_7aef04b1","updated":"2016-04-27 18:53:33.000000000","message":"You\u0027ve pretty much missed the whole point of this spec.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"0218dacccb8ff51a6d8e02f0c9131b8d00879ac3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Having to return all compute node records in the entire deployment is"},{"line_number":34,"context_line":"extremely wasteful and this inefficiency gets worse the larger the deployment"},{"line_number":35,"context_line":"is. The filter loop is essentially implementing a `SQL` `WHERE` clause, but in"},{"line_number":36,"context_line":"Python instead of a more efficient database query."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_07378b4d","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":50},"in_reply_to":"1a122d0e_ceee55ec","updated":"2016-04-28 03:11:05.000000000","message":"I didn\u0027t miss the point of the spec. The point is clear. I agree with Bauza\u0027s evaluation and posted a -1 for that and only that.\n\nThe rest is simply a perception I felt worth sharing triggered by questionable optimizations with negative tradeoffs.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"ed0580000a82d91466065f25066983b4948834c5","unresolved":false,"context_lines":[{"line_number":33,"context_line":"Having to return all compute node records in the entire deployment is"},{"line_number":34,"context_line":"extremely wasteful and this inefficiency gets worse the larger the deployment"},{"line_number":35,"context_line":"is. The filter loop is essentially implementing a `SQL` `WHERE` clause, but in"},{"line_number":36,"context_line":"Python instead of a more efficient database query."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_7aef04b1","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":50},"in_reply_to":"9a061dce_c26fd890","updated":"2016-04-27 15:06:04.000000000","message":"I agree with the Bauza\u0027s evaluation. Does there exist an operator for which this is actually a performance problem / bottleneck?\n\nPerhaps more of a perception than an observation but there seems to be a pattern of using a database for state management and inter-process communication (anti-patterns imho) and this feels like an extension of such.\n\nIf anything, I\u0027d prefer to see the filters pulled out into config / rules that are closer to the domain and easier for operators to create and manage that are then processed by a single generic filter in the code that would get the list of available computes via async messages from the authoritative sources, the computes, (optionally, with caching) than querying the database for system state information, even at some cost to performance, but I digress...","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"ed0580000a82d91466065f25066983b4948834c5","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Proposed change"},{"line_number":44,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"We propose to winnow the set of compute nodes the scheduler evaluates by only"},{"line_number":47,"context_line":"returning the compute node resource providers that meet requested resource"},{"line_number":48,"context_line":"constraints. This will dramatically reduce the amount of compute node records"},{"line_number":49,"context_line":"that need to be pulled from the database on every call to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_39ad999b","line":46,"updated":"2016-04-27 15:06:04.000000000","message":"This can be also be achieved by sharding by hardware characteristics. \nOne could then fairly argue that an operator could have a large number of hosts with the same hardware characteristics but varying resources.\n\nA quick google search yields a publication that demonstrates doing a bipartite matching on 20,000 nodes with 2 million edges in less than a second. Limiting the number of build requests concurrently processed within a period of time and considered hosts to a total of some practical limit (e.g. 20,000), randomly or otherwise, could achieve acceptable performance results without using a DB whatsoever. Point being, there are simple efficient solutions that don\u0027t require an architecture that stores and processes state in a DB.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c1a047f79dc4b7e68b09ebf0dd5c2ec9aba665bb","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Proposed change"},{"line_number":44,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"We propose to winnow the set of compute nodes the scheduler evaluates by only"},{"line_number":47,"context_line":"returning the compute node resource providers that meet requested resource"},{"line_number":48,"context_line":"constraints. This will dramatically reduce the amount of compute node records"},{"line_number":49,"context_line":"that need to be pulled from the database on every call to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_65e59f07","line":46,"in_reply_to":"1a122d0e_39ad999b","updated":"2016-04-27 20:19:25.000000000","message":"Honestly, I don\u0027t know what you\u0027re going on about here. This has nothing to do with \"requiring an architecture that stores and processes state in a DB\".\n\nAll this spec is proposing is to not return all compute_node records in the entire deployment each and every time select_destinations() is called. Instead, pass the request spec to the ComputeNode.get_all() method and only return a fraction of the compute nodes that definitely meet all the simple resource filter conditions.\n\nThat\u0027s it. It\u0027s not boiling the ocean.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"0218dacccb8ff51a6d8e02f0c9131b8d00879ac3","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Proposed change"},{"line_number":44,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"We propose to winnow the set of compute nodes the scheduler evaluates by only"},{"line_number":47,"context_line":"returning the compute node resource providers that meet requested resource"},{"line_number":48,"context_line":"constraints. This will dramatically reduce the amount of compute node records"},{"line_number":49,"context_line":"that need to be pulled from the database on every call to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_ab6ca1d0","line":46,"in_reply_to":"1a122d0e_65e59f07","updated":"2016-04-28 03:11:05.000000000","message":"Again, I understand the point of the spec. See my previous response. \n\n\"Having to return all compute node records in the entire deployment is\nextremely wasteful and this inefficiency gets worse the larger the deployment is.\"\n\nRetrieving a stored bit of discoverable mutable state information like a compute list is a code smell. This spec proposes to optimize such an operation. I believe it is fair game to call out that the code smell exists. It is not, however, why I provided a -1. This merely points out that a possible approach for achieving acceptable performance having eliminated said code smell.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":47,"context_line":"returning the compute node resource providers that meet requested resource"},{"line_number":48,"context_line":"constraints. This will dramatically reduce the amount of compute node records"},{"line_number":49,"context_line":"that need to be pulled from the database on every call to"},{"line_number":50,"context_line":"`select_destinations()`."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"Alternatives"},{"line_number":53,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_420aa8d3","line":50,"updated":"2016-04-04 18:52:37.000000000","message":"Which filters again ?","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":56,"context_line":"`FilterScheduler`. I\u0027m not really in favor of this approach because it"},{"line_number":57,"context_line":"introduces more complexity to the system than simply replacing *some* of the"},{"line_number":58,"context_line":"Python filters with `WHERE` expressions on the `SELECT` against the"},{"line_number":59,"context_line":"`compute_nodes` table."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Data model impact"},{"line_number":62,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_e2e77c10","line":59,"updated":"2016-04-04 18:52:37.000000000","message":"Well, having a FilterScheduler not running filters would be terribly named, nope ?\n\nTBH, I think it\u0027s a big operator change, and I\u0027d by far prefer to propose such modification as a very different driver, exactly like we did for the CachingScheduler.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":4912,"name":"Michael H Wilson","email":"geekinutah@gmail.com","username":"geekinutah"},"change_message_id":"90c3e03e919db51e90c780ed0860a9b096bfeec9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"`FilterScheduler`. I\u0027m not really in favor of this approach because it"},{"line_number":57,"context_line":"introduces more complexity to the system than simply replacing *some* of the"},{"line_number":58,"context_line":"Python filters with `WHERE` expressions on the `SELECT` against the"},{"line_number":59,"context_line":"`compute_nodes` table."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Data model impact"},{"line_number":62,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_f207211a","line":59,"in_reply_to":"9a061dce_e2e77c10","updated":"2016-04-05 13:37:10.000000000","message":"From an operator perspective we are not changing function persay, all that ability and functionality should stay intact. This spec proposes swapping out some of the parts that provide the functionality. If this spec is to go forward I propose that we do not duplicate functionality because the implementation is different. Instead code should go in slowly and incrementally with the proper review and testing.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":100,"context_line":"DiskFilter, CoreFilter), this change would be non-backwards-compatible."},{"line_number":101,"context_line":"Personally, I don\u0027t think this use case or deployment scenario is worth even"},{"line_number":102,"context_line":"catering to. A scheduler that doesn\u0027t make any decisions based on inventory is"},{"line_number":103,"context_line":"no scheduler IMHO."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"Developer impact"},{"line_number":106,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_62888c23","line":103,"updated":"2016-04-04 18:52:37.000000000","message":"Well, are you sure it\u0027s something we can just say \"meh\" ?\n\nPeople use the scheduler for placing hosts, that doesn\u0027t really imply resource consumption.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":4912,"name":"Michael H Wilson","email":"geekinutah@gmail.com","username":"geekinutah"},"change_message_id":"d39b3ce9e7f9e0b0a19f05482c7fb85a04477f12","unresolved":false,"context_lines":[{"line_number":100,"context_line":"DiskFilter, CoreFilter), this change would be non-backwards-compatible."},{"line_number":101,"context_line":"Personally, I don\u0027t think this use case or deployment scenario is worth even"},{"line_number":102,"context_line":"catering to. A scheduler that doesn\u0027t make any decisions based on inventory is"},{"line_number":103,"context_line":"no scheduler IMHO."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"Developer impact"},{"line_number":106,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_bbe4f43b","line":103,"in_reply_to":"1a122d0e_45ad0383","updated":"2016-04-27 21:36:48.000000000","message":"Gotcha, thanks.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":4912,"name":"Michael H Wilson","email":"geekinutah@gmail.com","username":"geekinutah"},"change_message_id":"90c3e03e919db51e90c780ed0860a9b096bfeec9","unresolved":false,"context_lines":[{"line_number":100,"context_line":"DiskFilter, CoreFilter), this change would be non-backwards-compatible."},{"line_number":101,"context_line":"Personally, I don\u0027t think this use case or deployment scenario is worth even"},{"line_number":102,"context_line":"catering to. A scheduler that doesn\u0027t make any decisions based on inventory is"},{"line_number":103,"context_line":"no scheduler IMHO."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"Developer impact"},{"line_number":106,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_cd51a0da","line":103,"in_reply_to":"9a061dce_62888c23","updated":"2016-04-05 13:37:10.000000000","message":"+1 Also, I\u0027m not understanding why this would be non-backwards compatible. That sounds like an implementation decision.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"147b3ee848451f222b4fdbff755e171ed22cd166","unresolved":false,"context_lines":[{"line_number":100,"context_line":"DiskFilter, CoreFilter), this change would be non-backwards-compatible."},{"line_number":101,"context_line":"Personally, I don\u0027t think this use case or deployment scenario is worth even"},{"line_number":102,"context_line":"catering to. A scheduler that doesn\u0027t make any decisions based on inventory is"},{"line_number":103,"context_line":"no scheduler IMHO."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"Developer impact"},{"line_number":106,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a122d0e_45ad0383","line":103,"in_reply_to":"9a061dce_cd51a0da","updated":"2016-04-27 20:26:27.000000000","message":"We can make it backwards-compatible, sure. But frankly, the ability to not take into account resource consumption during placement is totally not a valid use case IMHO. That isn\u0027t scheduling or placement. That\u0027s just a random.choice(\u003clist of all things\u003e)","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":108,"context_line":"Nova developers will need to learn how to translate Python filters against"},{"line_number":109,"context_line":"resource amounts to their corresponding SQL equivalents. I already have the"},{"line_number":110,"context_line":"example code for this in both SQL and SQLAlchemy constructs in the benchmarking"},{"line_number":111,"context_line":"harness to this should hopefully be a pretty minimal learning curve."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"Implementation"},{"line_number":114,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_c2ceb859","line":111,"range":{"start_line":111,"start_character":36,"end_line":111,"end_character":67},"updated":"2016-04-04 18:52:37.000000000","message":"I sincerely doubt this, sorry :(\n\nI wasn\u0027t there in the early days of OpenStack, but AFAIK, Python was chosen exactly because of the minimal learning curve.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":4912,"name":"Michael H Wilson","email":"geekinutah@gmail.com","username":"geekinutah"},"change_message_id":"90c3e03e919db51e90c780ed0860a9b096bfeec9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"Nova developers will need to learn how to translate Python filters against"},{"line_number":109,"context_line":"resource amounts to their corresponding SQL equivalents. I already have the"},{"line_number":110,"context_line":"example code for this in both SQL and SQLAlchemy constructs in the benchmarking"},{"line_number":111,"context_line":"harness to this should hopefully be a pretty minimal learning curve."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"Implementation"},{"line_number":114,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_6dcb34a6","line":111,"range":{"start_line":111,"start_character":36,"end_line":111,"end_character":67},"in_reply_to":"9a061dce_c2ceb859","updated":"2016-04-05 13:37:10.000000000","message":"it may be more accurate to say that developers would need a bit of SQL experience to write queries. I also feel like the learning curve is minimal, regardless we have several reviewers in Nova who are capable of reviewing the SQL statements.","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2e7de90a619569da2d186352738a61dc2cfeb133","unresolved":false,"context_lines":[{"line_number":132,"context_line":"  `nova.db.sqlalchemy.api.compute_node_get_all()`"},{"line_number":133,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":134,"context_line":"  successively adding WHERE conditions on the DB side and removing the"},{"line_number":135,"context_line":"  scheduler filter that does the same work on the Python side"},{"line_number":136,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":137,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":138,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a061dce_823a0035","line":135,"updated":"2016-04-04 18:52:37.000000000","message":"Any filter is optional, how as an operator can I ask the scheduler to not consume RAM for example ?","commit_id":"39e9604799504b1d1a38aa32fd3ec7dbab893a75"}],"specs/ocata/approved/resource-providers-scheduler-db-filters.rst":[{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"faf23c1814abd6239c12ddd49bc4637e5a662b36","unresolved":false,"context_lines":[{"line_number":50,"context_line":"to the list of resource classes we currently support."},{"line_number":51,"context_line":"This will dramatically reduce the amount of compute node records"},{"line_number":52,"context_line":"that need to be pulled from the database on every call to"},{"line_number":53,"context_line":"`select_destinations()`."},{"line_number":54,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) will be modified so if"},{"line_number":55,"context_line":"for example \u0027VCPU\u0027 is in ``enabled_resource_classes``, they will return True"},{"line_number":56,"context_line":"instead of checking the HostState values but they will be also deprecated."}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_a588da23","line":53,"updated":"2016-10-12 14:15:07.000000000","message":"Is select_destinations() called at most one time per request?","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2be9f18098144a5b1e7260ad3b7e532684775037","unresolved":false,"context_lines":[{"line_number":50,"context_line":"to the list of resource classes we currently support."},{"line_number":51,"context_line":"This will dramatically reduce the amount of compute node records"},{"line_number":52,"context_line":"that need to be pulled from the database on every call to"},{"line_number":53,"context_line":"`select_destinations()`."},{"line_number":54,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) will be modified so if"},{"line_number":55,"context_line":"for example \u0027VCPU\u0027 is in ``enabled_resource_classes``, they will return True"},{"line_number":56,"context_line":"instead of checking the HostState values but they will be also deprecated."}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_c5869d12","line":53,"in_reply_to":"fa6399be_a588da23","updated":"2016-10-12 19:25:00.000000000","message":"One time per attempt per request. A build can fail and the request will be retried, with each retry calling select_destinations().","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"faf23c1814abd6239c12ddd49bc4637e5a662b36","unresolved":false,"context_lines":[{"line_number":55,"context_line":"for example \u0027VCPU\u0027 is in ``enabled_resource_classes``, they will return True"},{"line_number":56,"context_line":"instead of checking the HostState values but they will be also deprecated."},{"line_number":57,"context_line":"In the next cycle, we will remove those filters."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_779f5950","line":58,"updated":"2016-10-12 14:15:07.000000000","message":"Will adding custom python filters to the list mutation pipeline still be possible?","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2be9f18098144a5b1e7260ad3b7e532684775037","unresolved":false,"context_lines":[{"line_number":55,"context_line":"for example \u0027VCPU\u0027 is in ``enabled_resource_classes``, they will return True"},{"line_number":56,"context_line":"instead of checking the HostState values but they will be also deprecated."},{"line_number":57,"context_line":"In the next cycle, we will remove those filters."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Alternatives"},{"line_number":60,"context_line":"------------"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_2578392a","line":58,"in_reply_to":"fa6399be_779f5950","updated":"2016-10-12 19:25:00.000000000","message":"Yes. The current filters that are amenable to SQL filtering will be converted, but these are used just as the starting point to reduce the total number of hosts (RPs) pulled from the DB. That list will then be run through the remaining filters and the weighers as is currently done.","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"faf23c1814abd6239c12ddd49bc4637e5a662b36","unresolved":false,"context_lines":[{"line_number":64,"context_line":"introduces more complexity to the system than simply replacing *some* of the"},{"line_number":65,"context_line":"Python filters with `WHERE` expressions on the `SELECT` against the"},{"line_number":66,"context_line":"`compute_nodes` table."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Data model impact"},{"line_number":69,"context_line":"-----------------"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_2503ea43","line":67,"updated":"2016-10-12 14:15:07.000000000","message":"One alternative approach worth mentioning, perpendicular in both description and perception though potentially not significantly different in terms of implementation, would be described as having the compute nodes be inputs that are then mutated through a series of functional (list in, list out) filters (much like now). Since the list of compute nodes are currently stored in the DB they would still have to be selected from the DB and potentially filtered based on the request somewhere near the beginning of the pipeline in an area of the code dedicated to side effects.\n\nThe key points in definition (though not necessarily substantially different in implementation) being explicitly marking where we are touching the DB (at the beginning of the pipeline) and supporting python filters to take in a list and output a filtered list. This might be the current intention, though not how I\u0027m currently interpreting it after reading.\n\nFurther optimization could be supported by allowing filters to drop into a compiled language like C if necessary.","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"faf23c1814abd6239c12ddd49bc4637e5a662b36","unresolved":false,"context_lines":[{"line_number":98,"context_line":"database side versus doing the filtering on the Python side and returning a"},{"line_number":99,"context_line":"record for each compute node in the system."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":".. _harness: http://github.com/jaypipes/placement-bench"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Other deployer impact"},{"line_number":104,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_45929ea0","line":101,"updated":"2016-10-12 14:15:07.000000000","message":"Could you include the test results from the experiments that justify the change here?","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"faf23c1814abd6239c12ddd49bc4637e5a662b36","unresolved":false,"context_lines":[{"line_number":110,"context_line":"Developer impact"},{"line_number":111,"context_line":"----------------"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"None."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"Implementation"},{"line_number":116,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa6399be_05ec268e","line":113,"updated":"2016-10-12 14:15:07.000000000","message":"I\u0027m not sure I grok why the developer impact went away. Reading the spec it\u0027s not immediately apparent to me what\u0027s different except that the filters are being first deprecated and then removed delaying the full change over more than one cycle. Am I missing something?","commit_id":"c1308addd2f748e3e67372918383912203f44895"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/resource-providers-scheduler-db-filters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint extends the `resource-providers` series of blueprints by"},{"line_number":14,"context_line":"having the scheduler make use of the `inventories` and `allocations` table to"},{"line_number":15,"context_line":"pre-filter compute nodes from evaluation during `select_destinations()`."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_925f90e4","line":14,"updated":"2016-10-12 18:17:43.000000000","message":"I know we\u0027re iterating so this is just a nit at this stage, but we should attempt to remove all the references to db concepts like tables so that it is clear we are using the resources presented by the placement API and the persistence aspects are not a concern.\n\nBut yeah, other than that nit, good summary.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Instead of doing that database call, we would rather make a HTTP call to the"},{"line_number":53,"context_line":"placement API on a specific GET /resource_providers action request that would"},{"line_number":54,"context_line":"pass the translated RequestSpec object into a list of allocation requests"},{"line_number":55,"context_line":"and would return the list of resource providers\u0027 UUIDs that would match those"},{"line_number":56,"context_line":"requests."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_32796430","line":55,"updated":"2016-10-12 18:17:43.000000000","message":"From discussion in IRC a couple things about this:\n\n* the format and method of the request is to-be-determined but that\u0027s okay. The part that\u0027s most important is getting the request body effective.\n* we want to return a list of resource providers as other resource provider resource collections return","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"We could create an entirely new scheduler driver instead of modifying the"},{"line_number":66,"context_line":"`FilterScheduler`. Jay is not really in favor of this approach because it"},{"line_number":67,"context_line":"introduces more complexity to the system than simply replacing *some* of the"},{"line_number":68,"context_line":"Python filters with `WHERE` expressions on the `SELECT` against the"},{"line_number":69,"context_line":"`compute_nodes` table."},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_12faa075","line":67,"updated":"2016-10-12 18:17:43.000000000","message":"I\u0027d replace everything after the \"than\" with:\n\n   and delays use of the placement service.\n\nbecause the SQL-ness isn\u0027t really relevant in this context.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":101,"context_line":"database side versus doing the filtering on the Python side and returning a"},{"line_number":102,"context_line":"record for each compute node in the system."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":".. _harness: http://github.com/jaypipes/placement-bench"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"Other deployer impact"},{"line_number":107,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_f210ccaa","line":104,"updated":"2016-10-12 18:17:43.000000000","message":"This will be out of date with the introduction of the HTTP requests. But I think we can guess that at scale the conclusions will remain the same.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":110,"context_line":"DiskFilter, CoreFilter), it would still be possible to make the placement API"},{"line_number":111,"context_line":"not verifying those corresponding resource classes by setting the allocation"},{"line_number":112,"context_line":"ratio for each inventory having that resource class to a close to infinite"},{"line_number":113,"context_line":"value like 100000.0."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"Developer impact"},{"line_number":116,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_ad0995df","line":113,"updated":"2016-10-12 18:17:43.000000000","message":"This is true, but I think that when we document this we should it make it clear that we are changing something which is effectively a workaround or hack into a mathematical correctness: The resources are still being consumed and tracked but are limited.\n\nI think this is important because it makes what resource providers are actually clear and explicit and not something to hack on to get funkity results.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  object into a list of allocation requests that would be passed to the"},{"line_number":139,"context_line":"  placement API by a specific GET /resource_providers action and would obtain"},{"line_number":140,"context_line":"  a list of resource providers UUIDs so they could match those with compute"},{"line_number":141,"context_line":"  nodes and only return those."},{"line_number":142,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":143,"context_line":"  successively adding parameters in the HTTP GET query string and deprecating"},{"line_number":144,"context_line":"  the  scheduler filter that does the same work on the Python side"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_0dd0c11e","line":141,"updated":"2016-10-12 18:17:43.000000000","message":"Does this method make sense on ComputNodeList? Why there instead of in the scheduler driver or the host manager?","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":141,"context_line":"  nodes and only return those."},{"line_number":142,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":143,"context_line":"  successively adding parameters in the HTTP GET query string and deprecating"},{"line_number":144,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":145,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":146,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":147,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_4dfe3938","line":144,"updated":"2016-10-12 18:17:43.000000000","message":"a) I don\u0027t think we want GET query strings for this, I think we want a json object with a rigorous schema that we can effectively document and share.\n\nb) I don\u0027t understand why doing this in incremental steps is a particular win as the complexity of the process is in the structuring of the request to support multiple forms of information (with an eye to later inclusion of qualitative requirments for example) and processing that into a sql query with some readable code. It might mean that the first change is easier to review but any after that are mostly boilerplate. Perhaps two changes if one is too much.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":146,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":147,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"},{"line_number":148,"context_line":"* Document the devref to provide a backwards-compatible way to avoid the"},{"line_number":149,"context_line":"  placement API to verify a specific resource class."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"Dependencies"},{"line_number":152,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_8dbdb16a","line":149,"updated":"2016-10-12 18:17:43.000000000","message":"a) How would that even work?\n\nb) Why would we want that?","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"Existing functional tests should adequately validate that swapping out DB-side"},{"line_number":162,"context_line":"filtering for Python-side filtering of RAM, vCPU and local disk produces no"},{"line_number":163,"context_line":"different scheduling results from `select_destinations()` calls."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"Documentation Impact"},{"line_number":166,"context_line":"\u003d\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":3,"id":"fa6399be_ed48ed89","line":163,"updated":"2016-10-12 18:17:43.000000000","message":"Testing is going to change quite a bit. It becomes a bit more complicated now, but the example at \n\n    https://github.com/openstack/nova/blob/master/nova/tests/functional/api/openstack/placement/test_report_client.py\n\nprovides a good starting point.","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3710e72135fa6aefb81e789bca046a9d92812325","unresolved":false,"context_lines":[{"line_number":166,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"Developer reference material is needed that explains the evolution towards"},{"line_number":169,"context_line":"DB-side filtering."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"References"},{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa6399be_0d79a1c8","line":169,"updated":"2016-10-12 18:17:43.000000000","message":"out of date","commit_id":"0abb9ff26cb96b548595ac9b638a705307152a51"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b4f1f309a902c1fd486966de8814cbbe41df634e","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Resource Providers - Scheduler Filters in DB"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/resource-providers-scheduler-db-filters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This blueprint aims to have the scheduler calling the placement API for getting the list"},{"line_number":14,"context_line":"of resource providers that could allow to pre-filter compute nodes from evaluation during"},{"line_number":15,"context_line":"`select_destinations()`."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_33a58a46","line":14,"range":{"start_line":11,"start_character":0,"end_line":14,"end_character":89},"updated":"2016-11-02 19:41:30.000000000","message":"nit: Those lines are longer than expected length","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b4f1f309a902c1fd486966de8814cbbe41df634e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"and would return the list of resource providers\u0027 UUIDs that would match those"},{"line_number":56,"context_line":"requests."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":59,"context_line":"resource classes will be considered deprecated and will be removed in the next"},{"line_number":60,"context_line":"cycle."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_13fc063d","line":60,"range":{"start_line":58,"start_character":0,"end_line":60,"end_character":6},"updated":"2016-11-02 19:41:30.000000000","message":"Should they also be removed from default filter set, so we don\u0027t duplicate the work of the sql query, or we are planning to do that on next cycle?","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6365798fdb8238817c6edfa8d7531c6536689780","unresolved":false,"context_lines":[{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":59,"context_line":"resource classes will be considered deprecated and will be removed in the next"},{"line_number":60,"context_line":"cycle."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9a629dbe_131ae86e","line":61,"updated":"2016-11-14 14:18:31.000000000","message":"I think we should note about the Caching Scheduler, its a subclass of the FilterScheduler.\n\nI think we probably want to keep the caching scheduler as it is, until we have claims in the placement API.\n\nThat has an impact that isn\u0027t noted here. I suspect we want to do something like ensure the caching scheduler keeps calling the DB for the full list, doesn\u0027t use the placement API like the filter scheduler will, and run all the same filters on both for now (as the not required filers are cheap on the smaller list). From that point we could talk about skipping filters in the filter scheduler, but its just an optimisation piece, and thats fine.","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d8f21d0d2c995304ad3553faa2a264f01ca1676d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":59,"context_line":"resource classes will be considered deprecated and will be removed in the next"},{"line_number":60,"context_line":"cycle."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_a55f4874","line":61,"in_reply_to":"9a629dbe_131ae86e","updated":"2016-11-14 20:29:38.000000000","message":"Fair enough.","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b4f1f309a902c1fd486966de8814cbbe41df634e","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"We could create an entirely new scheduler driver instead of modifying the"},{"line_number":66,"context_line":"`FilterScheduler`. Jay is not really in favor of this approach because it"},{"line_number":67,"context_line":"introduces more complexity to the system than directly using the placement API for that"},{"line_number":68,"context_line":"purpose."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_f38792b2","line":67,"range":{"start_line":67,"start_character":79,"end_line":67,"end_character":87},"updated":"2016-11-02 19:41:30.000000000","message":"Nit: Checker will complain on that line…","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b4f1f309a902c1fd486966de8814cbbe41df634e","unresolved":false,"context_lines":[{"line_number":98,"context_line":"Jay built a benchmarking harness_ that demonstrates that the more compute nodes"},{"line_number":99,"context_line":"in the deployment, the greater the gains are from doing filtering on the"},{"line_number":100,"context_line":"database side versus doing the filtering on the Python side and returning a"},{"line_number":101,"context_line":"record for each compute node in the system. That is direcly reading the DB but we assume"},{"line_number":102,"context_line":"the extra HTTP penalty as something not really impactful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":".. _harness: http://github.com/jaypipes/placement-bench"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_f375d2ca","line":101,"range":{"start_line":101,"start_character":79,"end_line":101,"end_character":88},"updated":"2016-11-02 19:41:30.000000000","message":"Nit: too long line again","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"b13288b21d26dbc3439d3111b293bb651e1c7891","unresolved":false,"context_lines":[{"line_number":98,"context_line":"Jay built a benchmarking harness_ that demonstrates that the more compute nodes"},{"line_number":99,"context_line":"in the deployment, the greater the gains are from doing filtering on the"},{"line_number":100,"context_line":"database side versus doing the filtering on the Python side and returning a"},{"line_number":101,"context_line":"record for each compute node in the system. That is direcly reading the DB but we assume"},{"line_number":102,"context_line":"the extra HTTP penalty as something not really impactful."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":".. _harness: http://github.com/jaypipes/placement-bench"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa6399be_71c9c558","line":101,"updated":"2016-10-14 10:21:34.000000000","message":"directly","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b4f1f309a902c1fd486966de8814cbbe41df634e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"Work Items"},{"line_number":134,"context_line":"----------"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and transform that"},{"line_number":137,"context_line":"  object into a list of allocation requests that would be passed to the"},{"line_number":138,"context_line":"  placement API by a specific GET /resource_providers action and would obtain"},{"line_number":139,"context_line":"  a list of resource providers UUIDs so they could match those with compute"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_161dd465","line":136,"range":{"start_line":136,"start_character":77,"end_line":136,"end_character":86},"updated":"2016-11-02 19:41:30.000000000","message":"nit again…","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c66ffb524aa5a41c989b6e72e009ab43d75c5981","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  placement API by a specific GET /resource_providers action and would obtain"},{"line_number":139,"context_line":"  a list of resource providers UUIDs so they could match those with compute"},{"line_number":140,"context_line":"  nodes and only return those."},{"line_number":141,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":142,"context_line":"  successively adding parameters in the HTTP GET body and deprecating"},{"line_number":143,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":144,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":145,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":146,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_284777bc","line":143,"range":{"start_line":141,"start_character":2,"end_line":143,"end_character":66},"updated":"2016-10-27 12:25:31.000000000","message":"If instance is booted from volume, then it\u0027s disk size should not be used for disk resource calculation. Where exactly this check will be added scheduler or placement api?","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3ecf59a2987519120bf34f008f4d9342b250ffee","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  placement API by a specific GET /resource_providers action and would obtain"},{"line_number":139,"context_line":"  a list of resource providers UUIDs so they could match those with compute"},{"line_number":140,"context_line":"  nodes and only return those."},{"line_number":141,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":142,"context_line":"  successively adding parameters in the HTTP GET body and deprecating"},{"line_number":143,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":144,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":145,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":146,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ba5da102_0027d812","line":143,"range":{"start_line":141,"start_character":2,"end_line":143,"end_character":66},"in_reply_to":"ba5da102_284777bc","updated":"2016-10-28 07:33:43.000000000","message":"Hi! So, the thing that needs to happen in the code. The first is that the Nova API server needs to ensure that for boot-from-volume requests, the RequestSpec.flavor.root_gb value is set to 0. This indicates that there is no request for disk space for the instance root disk. (Note that this is not the same as the request not having an amount of requested DISK_GB resource, since there may also be ephemeral instance disks that consume DISK_GB resource).\n\nThere is an additional complication around disk_available_least that we need to flesh out, however I don\u0027t believe that is going to affect the placement API or modeling of usage from the resource-providers schema point of view.","commit_id":"c5511f93d45a73ab2097d8c5ff8727e7b3fff9f5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9cda91d80a631b7da8f9c4f345cdc515c44a67c3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"`select_destinations()`."},{"line_number":52,"context_line":"Instead of doing that database call, we would rather make a HTTP call to the"},{"line_number":53,"context_line":"placement API on a specific REST resource with a request that would"},{"line_number":54,"context_line":"pass the translated RequestSpec object into a list of allocation requests"},{"line_number":55,"context_line":"and would return the list of resource providers\u0027 UUIDs that would match those"},{"line_number":56,"context_line":"requests."},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_40af3fe3","line":54,"updated":"2016-11-15 00:55:19.000000000","message":"note: until claims are done in the the scheduler, this isn\u0027t a list of allocation requests. Rather, it is a list of resource providers that match requested resource and trait criteria.","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6f4d1502aaff4635c9d72dca050bf16caf3b3c9f","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":59,"context_line":"resource classes will be considered deprecated for the use of FilterScheduler"},{"line_number":60,"context_line":"driver."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":63,"context_line":"overrides the method that fetches the list of hosts. That means the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_4b23e505","line":60,"updated":"2016-11-14 21:36:52.000000000","message":"Since we know the CachingScheduler will still need these, and we don\u0027t want to change it would it make sense to keep the inner loop of filtering in both schedulers just the same as it is now. What\u0027s different is the number of hosts they are evaluating. In the FilterScheduler using the CoreFilter, RAMFilter and DiskFilter will be (most of the time) redundant but low cost.\n\nThe win in this is that the surface area of change in the scheduler code is much smaller: we are _only_ changing the number of hosts involved, that\u0027s all. I like that.","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9cda91d80a631b7da8f9c4f345cdc515c44a67c3","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":59,"context_line":"resource classes will be considered deprecated for the use of FilterScheduler"},{"line_number":60,"context_line":"driver."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":63,"context_line":"overrides the method that fetches the list of hosts. That means the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_2081634b","line":60,"in_reply_to":"7a77a97e_4b23e505","updated":"2016-11-15 00:55:19.000000000","message":"++ to cdent\u0027s idea here.","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9cda91d80a631b7da8f9c4f345cdc515c44a67c3","unresolved":false,"context_lines":[{"line_number":140,"context_line":"----------"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and"},{"line_number":143,"context_line":"  transform that object into a list of allocation requests that would be passed"},{"line_number":144,"context_line":"  to the placement API by a specific GET /resource_providers action and would"},{"line_number":145,"context_line":"  obtain a list of resource providers UUIDs so they could match those with"},{"line_number":146,"context_line":"  compute nodes and only return those."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_2ceddc8b","line":143,"updated":"2016-11-15 00:55:19.000000000","message":"See above about this not actually being a list of allocation requests...","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6f4d1502aaff4635c9d72dca050bf16caf3b3c9f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"  compute nodes and only return those."},{"line_number":147,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":148,"context_line":"  successively adding parameters in the HTTP GET body and deprecating"},{"line_number":149,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":150,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":151,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":152,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_cb64554b","line":149,"updated":"2016-11-14 21:36:52.000000000","message":"This seems over-engineered to me. Get the hosts off the api, feed them into the filter loop, done.","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9cda91d80a631b7da8f9c4f345cdc515c44a67c3","unresolved":false,"context_lines":[{"line_number":146,"context_line":"  compute nodes and only return those."},{"line_number":147,"context_line":"* Separate patches for winnowing by RAM, vCPU, and local disk, with each patch"},{"line_number":148,"context_line":"  successively adding parameters in the HTTP GET body and deprecating"},{"line_number":149,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":150,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":151,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":152,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_ac900cee","line":149,"in_reply_to":"7a77a97e_cb64554b","updated":"2016-11-15 00:55:19.000000000","message":"Agreed. This can be done in a single patch for local disk, vCPU and RAM.","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9cda91d80a631b7da8f9c4f345cdc515c44a67c3","unresolved":false,"context_lines":[{"line_number":148,"context_line":"  successively adding parameters in the HTTP GET body and deprecating"},{"line_number":149,"context_line":"  the  scheduler filter that does the same work on the Python side"},{"line_number":150,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"},{"line_number":151,"context_line":"  until the `pci-generate-stats` blueprint is completed. We can have separate"},{"line_number":152,"context_line":"  blueprints for handling NUMA and PCI resources via filters on the DB side"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_8caa7018","line":151,"updated":"2016-11-15 00:55:19.000000000","message":"s/pci-generate-stats/nested-resource-providers/ :)","commit_id":"7e671bcb23b2b31b903b3ac3f12ff595fea10b1f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"None."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Proposed change"},{"line_number":44,"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":6,"id":"7a77a97e_ec0e41e4","line":41,"updated":"2016-11-22 15:18:48.000000000","message":"As a CERN user, I don\u0027t want to wait for the nova-scheduler to process 10K+ compute nodes to find a host on which to build my server.\n\nI know that\u0027s a bit exaggerated as CERN uses cellsv1 so the compute nodes are sharded into cells and the top-level cells scheduler picks the cell to build in, but you get the idea.\n\n:)","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Use Cases"},{"line_number":39,"context_line":"----------"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"None."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Proposed change"},{"line_number":44,"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":6,"id":"7a77a97e_3d205a49","line":41,"in_reply_to":"7a77a97e_ec0e41e4","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":54,"context_line":"list of resource providers\u0027 UUIDs that would match requested resources and"},{"line_number":55,"context_line":"traits criterias based on the original RequestSpec object."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_cc8a651a","line":57,"range":{"start_line":57,"start_character":41,"end_line":57,"end_character":57},"updated":"2016-11-22 15:18:48.000000000","message":"Maybe we should say FilterScheduler above then.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":54,"context_line":"list of resource providers\u0027 UUIDs that would match requested resources and"},{"line_number":55,"context_line":"traits criterias based on the original RequestSpec object."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_aca0c9a6","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":4},"updated":"2016-11-22 15:18:48.000000000","message":"This?","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":54,"context_line":"list of resource providers\u0027 UUIDs that would match requested resources and"},{"line_number":55,"context_line":"traits criterias based on the original RequestSpec object."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_fddc2248","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":4},"in_reply_to":"7a77a97e_aca0c9a6","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":54,"context_line":"list of resource providers\u0027 UUIDs that would match requested resources and"},{"line_number":55,"context_line":"traits criterias based on the original RequestSpec object."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_7df1f2cc","line":57,"range":{"start_line":57,"start_character":41,"end_line":57,"end_character":57},"in_reply_to":"7a77a97e_cc8a651a","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"331ddc443574b9bf76db1095d9f3276076303e17","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"That blueprint doesn\u0027t aim to change the CachingScheduler driver, which"},{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_ad92c3f4","line":59,"updated":"2016-11-21 14:20:03.000000000","message":"Thanks for that add. We could probably deprecate that soon, but this seems like the right approach.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"},{"line_number":63,"context_line":"by the usual config flag in case they don\u0027t want them redundantly checking the"},{"line_number":64,"context_line":"already acceptable hosts."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_cc7b45f3","line":64,"range":{"start_line":61,"start_character":0,"end_line":64,"end_character":25},"updated":"2016-11-22 15:18:48.000000000","message":"Wouldn\u0027t running requests through the placement API for CPU/RAM/DISK *and* these filters be redundant?\n\nMy thinking is that once the placement API is required (which we said it\u0027s required to upgrade to Ocata), then we could remove the redundant filters from the list of default filters (in the \u0027enabled_filters\u0027 config option) by default, and maybe even log a warning in those filters if they are used essentially saying they are redundant and should be disabled.\n\nMaybe that\u0027s something we handle in Pike? I\u0027m not sure if there is a use case for having them enabled when we\u0027re using the placement API, unless not all compute nodes have their inventories registered in the placement service by the time people get to using this in Ocata.\n\nThat\u0027s an open question of mine - how do we know all compute nodes in the deployment are registered in the placement API before we start using this in the scheduler? Or do we just not expect it to be a problem because once you get the placement service in place and configure your compute nodes for Newton to use the placement service, you just wait the 60 second update_available_resource periodic task and then those things will be registered? And we really expect that all of your newton compute nodes are registered with the placement service before you start upgrading for Ocata...right? If you don\u0027t, then the placement service will basically not return those compute nodes to the scheduler as possible hosts to try for building instances. I think we need to be pretty clear about this in our release notes and placement API and upgrade docs.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ed0598c6e787cff3a0e85c1b9e66e040743dbbe6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"},{"line_number":63,"context_line":"by the usual config flag in case they don\u0027t want them redundantly checking the"},{"line_number":64,"context_line":"already acceptable hosts."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_b811d8b1","line":64,"range":{"start_line":61,"start_character":0,"end_line":64,"end_character":25},"in_reply_to":"7a77a97e_78f100cd","updated":"2016-11-22 20:18:39.000000000","message":"The problem with doing the graceful fallback is we\u0027ll have people that don\u0027t realize until pike that they\u0027ve been falling back the whole time. That might be the same as making them do it before ocata, but we don\u0027t know what kind of other transitions they\u0027ll have to be making between ocata and pike.\n\nSo, not breaking is awesome, but, at some point we have to have a cutover and delaying further may or may not be good. Anyway, not sure I have a strong feeling either way, just wanted to say that.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"789b69f1d4c2bba04b9ecc6f7d7263b3604668e2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"},{"line_number":63,"context_line":"by the usual config flag in case they don\u0027t want them redundantly checking the"},{"line_number":64,"context_line":"already acceptable hosts."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_78f100cd","line":64,"range":{"start_line":61,"start_character":0,"end_line":64,"end_character":25},"in_reply_to":"7a77a97e_b85d58ee","updated":"2016-11-22 20:11:39.000000000","message":"Again, having said that, I think we expect that by the time you are upgrading to ocata, you\u0027re running the placement service in the control plane and you\u0027re computes are all upgraded to newton and checking in with the placement service.\n\nIt would be best if we had a tool for this though...which we could write into the nova-manage tooling. We can get all of the computes and check their service versions to know if they are new enough or not (newton or older), and we could probably cheat and query the API DB from nova-manage to check if all of those compute nodes are in the inventories tables. That\u0027s basically a one-off step for upgrading to Ocata.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"540482241b2500755de89ec5ef2d859f796aa47a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"},{"line_number":63,"context_line":"by the usual config flag in case they don\u0027t want them redundantly checking the"},{"line_number":64,"context_line":"already acceptable hosts."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_b85d58ee","line":64,"range":{"start_line":61,"start_character":0,"end_line":64,"end_character":25},"in_reply_to":"7a77a97e_bd78eaf9","updated":"2016-11-22 20:09:28.000000000","message":"So in the above scenario, if I have 1 compute node checking in with the placement service but 99 that aren\u0027t, I won\u0027t get an empty list back from the placement service (maybe, at least until that single compute node is filled up), but it\u0027s definitely not a representative list of my computes.\n\nI guess as noted, it\u0027s self-healing as the placement API is going to return that single compute (or small subset) until those are full, or that subset can\u0027t satisfy the request at all, and then we callback to the DB compute node get_all() lookup and start pushing that through the old filters.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"Legacy filters (CoreFilter, RAMFilter and DiskFilter) that have corresponding"},{"line_number":62,"context_line":"resource classes would still be enabled but operators could just disable them"},{"line_number":63,"context_line":"by the usual config flag in case they don\u0027t want them redundantly checking the"},{"line_number":64,"context_line":"already acceptable hosts."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_bd78eaf9","line":64,"range":{"start_line":61,"start_character":0,"end_line":64,"end_character":25},"in_reply_to":"7a77a97e_cc7b45f3","updated":"2016-11-22 20:02:06.000000000","message":"So, the way I thought this would work is that in Ocata we place the call to the placement API from the scheduler. If it returns an empty list (because no compute nodes have yet \"checked in\" to the placement API) then the scheduler will continue to do its ComputeNodeList.get_all() behaviour until Pike. This means that nothing will break out of the box but there will be a short (depending on the value of the periodic host audit interval) period of time where the call to the placement REST API would return a smaller number of compute hosts that might be possible to place an instance on -- because some compute hosts were in the process of going through their audit interval. And the only thing this might do is trigger some retries at which point the scheduler would likely now get a larger list of UUIDs back from the placement API and would be able to place the instance on the second or third retry operation...\n\nIn short, it\u0027s a self-healing system and any degradation in performance or placement ability is temporal.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"331ddc443574b9bf76db1095d9f3276076303e17","unresolved":false,"context_lines":[{"line_number":69,"context_line":"We could create an entirely new scheduler driver instead of modifying the"},{"line_number":70,"context_line":"`FilterScheduler`. Jay is not really in favor of this approach because it"},{"line_number":71,"context_line":"introduces more complexity to the system than directly using the placement API"},{"line_number":72,"context_line":"for that purpose."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Data model impact"},{"line_number":75,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_2d9eb307","line":72,"updated":"2016-11-21 14:20:03.000000000","message":"I like moving people onto the new stuff by default.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"331ddc443574b9bf76db1095d9f3276076303e17","unresolved":false,"context_lines":[{"line_number":114,"context_line":"DiskFilter, CoreFilter), it would still be possible to make the placement API"},{"line_number":115,"context_line":"not verifying those corresponding resource classes by setting the allocation"},{"line_number":116,"context_line":"ratio for each inventory having that resource class to a close to infinite"},{"line_number":117,"context_line":"value like 100000.0."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"Developer impact"},{"line_number":120,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_cd2b7f93","line":117,"updated":"2016-11-21 14:20:03.000000000","message":"This feels close to violating our upgrade agreements around configuration working unchanged between releases. But I think this is probably the best approach, we can possible log warning messages based on the filter configuration, etc. Easier to address these details in the code I feel.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":114,"context_line":"DiskFilter, CoreFilter), it would still be possible to make the placement API"},{"line_number":115,"context_line":"not verifying those corresponding resource classes by setting the allocation"},{"line_number":116,"context_line":"ratio for each inventory having that resource class to a close to infinite"},{"line_number":117,"context_line":"value like 100000.0."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"Developer impact"},{"line_number":120,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_bdbb8a74","line":117,"in_reply_to":"7a77a97e_ac17e952","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":114,"context_line":"DiskFilter, CoreFilter), it would still be possible to make the placement API"},{"line_number":115,"context_line":"not verifying those corresponding resource classes by setting the allocation"},{"line_number":116,"context_line":"ratio for each inventory having that resource class to a close to infinite"},{"line_number":117,"context_line":"value like 100000.0."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"Developer impact"},{"line_number":120,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_ac17e952","line":117,"in_reply_to":"7a77a97e_cd2b7f93","updated":"2016-11-22 15:18:48.000000000","message":"I\u0027m honestly having a hard time parsing this paragraph...not John\u0027s, the one in the spec.","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4d9f4f8367b0402f6891abc0a711a76ecf42b7f1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"----------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and"},{"line_number":141,"context_line":"  transform that object into a list of resource and traits criterias"},{"line_number":142,"context_line":"* Provide a method to call the placement API for getting the list of"},{"line_number":143,"context_line":"  resource providers that match those criterias."},{"line_number":144,"context_line":"* Translate that list of resource providers into a list of hosts and replace"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_4b4c9b70","line":141,"updated":"2016-11-15 16:16:54.000000000","message":"criteria is already plural so no s required","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":138,"context_line":"----------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and"},{"line_number":141,"context_line":"  transform that object into a list of resource and traits criterias"},{"line_number":142,"context_line":"* Provide a method to call the placement API for getting the list of"},{"line_number":143,"context_line":"  resource providers that match those criterias."},{"line_number":144,"context_line":"* Translate that list of resource providers into a list of hosts and replace"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_fd6c220a","line":141,"in_reply_to":"7a77a97e_4b4c9b70","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"4d9f4f8367b0402f6891abc0a711a76ecf42b7f1","unresolved":false,"context_lines":[{"line_number":140,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and"},{"line_number":141,"context_line":"  transform that object into a list of resource and traits criterias"},{"line_number":142,"context_line":"* Provide a method to call the placement API for getting the list of"},{"line_number":143,"context_line":"  resource providers that match those criterias."},{"line_number":144,"context_line":"* Translate that list of resource providers into a list of hosts and replace"},{"line_number":145,"context_line":"  the existing DB call by the HTTP call for the FilterScheduler driver only."},{"line_number":146,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_6b49575f","line":143,"updated":"2016-11-15 16:16:54.000000000","message":"ditto","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":140,"context_line":"* Add a new method that accepts a `nova.objects.RequestSpec` object and"},{"line_number":141,"context_line":"  transform that object into a list of resource and traits criterias"},{"line_number":142,"context_line":"* Provide a method to call the placement API for getting the list of"},{"line_number":143,"context_line":"  resource providers that match those criterias."},{"line_number":144,"context_line":"* Translate that list of resource providers into a list of hosts and replace"},{"line_number":145,"context_line":"  the existing DB call by the HTTP call for the FilterScheduler driver only."},{"line_number":146,"context_line":"* Leave NUMA and PCI device filters on the Python side of the scheduler for now"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_1d70fedb","line":143,"in_reply_to":"7a77a97e_6b49575f","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a927ee33b07aadb3fe596773d04435c86db3fae","unresolved":false,"context_lines":[{"line_number":166,"context_line":"Documentation Impact"},{"line_number":167,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"None."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"References"},{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_cf84175f","line":169,"updated":"2016-11-22 15:18:48.000000000","message":"As noted above, I think we have docs impacts for this, especially around the redundant filtering aspect. For sure we at least have release notes (that\u0027s a given), but probably also changes to the placement docs:\n\nhttp://docs.openstack.org/developer/nova/placement.html","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3f00db87a129868ebd2c72dfbe533b088739ae06","unresolved":false,"context_lines":[{"line_number":166,"context_line":"Documentation Impact"},{"line_number":167,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"None."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"References"},{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_3d5e9a45","line":169,"in_reply_to":"7a77a97e_cf84175f","updated":"2016-11-22 20:02:06.000000000","message":"Done","commit_id":"d10b03711f4703e519ab229b65d7e1843308d2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"65eec78f48caa659c89a4b175cfcc645a00457d3","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"After this change, the CoreFilter, RAMFilter and DiskFilter scheduler filters"},{"line_number":62,"context_line":"will be removed from the list of default scheduler filters. Of course, for"},{"line_number":63,"context_line":"existing deployments they will continue to have those filters in their list of"},{"line_number":64,"context_line":"enabled filters. We will log a warning saying those filters are now redundant"},{"line_number":65,"context_line":"and can safely be removed from the nova.conf file."}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a77a97e_180f2c89","line":62,"range":{"start_line":61,"start_character":0,"end_line":62,"end_character":59},"updated":"2016-11-22 20:21:07.000000000","message":"I think we agreed in IRC to do this in Pike. i.e. in Ocata if you\u0027re computes aren\u0027t updated and registered in the placement service then the query to the placement service doesn\u0027t return them, so we fallback to the DB get_all() call, and we do that until the computes are registered, or they are registered but overcommitted to the point they can\u0027t fulfill the placement request, in which case the placement query returns an empty list and we fallback to the DB query - but that\u0027s only for Ocata and we drop that fallback in Pike.","commit_id":"7e20a24c8af82449e448156888ffcd1ad83df245"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e78ae0b5e865fecdc0b43b3d094c8c4fbe0a5cd3","unresolved":false,"context_lines":[{"line_number":58,"context_line":"overrides the method that fetches the list of hosts. That means the"},{"line_number":59,"context_line":"CachingScheduler will *not* call the placement API."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"After this change, the CoreFilter, RAMFilter and DiskFilter scheduler filters"},{"line_number":62,"context_line":"will be removed from the list of default scheduler filters. Of course, for"},{"line_number":63,"context_line":"existing deployments they will continue to have those filters in their list of"},{"line_number":64,"context_line":"enabled filters. We will log a warning saying those filters are now redundant"},{"line_number":65,"context_line":"and can safely be removed from the nova.conf file."}],"source_content_type":"text/x-rst","patch_set":7,"id":"7a77a97e_18b9ec79","line":62,"range":{"start_line":61,"start_character":0,"end_line":62,"end_character":59},"in_reply_to":"7a77a97e_180f2c89","updated":"2016-11-22 20:24:34.000000000","message":"Can we throw the high-level fallback plan into the spec so it\u0027s not lost between here and implementation?","commit_id":"7e20a24c8af82449e448156888ffcd1ad83df245"}]}
