)]}'
{"specs/juno/isolate-scheduler-db.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"731c0c18db395c5f8253f97cf19f5bbf37e9024e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* We consider accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API as being part of the scheduler for the moment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bad4c104_12cedf83","line":49,"updated":"2014-04-29 19:48:49.000000000","message":"The above bullet point seems strange considering the bullet point directly above it. Did you mean to say that the services, vm_state, vm_mode and servicegroup API would *not* be considered part of this spec\u0027s scope?","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* We consider accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API as being part of the scheduler for the moment."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_2a2e9092","line":49,"in_reply_to":"bad4c104_12cedf83","updated":"2014-05-06 10:06:25.000000000","message":"I mean that accesses to services, vm_state and vm_mode tables won\u0027t be changed by this scope, so yes out of this bp scope.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"731c0c18db395c5f8253f97cf19f5bbf37e9024e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bad4c104_32cbe373","line":57,"updated":"2014-04-29 19:48:49.000000000","message":"++","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_4aa4b407","line":57,"in_reply_to":"9ad9bd40_91683af7","updated":"2014-05-06 10:06:25.000000000","message":"That\u0027s something really important to discuss. For baby steps, we took the decision in IRC to do this way, but I agree with the fact it could raise problems if aggregates are subject to change easily.\nWe should probably ask RT to update the aggregate stats when an API request is coming in.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c2ac6b0050f2b666874682f21ae62b998b75d18f","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_91683af7","line":57,"in_reply_to":"bad4c104_32cbe373","updated":"2014-04-30 12:17:37.000000000","message":"Feels like there would be a strange latency there between the user adding a host to an aggregate (API-\u003eDB) and the host detecting that its now part of an aggregate and reporting that to the scheduler.    \n\nHow would an admin know when it was safe to enable a new node because they are sure that the scheduler knows about all of the aggregate memebership.\n\nFeels more like the aggregate API should be updating the scheduler somehow.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"731c0c18db395c5f8253f97cf19f5bbf37e9024e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bad4c104_92a10fac","line":59,"updated":"2014-04-29 19:48:49.000000000","message":"? the compute_nodes table *is* querying the DB, no?","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c2ac6b0050f2b666874682f21ae62b998b75d18f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_f176e6d7","line":59,"in_reply_to":"9ad9bd40_79356745","updated":"2014-04-30 12:17:37.000000000","message":"Yep - I don\u0027t get this either.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_6a45f815","line":59,"in_reply_to":"9ad9bd40_f176e6d7","updated":"2014-05-06 10:06:25.000000000","message":"My bad, I was meaning to say that we will look at compute_nodes instead of aggregates","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"e916db2accfc6ff5767fe36dbcaadff625b1185b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of querying DB"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_79356745","line":59,"in_reply_to":"bad4c104_92a10fac","updated":"2014-04-30 05:37:30.000000000","message":"Same question with Jay Pipes. What is the difference of looks in to compute_nodes table and query DB? :-)","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"731c0c18db395c5f8253f97cf19f5bbf37e9024e","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":63,"context_line":"   select_destinations."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bad4c104_d2ab9787","line":63,"updated":"2014-04-29 19:48:49.000000000","message":"++","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"e916db2accfc6ff5767fe36dbcaadff625b1185b","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":63,"context_line":"   select_destinations."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_34e9261b","line":63,"updated":"2014-04-30 05:37:30.000000000","message":"Does the performance will be impacted if the OpenStack cluster has thousands of instances?","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c2ac6b0050f2b666874682f21ae62b998b75d18f","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":63,"context_line":"   select_destinations."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_9404a816","line":63,"updated":"2014-04-30 12:17:37.000000000","message":"So the list of instances on each host has to be passed into the scheduler just in case its needed ?  That seems really inefficient.\n\nConsider the case where an early filter reduces the list of possible hosts from 5000 to 20 - there are now 4980 lists of instances on hosts that were never needed.\n\nAs a typical example an AZ filter (which should always be early in the list) will reduce the list of possible hosts by 50% or more","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5b8605095ddb2acffcb93e1cc54d8b701e383f9f","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":63,"context_line":"   select_destinations."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_3f65e31d","line":63,"in_reply_to":"9ad9bd40_8ad31c03","updated":"2014-05-06 17:06:15.000000000","message":"Right. The key point here is to detach the scheduler from the nova database. And to do that, we must change the input into the scheduler to include the data that would have been looked up in the nova database. We can optimize (by use of caching and filtering) later on, but the scheduler may not be extricated from Nova until this happens.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":62,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":63,"context_line":"   select_destinations."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_8ad31c03","line":63,"in_reply_to":"9ad9bd40_9404a816","updated":"2014-05-06 10:06:25.000000000","message":"I\u0027m really concerned about the performance penalty. My problem is that a full list of hosts is better in terms of caching (only takes memory) compared to a call to conductor (RPC payload). I\u0027m keen to listen proposals here :-)","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c2ac6b0050f2b666874682f21ae62b998b75d18f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The other alternative would be to fork the scheduler code at a point in time to"},{"line_number":70,"context_line":"a separate Git repository, do the necessary changes within the code (unittests,"},{"line_number":71,"context_line":"imports). However neither syncing changes or having a code freeze on"},{"line_number":72,"context_line":"nova-scheduler seem like the best approach."}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_744d6472","line":69,"updated":"2014-04-30 12:17:37.000000000","message":"This is a generic alternative to creating a clean abstraction point in the code between Nova and the scheduler.\n\nWhat I\u0027d really like to see here is some thoughts on other ways of how to address this specific issue isolating the scheduler data model.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":66,"context_line":"Alternatives"},{"line_number":67,"context_line":"------------"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The other alternative would be to fork the scheduler code at a point in time to"},{"line_number":70,"context_line":"a separate Git repository, do the necessary changes within the code (unittests,"},{"line_number":71,"context_line":"imports). However neither syncing changes or having a code freeze on"},{"line_number":72,"context_line":"nova-scheduler seem like the best approach."}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_eaa58847","line":69,"in_reply_to":"9ad9bd40_744d6472","updated":"2014-05-06 10:06:25.000000000","message":"Done","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"e916db2accfc6ff5767fe36dbcaadff625b1185b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"-----------------"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":78,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_d4d9da84","line":78,"updated":"2014-04-30 05:37:30.000000000","message":"If \u0027aggregates\u0027 was put to compute_nodes, we still need to query compute_nodes table to get aggregation info?","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":75,"context_line":"-----------------"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":78,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_6a7178df","line":78,"in_reply_to":"9ad9bd40_d4d9da84","updated":"2014-05-06 10:06:25.000000000","message":"Indeed, same DB access, so no perfomance impact.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c2ac6b0050f2b666874682f21ae62b998b75d18f","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":78,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"REST API impact"},{"line_number":82,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_d47390af","line":79,"updated":"2014-04-30 12:17:37.000000000","message":"So that would cover the membership aspect of which aggregates a host belongs to -  but not how the scheduler then gets access to the aggregate metadata (which is what it needs to make the scheduling decision).    You wouldn\u0027t want to replicate that into each compute_node record.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d832652d167e35ffe524df5accfe1bbfdc76b490","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":78,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"REST API impact"},{"line_number":82,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ad9bd40_ca7fe4a9","line":79,"in_reply_to":"9ad9bd40_d47390af","updated":"2014-05-06 10:06:25.000000000","message":"Why wouldn\u0027t it be worth it ? Leaving this sentence unchanged, please feel free to comment again on this in the next patchset.","commit_id":"05dc7e9d2e931eed0439e21257918c30036b38bd"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/isolate-scheduler-db"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We want to split out nova-scheduler into gantt. To do this, we need to"},{"line_number":14,"context_line":"isolate the scheduler from the rest of nova."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"In this blueprint, we need to isolate all accesses to the database that"},{"line_number":17,"context_line":"Scheduler is doing and refactor code (manager, filters,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_182284b9","line":14,"updated":"2014-05-08 11:41:43.000000000","message":"good to say following on from the scheduler-lib split?","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/isolate-scheduler-db"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We want to split out nova-scheduler into gantt. To do this, we need to"},{"line_number":14,"context_line":"isolate the scheduler from the rest of nova."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"In this blueprint, we need to isolate all accesses to the database that"},{"line_number":17,"context_line":"Scheduler is doing and refactor code (manager, filters,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_0bcdb031","line":14,"in_reply_to":"7adec928_182284b9","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":18,"context_line":"weighters) so that scheduler is only internally accessing scheduler-related"},{"line_number":19,"context_line":"tables."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Note : this blueprint is targeted for Juno-2."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_98369402","line":21,"updated":"2014-05-08 11:41:43.000000000","message":"Not sure we want that in here.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"weighters) so that scheduler is only internally accessing scheduler-related"},{"line_number":19,"context_line":"tables."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Note : this blueprint is targeted for Juno-2."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_060be5d6","line":21,"in_reply_to":"7adec928_98369402","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cf7d629893d5f81f47473d7b5876a02bdeac62b","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Within scheduler code, some accesses are done to other DB tables like host"},{"line_number":28,"context_line":"aggregates or instances thanks to either API, conductor or SQLAlchemy"},{"line_number":29,"context_line":"directly. We need to figure out all the direct calls to these elements and"},{"line_number":30,"context_line":"refactor how resources are provided so that scheduler won\u0027t lookup at them"},{"line_number":31,"context_line":"directly."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"This change in approach for the gantt project was agreed at the Nova"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9ad9bd40_ff2c5bae","line":30,"updated":"2014-05-09 19:27:07.000000000","message":"s/lookup at them/look them up/ :)","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":28,"context_line":"aggregates or instances thanks to either API, conductor or SQLAlchemy"},{"line_number":29,"context_line":"directly. We need to figure out all the direct calls to these elements and"},{"line_number":30,"context_line":"refactor how resources are provided so that scheduler won\u0027t lookup at them"},{"line_number":31,"context_line":"directly."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"This change in approach for the gantt project was agreed at the Nova"},{"line_number":34,"context_line":"Icehouse mid-cycle meetup:"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_8290de96","line":31,"updated":"2014-05-08 11:41:43.000000000","message":"Can we split this into two clear cases please:\n\n* things the scheduler access outside of the compute_node table, and about compute nodes, we ensure they get copied into the compute_node table, by sending them via the update_node_stats scheduler lib call, e.g. availability zone, as specified in the aggregate\n\n* things the scheduler need about the wider context of a specific scheduling request, need to be passed into select_destination scheduler lib call, e.g. instance groups\n\nThen talk about the specifics in the proposed change section?\n\nI would like to set the ground rules, and let us find out more of the details as we spot them in specs that can then just reference this one, as required.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"aggregates or instances thanks to either API, conductor or SQLAlchemy"},{"line_number":29,"context_line":"directly. We need to figure out all the direct calls to these elements and"},{"line_number":30,"context_line":"refactor how resources are provided so that scheduler won\u0027t lookup at them"},{"line_number":31,"context_line":"directly."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"This change in approach for the gantt project was agreed at the Nova"},{"line_number":34,"context_line":"Icehouse mid-cycle meetup:"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_61265318","line":31,"in_reply_to":"7adec928_8290de96","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"The basic points to note about this change are:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* No change in behaviour. This is just a refactor."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* At the moment of writing this spec, only aggregates and instances accesses"},{"line_number":46,"context_line":"  are subject to change."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_e22b6280","line":43,"updated":"2014-05-08 11:41:43.000000000","message":"Not sure that is true, you are moving where data is stored in the Database, etc.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"The basic points to note about this change are:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"* No change in behaviour. This is just a refactor."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* At the moment of writing this spec, only aggregates and instances accesses"},{"line_number":46,"context_line":"  are subject to change."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_e17983fd","line":43,"in_reply_to":"7adec928_e22b6280","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"1c55dd4488168943d849a8f5812d21fcbd6cde97","unresolved":false,"context_lines":[{"line_number":45,"context_line":"* At the moment of writing this spec, only aggregates and instances accesses"},{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_5902d66f","line":48,"updated":"2014-05-16 14:28:34.000000000","message":"What about compute_nodes table? host_manager in nova scheduler need to access this table.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"* At the moment of writing this spec, only aggregates and instances accesses"},{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_e80ee833","line":48,"in_reply_to":"7adec928_5902d66f","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cf7d629893d5f81f47473d7b5876a02bdeac62b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9ad9bd40_e5876eb3","line":49,"updated":"2014-05-09 19:27:07.000000000","message":"++, much clearer :)","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c712bee01a84a5f1fe255b65f8c07009602d7f6e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_42e7b612","line":49,"updated":"2014-05-08 11:47:05.000000000","message":"Hmm, I am not so sure this should be out of scope here. I don\u0027t understand why the scheduler needs all that info, but I guess we have to draw the line somewhere.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_2dff0236","line":49,"in_reply_to":"7adec928_a2eebab2","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  are subject to change."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* Accesses to services table, vm_state, vm_mode modules and"},{"line_number":49,"context_line":"  servicegroup API are not scoped to change within this blueprint."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_a2eebab2","line":49,"in_reply_to":"9ad9bd40_e5876eb3","updated":"2014-05-21 14:52:31.000000000","message":"I\u0027m not sure we want to have a BP that only addresses part of the issue - a BP should IMO cover a range of related work packages,  SO you could make cleaning up access to each table a separate WP, but lets keep them in the same BP","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_025a0e83","line":59,"updated":"2014-05-21 14:52:31.000000000","message":"Individual filters shouldn\u0027t be looking in the DB at all - that\u0027s a big performance issue on a large system.   Instead we should make sure that all the required info is in either the request Spec or the host state.\n\nFor example metadata for each aggregate should be in the request spec, and membership of aggregates should be in the host state","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    scheduler the list of aggregates the host belongs to, as part of the RT"},{"line_number":57,"context_line":"    stats"},{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_0813145d","line":59,"in_reply_to":"7adec928_025a0e83","updated":"2014-05-26 13:56:26.000000000","message":"Done, thanks for that good catch !","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_22154af1","line":61,"updated":"2014-05-08 11:41:43.000000000","message":"Not sure this is quite the right way to do it... I think you need to list all the aggregates, and there associated properties for each host.\n\nNow, I feel what we should do here is using the extensible resource tracker system to create one that reports only the aggregate stats that are required by the user\u0027s current scheduler configuration.\n\nAlso the resource tracker should prehaps cache the result for a few hours? Or maybe just require nova-compute to get restarted to update the aggregate info? Maybe send an RPC request to clear the cache should an aggregate get updated? Not totally sure, but I feel we are missing some detail here.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c712bee01a84a5f1fe255b65f8c07009602d7f6e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_c2a106ab","line":61,"in_reply_to":"7adec928_22154af1","updated":"2014-05-08 11:47:05.000000000","message":"Just to be clear, we probably can\u0027t solve all these issues in one go, but we should choose something that is going to work, and document the limitations, and ideally the plans to go fix it.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_681ad86f","line":61,"in_reply_to":"7adec928_65c03c7d","updated":"2014-05-26 13:56:26.000000000","message":"will try to propose something, let me know if it\u0027s OK","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":58,"context_line":"  - update scheduler filters so that it looks into compute_nodes table instead"},{"line_number":59,"context_line":"    of aggregates"},{"line_number":60,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_65c03c7d","line":61,"in_reply_to":"7adec928_c2a106ab","updated":"2014-05-21 14:52:31.000000000","message":"In terms of getting something that can work I don\u0027t think that operationally you could live with the latency between a host being added to the aggregate in the API, and nova compute telling the scheduler some time later that its now in an aggregate.   \n\nIt depends to a large extent on the how that aggregate is used by the scheduler.  For example when adding a new host to the system and putting it into an AZ for example its safe to enable the service on that host since it just won\u0027t be counted as being in the requested AZ.  But if the aggregate is used, for example, to isolate VMS with particular image properties then if it gets enabled too soon it may be used for a VM that doesn\u0027t match.  \n\n I think we do need to agree an approach here, as this kind of data consistency issue is one of the big issues we have to solve in getting the required isolation for the scheduler - i.e it needs to be covered in the BP - not carried as a todo  item.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c712bee01a84a5f1fe255b65f8c07009602d7f6e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_a2eebaea","line":64,"updated":"2014-05-08 11:47:05.000000000","message":"Erm, don\u0027t you mean just the instances in that server group, and only when an appropriate scheduler filer is specified? Basically just moving the DB query from the scheduler into the API/conductor.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_e82508ac","line":64,"in_reply_to":"7adec928_65475c1e","updated":"2014-05-26 13:56:26.000000000","message":"just rewrited the sentence to make things a bit clearer (I hope)","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    removed from an aggregate"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_65475c1e","line":64,"in_reply_to":"7adec928_a2eebaea","updated":"2014-05-21 14:52:31.000000000","message":"Some of the existing filters don\u0027t use (pre-date) Server Groups John.  Maybe we need to consider depricating those in favour of server groups as part of this work ?","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cf7d629893d5f81f47473d7b5876a02bdeac62b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9ad9bd40_258eb6d0","line":67,"updated":"2014-05-09 19:27:07.000000000","message":"Right. The key point here is to detach the scheduler from the nova database. And to do that, we must change the input into the scheduler to include the data that would have been looked up in the nova database. We can optimize (by use of caching and filtering) later on, but the scheduler may not be extricated from Nova until this happens.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_e2d52244","line":67,"updated":"2014-05-08 11:41:43.000000000","message":"its not really performance issue in my head, its more architectural cleanliness, making the interface much clearer and smaller.\n\nBut yes, it probably would be worse performance wise too.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   we will provide full list of instances as filter property when calling"},{"line_number":65,"context_line":"   select_destinations. Here, we consider that passing a full list of instances"},{"line_number":66,"context_line":"   is better in performance rather than having the scheduler querying it thru"},{"line_number":67,"context_line":"   conductor (RPC payload penalty)."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_083a34cd","line":67,"in_reply_to":"9ad9bd40_258eb6d0","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3cf7d629893d5f81f47473d7b5876a02bdeac62b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"said, the problem here is that it increases response time (external call"},{"line_number":76,"context_line":"instead of direct DB access) and also creates an external dependency with Nova"},{"line_number":77,"context_line":"objects that would require to be turned into python-novaclient call once Gantt"},{"line_number":78,"context_line":"forklifted."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9ad9bd40_05a8d21e","line":78,"updated":"2014-05-09 19:27:07.000000000","message":"Exactly, couldn\u0027t agree more.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":75,"context_line":"said, the problem here is that it increases response time (external call"},{"line_number":76,"context_line":"instead of direct DB access) and also creates an external dependency with Nova"},{"line_number":77,"context_line":"objects that would require to be turned into python-novaclient call once Gantt"},{"line_number":78,"context_line":"forklifted."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_22d0ea4f","line":78,"updated":"2014-05-08 11:41:43.000000000","message":"Yeah, I think the clean interface is the more important concert here, but this does cover all the areas, so looks good.\n\nBut we are missing discussion around the different ways we can report up the aggregate capabilities.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":75,"context_line":"said, the problem here is that it increases response time (external call"},{"line_number":76,"context_line":"instead of direct DB access) and also creates an external dependency with Nova"},{"line_number":77,"context_line":"objects that would require to be turned into python-novaclient call once Gantt"},{"line_number":78,"context_line":"forklifted."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_2837f0e4","line":78,"in_reply_to":"7adec928_c55d90ee","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":75,"context_line":"said, the problem here is that it increases response time (external call"},{"line_number":76,"context_line":"instead of direct DB access) and also creates an external dependency with Nova"},{"line_number":77,"context_line":"objects that would require to be turned into python-novaclient call once Gantt"},{"line_number":78,"context_line":"forklifted."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_c55d90ee","line":78,"in_reply_to":"9ad9bd40_05a8d21e","updated":"2014-05-21 14:52:31.000000000","message":"+1","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":82,"context_line":"-----------------"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":85,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_62c11280","line":85,"updated":"2014-05-08 11:41:43.000000000","message":"Hmm, well there are no changes in the database required, independent of the extensible RT blueprint, given how things are already stored in a json blob in the DB today.\n\nBut you are changing what is stored in the database.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":82,"context_line":"-----------------"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":85,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_e85c2828","line":85,"in_reply_to":"7adec928_45f7c08c","updated":"2014-05-26 13:56:26.000000000","message":"well, tried to rewrite this","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":82,"context_line":"-----------------"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"None if we consider extensible RT blueprint for storing extra values;"},{"line_number":85,"context_line":"extra field \u0027aggregates\u0027 to be created to compute_nodes if not."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"REST API impact"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_45f7c08c","line":85,"in_reply_to":"7adec928_62c11280","updated":"2014-05-21 14:52:31.000000000","message":"I\u0027d like to see a better analysis of where the various data moves are going to happen.  The BP seems to be the right place to capture this kind of design / investigation - its more than just a concept description","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":109,"context_line":"Performance Impact"},{"line_number":110,"context_line":"------------------"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"None"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Other deployer impact"},{"line_number":115,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_a2007aab","line":112,"updated":"2014-05-08 11:41:43.000000000","message":"In this case, I feel we should comment on the details a little.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"Performance Impact"},{"line_number":110,"context_line":"------------------"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"None"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"Other deployer impact"},{"line_number":115,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_484b5c59","line":112,"in_reply_to":"7adec928_a2007aab","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Ideally:"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"* Filters should no longer place calls to other bits of code except Scheduler"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_220f0a32","line":124,"updated":"2014-05-08 11:41:43.000000000","message":"We can block this, in a similar way to how we block nova-compute from making any DB calls:\nhttps://github.com/openstack/nova/blob/master/nova/cmd/compute.py#L42\n\nI think this should be part of this blueprint, enforcing these changes by ensuring the scheduler is only able to make calls to certain DB tables, and then ensuring no other components can make those calls.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"9fbff25585bcc653e52dcacbc7c1fc8168849535","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Ideally:"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"* Filters should no longer place calls to other bits of code except Scheduler"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_c51110b1","line":124,"in_reply_to":"7adec928_220f0a32","updated":"2014-05-21 14:52:31.000000000","message":"+1","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"Ideally:"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"* Filters should no longer place calls to other bits of code except Scheduler"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_8874849d","line":124,"in_reply_to":"7adec928_c51110b1","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":149,"context_line":"* Pass list of instances as filter property on select_destinations()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Refactoring of filters by using filter_properties for list of instances"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_222c6a47","line":152,"updated":"2014-05-08 11:41:43.000000000","message":"As above, I fell we should also look at adding in DB restrictions, to enforce this split.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"* Pass list of instances as filter property on select_destinations()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Refactoring of filters by using filter_properties for list of instances"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_a8794095","line":152,"in_reply_to":"7adec928_222c6a47","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":156,"context_line":"Dependencies"},{"line_number":157,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"None (see references below)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Testing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_b8127060","line":159,"updated":"2014-05-08 11:41:43.000000000","message":"should have scheduler-lib here really, I guess? and maybe add resource tracker here.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":156,"context_line":"Dependencies"},{"line_number":157,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"None (see references below)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Testing"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_c86e8cc9","line":159,"in_reply_to":"7adec928_b8127060","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ebbecd9bc16a7bdbea60fde2ff80fbb91be6940","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"* Extensible ResourceTracker could avoid DB change for adding \u0027aggregates\u0027"},{"line_number":178,"context_line":"  field to compute_nodes"},{"line_number":179,"context_line":"  https://review.openstack.org/#/c/86050/"},{"line_number":180,"context_line":"  (pmurray)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"* Other effort related to RT using objects is not mandatory for this blueprint"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7adec928_42209649","line":179,"updated":"2014-05-08 11:41:43.000000000","message":"please reference the blueprint not the change.","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e8bdf01495b850bc81926af3926ef9945cab7a8a","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"* Extensible ResourceTracker could avoid DB change for adding \u0027aggregates\u0027"},{"line_number":178,"context_line":"  field to compute_nodes"},{"line_number":179,"context_line":"  https://review.openstack.org/#/c/86050/"},{"line_number":180,"context_line":"  (pmurray)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"* Other effort related to RT using objects is not mandatory for this blueprint"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5adbc538_e87348af","line":179,"in_reply_to":"7adec928_42209649","updated":"2014-05-26 13:56:26.000000000","message":"Done","commit_id":"17e279ca282594cb3f7999965e005258859f02cf"},{"author":{"_account_id":2033,"name":"Belmiro Moreira","email":"moreira.belmiro.email.lists@gmail.com","username":"moreira-belmiro-email-lists"},"change_message_id":"42594a1b8b62376d5444820b7d8f51d401ba1d04","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  are subject to change."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"* We are only considering how the scheduler is accessing Nova objects, not what"},{"line_number":51,"context_line":"  objects the scheduler is using. Considering this, accesses to coompute_nodes"},{"line_number":52,"context_line":"  and services table, vm_state, vm_mode modules and servicegroup API are"},{"line_number":53,"context_line":"  identified as being part of the scheduler. That said, once Gantt will be"},{"line_number":54,"context_line":"  forklifted as a separate project, it will require to have its own objects as"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_a75a6528","line":51,"updated":"2014-06-16 06:48:09.000000000","message":"Just a typo in compute_nodes","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8de7fbccc17c2fd8425529a12dd39cfac7f07b7c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  are subject to change."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"* We are only considering how the scheduler is accessing Nova objects, not what"},{"line_number":51,"context_line":"  objects the scheduler is using. Considering this, accesses to coompute_nodes"},{"line_number":52,"context_line":"  and services table, vm_state, vm_mode modules and servicegroup API are"},{"line_number":53,"context_line":"  identified as being part of the scheduler. That said, once Gantt will be"},{"line_number":54,"context_line":"  forklifted as a separate project, it will require to have its own objects as"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_8ee1322c","line":51,"in_reply_to":"1ae5cdf2_a75a6528","updated":"2014-07-07 15:09:44.000000000","message":"Done","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ab92a61e7d36b3fc7e4a84521f6139adf029e7e3","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  and services table, vm_state, vm_mode modules and servicegroup API are"},{"line_number":53,"context_line":"  identified as being part of the scheduler. That said, once Gantt will be"},{"line_number":54,"context_line":"  forklifted as a separate project, it will require to have its own objects as"},{"line_number":55,"context_line":"  the ones mentioned above."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_b2a2b098","line":55,"updated":"2014-06-30 16:59:05.000000000","message":"sorry, I don\u0027t really understand what you are trying to say here.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8de7fbccc17c2fd8425529a12dd39cfac7f07b7c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  and services table, vm_state, vm_mode modules and servicegroup API are"},{"line_number":53,"context_line":"  identified as being part of the scheduler. That said, once Gantt will be"},{"line_number":54,"context_line":"  forklifted as a separate project, it will require to have its own objects as"},{"line_number":55,"context_line":"  the ones mentioned above."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"1. Regarding accesses to aggregates table, the change we propose can be divided"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_5ce0df95","line":55,"in_reply_to":"baada198_b2a2b098","updated":"2014-07-07 15:09:44.000000000","message":"Rewriting this","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":9407,"name":"tan0","email":"tano.tum@gmail.com","username":"tanlin"},"change_message_id":"6ebf04c198ac356d83d17333ff651b72128a412d","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_3eab9cd7","line":63,"updated":"2014-06-09 09:24:12.000000000","message":"Hi, there could be a bug.\nBecause RT will only update every 60s. What if admin modify the aggregates of the host and run select_destinations immediately? Scheduler will select a host depend on wrong info. What do you think?","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ab92a61e7d36b3fc7e4a84521f6139adf029e7e3","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_b2c9d05c","line":63,"in_reply_to":"1ae5cdf2_3eab9cd7","updated":"2014-06-30 16:59:05.000000000","message":"This has been raised before, I feel we should cover this issue somewhere in the spec.\n\nMost scheduler info is always out of date, so thats expected, but this one is trickier because of the DB load.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8de7fbccc17c2fd8425529a12dd39cfac7f07b7c","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_bce65bae","line":63,"in_reply_to":"baada198_b2c9d05c","updated":"2014-07-07 15:09:44.000000000","message":"This is covered by the spec, see L72. I will move L72 to here for better clarity.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"df7e0e7f72ea4d4d597b2fb79f0b86e6928a53bc","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_044538b3","line":64,"updated":"2014-06-19 06:20:59.000000000","message":"@Sylvain, now I add all the aggregates info in request_spec. If only add the info as below, can we remove the IDs in the compute_nodes and also the API hook?\nin the filters, we can use the host_state.hosts(host name) to find the right aggregates the host belong to.\n\nfor example, only pass three aggregate keys \"host\" \u0027\u0027id \", \"metadate\"\nrequest_spec \u003d {\n u\u0027aggregates\u0027: [{u\u0027hosts\u0027: [u\u0027tianst\u0027],\n                        u\u0027id\u0027: 1,\n                        u\u0027metadata\u0027: {u\u0027dsa\u0027: u\u0027true\u0027}]\n}","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f21681b7c2b2e35995897c583d113929d0541d89","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_8eaec2e5","line":64,"in_reply_to":"1ae5cdf2_044538b3","updated":"2014-06-19 07:33:50.000000000","message":"IMHO, we still require to pass out the list of aggregates a compute host is belonging to thanks to RT in order to not change the logic of the filters: \n- user specifies a set of aggregates (or AZ) in the request thanks to either a hint or the --az flag\n- computes are part of aggregates with metadata (and so AZs)\n\nThese 2 notions are not the same thing : imagine an user asks to boot a VM on AZ1 (ie. agg1 with metadata AZ1). Agg1 only has node1 as hosts, so you will only pass in request_spec agg1 with node1\n\nWhen FilterScheduler will check aggs for node2, it won\u0027t know if node2 is part of agg1, hence the id to provide thru RT.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"6e27b1671b3a973830acb075c2e5551bdf857118","unresolved":false,"context_lines":[{"line_number":61,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_51b0dbfc","line":64,"in_reply_to":"1ae5cdf2_8eaec2e5","updated":"2014-06-19 08:21:02.000000000","message":"got it. only pass the metadata and id, drop all other info, right ?","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ab92a61e7d36b3fc7e4a84521f6139adf029e7e3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_f2da6816","line":65,"updated":"2014-06-30 16:59:05.000000000","message":"This doesn\u0027t sound like a good idea. Every request then gets lots of extra data.\n\nI think we need to look at a better approach, and probably on a case by case process.\n\nFor instance groups, we need to pass the current state of the instance group, but that is clearly request metadata, that is currently fetching in the scheduler, but should be fetched inside Nova. Its these kinds of issues that are more important to think about here.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8de7fbccc17c2fd8425529a12dd39cfac7f07b7c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":63,"context_line":"    RT stats"},{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_1c24a7c3","line":65,"in_reply_to":"baada198_f2da6816","updated":"2014-07-07 15:09:44.000000000","message":"Rewriting that part too","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ab92a61e7d36b3fc7e4a84521f6139adf029e7e3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"  - provide aggregates metadata as part of the request_spec argument of"},{"line_number":65,"context_line":"    select_destinations() when filtering from explicit aggregates or AZs"},{"line_number":66,"context_line":"  - update scheduler filters so that it looks into HostState instead"},{"line_number":67,"context_line":"    of aggregates and gets the associate metadata in request_spec"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"For making sure there is no crucial latency in between aggregates changes in"},{"line_number":70,"context_line":"API and scheduler-related view, we can propose an extra 4th step :"}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_9203ec72","line":67,"updated":"2014-06-30 16:59:05.000000000","message":"This we certainly should do this one. But really this means get the data that is required into the HostState, then start queuing that new data instead of the old data, in some new filters.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"0c932d5c6d0f0b7c4bd06ce8eb1a017dc7a9db5c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"API and scheduler-related view, we can propose an extra 4th step :"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"  - hook the API to call RT for updating host state if hosts are added or"},{"line_number":73,"context_line":"    removed from an aggregate"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"2. Regarding accesses to instances (Affinity, Trusted, TypeAffinity filters),"},{"line_number":76,"context_line":"   we will provide the list of instances belonging to the desired  ServerGroup"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1ae5cdf2_7cc7ec64","line":73,"updated":"2014-06-09 10:32:17.000000000","message":"Lin, this may solve your question, Since this doesn\u0027t make sense, another way to chose?","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ab92a61e7d36b3fc7e4a84521f6139adf029e7e3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"moving the whole aggregate concept into the scheduler for its solely use, but"},{"line_number":94,"context_line":"we think the proposal we made is the most performance-wise."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_d2500461","line":96,"updated":"2014-06-30 16:59:05.000000000","message":"There is a much nicer alternative here I think:\n\nCreate the gantt project so it supports only the filters and weights that work with the existing data flow (given we have things like this happening\nhttp://git.openstack.org/cgit/openstack/nova-specs/tree/specs/juno/allocation-ratio-to-resource-tracker.rst)\n\nThen look to extend the data supplied by Nova to add extra feature support to the Gantt scheduler, (the first one will be instance groups I think).\n\nOther things will involve extending the extensible resource tracker efforts.","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8de7fbccc17c2fd8425529a12dd39cfac7f07b7c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"moving the whole aggregate concept into the scheduler for its solely use, but"},{"line_number":94,"context_line":"we think the proposal we made is the most performance-wise."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Data model impact"},{"line_number":98,"context_line":"-----------------"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"baada198_1c0bc72a","line":96,"in_reply_to":"baada198_d2500461","updated":"2014-07-07 15:09:44.000000000","message":"Asked community about this http://lists.openstack.org/pipermail/openstack-dev/2014-July/039309.html\n\nas I think it\u0027s a change of plans from what has been agreed at last Summit","commit_id":"144aba6a6422d411733ee06597ba8f4329c7523e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"356d58914036f26666fdd887a654f6c693a6a982","unresolved":false,"context_lines":[{"line_number":26,"context_line":"In order to make decisions, the scheduler needs to know the state of very"},{"line_number":27,"context_line":"different Nova objects depending on which filter to run, like aggregates or"},{"line_number":28,"context_line":"instance groups. At the moment, the scheduler is directly reading values from"},{"line_number":29,"context_line":"DB or conductor while it should not, if we want to do a clean split."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Here we can consider two distinct concerns :"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"baada198_786d56cc","line":29,"updated":"2014-07-16 09:12:55.000000000","message":"I think you are muddling things here.\n\nThe problem is that the scheduler filters and weights are using things other than the HostState object, such as aggregate metadata to make their decisions. \n\nWe need all the filters to start using new locations for the data.","commit_id":"98d84bb7a361841e1d1e2a3d7308995b86c5d9ca"},{"author":{"_account_id":1981,"name":"Don Dugger","email":"n0ano@n0ano.com","username":"n0ano"},"change_message_id":"372ed99668243132f5b8705c51abe77000edc2d9","unresolved":false,"context_lines":[{"line_number":101,"context_line":"  - For each aggregate creation/update in the Compute API, calls"},{"line_number":102,"context_line":"    scheduler.client.update_resource_stats(name, values) with the name is"},{"line_number":103,"context_line":"    a tuple (aggregate, \u0027id\u0027) where id is the id of the aggregate, and where"},{"line_number":104,"context_line":"    values is the metadata of the aggregate"},{"line_number":105,"context_line":"  - amend scheduler.client.update_resource_stats so if name is (agg, id), do"},{"line_number":106,"context_line":"    nothing (will be honored for Gantt, not for Nova)"},{"line_number":107,"context_line":"  - modify HostManager so it builds aggregates info in HostState by querying"}],"source_content_type":"text/x-rst","patch_set":8,"id":"baada198_4761aaa7","line":104,"updated":"2014-07-08 02:13:25.000000000","message":"If you call update_resource_stats on aggregate creation/update what do you do when an aggregate is deleted?  There has to be someway to remove a host from an aggregate.","commit_id":"98d84bb7a361841e1d1e2a3d7308995b86c5d9ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b039270b7e58ae3d81aaffe182011d4a7f555975","unresolved":false,"context_lines":[{"line_number":101,"context_line":"  - For each aggregate creation/update in the Compute API, calls"},{"line_number":102,"context_line":"    scheduler.client.update_resource_stats(name, values) with the name is"},{"line_number":103,"context_line":"    a tuple (aggregate, \u0027id\u0027) where id is the id of the aggregate, and where"},{"line_number":104,"context_line":"    values is the metadata of the aggregate"},{"line_number":105,"context_line":"  - amend scheduler.client.update_resource_stats so if name is (agg, id), do"},{"line_number":106,"context_line":"    nothing (will be honored for Gantt, not for Nova)"},{"line_number":107,"context_line":"  - modify HostManager so it builds aggregates info in HostState by querying"}],"source_content_type":"text/x-rst","patch_set":8,"id":"baada198_3fd2e834","line":104,"in_reply_to":"baada198_4761aaa7","updated":"2014-07-08 14:01:04.000000000","message":"Indeed, we need to find a way to remove a resource using update_resource_stats... Good catch, we need to discuss it, not yet consensus on it.","commit_id":"98d84bb7a361841e1d1e2a3d7308995b86c5d9ca"},{"author":{"_account_id":1981,"name":"Don Dugger","email":"n0ano@n0ano.com","username":"n0ano"},"change_message_id":"372ed99668243132f5b8705c51abe77000edc2d9","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    a tuple (aggregate, \u0027id\u0027) where id is the id of the aggregate, and where"},{"line_number":104,"context_line":"    values is the metadata of the aggregate"},{"line_number":105,"context_line":"  - amend scheduler.client.update_resource_stats so if name is (agg, id), do"},{"line_number":106,"context_line":"    nothing (will be honored for Gantt, not for Nova)"},{"line_number":107,"context_line":"  - modify HostManager so it builds aggregates info in HostState by querying"},{"line_number":108,"context_line":"    all Aggregate objects."},{"line_number":109,"context_line":"  - update scheduler filters so that it looks into HostState instead"}],"source_content_type":"text/x-rst","patch_set":8,"id":"baada198_47e0cacc","line":106,"updated":"2014-07-08 02:13:25.000000000","message":"Are you saying the update_resource_stats runs in two contexts, in the nova context it ignores (app, id) while in the gantt context if processes (app, id).  It would be nice if there were only one instance of update_resource_stats running in one context.","commit_id":"98d84bb7a361841e1d1e2a3d7308995b86c5d9ca"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b039270b7e58ae3d81aaffe182011d4a7f555975","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    a tuple (aggregate, \u0027id\u0027) where id is the id of the aggregate, and where"},{"line_number":104,"context_line":"    values is the metadata of the aggregate"},{"line_number":105,"context_line":"  - amend scheduler.client.update_resource_stats so if name is (agg, id), do"},{"line_number":106,"context_line":"    nothing (will be honored for Gantt, not for Nova)"},{"line_number":107,"context_line":"  - modify HostManager so it builds aggregates info in HostState by querying"},{"line_number":108,"context_line":"    all Aggregate objects."},{"line_number":109,"context_line":"  - update scheduler filters so that it looks into HostState instead"}],"source_content_type":"text/x-rst","patch_set":8,"id":"baada198_5f095cdc","line":106,"in_reply_to":"baada198_47e0cacc","updated":"2014-07-08 14:01:04.000000000","message":"It was previously defined that both clients for nova-scheduler and gantt would have the same interface but not the same implementation, so I think this is normal to have 2 different contexts providing the I/O would remain the same...","commit_id":"98d84bb7a361841e1d1e2a3d7308995b86c5d9ca"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a88dbf676ef4fed90f9d983d115f10e1670800fd","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"  - modify ResourceTracker update_available_resource so that it provides to"},{"line_number":100,"context_line":"    scheduler a list of IDs of aggregates the host belongs to, as part of the"},{"line_number":101,"context_line":"    RT stats"},{"line_number":102,"context_line":"  - Modify conductor so it provides in request_spec a list of aggregates IDs"},{"line_number":103,"context_line":"    having in metadata either :"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"baada198_8b94fa8c","line":101,"updated":"2014-07-25 12:10:31.000000000","message":"I thought we decided against this? The host reports associated metadata, as required, instead?","commit_id":"2d17bd8f872cf871c326c3b596b7a8b166f080e4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a88dbf676ef4fed90f9d983d115f10e1670800fd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    A new method will be provided in scheduler.utils for getting the list of"},{"line_number":111,"context_line":"    active filters, so the conductor can call it. That requires to have"},{"line_number":112,"context_line":"    nova.conf identical if Scheduler and Conductor services are not on the same"},{"line_number":113,"context_line":"    host."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"  - update scheduler filters so that it looks into request_spec to get the list"},{"line_number":116,"context_line":"    of validated aggregates and compare it with their own list of aggregates"}],"source_content_type":"text/x-rst","patch_set":9,"id":"baada198_6b6ec6c9","line":113,"updated":"2014-07-25 12:10:31.000000000","message":"I don\u0027t think thats required. By default everything does everything. Deployers can optimise things by turning some off, and we can add that as an extra feature later.\n\nI say this, because it also affects API validation, etc.","commit_id":"2d17bd8f872cf871c326c3b596b7a8b166f080e4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a88dbf676ef4fed90f9d983d115f10e1670800fd","unresolved":false,"context_lines":[{"line_number":119,"context_line":"3. For instances, we propose the following :"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"  - RT.update_available_resource reports the list of instance UUIDs the host is"},{"line_number":122,"context_line":"    running with their respective flavor (needed for TypeAffinityFilter)"},{"line_number":123,"context_line":"  - filters will look into HostState to know if they run the instance asked in"},{"line_number":124,"context_line":"    the hint"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"baada198_ebb01642","line":122,"updated":"2014-07-25 12:10:31.000000000","message":"I thought we decided against this now? The host reports \"affinity information\" instead.","commit_id":"2d17bd8f872cf871c326c3b596b7a8b166f080e4"},{"author":{"_account_id":1981,"name":"Don Dugger","email":"n0ano@n0ano.com","username":"n0ano"},"change_message_id":"91e481908f77af3b96525111e8e68f193ddff8c1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the field"},{"line_number":139,"context_line":"is there, and if not failback to calling the corresponding Nova object."},{"line_number":140,"context_line":"So, Juno scheduler filters will have compatibility filters and upgrade to Kilo"},{"line_number":141,"context_line":"will see the failback mode removed (because Juno computes will provide stats)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":11,"id":"baada198_8484ceb1","line":141,"updated":"2014-07-26 03:19:19.000000000","message":"Note for future reference.  The fallback calls into Nova objects will need to be removed before we split the scheduler out into Gantt but that\u0027s a separate problem, just wanted to make sure we\u0027re aware of that.","commit_id":"938f817099abcb8a188d35f453fa408f506b8151"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"1d38a013766f0f54595b16f29f224281bb4a29cd","unresolved":false,"context_lines":[{"line_number":138,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the field"},{"line_number":139,"context_line":"is there, and if not failback to calling the corresponding Nova object."},{"line_number":140,"context_line":"So, Juno scheduler filters will have compatibility filters and upgrade to Kilo"},{"line_number":141,"context_line":"will see the failback mode removed (because Juno computes will provide stats)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":11,"id":"baada198_a96358a9","line":141,"in_reply_to":"baada198_8484ceb1","updated":"2014-07-28 07:39:37.000000000","message":"The scheduler code will need a cleanup when splitting out Nova, so indeed we\u0027ll remove the call at this time but we need to make sure that nova-scheduler code will run it for Juno.","commit_id":"938f817099abcb8a188d35f453fa408f506b8151"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"09e4c6b75d08c87e2a218c4c2079e55a9b1041c1","unresolved":false,"context_lines":[{"line_number":138,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the field"},{"line_number":139,"context_line":"is there, and if not failback to calling the corresponding Nova object."},{"line_number":140,"context_line":"So, Juno scheduler filters will have compatibility filters and upgrade to Kilo"},{"line_number":141,"context_line":"will see the failback mode removed (because Juno computes will provide stats)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":11,"id":"baada198_1c71e376","line":141,"in_reply_to":"baada198_a96358a9","updated":"2014-08-04 10:44:26.000000000","message":"+1 I think that can be assumed, no need for another revision.","commit_id":"938f817099abcb8a188d35f453fa408f506b8151"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"09e4c6b75d08c87e2a218c4c2079e55a9b1041c1","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"Possibly some little increases in performance as the scheduler won\u0027t no longer"},{"line_number":193,"context_line":"access other Nova objects thru conductor but rather will look at"},{"line_number":194,"context_line":"filter_properties or request_spec that are passed thru RPC payload."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"Other deployer impact"}],"source_content_type":"text/x-rst","patch_set":11,"id":"baada198_5cfefbaf","line":194,"updated":"2014-08-04 10:44:26.000000000","message":"Could get increased DB load in some cases I guess, but we can ignore that for now.","commit_id":"938f817099abcb8a188d35f453fa408f506b8151"}],"specs/kilo/approved/isolate-scheduler-db-aggregates.rst":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"546717512ed413433e4318396e15d425bd90e7c8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"-----------------"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"This blueprint is part of the \u0027scheduler\u0027 refactoring effort identified as the"},{"line_number":53,"context_line":"3rd priority for Kilo (see footnote [1])."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_2c975d49","line":53,"updated":"2014-11-25 18:31:55.000000000","message":"Nit: no need to reference the list here.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"546717512ed413433e4318396e15d425bd90e7c8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"  - list of hosts belonging to it"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"That method would be called at the aggregates helper module level, in each"},{"line_number":74,"context_line":"method responsible for actually updating the Aggregate object."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_2cd3dd04","line":74,"updated":"2014-11-25 18:31:55.000000000","message":"I do wonder if it should be called a \"host group\", or \"host aggregate\" but thats detail for the code review.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"546717512ed413433e4318396e15d425bd90e7c8","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"That method would be called at the aggregates helper module level, in each"},{"line_number":74,"context_line":"method responsible for actually updating the Aggregate object."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"},{"line_number":78,"context_line":"using the corresponding Resource.usage(). That will require to update the"}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_ac06ed83","line":75,"updated":"2014-11-25 18:31:55.000000000","message":"Nit: extra empty line here.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"546717512ed413433e4318396e15d425bd90e7c8","unresolved":false,"context_lines":[{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"},{"line_number":78,"context_line":"using the corresponding Resource.usage(). That will require to update the"},{"line_number":79,"context_line":"Scheduler RPC API to add update_aggregate() so that the Manager can directly"},{"line_number":80,"context_line":"access HostState."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Once all of that would be done, filters would just have to look into HostState"},{"line_number":83,"context_line":"to access what they need."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_db4f6890","line":80,"updated":"2014-11-25 18:31:55.000000000","message":"I don\u0027t think the scheduler should be updating the database.\n\nYou can have a scheduler client API that happens to make a conductor call to update the DB, but the nova-scheduler should not be tasked with updating the DB.\n\nIts a scale problem. The above requests scales with the number of hosts, the current scheduler scales with the number of requests.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"59f75fddbd7dcd0cf9e244f195796c2be243c521","unresolved":false,"context_lines":[{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"},{"line_number":78,"context_line":"using the corresponding Resource.usage(). That will require to update the"},{"line_number":79,"context_line":"Scheduler RPC API to add update_aggregate() so that the Manager can directly"},{"line_number":80,"context_line":"access HostState."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Once all of that would be done, filters would just have to look into HostState"},{"line_number":83,"context_line":"to access what they need."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_8921fa9f","line":80,"in_reply_to":"5a890539_81b2b803","updated":"2014-11-26 13:31:46.000000000","message":"I\u0027m just wondering if we need this in the host state at all. We did talk about doing it that way before, but I wonder if keeping aggregates as a separate data structure is more appropriate given the host state is generated whole at the moment.\n\nhttps://review.openstack.org/#/c/133083/ adds to an earlier patch to objectify the use of aggregates in filters. The methods in nova/scheduler/filters/utils.py could do exactly what you suggest (work on a cache or fall back to the database if the cache is not initialised). \n\nThe cache could be optimized by deriving a map (host-\u003eaggregate meta data) - but that could be just implementation detail - the point is we don\u0027t necessarily need to talk about putting it in HostState here. All we need is that the data is cached in the scheduler and updated when the cache is empty (by reading the DB) or if the update_aggregate() method is called (possibly without reading the DB - just using data communicated in the method call). Data can always be written to the DB by the client, initially to the nova DB, but eventually to the scheduler (Gantt) DB.\n\nI think that would address John\u0027s concerns about scaling and DB access. John?","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"63a20fa9ef56d98d53b0d390308a67189a7dfcb5","unresolved":false,"context_lines":[{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"},{"line_number":78,"context_line":"using the corresponding Resource.usage(). That will require to update the"},{"line_number":79,"context_line":"Scheduler RPC API to add update_aggregate() so that the Manager can directly"},{"line_number":80,"context_line":"access HostState."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Once all of that would be done, filters would just have to look into HostState"},{"line_number":83,"context_line":"to access what they need."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_29d5661b","line":80,"in_reply_to":"5a890539_8921fa9f","updated":"2014-11-26 13:37:23.000000000","message":"I think somewhere between what I thought you were doing, and what paul is describing, is probably the correct approach here. Still quite uncertain about whats planned here.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3effad088229346e69b9813538238476a5c5f441","unresolved":false,"context_lines":[{"line_number":77,"context_line":"The implementation proposal for that method would consist in updating HostState"},{"line_number":78,"context_line":"using the corresponding Resource.usage(). That will require to update the"},{"line_number":79,"context_line":"Scheduler RPC API to add update_aggregate() so that the Manager can directly"},{"line_number":80,"context_line":"access HostState."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Once all of that would be done, filters would just have to look into HostState"},{"line_number":83,"context_line":"to access what they need."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_81b2b803","line":80,"in_reply_to":"5a890539_db4f6890","updated":"2014-11-26 10:55:18.000000000","message":"John, I think there is a misunderstanding : we are not proposing to update the DB, but HostState which is an internal object, see the data model impact session.\n\nCRUD actions on Aggregates are still going on the DB within the nova-api service (called by aggregates helper module), we will just add a RPC call to the scheduler API for notifying the scheduler, which would update its internal view.\n\nThat said, as it\u0027s provided at the end of this section, we still have to consider why the Aggregates should still be managed by Nova and not the Scheduler, as it\u0027s a segregatation notion.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"546717512ed413433e4318396e15d425bd90e7c8","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to access what they need."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"In order to provide compatibility in between distinct releases of compute nodes"},{"line_number":86,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the field"},{"line_number":87,"context_line":"is there, and if not failback to calling the corresponding Aggregate object."},{"line_number":88,"context_line":"That also allows to manage the case when the Scheduler service is restarted, as"},{"line_number":89,"context_line":"HostState is not persisted yet."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_b628f386","line":86,"updated":"2014-11-25 18:31:55.000000000","message":"I want to say host state should be an object that can lazy load of the aggregate from the DB, if thats required, and is missing. But this is a bit too much into implementation details, so I will ignore that, but it might be good to make that paragraph more generic and talk about the approach, not the implementation details.","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3effad088229346e69b9813538238476a5c5f441","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to access what they need."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"In order to provide compatibility in between distinct releases of compute nodes"},{"line_number":86,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the field"},{"line_number":87,"context_line":"is there, and if not failback to calling the corresponding Aggregate object."},{"line_number":88,"context_line":"That also allows to manage the case when the Scheduler service is restarted, as"},{"line_number":89,"context_line":"HostState is not persisted yet."}],"source_content_type":"text/x-rst","patch_set":15,"id":"5a890539_c1d200ff","line":86,"in_reply_to":"5a890539_b628f386","updated":"2014-11-26 10:55:18.000000000","message":"HostState is already an object, generated by HostManager.get_all_host_states() method which itselt is called during a select_destinations() call","commit_id":"df926d9abc7d6e2dedac4ec2c4ac241aa8b14970"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":17,"context_line":"In this blueprint, we need to isolate all accesses to the database that"},{"line_number":18,"context_line":"Scheduler is doing and refactor code (manager, filters,"},{"line_number":19,"context_line":"weighters) so that scheduler is only internally accessing scheduler-related"},{"line_number":20,"context_line":"tables or resources."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Note : this spec is only targeting changes to the Aggregates-related filters."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_39c3d639","line":20,"updated":"2014-12-16 12:09:56.000000000","message":"I don\u0027t think the aggregates are used outside scheduling, so I would imagine this just means that the aggregates table becomes a scheduler owned table.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0a282116817ed24eb5375c6e6a36c578c8923d41","unresolved":false,"context_lines":[{"line_number":17,"context_line":"In this blueprint, we need to isolate all accesses to the database that"},{"line_number":18,"context_line":"Scheduler is doing and refactor code (manager, filters,"},{"line_number":19,"context_line":"weighters) so that scheduler is only internally accessing scheduler-related"},{"line_number":20,"context_line":"tables or resources."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Note : this spec is only targeting changes to the Aggregates-related filters."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_4aba820b","line":20,"in_reply_to":"3a961159_39c3d639","updated":"2014-12-16 15:00:08.000000000","message":"That\u0027s mentioned in the alternatives section","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cb0087ce84fee0a31d899009b4a0cc2be98b0c54","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"In order to make decisions implying aggregates context, the scheduler needs to"},{"line_number":29,"context_line":"directly access values from DB or conductor while it should not, considering"},{"line_number":30,"context_line":"that Aggregates are Nova objects and are no stored on the scheduler tables."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Below is the summary of all filters impacted by that proposal"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_b6228fb6","line":30,"updated":"2014-12-15 16:55:01.000000000","message":"Would you mind reworking this paragraph. It doesn\u0027t really make sense, grammatically. How about something like this?\n\nWhen making decisions involving information about an aggregate, the scheduler accesses the Nova DB\u0027s aggregates table either directly or indirectly via nova.objects.AggregateList. In order for the split of the scheduler to be clean, any access by the Nova scheduler to tables that will stay in the Nova DB (i.e. aggregates table) must be refactored so that the scheduler has an API method that allows nova-conductor or other services to update the scheduler\u0027s view of aggregate information.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0a282116817ed24eb5375c6e6a36c578c8923d41","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"In order to make decisions implying aggregates context, the scheduler needs to"},{"line_number":29,"context_line":"directly access values from DB or conductor while it should not, considering"},{"line_number":30,"context_line":"that Aggregates are Nova objects and are no stored on the scheduler tables."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Below is the summary of all filters impacted by that proposal"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_6a365eb6","line":30,"in_reply_to":"3a961159_b6228fb6","updated":"2014-12-16 15:00:08.000000000","message":"Done","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"f09cc0c0e00ca6719160d8bd38381b7728a8d2f3","unresolved":false,"context_lines":[{"line_number":50,"context_line":"-----------------"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"This blueprint is part of the \u0027scheduler\u0027 refactoring effort identified as a"},{"line_number":53,"context_line":"priority for Kilo."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_89704741","line":53,"updated":"2014-12-12 20:08:50.000000000","message":"Yup","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"f09cc0c0e00ca6719160d8bd38381b7728a8d2f3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The strategy will consist in updating the scheduler each time a change comes"},{"line_number":60,"context_line":"to an Aggregate (adding or removing a host or changing metadata)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"As the current Scheduler design scales with the number of requests (for each"},{"line_number":63,"context_line":"request, a new HostState object is generated using get_all_host_states method"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_69acfb8c","line":60,"updated":"2014-12-12 20:08:50.000000000","message":"as this is an infrequent action, makes sense.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1959a78b953cdc8a25dc42fe34399c2e580fa606","unresolved":false,"context_lines":[{"line_number":75,"context_line":"That would consequently require to create a new table in the Nova DB,"},{"line_number":76,"context_line":"considered as a duplicate or a close sibling of the aggregates table,"},{"line_number":77,"context_line":"but fully owned by the Scheduler in the eventuality where the Scheduler lifts"},{"line_number":78,"context_line":"off from Nova and becomes a separate entity."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We also understand that the problem of providing aggregate information to the"},{"line_number":81,"context_line":"Scheduler can be tied to a more global problem where some contextual"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_e9071580","line":78,"updated":"2014-12-12 16:07:28.000000000","message":"Admittedly I don\u0027t have all the context, but I don\u0027t understand what\u0027s being proposed from the above description. I don\u0027t understand the relationship between Nova\u0027s aggregates tables and the scheduler\u0027s topology tables.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cb0087ce84fee0a31d899009b4a0cc2be98b0c54","unresolved":false,"context_lines":[{"line_number":75,"context_line":"That would consequently require to create a new table in the Nova DB,"},{"line_number":76,"context_line":"considered as a duplicate or a close sibling of the aggregates table,"},{"line_number":77,"context_line":"but fully owned by the Scheduler in the eventuality where the Scheduler lifts"},{"line_number":78,"context_line":"off from Nova and becomes a separate entity."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We also understand that the problem of providing aggregate information to the"},{"line_number":81,"context_line":"Scheduler can be tied to a more global problem where some contextual"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_ece28b2e","line":78,"in_reply_to":"3a961159_895cd14c","updated":"2014-12-15 16:55:01.000000000","message":"The above two paragraphs really don\u0027t make a whole lot of sense to me. Why not just say:\n\nWe propose that when changes are made on the Nova side to a host aggregate, the scheduler shall be notified of those changes.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f1f8613788efa9623fd2cca35ac795147bb15bf0","unresolved":false,"context_lines":[{"line_number":75,"context_line":"That would consequently require to create a new table in the Nova DB,"},{"line_number":76,"context_line":"considered as a duplicate or a close sibling of the aggregates table,"},{"line_number":77,"context_line":"but fully owned by the Scheduler in the eventuality where the Scheduler lifts"},{"line_number":78,"context_line":"off from Nova and becomes a separate entity."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We also understand that the problem of providing aggregate information to the"},{"line_number":81,"context_line":"Scheduler can be tied to a more global problem where some contextual"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_895cd14c","line":78,"in_reply_to":"3a961159_e9071580","updated":"2014-12-12 16:17:31.000000000","message":"There is no relationship, only a matter of having the Scheduler its own tables. Again, see the alternatives section.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":75,"context_line":"That would consequently require to create a new table in the Nova DB,"},{"line_number":76,"context_line":"considered as a duplicate or a close sibling of the aggregates table,"},{"line_number":77,"context_line":"but fully owned by the Scheduler in the eventuality where the Scheduler lifts"},{"line_number":78,"context_line":"off from Nova and becomes a separate entity."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"We also understand that the problem of providing aggregate information to the"},{"line_number":81,"context_line":"Scheduler can be tied to a more global problem where some contextual"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_59eee2b5","line":78,"in_reply_to":"3a961159_ece28b2e","updated":"2014-12-16 12:09:56.000000000","message":"Agree - the scheduler could get a similar API to Nova\u0027s aggregates - in the future the scheduler could own aggregates altogether.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":86,"context_line":"future some information related to physical racks (for affinity purpose) that"},{"line_number":87,"context_line":"could be populated to the scheduler using the same table so that a"},{"line_number":88,"context_line":"potential RackAffinityFilter (I\u0027m very poor at naming things) could actually"},{"line_number":89,"context_line":"filter out hosts based on that info."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"This table would get the following model ::"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_b98266c6","line":89,"updated":"2014-12-16 12:09:56.000000000","message":"While this is interesting, I think it would be better to reduce the scope to just talking about aggregates. We can have a discussion about general models later (and there would be a lot of discussion about that!)","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cb0087ce84fee0a31d899009b4a0cc2be98b0c54","unresolved":false,"context_lines":[{"line_number":114,"context_line":"          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":115,"context_line":"              \u0027TopologyInformation.id \u003d\u003d TopologyMetadata.topology_id,\u0027"},{"line_number":116,"context_line":"              \u0027TopologyMetadata.deleted \u003d\u003d 0,\u0027"},{"line_number":117,"context_line":"              \u0027TopologyInformation.deleted \u003d\u003d 0)\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"Of course, we plan to follow the existing normalization and have foreign keys"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_cc186f21","line":117,"updated":"2014-12-15 16:55:01.000000000","message":"I don\u0027t understand the need to talk about a table in a database at all, or the above example table about topologies. We are talking about in-memory data in the scheduler only, not persistent data. The scheduler should call the Nova API on startup to populate its view of aggregate information and allow the newly-proposed update_aggregate() RPC API call to update that view of the aggregates. There should not be any new database table added in this spec.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23fcb810a0bac48c42f757f07ac7af0a2d7c0d29","unresolved":false,"context_lines":[{"line_number":114,"context_line":"          primaryjoin\u003d\u0027and_(\u0027"},{"line_number":115,"context_line":"              \u0027TopologyInformation.id \u003d\u003d TopologyMetadata.topology_id,\u0027"},{"line_number":116,"context_line":"              \u0027TopologyMetadata.deleted \u003d\u003d 0,\u0027"},{"line_number":117,"context_line":"              \u0027TopologyInformation.deleted \u003d\u003d 0)\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"Of course, we plan to follow the existing normalization and have foreign keys"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_6643126d","line":117,"in_reply_to":"3a961159_cc186f21","updated":"2014-12-15 20:05:33.000000000","message":"Yeah, is this actually proposed to be added, or just an example of a thing that could exist? If the latter, it should be removed I think as it just clouds the issue.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"56e78beb79953297083e5b2d7d861496d0f43f9f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"      key \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_22de2140","line":150,"updated":"2014-12-09 09:19:08.000000000","message":"Is this bad like instance\u0027s system_metadata, we should use blob like instance_extra?","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b61deb07404f6126320e9035c7de985f4dc41d49","unresolved":false,"context_lines":[{"line_number":147,"context_line":"      key \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_cea106ab","line":150,"in_reply_to":"3a961159_22de2140","updated":"2014-12-09 10:18:48.000000000","message":"I tried to provide the same normalized model than for the Aggregates, as I think it\u0027s not facing the same performance issues that sys_metadata has. Here, serializing all aggregate metadata into a big JSON blob sounds less performant than having FKs with tuples.\n\nI\u0027m keen to listen other feedback tho.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1959a78b953cdc8a25dc42fe34399c2e580fa606","unresolved":false,"context_lines":[{"line_number":147,"context_line":"      key \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_2e44c372","line":150,"in_reply_to":"3a961159_cea106ab","updated":"2014-12-12 16:07:28.000000000","message":"I don\u0027t think this is a candidate for blobification, because the scheduler will presumable want to select on this metadata. Note that the scheduler doesn\u0027t currently select on aggregate metadata, but that\u0027s a bug. This is different to system_metadata, which is only ever treated as an atomic blob of data.\n\ne.g. select topology join metadata where metadata.key \u003d \u0027foo\u0027 and metadata.value in (\u0027bar\u0027, \u0027frob\u0027)\n\nYou can\u0027t do that if it\u0027s a blob: you have to pull it all back and sort through it in python (which is what the current code does).","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cb0087ce84fee0a31d899009b4a0cc2be98b0c54","unresolved":false,"context_lines":[{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"},{"line_number":154,"context_line":"a new NovaObject would be created (TopologyInformation) with mapped methods"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_8c93c75b","line":151,"updated":"2014-12-15 16:55:01.000000000","message":"I see no reason to add any database tables at all in this blueprint.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0a282116817ed24eb5375c6e6a36c578c8923d41","unresolved":false,"context_lines":[{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"},{"line_number":154,"context_line":"a new NovaObject would be created (TopologyInformation) with mapped methods"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_ea524e67","line":151,"in_reply_to":"3a961159_795f1e76","updated":"2014-12-16 15:00:08.000000000","message":"Well, that\u0027s not that simple if we consider the warmup period necessary for the Scheduler to learn the world (ie. know all aggregates) and the potential race conditions that could happen. Having a way to persist the aggregates information within the Scheduler codebase could be considered quite interesting for that.... But let\u0027s discuss this in the alternatives section.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":148,"context_line":"      value \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":149,"context_line":"      topology_id \u003d Column(Integer, ForeignKey(\u0027topology_informations.id\u0027),"},{"line_number":150,"context_line":"                           nullable\u003dFalse)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"DB API would be amended accordingly with all CRUD/members/metadata methods,"},{"line_number":154,"context_line":"a new NovaObject would be created (TopologyInformation) with mapped methods"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_795f1e76","line":151,"in_reply_to":"3a961159_8c93c75b","updated":"2014-12-16 12:09:56.000000000","message":"agreed","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8db1b788a39d0d4227a2e1fd557f0a7ab1621188","unresolved":false,"context_lines":[{"line_number":164,"context_line":"be created so that it would be called in the FilterScheduler._schedule and"},{"line_number":165,"context_line":"CachingScheduler._get_up_hosts methods like does get_all_host_states and"},{"line_number":166,"context_line":"would instantiate a new TopologyState object attach to the driver so"},{"line_number":167,"context_line":"that the filters could consume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Once all of that would be done, filters would just have to look into"},{"line_number":170,"context_line":"TopologyState to access what they need."}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_21c94659","line":167,"updated":"2014-12-12 05:23:53.000000000","message":"I\u0027m not sure understand all. Does this means TopologyManager will instance a new TopologyState by loading db from new Topology table?\n\nIf yes, what\u0027s different if we load those from aggregate* tables?\n\nForgive me if I understand wrong, just begin to touch this area, a lot of question.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23fcb810a0bac48c42f757f07ac7af0a2d7c0d29","unresolved":false,"context_lines":[{"line_number":164,"context_line":"be created so that it would be called in the FilterScheduler._schedule and"},{"line_number":165,"context_line":"CachingScheduler._get_up_hosts methods like does get_all_host_states and"},{"line_number":166,"context_line":"would instantiate a new TopologyState object attach to the driver so"},{"line_number":167,"context_line":"that the filters could consume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Once all of that would be done, filters would just have to look into"},{"line_number":170,"context_line":"TopologyState to access what they need."}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_6611525d","line":167,"in_reply_to":"3a961159_19f83ec2","updated":"2014-12-15 20:05:33.000000000","message":"Why? If we consider the aggregates to be owned by the scheduler, and we define a clear interface that anything else (i.e. the API) uses to examine aggregates, then we don\u0027t need to duplicate the table, create the new one above (still not sure if it\u0027s *actually* proposed), etc, right?","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3dd599a1523e2740842e24ca7ea704ddf764cc88","unresolved":false,"context_lines":[{"line_number":164,"context_line":"be created so that it would be called in the FilterScheduler._schedule and"},{"line_number":165,"context_line":"CachingScheduler._get_up_hosts methods like does get_all_host_states and"},{"line_number":166,"context_line":"would instantiate a new TopologyState object attach to the driver so"},{"line_number":167,"context_line":"that the filters could consume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Once all of that would be done, filters would just have to look into"},{"line_number":170,"context_line":"TopologyState to access what they need."}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_19f83ec2","line":167,"in_reply_to":"3a961159_21c94659","updated":"2014-12-12 16:16:35.000000000","message":"See the alternatives section and why we would need to duplicate the table. I also mentioned this concern at L75 by saying it\u0027s a necessary move for the scheduler split.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":164,"context_line":"be created so that it would be called in the FilterScheduler._schedule and"},{"line_number":165,"context_line":"CachingScheduler._get_up_hosts methods like does get_all_host_states and"},{"line_number":166,"context_line":"would instantiate a new TopologyState object attach to the driver so"},{"line_number":167,"context_line":"that the filters could consume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Once all of that would be done, filters would just have to look into"},{"line_number":170,"context_line":"TopologyState to access what they need."}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_f9930e5a","line":167,"in_reply_to":"3a961159_6611525d","updated":"2014-12-16 12:09:56.000000000","message":"Right - IMO.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23fcb810a0bac48c42f757f07ac7af0a2d7c0d29","unresolved":false,"context_lines":[{"line_number":202,"context_line":"Data model impact"},{"line_number":203,"context_line":"-----------------"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"See above, it implies to create 3 fresh new tables. Migration would only be"},{"line_number":206,"context_line":"additive (deletions would be managed directly by the AggregateAPI) and could"},{"line_number":207,"context_line":"be handled on-the-fly by the TopologyInformation object each time a save()"},{"line_number":208,"context_line":"operation would be requested (so it would loopback to Aggregate for populating"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_61085c29","line":205,"updated":"2014-12-15 20:05:33.000000000","message":"Oh, you really want to create those.. Hmm. What else needs to consider aggregates, other than just some small amount of the API that exposes some details about them? Seems like all we need to do to \"isolate\" them is to \"isolate them from the rest of nova, and then consider them owned by the scheduler\" .. no?","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"bfcecda5514539081c0eb60859460e4b8e855228","unresolved":false,"context_lines":[{"line_number":202,"context_line":"Data model impact"},{"line_number":203,"context_line":"-----------------"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"See above, it implies to create 3 fresh new tables. Migration would only be"},{"line_number":206,"context_line":"additive (deletions would be managed directly by the AggregateAPI) and could"},{"line_number":207,"context_line":"be handled on-the-fly by the TopologyInformation object each time a save()"},{"line_number":208,"context_line":"operation would be requested (so it would loopback to Aggregate for populating"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_f91eae0c","line":205,"in_reply_to":"3a961159_61085c29","updated":"2014-12-16 12:09:56.000000000","message":"Absolutely - I\u0027m not aware that the aggregates are needed by nova outside the scheduler.","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23fcb810a0bac48c42f757f07ac7af0a2d7c0d29","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"Possibly some little increases in performance as the scheduler won\u0027t no longer"},{"line_number":238,"context_line":"access other Nova objects thru conductor but rather will introspect an"},{"line_number":239,"context_line":"in-memory object."},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"Other deployer impact"},{"line_number":242,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"3a961159_e1328cf1","line":239,"updated":"2014-12-15 20:05:33.000000000","message":"The scheduler doesn\u0027t currently access any objects through conductor...","commit_id":"61f7e407de9c3a90b0b1733b8dd61e599514c3ff"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d80d2799cd65c5df9f3a992a0116dac147790a27","unresolved":false,"context_lines":[{"line_number":31,"context_line":"clean, any access by the Nova scheduler to tables that will stay in the Nova DB"},{"line_number":32,"context_line":"(i.e. aggregates table) must be refactored so that the scheduler has an API"},{"line_number":33,"context_line":"method that allows nova-conductor or other services to update the scheduler\u0027s"},{"line_number":34,"context_line":"view of aggregate information."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Below is the summary of all filters impacted by that proposal"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a961159_e453376a","line":34,"updated":"2014-12-17 15:08:15.000000000","message":"++","commit_id":"65a2fa5bf8d5c17158b103dbd9893ba0173826dc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d80d2799cd65c5df9f3a992a0116dac147790a27","unresolved":false,"context_lines":[{"line_number":76,"context_line":"objects instead of calling by themselves the Nova aggregates DB table"},{"line_number":77,"context_line":"indirectly. Updates to the Aggregates which are done using the"},{"line_number":78,"context_line":"nova.compute.api.AggregateAPI will also call the Scheduler RPC API to ask the"},{"line_number":79,"context_line":"Scheduler to update the relevant AggregateState view."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a961159_c4d47bbf","line":79,"updated":"2014-12-17 15:08:15.000000000","message":"++","commit_id":"65a2fa5bf8d5c17158b103dbd9893ba0173826dc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d80d2799cd65c5df9f3a992a0116dac147790a27","unresolved":false,"context_lines":[{"line_number":182,"context_line":"          # do what\u0027s necessary for each aggregate field"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"where ``aggregate`` would be a Aggregate NovaObject."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"Accessing the AggregateState objects would be done through a"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a961159_1f35ecda","line":185,"updated":"2014-12-17 15:08:15.000000000","message":"Why not just have a collection of nova.objects.Aggregate objects attached to the HostState object? No need for any additional aggregate_state module or anything.\n\nHere\u0027s some old PoC code I threw together a couple months ago that shows what I am thinking here:\n\nhttps://review.openstack.org/#/c/142461/1/nova/scheduler/host_manager.py\n\nObviously, it would need to be adapted based on your new code that detaches service from compute node and all, but hopefully you can see the ideas I\u0027m looking for.","commit_id":"65a2fa5bf8d5c17158b103dbd9893ba0173826dc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"129a961603583329a4e47fd12755ec5e3c462947","unresolved":false,"context_lines":[{"line_number":73,"context_line":"Instead, we propose to create an in-memory view of all the aggregates in the"},{"line_number":74,"context_line":"Scheduler which would be populated when the scheduler is starting by calling"},{"line_number":75,"context_line":"the Nova Aggregates API and leave the filters access these objects instead of"},{"line_number":76,"context_line":"calling by themselves the Nova aggregates DB table indirectly. "},{"line_number":77,"context_line":"Updates to the Aggregates which are done using the"},{"line_number":78,"context_line":"``nova.compute.api.AggregateAPI`` will also call the Scheduler RPC API to ask"},{"line_number":79,"context_line":"the Scheduler to update the relevant view."}],"source_content_type":"text/x-rst","patch_set":18,"id":"3a961159_d6b8aa2c","line":76,"updated":"2014-12-17 17:45:35.000000000","message":"I am ignoring this whitespace issue, on purpose.","commit_id":"762536c4e0bcd8121b9f6310ad0c6114c4030c2f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"129a961603583329a4e47fd12755ec5e3c462947","unresolved":false,"context_lines":[{"line_number":87,"context_line":"the information in the Scheduler memory is a small price to pay for making sure"},{"line_number":88,"context_line":"that the Scheduler could one day live by its own."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"A corollar would be to consider that if duplication is not good, then the"},{"line_number":91,"context_line":"Scheduler should fully *own* the Aggregates table. Consequently, all the calls"},{"line_number":92,"context_line":"in the nova.compute.api.AggregatesAPI would be treated as \"external\" calls and"},{"line_number":93,"context_line":"once the Scheduler would be splitted out, the Aggregates would no longer reside"}],"source_content_type":"text/x-rst","patch_set":18,"id":"3a961159_96c38289","line":90,"range":{"start_line":90,"start_character":2,"end_line":90,"end_character":10},"updated":"2014-12-17 17:45:35.000000000","message":"corollary?","commit_id":"762536c4e0bcd8121b9f6310ad0c6114c4030c2f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"129a961603583329a4e47fd12755ec5e3c462947","unresolved":false,"context_lines":[{"line_number":181,"context_line":"Every time that an Aggregate would be updated, we would hook the existing"},{"line_number":182,"context_line":"nova.compute.api.AggregateAPI class and each method in it by adding another"},{"line_number":183,"context_line":"call to nova.scheduler.client in a context manager so we would be sure that"},{"line_number":184,"context_line":"this would be transactional."},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"Once all of that would be done, filters would just have to look into"},{"line_number":187,"context_line":"HostState.aggregates to access all aggregate information (incl. metadata)"}],"source_content_type":"text/x-rst","patch_set":18,"id":"3a961159_36072e83","line":184,"updated":"2014-12-17 17:45:35.000000000","message":"I think talking about the fact this is RPC fan out should be mentioned. I care less about the context manager, not sure why you need that really.","commit_id":"762536c4e0bcd8121b9f6310ad0c6114c4030c2f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"129a961603583329a4e47fd12755ec5e3c462947","unresolved":false,"context_lines":[{"line_number":190,"context_line":"In order to provide compatibility in between distinct releases of compute nodes"},{"line_number":191,"context_line":"and scheduler, the idea is, for each filter, to check HostState if the"},{"line_number":192,"context_line":"field is there, and if not failback to calling the corresponding Aggregate"},{"line_number":193,"context_line":"object."},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"Assignee(s)"}],"source_content_type":"text/x-rst","patch_set":18,"id":"3a961159_56359a44","line":193,"updated":"2014-12-17 17:45:35.000000000","message":"Can\u0027t we encapsulate that in the HostState for now? Seems bad to add that complexity into every user of the code.\n\nI would drop the details, and just say we need to cope with older versions of certainly components, i.e. need to pass grenade.","commit_id":"762536c4e0bcd8121b9f6310ad0c6114c4030c2f"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"37f05e490f3fe59daa5dd7720ac320b6511f03f3","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Instead, we propose to create an in-memory view of all the aggregates in the"},{"line_number":74,"context_line":"Scheduler which would be populated when the scheduler is starting by calling"},{"line_number":75,"context_line":"the Nova Aggregates API and leave the filters access these objects instead of"},{"line_number":76,"context_line":"calling by themselves the Nova aggregates DB table indirectly."},{"line_number":77,"context_line":"Updates to the Aggregates which are done using the"},{"line_number":78,"context_line":"``nova.compute.api.AggregateAPI`` will also call the Scheduler RPC API to ask"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3a961159_3312d5b4","line":75,"updated":"2014-12-17 23:14:53.000000000","message":"I assume this is is the REST API?","commit_id":"b7ac10cdf6e24dfefbd0159788d6229422c48dba"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"37f05e490f3fe59daa5dd7720ac320b6511f03f3","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Here, we propose to set the collection of ``nova.objects.Aggregate`` objects"},{"line_number":168,"context_line":"by calling ``nova.objects.AggregateList.get_all()`` during the initialization"},{"line_number":169,"context_line":"of ``nova.scheduler.host_state.HostManager`` as an attribute to HostManager."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"In order to access the list of aggregates than an host belongs to, we plan"},{"line_number":172,"context_line":"to add a list of references to the corresponding Aggregate objects as an"}],"source_content_type":"text/x-rst","patch_set":19,"id":"3a961159_d320b1fa","line":169,"updated":"2014-12-17 23:14:53.000000000","message":"ahh ignore my previous question.","commit_id":"b7ac10cdf6e24dfefbd0159788d6229422c48dba"}],"specs/kilo/approved/isolate-scheduler-db.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24299cb97275288ac92ec16eba849159f4ab59e3","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the second stage after scheduler-lib split. These two blueprints are"},{"line_number":15,"context_line":"independent however."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"In this blueprint, we need to isolate all accesses to the database that"},{"line_number":18,"context_line":"Scheduler is doing and refactor code (manager, filters,"},{"line_number":19,"context_line":"weighters) so that scheduler is only internally accessing scheduler-related"},{"line_number":20,"context_line":"tables or resources."}],"source_content_type":"text/x-rst","patch_set":12,"id":"baa201ad_9b0177b1","line":17,"updated":"2014-10-16 17:34:15.000000000","message":"s/database/Nova database/","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24299cb97275288ac92ec16eba849159f4ab59e3","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* things that scheduler should know which are related to compute"},{"line_number":34,"context_line":"  nodes should by updated by ResourceTracker using update_available_resource()"},{"line_number":35,"context_line":"  or when instance_claim() (like aggregates whose host belongs to)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* things the scheduler needs about the wider context of a specific scheduling"},{"line_number":38,"context_line":"  request need to be passed into select_destinations scheduler lib call, e.g."}],"source_content_type":"text/x-rst","patch_set":12,"id":"baa201ad_fbe283d3","line":35,"updated":"2014-10-16 17:34:15.000000000","message":"The above is a bit confusing, as it mixes resources with non-resources like aggregates.\n\nI\u0027d recommend instead listing three points instead of just these two:\n\n* Communicating between a nova-compute node and the nova-scheduler what resources are consumed and released on the node.\n\n* Communicating changes in capabilities or tags of a compute node or any aggregate that a compute node may belong to. \"Capabilities\" here include things like overcommit ratios or supported hypervisor specs. \"Tags\" is just a general term for things that an aggregate or compute node might be associated with, such as an availability zone.\n\n* Communicating the entirety of the launch request so that the scheduler does not have to call the database to find information about certain scheduling policies or conditions. For example, right now the select_destinations() call passes only a scheduler-hint for the instance group, passing the instance group name only. The scheduler makes a call to the database in order to determine both the policy of the instance group (affinity/anti-affinity) and the instances that are members of the instance group. In order to detach the scheduler from the Nova database, any information that the scheduler needs to take into account for the launch request should be supplied in whole in the request_spec that is passed to select_destinations()","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5918fa99187a1f38be816ab774e5bfcc9a00e854","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"* things that scheduler should know which are related to compute"},{"line_number":34,"context_line":"  nodes should by updated by ResourceTracker using update_available_resource()"},{"line_number":35,"context_line":"  or when instance_claim() (like aggregates whose host belongs to)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"* things the scheduler needs about the wider context of a specific scheduling"},{"line_number":38,"context_line":"  request need to be passed into select_destinations scheduler lib call, e.g."}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_27ff1369","line":35,"in_reply_to":"baa201ad_fbe283d3","updated":"2014-11-01 22:50:06.000000000","message":"I\u0027m not sure the resource tracker should be concerned with aggregates. See further comments below.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24299cb97275288ac92ec16eba849159f4ab59e3","unresolved":false,"context_lines":[{"line_number":103,"context_line":"   we propose the following :"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  - Compute host reports periodically to Scheduler"},{"line_number":106,"context_line":"    (thanks to update_resource_stats) a extra set of AggregateResource objects"},{"line_number":107,"context_line":"    (see bp/resource-objects) like :"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    - metadata \"filter_tenant_id\" from aggregates he is part of"}],"source_content_type":"text/x-rst","patch_set":12,"id":"baa201ad_bb471ba2","line":106,"updated":"2014-10-16 17:34:15.000000000","message":"I believe it would be prudent to actually have a separate scheduler RPC API method to update aggregate information.\n\nWe don\u0027t want or need to be sending aggregate information every time we call update_resource_stats() -- which can conceivably be called often, or at least a lot more often than aggregates change. :)","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a271924fa6264ca35b53a89720a345160dab9447","unresolved":false,"context_lines":[{"line_number":103,"context_line":"   we propose the following :"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  - Compute host reports periodically to Scheduler"},{"line_number":106,"context_line":"    (thanks to update_resource_stats) a extra set of AggregateResource objects"},{"line_number":107,"context_line":"    (see bp/resource-objects) like :"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    - metadata \"filter_tenant_id\" from aggregates he is part of"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_ac867f11","line":106,"in_reply_to":"7a8c0949_47041f7b","updated":"2014-11-03 15:27:45.000000000","message":"fair enough about adding a new method. I\u0027ll also amend the spec to make clear that the primary update comes from the aggregates helper class (when adding/removing hosts to an agg), but also with a periodical check running on the compute node which will also update the scheduler.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5918fa99187a1f38be816ab774e5bfcc9a00e854","unresolved":false,"context_lines":[{"line_number":103,"context_line":"   we propose the following :"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  - Compute host reports periodically to Scheduler"},{"line_number":106,"context_line":"    (thanks to update_resource_stats) a extra set of AggregateResource objects"},{"line_number":107,"context_line":"    (see bp/resource-objects) like :"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    - metadata \"filter_tenant_id\" from aggregates he is part of"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_47041f7b","line":106,"in_reply_to":"baa201ad_bb471ba2","updated":"2014-11-01 22:50:06.000000000","message":"I agree, and I also think that the updates should come from the source of the data, not indirectly via the compute nodes.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24299cb97275288ac92ec16eba849159f4ab59e3","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  - Compute host reports periodically to Scheduler"},{"line_number":106,"context_line":"    (thanks to update_resource_stats) a extra set of AggregateResource objects"},{"line_number":107,"context_line":"    (see bp/resource-objects) like :"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    - metadata \"filter_tenant_id\" from aggregates he is part of"},{"line_number":110,"context_line":"    - metadata \"availability_zone\" from aggregates he is part of"}],"source_content_type":"text/x-rst","patch_set":12,"id":"baa201ad_dbf05f69","line":107,"updated":"2014-10-16 17:34:15.000000000","message":"Is this the right BP? resource-objects doesn\u0027t change the wire-format of the update_resource_stats() method, nor does it include anything to do with aggregates (since aggregates are not resources)","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a271924fa6264ca35b53a89720a345160dab9447","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  - Compute host reports periodically to Scheduler"},{"line_number":106,"context_line":"    (thanks to update_resource_stats) a extra set of AggregateResource objects"},{"line_number":107,"context_line":"    (see bp/resource-objects) like :"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    - metadata \"filter_tenant_id\" from aggregates he is part of"},{"line_number":110,"context_line":"    - metadata \"availability_zone\" from aggregates he is part of"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_2c728f49","line":107,"in_reply_to":"baa201ad_dbf05f69","updated":"2014-11-03 15:27:45.000000000","message":"good question: at least, as per your last comment, it will be on a separate method. So I guess we can handle the attributes syntax of this method in this blueprint. TBH, I want to avoid having multiple dependent blueprints for that as it would be time overkill and as the items are quite clear.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"24299cb97275288ac92ec16eba849159f4ab59e3","unresolved":false,"context_lines":[{"line_number":127,"context_line":"2. For instances, we propose a very close approach :"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"  - RT.update_available_resource provides Instance object as a Resource nested"},{"line_number":130,"context_line":"    to ComputeNode object"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"  - filters will look into HostState to know if host runs the instance asked in"},{"line_number":133,"context_line":"    the hint"}],"source_content_type":"text/x-rst","patch_set":12,"id":"baa201ad_5e153d3e","line":130,"updated":"2014-10-16 17:34:15.000000000","message":"Why would we include a list of Instance objects in the ComputeNode object when we pass the ComputeNode object to update_resource_stats()? This may be needed for tracking instance groups and things like \"make sure my instance does not go on a host with lots of instances with flavor X on it\", but if we are going to be sending full Instance objects along with every ComputeNode sent in update_resource_stats(), that is going to be expensive, especially for the deployments that don\u0027t use instance groups or advanced scheduling hints.\n\nKeep in mind that the scheduler can already keep track of the Instances on a host, and the types of flavors launched on a host -- it can do this \"in real time\" as the host is selected for an instance placement, by updating the HostState object with, for example, the set of instance IDs launched on a host. We should be able to cache the same kind of information for instance groups and aggregates, and keep the information updated with separate scheduler RPC API calls to update_aggregate() and update_instance_group().","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a271924fa6264ca35b53a89720a345160dab9447","unresolved":false,"context_lines":[{"line_number":127,"context_line":"2. For instances, we propose a very close approach :"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"  - RT.update_available_resource provides Instance object as a Resource nested"},{"line_number":130,"context_line":"    to ComputeNode object"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"  - filters will look into HostState to know if host runs the instance asked in"},{"line_number":133,"context_line":"    the hint"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_0cc5d33b","line":130,"in_reply_to":"baa201ad_5e153d3e","updated":"2014-11-03 15:27:45.000000000","message":"Agreed on the overhead and indeed, HostManager already gets list of instances running on the host, so that\u0027s not necessarly.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"5918fa99187a1f38be816ab774e5bfcc9a00e854","unresolved":false,"context_lines":[{"line_number":156,"context_line":"various different ways, like having the conductor placing a call to aggregates"},{"line_number":157,"context_line":"and providing it in request_spec, or copying all the aggregate data in"},{"line_number":158,"context_line":"compute_nodes or moving the whole aggregate concept into the scheduler for its"},{"line_number":159,"context_line":"solely use, but we think the proposal we made is the most performance-wise."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_070a178a","line":159,"updated":"2014-11-01 22:50:06.000000000","message":"I think moving the aggregates into the scheduler could actually make more sense and have better performance.\n\nThe compute node is not the source of the aggregate data. Passing it to the scheduler from the source (i.e. the aggregate api) is simpler and does not require the indirection of obtaining it at the compute node. Additionally I think the scheduler is the only thing really concerned with aggregates, which is a global concept (well, more global than a compute node).\n\nMoving aggregates to the scheduler may have better performance opportunities because the aggregate api would update the scheduler exactly when the aggregate data changed and the scheduler would be in a better position to cache the information without the problem of keeping the cache consistent.\n\nEven if the scheduler doesn\u0027t \"own\" the aggregates, i think it is better to pass the data directly.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a271924fa6264ca35b53a89720a345160dab9447","unresolved":false,"context_lines":[{"line_number":156,"context_line":"various different ways, like having the conductor placing a call to aggregates"},{"line_number":157,"context_line":"and providing it in request_spec, or copying all the aggregate data in"},{"line_number":158,"context_line":"compute_nodes or moving the whole aggregate concept into the scheduler for its"},{"line_number":159,"context_line":"solely use, but we think the proposal we made is the most performance-wise."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7a8c0949_8ce8e3b5","line":159,"in_reply_to":"7a8c0949_070a178a","updated":"2014-11-03 15:27:45.000000000","message":"Well, I was unclear in that spec, as I was already mentioning what you propose but on a last bullet: \"any change to the Aggregate structure [...] will call update_resource_stats [...]\"\n\nI\u0027ll amend that spec as I said above.","commit_id":"81f8db68b1c1b900fecc2a2329d148af92f7182d"}]}
