)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d865b22f4f5500ebcbe8aadee62ff5c8e5a2e9b3","unresolved":false,"context_lines":[{"line_number":22,"context_line":"certain types of boot-from-volume requests as requiring specific"},{"line_number":23,"context_line":"capabilites, like for volume multiattach and tagged devices."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Related to blueprint placement-req-filter"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I15364d37fb7426f4eec00ca4eaf99bec50e964b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3fa0c359_9b91d9f4","line":25,"updated":"2018-02-16 09:46:39.000000000","message":"I don\u0027t see why that change should be in the same series that the placement-req-filter ?","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"782b1db64556a99c220d99de1edf654a82c9bfd9","unresolved":false,"context_lines":[{"line_number":22,"context_line":"certain types of boot-from-volume requests as requiring specific"},{"line_number":23,"context_line":"capabilites, like for volume multiattach and tagged devices."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Related to blueprint placement-req-filter"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I15364d37fb7426f4eec00ca4eaf99bec50e964b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3fa0c359_25fdbb39","line":25,"in_reply_to":"3fa0c359_1b6ce906","updated":"2018-02-20 14:47:24.000000000","message":"Because the eventual usage for this is by adding a placement request filter to process a BFV+tags or BFV+multiattach request and modify the request spec\u0027s embedded flavor to indicate it is going to require one of these traits.","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e2d189b79f50c796793af4e7244af6ea24eec4f2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"certain types of boot-from-volume requests as requiring specific"},{"line_number":23,"context_line":"capabilites, like for volume multiattach and tagged devices."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Related to blueprint placement-req-filter"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I15364d37fb7426f4eec00ca4eaf99bec50e964b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3fa0c359_1b6ce906","line":25,"in_reply_to":"3fa0c359_9b91d9f4","updated":"2018-02-16 09:48:07.000000000","message":"I mean, *for now* \n\nI see your comment above, but honestly, providing traits now is fine.","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6e526d5b3b8a494e431f3faa81aee410d4fb2f13","unresolved":false,"context_lines":[{"line_number":22,"context_line":"certain types of boot-from-volume requests as requiring specific"},{"line_number":23,"context_line":"capabilites, like for volume multiattach and tagged devices."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Related to blueprint placement-req-filter"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I15364d37fb7426f4eec00ca4eaf99bec50e964b6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"df7087c5_8cdce1e4","line":25,"updated":"2018-03-13 14:41:38.000000000","message":"I wonder if I should tie this change and any placement request filter work to blueprint expose-host-capabilities which was really an earlier form of the same kind of idea.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e046837a0aa6aff38978c78f811769d03427a62","unresolved":false,"context_lines":[{"line_number":13,"context_line":"- tests for the provider tree flows since the fake virt driver"},{"line_number":14,"context_line":"  does not implement update_provider_tree()"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This builds on the get_traits() work in the compute driver and resource"},{"line_number":17,"context_line":"tracker to take the supported capabilities from a driver and turn those"},{"line_number":18,"context_line":"into CUSTOM_COMPUTE_\u003ccapability_name\u003e traits on the compute node resource"},{"line_number":19,"context_line":"provider."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f7c97a3_c4c98c5a","line":16,"range":{"start_line":16,"start_character":5,"end_line":16,"end_character":36},"updated":"2018-06-19 19:09:58.000000000","message":"Not once first TODO is done :)","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e046837a0aa6aff38978c78f811769d03427a62","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This builds on the get_traits() work in the compute driver and resource"},{"line_number":17,"context_line":"tracker to take the supported capabilities from a driver and turn those"},{"line_number":18,"context_line":"into CUSTOM_COMPUTE_\u003ccapability_name\u003e traits on the compute node resource"},{"line_number":19,"context_line":"provider."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This is a simple way to expose what a compute node, via its driver,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f7c97a3_04b0e4dc","line":18,"range":{"start_line":18,"start_character":5,"end_line":18,"end_character":37},"updated":"2018-06-19 19:09:58.000000000","message":"standard traits if available, or ...","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5bb8440ea096e0797380352a955d352a9c1d021a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    https://pasteboard.co/I25qICd.png"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Co-Authored-By: Adam Spiers \u003caspiers@suse.com\u003e"},{"line_number":46,"context_line":"Depends-On: https://review.openstack.org/576595/"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Related to blueprint placement-req-filter"},{"line_number":49,"context_line":"Related to blueprint expose-host-capabilities"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9fdfeff1_fd7dd76c","line":46,"updated":"2019-02-27 17:06:25.000000000","message":"nit: remove this","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    https://pasteboard.co/I25qICd.png"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Co-Authored-By: Adam Spiers \u003caspiers@suse.com\u003e"},{"line_number":46,"context_line":"Depends-On: https://review.openstack.org/576595/"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Related to blueprint placement-req-filter"},{"line_number":49,"context_line":"Related to blueprint expose-host-capabilities"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"9fdfeff1_3c3ca1c6","line":46,"in_reply_to":"9fdfeff1_fd7dd76c","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4dade5df3856a3b5efdac1ca2e52f9e07381f80a","unresolved":false,"context_lines":[{"line_number":863,"context_line":"            if supported:"},{"line_number":864,"context_line":"                cap_traits.append(\u0027CUSTOM_COMPUTE_%s\u0027 % capability.upper())"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"        return list(set(driver_traits + cap_traits))"},{"line_number":867,"context_line":""},{"line_number":868,"context_line":"    def _update(self, context, compute_node):"},{"line_number":869,"context_line":"        \"\"\"Update partial stats locally and populate them to Scheduler.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_e62d39fe","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":50},"updated":"2018-02-01 21:25:02.000000000","message":"We don\u0027t seem to need 2 separate lists since they aren\u0027t used for anything except adding them together. Append cap-based traits to the same list we get back from driver.get_traits and we avoid having to do this merging.","commit_id":"d71d8e76e49175ec16adee9a67386d9328bf74d7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1d6a12a0f973b4b76cd639d014afbcf1394939e","unresolved":false,"context_lines":[{"line_number":854,"context_line":"        try:"},{"line_number":855,"context_line":"            # We make a copy of the list that the driver gives us since we\u0027re"},{"line_number":856,"context_line":"            # going to append the capabilities below."},{"line_number":857,"context_line":"            traits \u003d list(self.driver.get_traits(nodename))"},{"line_number":858,"context_line":"        except NotImplementedError:"},{"line_number":859,"context_line":"            traits \u003d []"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_bcb0488d","line":857,"range":{"start_line":857,"start_character":21,"end_line":857,"end_character":25},"updated":"2018-02-16 15:10:46.000000000","message":"or just use set() to begin with (which creates a copy), and save on L867.","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"782b1db64556a99c220d99de1edf654a82c9bfd9","unresolved":false,"context_lines":[{"line_number":854,"context_line":"        try:"},{"line_number":855,"context_line":"            # We make a copy of the list that the driver gives us since we\u0027re"},{"line_number":856,"context_line":"            # going to append the capabilities below."},{"line_number":857,"context_line":"            traits \u003d list(self.driver.get_traits(nodename))"},{"line_number":858,"context_line":"        except NotImplementedError:"},{"line_number":859,"context_line":"            traits \u003d []"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_c5489788","line":857,"range":{"start_line":857,"start_character":21,"end_line":857,"end_character":25},"in_reply_to":"3fa0c359_bcb0488d","updated":"2018-02-20 14:47:24.000000000","message":"Done","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"da02f4ca60aa5b5caeb74ae7f3aa64e4b2331bb4","unresolved":false,"context_lines":[{"line_number":854,"context_line":"        try:"},{"line_number":855,"context_line":"            # We make a copy of the list that the driver gives us since we\u0027re"},{"line_number":856,"context_line":"            # going to append the capabilities below."},{"line_number":857,"context_line":"            traits \u003d set(self.driver.get_traits(nodename))"},{"line_number":858,"context_line":"        except NotImplementedError:"},{"line_number":859,"context_line":"            traits \u003d set([])"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_5c140b44","line":857,"range":{"start_line":857,"start_character":21,"end_line":857,"end_character":25},"updated":"2018-02-23 14:29:47.000000000","message":"just a nit, but why the driver couldn\u0027t pass a set instead of a list ?","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"88e52eebbcce198e9dbe1bed111277d54bbed4cb","unresolved":false,"context_lines":[{"line_number":856,"context_line":"            # going to append the capabilities below."},{"line_number":857,"context_line":"            traits \u003d set(self.driver.get_traits(nodename))"},{"line_number":858,"context_line":"        except NotImplementedError:"},{"line_number":859,"context_line":"            traits \u003d set([])"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":"        # Now get the capabilities off the driver and consider anything that\u0027s"},{"line_number":862,"context_line":"        # supported as a custom compute trait."}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_28764608","line":859,"range":{"start_line":859,"start_character":21,"end_line":859,"end_character":28},"updated":"2018-03-01 10:13:15.000000000","message":"nit: that is equivalent with simply saying set()","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"668801505ee4e97fb611a326a3cb5f1509ff4fc2","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        # supported as a custom compute trait."},{"line_number":863,"context_line":"        for capability, supported in self.driver.capabilities.items():"},{"line_number":864,"context_line":"            if supported:"},{"line_number":865,"context_line":"                traits.add(\u0027CUSTOM_COMPUTE_%s\u0027 % capability.upper())"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"        return list(traits)"},{"line_number":868,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_0aa74a0d","line":865,"range":{"start_line":865,"start_character":28,"end_line":865,"end_character":43},"updated":"2018-02-21 17:51:18.000000000","message":"food for thought:\n\nhttps://review.openstack.org/546713","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"da02f4ca60aa5b5caeb74ae7f3aa64e4b2331bb4","unresolved":false,"context_lines":[{"line_number":862,"context_line":"        # supported as a custom compute trait."},{"line_number":863,"context_line":"        for capability, supported in self.driver.capabilities.items():"},{"line_number":864,"context_line":"            if supported:"},{"line_number":865,"context_line":"                traits.add(\u0027CUSTOM_COMPUTE_%s\u0027 % capability.upper())"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"        return list(traits)"},{"line_number":868,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_dc29fb89","line":865,"range":{"start_line":865,"start_character":28,"end_line":865,"end_character":43},"in_reply_to":"3fa0c359_0aa74a0d","updated":"2018-02-23 14:29:47.000000000","message":"Maybe...","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"370c34d13457c8a0ccb3b8da3a502e53cd19930d","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_00318da2","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"updated":"2018-02-20 15:05:17.000000000","message":"Hm, I don\u0027t think so.\n\nIf _get_traits returns the empty list, we need to set the compute RP\u0027s traits to be empty.\n\nI\u0027ll grant you this would be relatively unusual - the compute driver would have to have no capabilities and also either no get_traits impl or return no traits from that guy - but it needs to be possible.\n\nAnd pursuant to that, add a test case to assert that set_traits_for_provider is called.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"001d5d2b080fe270ebc87ffe3e9486b109856d70","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_f64346ae","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"1f9dbf25_a83a56e4","updated":"2018-03-02 14:19:39.000000000","message":"Actually, Eric made a very valid point about stopping to support some traits...","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5c3dc235a2cbfd315099bd78487b7461c2af7e15","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"df7087c5_ad145e4f","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"1f9dbf25_f64346ae","updated":"2018-03-12 20:33:31.000000000","message":"This needs to be rebased on top of:\n\nhttps://review.openstack.org/#/c/520246/52/nova/compute/resource_tracker.py\n\nAnd then just use add_traits to shove in the capabilities-defined traits.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"da02f4ca60aa5b5caeb74ae7f3aa64e4b2331bb4","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_3c433f41","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"3fa0c359_00318da2","updated":"2018-02-23 14:29:47.000000000","message":"I disagree with Eric here. If we don\u0027t have a driver passing traits, why should we still have a empty list of traits ?\n\nFor resources like vGPUs, we said it was okay to not create an empty inventory if the compute wasn\u0027t supporting it.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cf15d444d93bcb2a5d1bb761cbdf2415a73b575c","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_3d7ed6ae","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"3fa0c359_3c433f41","updated":"2018-02-23 18:55:30.000000000","message":"Setting no traits isn\u0027t the same thing as creating a zero inventory for a resource class.  Looklook:\n\nLet\u0027s say my driver supports none of the capabilities; so that bit returns an empty list.\n\nFirst time through, the driver\u0027s get_traits decides it wants the CUSTOM_FOO trait to be set, so we hit this path and set that trait on the compute RP.\n\nSecond time through, the driver decides it doesn\u0027t want CUSTOM_FOO anymore, so get_traits returns the empty list.  We hit this path with traits \u003d\u003d [] ... and don\u0027t clear out the traits in the DB; so the compute RP still has the CUSTOM_FOO trait.  That\u0027s bad.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"88e52eebbcce198e9dbe1bed111277d54bbed4cb","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_a83a56e4","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"3fa0c359_3d7ed6ae","updated":"2018-03-01 10:13:15.000000000","message":"If the compute RP is owned by virt driver on that compute then whatever that driver returns as traits is the truth and need to be passed to placement. Even if this means that it will overwrite traits on the compute RP added by somebody else. So I agree with Eric to pass the empty traits to placement.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"248d8aa7043e4bc7764a83bc01874b3f482f136b","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_3cc10ee6","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"bf659307_fc971639","updated":"2018-04-02 21:20:46.000000000","message":"In light of things that happened at the PTG (see links in commit message [1]), YHO represents consensus.  Quit being so H.\n\n[1] https://review.openstack.org/#/c/552122/","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"91441ef1055fc4e27484c73d35ae84765a47f4d7","unresolved":false,"context_lines":[{"line_number":901,"context_line":"            self.scheduler_client.update_compute_node(context, compute_node)"},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"        traits \u003d self._get_traits(nodename)"},{"line_number":904,"context_line":"        if traits:"},{"line_number":905,"context_line":"            # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":906,"context_line":"            # provider tree in the report client, so we rely on the above call"},{"line_number":907,"context_line":"            # to set_inventory_for_provider or update_compute_node to ensure"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_fc971639","line":904,"range":{"start_line":904,"start_character":8,"end_line":904,"end_character":18},"in_reply_to":"df7087c5_ad145e4f","updated":"2018-04-02 20:57:47.000000000","message":"This should, IMHO, result in the set of traits on the compute node to be those asserted, removing any known virt capabilities traits not in the asserted set.\n\nThat makes the virt driver authoritative for that subset of traits on the provider.","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e046837a0aa6aff38978c78f811769d03427a62","unresolved":false,"context_lines":[{"line_number":865,"context_line":"            # Get the traits from the driver itself."},{"line_number":866,"context_line":"            try:"},{"line_number":867,"context_line":"                # We make a copy of the list that the driver gives us since"},{"line_number":868,"context_line":"                # we\u0027re going to append the capabilities below."},{"line_number":869,"context_line":"                traits \u003d set(self.driver.get_traits(nodename))"},{"line_number":870,"context_line":"            except NotImplementedError:"},{"line_number":871,"context_line":"                traits \u003d set()"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e4760840","line":868,"range":{"start_line":868,"start_character":33,"end_line":868,"end_character":39},"updated":"2018-06-19 19:09:58.000000000","message":"add/remove","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9db8bb2d372fcacc3fee5f35100938c331d1f156","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        # on the provider that aren\u0027t owned by the virt driver."},{"line_number":862,"context_line":"        if provider_tree:"},{"line_number":863,"context_line":"            traits \u003d provider_tree.data(nodename).traits"},{"line_number":864,"context_line":"        else:"},{"line_number":865,"context_line":"            # Get the traits from the driver itself."},{"line_number":866,"context_line":"            try:"},{"line_number":867,"context_line":"                # We make a copy of the list that the driver gives us since"},{"line_number":868,"context_line":"                # we\u0027re going to append the capabilities below."},{"line_number":869,"context_line":"                traits \u003d set(self.driver.get_traits(nodename))"},{"line_number":870,"context_line":"            except NotImplementedError:"},{"line_number":871,"context_line":"                traits \u003d set()"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Now get the capabilities off the driver and add any supported"},{"line_number":874,"context_line":"        # traits that are missing, and remove any existing set traits that"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_3b5bbbf6","line":871,"range":{"start_line":864,"start_character":8,"end_line":871,"end_character":30},"updated":"2018-06-20 00:03:19.000000000","message":"This goes away once get_traits() is dropped.","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cc4a13b1f0c5336bf7326dc65156bc80024093a","unresolved":false,"context_lines":[{"line_number":918,"context_line":"            inv_data \u003d prov_tree.data(nodename).inventory"},{"line_number":919,"context_line":"            _normalize_inventory_from_cn_obj(inv_data, compute_node)"},{"line_number":920,"context_line":"            prov_tree.update_inventory(nodename, inv_data)"},{"line_number":921,"context_line":"            # TODO(mriedem): Need to inject driver capabilities traits into"},{"line_number":922,"context_line":"            # the provider tree. We need to determine the traits that the virt"},{"line_number":923,"context_line":"            # driver owns - so those that come from the tree itself (via the"},{"line_number":924,"context_line":"            # virt driver) plus the compute capabilites traits, and then merge"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_a4b81011","line":921,"updated":"2018-06-19 18:54:24.000000000","message":"I should be able to remove this TODO now.","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e046837a0aa6aff38978c78f811769d03427a62","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            # FIXME(mriedem): This doesn\u0027t *unset* traits that are no longer"},{"line_number":960,"context_line":"            # supported by the driver."},{"line_number":961,"context_line":"            traits \u003d self._get_traits(nodename)"},{"line_number":962,"context_line":"            if traits:"},{"line_number":963,"context_line":"                # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":964,"context_line":"                # provider tree in the report client, so we rely on the above"},{"line_number":965,"context_line":"                # call to set_inventory_for_provider or update_compute_node to"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_64bd18d6","line":962,"range":{"start_line":962,"start_character":12,"end_line":962,"end_character":22},"updated":"2018-06-19 19:09:58.000000000","message":"We still don\u0027t want this condition.  If the stuff above reduced our total traits list down to empty, we still want to flush that to placement.  See discussion at PS6 [1].\n\n(I\u0027ll grant you that this should almost never happen IRL, but still...)\n\n[1] https://review.openstack.org/#/c/538498/6/nova/compute/resource_tracker.py@904","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9db8bb2d372fcacc3fee5f35100938c331d1f156","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            # FIXME(mriedem): This doesn\u0027t *unset* traits that are no longer"},{"line_number":960,"context_line":"            # supported by the driver."},{"line_number":961,"context_line":"            traits \u003d self._get_traits(nodename)"},{"line_number":962,"context_line":"            if traits:"},{"line_number":963,"context_line":"                # NOTE(mgoddard): set_traits_for_provider does not refresh the"},{"line_number":964,"context_line":"                # provider tree in the report client, so we rely on the above"},{"line_number":965,"context_line":"                # call to set_inventory_for_provider or update_compute_node to"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_bb4d8b3c","line":962,"range":{"start_line":962,"start_character":12,"end_line":962,"end_character":22},"in_reply_to":"5f7c97a3_64bd18d6","updated":"2018-06-20 00:03:19.000000000","message":"Yeah this goes away when I rebase on your change that removes driver.get_traits().","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":919,"context_line":"        # on the provider that aren\u0027t owned by the virt driver."},{"line_number":920,"context_line":"        traits \u003d provider_tree.data(nodename).traits"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        # Now get the capabilities off the driver and add any supported"},{"line_number":923,"context_line":"        # traits that are missing, and remove any existing set traits that"},{"line_number":924,"context_line":"        # are not currently supported."},{"line_number":925,"context_line":"        for trait, supported in self.driver.capabilities_as_traits().items():"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_fdf2b704","line":922,"range":{"start_line":922,"start_character":35,"end_line":922,"end_character":38},"updated":"2019-02-27 17:38:29.000000000","message":"nit: \"of\" - or better yet, \"the driver\u0027s capabilities\"","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":919,"context_line":"        # on the provider that aren\u0027t owned by the virt driver."},{"line_number":920,"context_line":"        traits \u003d provider_tree.data(nodename).traits"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        # Now get the capabilities off the driver and add any supported"},{"line_number":923,"context_line":"        # traits that are missing, and remove any existing set traits that"},{"line_number":924,"context_line":"        # are not currently supported."},{"line_number":925,"context_line":"        for trait, supported in self.driver.capabilities_as_traits().items():"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_6bb5a131","line":922,"range":{"start_line":922,"start_character":35,"end_line":922,"end_character":38},"in_reply_to":"9fdfeff1_fdf2b704","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        # Now get the capabilities off the driver and add any supported"},{"line_number":923,"context_line":"        # traits that are missing, and remove any existing set traits that"},{"line_number":924,"context_line":"        # are not currently supported."},{"line_number":925,"context_line":"        for trait, supported in self.driver.capabilities_as_traits().items():"},{"line_number":926,"context_line":"            if supported:"},{"line_number":927,"context_line":"                traits.add(trait)"},{"line_number":928,"context_line":"            elif trait in traits:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_3dc03f50","line":925,"range":{"start_line":925,"start_character":12,"end_line":925,"end_character":17},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this is the trait name","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":981,"context_line":"            # example, let\u0027s say we reported multiattach support as a"},{"line_number":982,"context_line":"            # trait at t1 and then at t2 it\u0027s not, so we need to"},{"line_number":983,"context_line":"            # remove it.  But at both t1 and t2 there is a"},{"line_number":984,"context_line":"            # CUSTOM_VENDOR_TRAIT_X set externally on the provider -"},{"line_number":985,"context_line":"            # we can\u0027t touch that."},{"line_number":986,"context_line":"            traits \u003d self._get_traits(nodename, provider_tree\u003dprov_tree)"},{"line_number":987,"context_line":"            prov_tree.update_traits(nodename, traits)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_c0aa6cd0","line":984,"updated":"2019-02-27 17:38:29.000000000","message":"This confused be a bit because I thought the naming was somehow relevant, and that any CUSTOM_ traits are preserved. But not, anything the driver reports, named CUSTOM_ or not, takes precedence.","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":981,"context_line":"            # example, let\u0027s say we reported multiattach support as a"},{"line_number":982,"context_line":"            # trait at t1 and then at t2 it\u0027s not, so we need to"},{"line_number":983,"context_line":"            # remove it.  But at both t1 and t2 there is a"},{"line_number":984,"context_line":"            # CUSTOM_VENDOR_TRAIT_X set externally on the provider -"},{"line_number":985,"context_line":"            # we can\u0027t touch that."},{"line_number":986,"context_line":"            traits \u003d self._get_traits(nodename, provider_tree\u003dprov_tree)"},{"line_number":987,"context_line":"            prov_tree.update_traits(nodename, traits)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_2b85595a","line":984,"in_reply_to":"9fdfeff1_c0aa6cd0","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5365dabca729e9a4afede82786168bbee6b073da","unresolved":false,"context_lines":[{"line_number":913,"context_line":"            return True"},{"line_number":914,"context_line":"        return False"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"    def _get_traits(self, nodename, provider_tree\u003dNone):"},{"line_number":917,"context_line":"        # Get the traits from the ProviderTree which will be the set"},{"line_number":918,"context_line":"        # of virt-owned traits plus any externally defined traits set"},{"line_number":919,"context_line":"        # on the provider that aren\u0027t owned by the virt driver."}],"source_content_type":"text/x-python","patch_set":22,"id":"5fc1f717_6de823b2","line":916,"range":{"start_line":916,"start_character":49,"end_line":916,"end_character":54},"updated":"2019-03-18 15:11:39.000000000","message":"Heh, I guess we can remove this.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"98f2003cb19f475bc7d8a0a423ce250e28c48e38","unresolved":false,"context_lines":[{"line_number":913,"context_line":"            return True"},{"line_number":914,"context_line":"        return False"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"    def _get_traits(self, nodename, provider_tree\u003dNone):"},{"line_number":917,"context_line":"        # Get the traits from the ProviderTree which will be the set"},{"line_number":918,"context_line":"        # of virt-owned traits plus any externally defined traits set"},{"line_number":919,"context_line":"        # on the provider that aren\u0027t owned by the virt driver."}],"source_content_type":"text/x-python","patch_set":22,"id":"5fc1f717_50885221","line":916,"range":{"start_line":916,"start_character":49,"end_line":916,"end_character":54},"in_reply_to":"5fc1f717_6de823b2","updated":"2019-03-19 00:31:12.000000000","message":"Proposed in https://review.openstack.org/#/c/644452/","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"}],"nova/tests/functional/libvirt/test_report_cpu_traits.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20edce176e94ab2acd7689a28eb236809b7931e2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # the report client cache so the subsequent update picks up the change."},{"line_number":52,"context_line":"        self.compute.manager.reset()"},{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d self._get_provider_traits(self.host_uuid)"},{"line_number":57,"context_line":"        for trait in (\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027):"},{"line_number":58,"context_line":"            self.assertIn(trait, traits)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_2c4f0e6b","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":52},"updated":"2019-02-23 10:35:32.000000000","message":"So we need to assertNotIn(AVX, traits)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"1e903f53ececd4eec6821728944abdc8af956440","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # the report client cache so the subsequent update picks up the change."},{"line_number":52,"context_line":"        self.compute.manager.reset()"},{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d self._get_provider_traits(self.host_uuid)"},{"line_number":57,"context_line":"        for trait in (\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027):"},{"line_number":58,"context_line":"            self.assertIn(trait, traits)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_f305487b","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":52},"in_reply_to":"9fdfeff1_2c4f0e6b","updated":"2019-02-25 13:34:20.000000000","message":"Can we do that in a separate patch? since it\u0027s not really related to this patch, and changing it here means rebasing 3 patches stacked on top of it :-)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # the report client cache so the subsequent update picks up the change."},{"line_number":52,"context_line":"        self.compute.manager.reset()"},{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d self._get_provider_traits(self.host_uuid)"},{"line_number":57,"context_line":"        for trait in (\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027):"},{"line_number":58,"context_line":"            self.assertIn(trait, traits)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_d35fcd3e","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":52},"in_reply_to":"9fdfeff1_2d67e44f","updated":"2019-02-26 13:08:49.000000000","message":"OK got it, thanks.\n\nNo, it\u0027s not at all onerous for me; with magit I can rebase faster than git-restack :-p  I was concerned about the extra overhead to reviewers and CI resources incurred by re-rolling a patch on the bottom of a stack, since it requires everything above it to be re-reviewed and retested.\n\nAnyway, since there\u0027s enough other stuff to justify a respin, this line of discussion becomes obsolete anyway :-)\n\n(BTW I\u0027m kinda puzzled why there\u0027s a 277-line Python script which doesn\u0027t seem to do much more than git rebase -i `git merge-base HEAD origin/master` ... but that\u0027s another discussion.  Yeah I know it also looks at .gitreview, but still seems pretty heavyweight.)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # the report client cache so the subsequent update picks up the change."},{"line_number":52,"context_line":"        self.compute.manager.reset()"},{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d self._get_provider_traits(self.host_uuid)"},{"line_number":57,"context_line":"        for trait in (\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027):"},{"line_number":58,"context_line":"            self.assertIn(trait, traits)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_8fd1115a","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":52},"in_reply_to":"9fdfeff1_d35fcd3e","updated":"2019-02-26 16:12:16.000000000","message":"If the rebases are automatic, votes carry through, so no additional human effort there. CI resources... yeah, I guess we could stand to imbue the community with a \"greener\" culture there.\n\n(Agree git-restack is heavy for what it does, but syntactically soo convenient.)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # the report client cache so the subsequent update picks up the change."},{"line_number":52,"context_line":"        self.compute.manager.reset()"},{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d self._get_provider_traits(self.host_uuid)"},{"line_number":57,"context_line":"        for trait in (\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027):"},{"line_number":58,"context_line":"            self.assertIn(trait, traits)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_2d67e44f","line":55,"range":{"start_line":54,"start_character":8,"end_line":55,"end_character":52},"in_reply_to":"9fdfeff1_f305487b","updated":"2019-02-25 22:57:20.000000000","message":"It is related. Before we were testing the exact set of traits on the provider. And since it\u0027s the whole point of this test case to make sure that AVX got filtered out, the fact that we\u0027re not doing that anymore could be masking a regression (i.e. how do we know that your change isn\u0027t now leaving it in there?)\n\nIncidentally, if rebasing patches on top of this one seems onerous, perhaps you aren\u0027t using git-restack?  :P","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d set(self._get_provider_traits(self.host_uuid))"},{"line_number":57,"context_line":"        expected_traits \u003d self.expected_libvirt_driver_capability_traits.union("},{"line_number":58,"context_line":"            [\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027]"},{"line_number":59,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":17,"id":"9fdfeff1_c454e024","line":56,"updated":"2019-02-26 16:12:16.000000000","message":"Well, this is odd. This test is failing zuul the same way for both py2 and py3, but it passes for me locally.","commit_id":"70dd8c12592ed44b6a9e3884b513bc2690136d8f"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"acedad0a89846c115be968b919e6144b909ed2f5","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d set(self._get_provider_traits(self.host_uuid))"},{"line_number":57,"context_line":"        expected_traits \u003d self.expected_libvirt_driver_capability_traits.union("},{"line_number":58,"context_line":"            [\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027]"},{"line_number":59,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":17,"id":"9fdfeff1_3d14d64c","line":56,"in_reply_to":"9fdfeff1_c414db43","updated":"2019-02-26 22:48:46.000000000","message":"OK so the problem was lack of proper isolation - the SRIOV test was adding the multi_attach capability, and this was bleeding over.  Swapping the order with Ic4c16b23834b43a258be5073e32bcdb9c0421f02 fixes it.\n\nBTW this was extremely painful to debug due to a testtools issue which I have reported here: https://bugs.launchpad.net/testtools/+bug/1817800","commit_id":"70dd8c12592ed44b6a9e3884b513bc2690136d8f"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"54bafbbf3c51ca5f90bc7d8a5dd2f81a531030cb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._run_periodics()"},{"line_number":54,"context_line":"        # HW_CPU_X86_AVX is filtered out because nova-compute owns CPU traits"},{"line_number":55,"context_line":"        # and it\u0027s not in the baseline for the host."},{"line_number":56,"context_line":"        traits \u003d set(self._get_provider_traits(self.host_uuid))"},{"line_number":57,"context_line":"        expected_traits \u003d self.expected_libvirt_driver_capability_traits.union("},{"line_number":58,"context_line":"            [\u0027HW_CPU_X86_VMX\u0027, \u0027HW_CPU_X86_AESNI\u0027, \u0027CUSTOM_TRAITS\u0027]"},{"line_number":59,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":17,"id":"9fdfeff1_c414db43","line":56,"in_reply_to":"9fdfeff1_c454e024","updated":"2019-02-26 19:10:45.000000000","message":"Yeah I see the same, which is why I didn\u0027t catch it prior to upload.  I\u0027ve pinned down the test failure to an interaction with another test - it\u0027s 100% reproducible for me via:\n\n    stestr --test-path\u003d./nova/tests/functional run --serial nova.tests.functional.libvirt.test_pci_sriov_servers.SRIOVServersTest.test_create_server_with_pci_dev_and_numa_fails nova.tests.functional.libvirt.test_report_cpu_traits.LibvirtReportTraitsTests.test_report_cpu_traits\n\n(Note the --serial is required.)  I\u0027m adding debug now to figure out what\u0027s going on.","commit_id":"70dd8c12592ed44b6a9e3884b513bc2690136d8f"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1d6a12a0f973b4b76cd639d014afbcf1394939e","unresolved":false,"context_lines":[{"line_number":1618,"context_line":""},{"line_number":1619,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1620,"context_line":"        self.assertNotIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1621,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1622,"context_line":"        self.assertEqual([], self._get_all_providers())"},{"line_number":1623,"context_line":""},{"line_number":1624,"context_line":"        self.compute \u003d self._start_compute(host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_9ca78c50","line":1621,"updated":"2018-02-16 15:10:46.000000000","message":"Assert CUSTOM_COMPUTE_SUPPORTS_FOO is absent.","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"782b1db64556a99c220d99de1edf654a82c9bfd9","unresolved":false,"context_lines":[{"line_number":1618,"context_line":""},{"line_number":1619,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1620,"context_line":"        self.assertNotIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1621,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1622,"context_line":"        self.assertEqual([], self._get_all_providers())"},{"line_number":1623,"context_line":""},{"line_number":1624,"context_line":"        self.compute \u003d self._start_compute(host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_054f5f92","line":1621,"in_reply_to":"3fa0c359_9ca78c50","updated":"2018-02-20 14:47:24.000000000","message":"Done","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e1d6a12a0f973b4b76cd639d014afbcf1394939e","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":1629,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1630,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1631,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1632,"context_line":""},{"line_number":1633,"context_line":""},{"line_number":1634,"context_line":"class ServerMovingTests(ProviderUsageBaseTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_5c67c426","line":1631,"updated":"2018-02-16 15:10:46.000000000","message":"assert CUSTOM_COMPUTE_SUPPORTS_FOO is still absent.\n\nThough you may want to consider a different name, to avoid confusion between CUSTOM_FOO and CUSTOM_COMPUTE_SUPPORTS_FOO.","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"782b1db64556a99c220d99de1edf654a82c9bfd9","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":1629,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1630,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1631,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1632,"context_line":""},{"line_number":1633,"context_line":""},{"line_number":1634,"context_line":"class ServerMovingTests(ProviderUsageBaseTestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_a5454b72","line":1631,"in_reply_to":"3fa0c359_5c67c426","updated":"2018-02-20 14:47:24.000000000","message":"Done","commit_id":"2dbe1a7d845629916a4be059daa0ac2100762444"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"370c34d13457c8a0ccb3b8da3a502e53cd19930d","unresolved":false,"context_lines":[{"line_number":1630,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1631,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1632,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1633,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_TAGS\u0027, traits)"},{"line_number":1634,"context_line":""},{"line_number":1635,"context_line":""},{"line_number":1636,"context_line":"class ServerMovingTests(ProviderUsageBaseTestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_c05c05ef","line":1633,"range":{"start_line":1633,"start_character":57,"end_line":1633,"end_character":63},"updated":"2018-02-20 15:05:17.000000000","message":"global_traits","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"88e52eebbcce198e9dbe1bed111277d54bbed4cb","unresolved":false,"context_lines":[{"line_number":1630,"context_line":"        global_traits \u003d self._get_traits()"},{"line_number":1631,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":1632,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":1633,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_TAGS\u0027, traits)"},{"line_number":1634,"context_line":""},{"line_number":1635,"context_line":""},{"line_number":1636,"context_line":"class ServerMovingTests(ProviderUsageBaseTestCase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_0b7b448c","line":1633,"range":{"start_line":1633,"start_character":57,"end_line":1633,"end_character":63},"in_reply_to":"3fa0c359_c05c05ef","updated":"2018-03-01 10:13:15.000000000","message":"+1","commit_id":"89a4a2477fe3de914ce290e573b8e8424134716b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20edce176e94ab2acd7689a28eb236809b7931e2","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":1755,"context_line":"            },"},{"line_number":1756,"context_line":"        }, self._get_provider_inventory(self.host_uuid))"},{"line_number":1757,"context_line":"        self.assertEqual(self.expected_capability_traits,"},{"line_number":1758,"context_line":"                         sorted(self._get_provider_traits(self.host_uuid)))"},{"line_number":1759,"context_line":""},{"line_number":1760,"context_line":"    def _run_update_available_resource(self, startup):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_0c756a98","line":1757,"range":{"start_line":1757,"start_character":30,"end_line":1757,"end_character":56},"updated":"2019-02-23 10:35:32.000000000","message":"or you could make these sets","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"1e903f53ececd4eec6821728944abdc8af956440","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":1755,"context_line":"            },"},{"line_number":1756,"context_line":"        }, self._get_provider_inventory(self.host_uuid))"},{"line_number":1757,"context_line":"        self.assertEqual(self.expected_capability_traits,"},{"line_number":1758,"context_line":"                         sorted(self._get_provider_traits(self.host_uuid)))"},{"line_number":1759,"context_line":""},{"line_number":1760,"context_line":"    def _run_update_available_resource(self, startup):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_73f9587e","line":1757,"range":{"start_line":1757,"start_character":30,"end_line":1757,"end_character":56},"in_reply_to":"9fdfeff1_0c756a98","updated":"2019-02-25 13:34:20.000000000","message":"That\u0027s a good idea.  If another patchset is unavoidable for other reasons I can change that.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":1754,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":1755,"context_line":"            },"},{"line_number":1756,"context_line":"        }, self._get_provider_inventory(self.host_uuid))"},{"line_number":1757,"context_line":"        self.assertEqual(self.expected_capability_traits,"},{"line_number":1758,"context_line":"                         sorted(self._get_provider_traits(self.host_uuid)))"},{"line_number":1759,"context_line":""},{"line_number":1760,"context_line":"    def _run_update_available_resource(self, startup):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_0410ad58","line":1757,"range":{"start_line":1757,"start_character":30,"end_line":1757,"end_character":56},"in_reply_to":"9fdfeff1_73f9587e","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2233,"context_line":"        \u0027supports_device_tagging\u0027: True"},{"line_number":2234,"context_line":"    }"},{"line_number":2235,"context_line":""},{"line_number":2236,"context_line":"    def _get_fake_upt(self, traits_to_add, traits_to_remove):"},{"line_number":2237,"context_line":"        \"\"\"Set up the compute driver with a fake update_provider_tree()"},{"line_number":2238,"context_line":"        which injects the given traits into the provider tree"},{"line_number":2239,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_31e97e19","line":2236,"range":{"start_line":2236,"start_character":9,"end_line":2236,"end_character":12},"updated":"2019-02-25 22:57:20.000000000","message":"This method name would be better with \u0027mock\u0027 somewhere in it. \u0027get\u0027 implies it\u0027s returning something.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2233,"context_line":"        \u0027supports_device_tagging\u0027: True"},{"line_number":2234,"context_line":"    }"},{"line_number":2235,"context_line":""},{"line_number":2236,"context_line":"    def _get_fake_upt(self, traits_to_add, traits_to_remove):"},{"line_number":2237,"context_line":"        \"\"\"Set up the compute driver with a fake update_provider_tree()"},{"line_number":2238,"context_line":"        which injects the given traits into the provider tree"},{"line_number":2239,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_4e9b34c8","line":2236,"range":{"start_line":2236,"start_character":9,"end_line":2236,"end_character":12},"in_reply_to":"9fdfeff1_31e97e19","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2270,"context_line":"        self.compute \u003d self._start_compute(host\u003d\u0027host1\u0027)"},{"line_number":2271,"context_line":""},{"line_number":2272,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2273,"context_line":"        traits.insert(0, \u0027COMPUTE_DEVICE_TAGGING\u0027)"},{"line_number":2274,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2275,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":2276,"context_line":"        global_traits \u003d self._get_all_traits()"},{"line_number":2277,"context_line":"        # CUSTOM_FOO and CUSTOM_COMPUTE_SUPPORTS_BAR are now registered traits"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_5189a272","line":2274,"range":{"start_line":2273,"start_character":0,"end_line":2274,"end_character":55},"updated":"2019-02-25 22:57:20.000000000","message":"This is weird, why do you care what order they\u0027re in? Why not use .append or .extend or + ?","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2270,"context_line":"        self.compute \u003d self._start_compute(host\u003d\u0027host1\u0027)"},{"line_number":2271,"context_line":""},{"line_number":2272,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2273,"context_line":"        traits.insert(0, \u0027COMPUTE_DEVICE_TAGGING\u0027)"},{"line_number":2274,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2275,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":2276,"context_line":"        global_traits \u003d self._get_all_traits()"},{"line_number":2277,"context_line":"        # CUSTOM_FOO and CUSTOM_COMPUTE_SUPPORTS_BAR are now registered traits"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_0e7a0c76","line":2274,"range":{"start_line":2273,"start_character":0,"end_line":2274,"end_character":55},"in_reply_to":"9fdfeff1_5189a272","updated":"2019-02-26 13:08:49.000000000","message":"I don\u0027t know - ask Matt since he wrote that bit ;-)  But yeah, I\u0027ll convert to sets or at least use assertItemsEqual().","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2272,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2273,"context_line":"        traits.insert(0, \u0027COMPUTE_DEVICE_TAGGING\u0027)"},{"line_number":2274,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2275,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":2276,"context_line":"        global_traits \u003d self._get_all_traits()"},{"line_number":2277,"context_line":"        # CUSTOM_FOO and CUSTOM_COMPUTE_SUPPORTS_BAR are now registered traits"},{"line_number":2278,"context_line":"        # because the virt driver reported them. CUSTOM_COMPUTE_SUPPORTS_TAGS"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_117f9a66","line":2275,"range":{"start_line":2275,"start_character":33,"end_line":2275,"end_character":39},"updated":"2019-02-25 22:57:20.000000000","message":"oh. Yeah, you could just use sets :)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2272,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2273,"context_line":"        traits.insert(0, \u0027COMPUTE_DEVICE_TAGGING\u0027)"},{"line_number":2274,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2275,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":2276,"context_line":"        global_traits \u003d self._get_all_traits()"},{"line_number":2277,"context_line":"        # CUSTOM_FOO and CUSTOM_COMPUTE_SUPPORTS_BAR are now registered traits"},{"line_number":2278,"context_line":"        # because the virt driver reported them. CUSTOM_COMPUTE_SUPPORTS_TAGS"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_696872f4","line":2275,"range":{"start_line":2275,"start_character":33,"end_line":2275,"end_character":39},"in_reply_to":"9fdfeff1_117f9a66","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2287,"context_line":"        traits.remove(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2288,"context_line":"        self._set_provider_traits(rp_uuid, traits)"},{"line_number":2289,"context_line":"        self.assertEqual(traits, sorted(self._get_provider_traits(rp_uuid)))"},{"line_number":2290,"context_line":"        self._delete_trait(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2291,"context_line":"        global_traits \u003d self._get_all_traits()"},{"line_number":2292,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":2293,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_f40f6436","line":2290,"range":{"start_line":2290,"start_character":0,"end_line":2290,"end_character":57},"updated":"2019-02-25 22:57:20.000000000","message":"This part I would say we don\u0027t really care about in this patch, but it\u0027s a nice bonus to test.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2297,"context_line":"        # cache so the subsequent update picks up the change."},{"line_number":2298,"context_line":"        self.compute.manager.reset()"},{"line_number":2299,"context_line":""},{"line_number":2300,"context_line":"        # Add the trait back to the fixture so that the fake"},{"line_number":2301,"context_line":"        # update_provider_tree() can reinject it."},{"line_number":2302,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2303,"context_line":""},{"line_number":2304,"context_line":"        # Now when we run the periodic update task, the trait should"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_b1732e80","line":2301,"range":{"start_line":2300,"start_character":0,"end_line":2301,"end_character":49},"updated":"2019-02-25 22:57:20.000000000","message":"That\u0027s not really what\u0027s happening here. You\u0027re adding the trait into the list of traits you expect to see on the provider, but it\u0027s not feeding into the fixture. I think this would be clearer if the variable name were s/traits/expected_traits/ - possibly initialize a new variable at L2273 as\n\n expected_traits \u003d set(traits + [\u0027COMPUTE_DEVICE_TAGGING\u0027, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027])","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":2297,"context_line":"        # cache so the subsequent update picks up the change."},{"line_number":2298,"context_line":"        self.compute.manager.reset()"},{"line_number":2299,"context_line":""},{"line_number":2300,"context_line":"        # Add the trait back to the fixture so that the fake"},{"line_number":2301,"context_line":"        # update_provider_tree() can reinject it."},{"line_number":2302,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2303,"context_line":""},{"line_number":2304,"context_line":"        # Now when we run the periodic update task, the trait should"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_0f40c134","line":2301,"range":{"start_line":2300,"start_character":0,"end_line":2301,"end_character":49},"in_reply_to":"9fdfeff1_04c8ada5","updated":"2019-02-26 16:12:16.000000000","message":"Mm, a closure with a list variable by reference. That\u0027s a tad obscure. But okay.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2297,"context_line":"        # cache so the subsequent update picks up the change."},{"line_number":2298,"context_line":"        self.compute.manager.reset()"},{"line_number":2299,"context_line":""},{"line_number":2300,"context_line":"        # Add the trait back to the fixture so that the fake"},{"line_number":2301,"context_line":"        # update_provider_tree() can reinject it."},{"line_number":2302,"context_line":"        traits.insert(1, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027)"},{"line_number":2303,"context_line":""},{"line_number":2304,"context_line":"        # Now when we run the periodic update task, the trait should"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_04c8ada5","line":2301,"range":{"start_line":2300,"start_character":0,"end_line":2301,"end_character":49},"in_reply_to":"9fdfeff1_b1732e80","updated":"2019-02-26 13:08:49.000000000","message":"I believe it *is* feeding into the fixture (assuming that the term \"fixture\" includes ``SmallFakeDriver`` and associated mocks), because the soon-to-be-renamed ``_get_fake_upt()`` creates a closure which uses that variable as ``traits_to_add``.\n\nNevertheless I agree the variable naming is too vague, so I\u0027ll fix that.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2325,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2326,"context_line":"        traits \u003d self._get_provider_traits(rp_uuid)"},{"line_number":2327,"context_line":"        traits.append(admin_trait)"},{"line_number":2328,"context_line":"        self._set_provider_traits(rp_uuid, traits)"},{"line_number":2329,"context_line":"        self.assertIn(admin_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2330,"context_line":""},{"line_number":2331,"context_line":"        self._run_periodics()"},{"line_number":2332,"context_line":"        self.assertIn(admin_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2333,"context_line":""},{"line_number":2334,"context_line":"    @mock.patch.dict(fake.SmallFakeDriver.capabilities, clear\u003dTrue,"},{"line_number":2335,"context_line":"                     values\u003dfake_caps)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_d70fc22b","line":2332,"range":{"start_line":2328,"start_character":0,"end_line":2332,"end_character":70},"updated":"2019-02-25 22:57:20.000000000","message":"Pretty sure this doesn\u0027t hit placement. I think you want to do the .reset() thing again.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2325,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2326,"context_line":"        traits \u003d self._get_provider_traits(rp_uuid)"},{"line_number":2327,"context_line":"        traits.append(admin_trait)"},{"line_number":2328,"context_line":"        self._set_provider_traits(rp_uuid, traits)"},{"line_number":2329,"context_line":"        self.assertIn(admin_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2330,"context_line":""},{"line_number":2331,"context_line":"        self._run_periodics()"},{"line_number":2332,"context_line":"        self.assertIn(admin_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2333,"context_line":""},{"line_number":2334,"context_line":"    @mock.patch.dict(fake.SmallFakeDriver.capabilities, clear\u003dTrue,"},{"line_number":2335,"context_line":"                     values\u003dfake_caps)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_e421e9b5","line":2332,"range":{"start_line":2328,"start_character":0,"end_line":2332,"end_character":70},"in_reply_to":"9fdfeff1_d70fc22b","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2336,"context_line":"    def test_driver_removing_support_for_custom_trait_via_capability(self):"},{"line_number":2337,"context_line":"        \"\"\"Test that if a driver initially reports a custom trait via a"},{"line_number":2338,"context_line":"        supported capability, then at the next periodic update doesn\u0027t"},{"line_number":2339,"context_line":"        report support for it again, it gets removed from placement."},{"line_number":2340,"context_line":"        \"\"\""},{"line_number":2341,"context_line":"        cap \u003d \"supports_bar\""},{"line_number":2342,"context_line":"        custom_trait \u003d \"CUSTOM_COMPUTE_SUPPORTS_BAR\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_f71d2662","line":2339,"range":{"start_line":2339,"start_character":58,"end_line":2339,"end_character":67},"updated":"2019-02-25 22:57:20.000000000","message":"the provider","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2336,"context_line":"    def test_driver_removing_support_for_custom_trait_via_capability(self):"},{"line_number":2337,"context_line":"        \"\"\"Test that if a driver initially reports a custom trait via a"},{"line_number":2338,"context_line":"        supported capability, then at the next periodic update doesn\u0027t"},{"line_number":2339,"context_line":"        report support for it again, it gets removed from placement."},{"line_number":2340,"context_line":"        \"\"\""},{"line_number":2341,"context_line":"        cap \u003d \"supports_bar\""},{"line_number":2342,"context_line":"        custom_trait \u003d \"CUSTOM_COMPUTE_SUPPORTS_BAR\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_e43b2935","line":2339,"range":{"start_line":2339,"start_character":58,"end_line":2339,"end_character":67},"in_reply_to":"9fdfeff1_f71d2662","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2356,"context_line":"    def test_driver_removing_support_for_standard_trait_via_capability(self):"},{"line_number":2357,"context_line":"        \"\"\"Test that if a driver initially reports a standard trait via a"},{"line_number":2358,"context_line":"        supported capability, then at the next periodic update doesn\u0027t"},{"line_number":2359,"context_line":"        report support for it again, it gets removed from placement."},{"line_number":2360,"context_line":"        \"\"\""},{"line_number":2361,"context_line":"        cap \u003d \"supports_device_tagging\""},{"line_number":2362,"context_line":"        standard_trait \u003d os_traits.COMPUTE_DEVICE_TAGGING"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_97437a3f","line":2359,"updated":"2019-02-25 22:57:20.000000000","message":"Standard vs custom traits don\u0027t really make a difference. IMO this is redundant with the previous. (Or you could combine them.)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2356,"context_line":"    def test_driver_removing_support_for_standard_trait_via_capability(self):"},{"line_number":2357,"context_line":"        \"\"\"Test that if a driver initially reports a standard trait via a"},{"line_number":2358,"context_line":"        supported capability, then at the next periodic update doesn\u0027t"},{"line_number":2359,"context_line":"        report support for it again, it gets removed from placement."},{"line_number":2360,"context_line":"        \"\"\""},{"line_number":2361,"context_line":"        cap \u003d \"supports_device_tagging\""},{"line_number":2362,"context_line":"        standard_trait \u003d os_traits.COMPUTE_DEVICE_TAGGING"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_bf3be8ce","line":2359,"in_reply_to":"9fdfeff1_97437a3f","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2375,"context_line":"        \"\"\"Test that if a driver reports a standard trait via"},{"line_number":2376,"context_line":"        update_provider_tree() initially, then at the next periodic"},{"line_number":2377,"context_line":"        update doesn\u0027t report it again, it gets removed from"},{"line_number":2378,"context_line":"        placement."},{"line_number":2379,"context_line":"        \"\"\""},{"line_number":2380,"context_line":"        standard_trait \u003d os_traits.HW_CPU_X86_SGX"},{"line_number":2381,"context_line":"        self._get_fake_upt([standard_trait], [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_b769debe","line":2378,"range":{"start_line":2378,"start_character":8,"end_line":2378,"end_character":17},"updated":"2019-02-25 22:57:20.000000000","message":"the provider","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2375,"context_line":"        \"\"\"Test that if a driver reports a standard trait via"},{"line_number":2376,"context_line":"        update_provider_tree() initially, then at the next periodic"},{"line_number":2377,"context_line":"        update doesn\u0027t report it again, it gets removed from"},{"line_number":2378,"context_line":"        placement."},{"line_number":2379,"context_line":"        \"\"\""},{"line_number":2380,"context_line":"        standard_trait \u003d os_traits.HW_CPU_X86_SGX"},{"line_number":2381,"context_line":"        self._get_fake_upt([standard_trait], [])"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_9f2e248a","line":2378,"range":{"start_line":2378,"start_character":8,"end_line":2378,"end_character":17},"in_reply_to":"9fdfeff1_b769debe","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2389,"context_line":"        self._get_fake_upt([], [standard_trait])"},{"line_number":2390,"context_line":"        self._run_periodics()"},{"line_number":2391,"context_line":""},{"line_number":2392,"context_line":"        self.assertNotIn(standard_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2393,"context_line":""},{"line_number":2394,"context_line":"    def test_driver_removing_custom_trait_via_upt(self):"},{"line_number":2395,"context_line":"        \"\"\"Test that if a driver reports a custom trait via"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_975cda19","line":2392,"updated":"2019-02-25 22:57:20.000000000","message":"nice","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":2391,"context_line":""},{"line_number":2392,"context_line":"        self.assertNotIn(standard_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2393,"context_line":""},{"line_number":2394,"context_line":"    def test_driver_removing_custom_trait_via_upt(self):"},{"line_number":2395,"context_line":"        \"\"\"Test that if a driver reports a custom trait via"},{"line_number":2396,"context_line":"        update_provider_tree() initially, then at the next periodic"},{"line_number":2397,"context_line":"        update doesn\u0027t report it again, it gets removed from"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_17a6aa10","line":2394,"range":{"start_line":2394,"start_character":29,"end_line":2394,"end_character":35},"updated":"2019-02-25 22:57:20.000000000","message":"likewise redundant IMO","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":2391,"context_line":""},{"line_number":2392,"context_line":"        self.assertNotIn(standard_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2393,"context_line":""},{"line_number":2394,"context_line":"    def test_driver_removing_custom_trait_via_upt(self):"},{"line_number":2395,"context_line":"        \"\"\"Test that if a driver reports a custom trait via"},{"line_number":2396,"context_line":"        update_provider_tree() initially, then at the next periodic"},{"line_number":2397,"context_line":"        update doesn\u0027t report it again, it gets removed from"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_df702c75","line":2394,"range":{"start_line":2394,"start_character":29,"end_line":2394,"end_character":35},"in_reply_to":"9fdfeff1_17a6aa10","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":2274,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(\u0027host1\u0027)"},{"line_number":2275,"context_line":"        expected_traits \u003d set("},{"line_number":2276,"context_line":"            ptree_traits +"},{"line_number":2277,"context_line":"            [\u0027COMPUTE_DEVICE_TAGGING\u0027, \u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027]"},{"line_number":2278,"context_line":"        )"},{"line_number":2279,"context_line":"        self.assertItemsEqual(expected_traits,"},{"line_number":2280,"context_line":"                              self._get_provider_traits(rp_uuid))"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_3d503f32","line":2277,"range":{"start_line":2277,"start_character":40,"end_line":2277,"end_character":67},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this comes from the supports_bar in fake_caps","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":2283,"context_line":"        # because the virt driver reported them. CUSTOM_COMPUTE_SUPPORTS_TAGS"},{"line_number":2284,"context_line":"        # is not reported since the virt driver capabilities dict said it\u0027s"},{"line_number":2285,"context_line":"        # not supported."},{"line_number":2286,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":2287,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":2288,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_TAGS\u0027, global_traits)"},{"line_number":2289,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_5d2bc393","line":2286,"range":{"start_line":2286,"start_character":23,"end_line":2286,"end_character":33},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this is ptree_traits on L2261","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":2284,"context_line":"        # is not reported since the virt driver capabilities dict said it\u0027s"},{"line_number":2285,"context_line":"        # not supported."},{"line_number":2286,"context_line":"        self.assertIn(\u0027CUSTOM_FOO\u0027, global_traits)"},{"line_number":2287,"context_line":"        self.assertIn(\u0027CUSTOM_COMPUTE_SUPPORTS_BAR\u0027, global_traits)"},{"line_number":2288,"context_line":"        self.assertNotIn(\u0027CUSTOM_COMPUTE_SUPPORTS_TAGS\u0027, global_traits)"},{"line_number":2289,"context_line":""},{"line_number":2290,"context_line":"        # Now simulate user deletion of a driver-provided trait.  We"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_1d1bfb80","line":2287,"range":{"start_line":2287,"start_character":23,"end_line":2287,"end_character":50},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: from fake_caps","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"864195672cbb9dde43cd778bd77f3d1a36404f09","unresolved":false,"context_lines":[{"line_number":2388,"context_line":""},{"line_number":2389,"context_line":"        self.assertNotIn(custom_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2390,"context_line":"        self.assertNotIn(standard_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2391,"context_line":""},{"line_number":2392,"context_line":""},{"line_number":2393,"context_line":"class ServerMovingTests(integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":2394,"context_line":"    \"\"\"Tests moving servers while checking the resource allocations and usages"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_4be1bdcf","line":2391,"updated":"2019-02-27 18:46:37.000000000","message":"Adam noticed we\u0027re missing the case where the admin adds an unsupported capability trait and the next periodic removes it.","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":2388,"context_line":""},{"line_number":2389,"context_line":"        self.assertNotIn(custom_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2390,"context_line":"        self.assertNotIn(standard_trait, self._get_provider_traits(rp_uuid))"},{"line_number":2391,"context_line":""},{"line_number":2392,"context_line":""},{"line_number":2393,"context_line":"class ServerMovingTests(integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":2394,"context_line":"    \"\"\"Tests moving servers while checking the resource allocations and usages"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_5f3712ff","line":2391,"in_reply_to":"9fdfeff1_4be1bdcf","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        ptree \u003d provider_tree.ProviderTree()"},{"line_number":494,"context_line":"        ptree.new_root(compute.hypervisor_hostname, compute.uuid)"},{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_b7979e90","line":495,"range":{"start_line":495,"start_character":8,"end_line":495,"end_character":41},"updated":"2019-02-25 22:57:20.000000000","message":"guess I would prefer this be done with mock.patch.object","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        ptree \u003d provider_tree.ProviderTree()"},{"line_number":494,"context_line":"        ptree.new_root(compute.hypervisor_hostname, compute.uuid)"},{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_ffa650c0","line":495,"range":{"start_line":495,"start_character":8,"end_line":495,"end_character":41},"in_reply_to":"9fdfeff1_b7979e90","updated":"2019-02-26 13:08:49.000000000","message":"I don\u0027t see how that could work and still allow the \n\n    ptree.update_traits.assert_called_once_with(...)\n\nbelow?","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        ptree \u003d provider_tree.ProviderTree()"},{"line_number":494,"context_line":"        ptree.new_root(compute.hypervisor_hostname, compute.uuid)"},{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_4f0a49d1","line":495,"range":{"start_line":495,"start_character":8,"end_line":495,"end_character":41},"in_reply_to":"9fdfeff1_ffa650c0","updated":"2019-02-26 16:12:16.000000000","message":"I think it doesn\u0027t change anything, since it\u0027s effectively doing the same thing. But meh.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"},{"line_number":499,"context_line":"        gptaer_mock.return_value \u003d ptree"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        return ptree"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_778db67a","line":498,"range":{"start_line":498,"start_character":30,"end_line":498,"end_character":63},"updated":"2019-02-25 22:57:20.000000000","message":"sorry about that","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"},{"line_number":499,"context_line":"        gptaer_mock.return_value \u003d ptree"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        return ptree"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_cffdd9b2","line":498,"range":{"start_line":498,"start_character":30,"end_line":498,"end_character":63},"in_reply_to":"9fdfeff1_1fac749d","updated":"2019-02-26 16:12:16.000000000","message":"the ugliness of having to do two interim assignments to get at the return_value of this mock, because this method name is so bloody long. Actually I think it\u0027s Jay\u0027s fault, despite my name being on that change :)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        ptree.update_traits \u003d mock.Mock()"},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        rc_mock \u003d self.rt.reportclient"},{"line_number":498,"context_line":"        gptaer_mock \u003d rc_mock.get_provider_tree_and_ensure_root"},{"line_number":499,"context_line":"        gptaer_mock.return_value \u003d ptree"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":"        return ptree"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_1fac749d","line":498,"range":{"start_line":498,"start_character":30,"end_line":498,"end_character":63},"in_reply_to":"9fdfeff1_778db67a","updated":"2019-02-26 13:08:49.000000000","message":"?","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":1410,"context_line":"        save_mock.assert_called_once_with()"},{"line_number":1411,"context_line":"        norm_mock.assert_called_once_with(mock.sentinel.inv_data, new_compute)"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def test_existing_node_capabilities_as_traits(self):"},{"line_number":1414,"context_line":"        \"\"\"The capabilities_as_traits() driver method returns traits"},{"line_number":1415,"context_line":"        information for a node/provider."},{"line_number":1416,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_17f46af0","line":1413,"updated":"2019-02-25 22:57:20.000000000","message":"This is probably not needed. What have you done here that wasn\u0027t covered in the functional tests?","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":1410,"context_line":"        save_mock.assert_called_once_with()"},{"line_number":1411,"context_line":"        norm_mock.assert_called_once_with(mock.sentinel.inv_data, new_compute)"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def test_existing_node_capabilities_as_traits(self):"},{"line_number":1414,"context_line":"        \"\"\"The capabilities_as_traits() driver method returns traits"},{"line_number":1415,"context_line":"        information for a node/provider."},{"line_number":1416,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_1fb314eb","line":1413,"in_reply_to":"9fdfeff1_17f46af0","updated":"2019-02-26 13:08:49.000000000","message":"I\u0027m not sure, Matt wrote this originally - I just updated it.  I guess the functional tests I added cover the same stuff more thoroughly, but OTOH this test is much more lightweight and might provide an early warning for other developers who initially only run fast unit tests?","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"57fcce970ff6e028701010616ae4f0205550e7da","unresolved":false,"context_lines":[{"line_number":1410,"context_line":"        save_mock.assert_called_once_with()"},{"line_number":1411,"context_line":"        norm_mock.assert_called_once_with(mock.sentinel.inv_data, new_compute)"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def test_existing_node_capabilities_as_traits(self):"},{"line_number":1414,"context_line":"        \"\"\"The capabilities_as_traits() driver method returns traits"},{"line_number":1415,"context_line":"        information for a node/provider."},{"line_number":1416,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_0fe68117","line":1413,"in_reply_to":"9fdfeff1_1fb314eb","updated":"2019-02-26 16:12:16.000000000","message":"We usually prefer not to go redundant (considering how big our tests are anyway - refer to \"green\" discussion); and we prefer functional over unit where feasible. It\u0027s probably not a big deal; I\u0027ll let other reviewers weigh in.","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"}],"nova/virt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"84add548bfd568e2e21fb93fe5553114b3cd991c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    \"supports_extend_volume\": os_traits.COMPUTE_VOLUME_EXTEND,"},{"line_number":102,"context_line":"    \"supports_multiattach\": os_traits.COMPUTE_VOLUME_MULTI_ATTACH,"},{"line_number":103,"context_line":"    # Added in os-traits 0.8.0."},{"line_number":104,"context_line":"    # TODO(mriedem): Uncomment once https://review.openstack.org/#/c/576595/"},{"line_number":105,"context_line":"    # is released."},{"line_number":106,"context_line":"    # \"supports_trusted_certs\": os_traits.COMPUTE_TRUSTED_CERTS"},{"line_number":107,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_8dc1b584","line":104,"updated":"2018-06-28 17:25:21.000000000","message":"Will be in os-traits 0.8.0:\n\nhttps://review.openstack.org/#/c/578895/","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"01637670f9f8734bafcf8a097285d33850c4537e","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    # NOTE(mriedem): When adding new capabilities, ensure they are mirrored"},{"line_number":142,"context_line":"    # in CAPABILITY_TRAITS_MAP and optionally the os-traits library."},{"line_number":143,"context_line":"    capabilities \u003d {"},{"line_number":144,"context_line":"        \"has_imagecache\": False,"},{"line_number":145,"context_line":"        \"supports_recreate\": False,"},{"line_number":146,"context_line":"        \"supports_migrate_to_same_host\": False,"},{"line_number":147,"context_line":"        \"supports_attach_interface\": False,"},{"line_number":148,"context_line":"        \"supports_device_tagging\": False,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_c04e4fc1","line":145,"range":{"start_line":144,"start_character":8,"end_line":145,"end_character":35},"updated":"2018-06-20 05:10:27.000000000","message":"seems those 2 are not customize trait? what kind of use case to support customize trait ?","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2ae35dc656f17bfcfec501bceb987b39514e7a47","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    # NOTE(mriedem): When adding new capabilities, ensure they are mirrored"},{"line_number":142,"context_line":"    # in CAPABILITY_TRAITS_MAP and optionally the os-traits library."},{"line_number":143,"context_line":"    capabilities \u003d {"},{"line_number":144,"context_line":"        \"has_imagecache\": False,"},{"line_number":145,"context_line":"        \"supports_recreate\": False,"},{"line_number":146,"context_line":"        \"supports_migrate_to_same_host\": False,"},{"line_number":147,"context_line":"        \"supports_attach_interface\": False,"},{"line_number":148,"context_line":"        \"supports_device_tagging\": False,"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_14a70d0c","line":145,"range":{"start_line":144,"start_character":8,"end_line":145,"end_character":35},"in_reply_to":"5f7c97a3_c04e4fc1","updated":"2018-06-27 20:27:05.000000000","message":"Do you mean standard traits from the os-traits library? The has_imagecache capability isn\u0027t really something we\u0027d advertise as a trait on the resource provider since it doesn\u0027t really map to anything in the compute API. Why supports_recreate isn\u0027t in os-traits, I\u0027m not really sure...it could I guess if we wanted to pre-filter hosts during evacuate to find only compute nodes that could support evacuate if you have a mixed hypervisor deployment not separated by aggregates.","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cc4a13b1f0c5336bf7326dc65156bc80024093a","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        \"\"\""},{"line_number":914,"context_line":"        raise NotImplementedError()"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"    def capabilities_as_traits(self):"},{"line_number":917,"context_line":"        \"\"\"Returns this driver\u0027s capabilities dict where the keys are traits"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        Standard compute capabilityes traits from the os-traits library will"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_043f8487","line":916,"updated":"2018-06-19 18:54:24.000000000","message":"This could be split out into a separate dependent change.","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e046837a0aa6aff38978c78f811769d03427a62","unresolved":false,"context_lines":[{"line_number":916,"context_line":"    def capabilities_as_traits(self):"},{"line_number":917,"context_line":"        \"\"\"Returns this driver\u0027s capabilities dict where the keys are traits"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        Standard compute capabilityes traits from the os-traits library will"},{"line_number":920,"context_line":"        be used if available in the os-traits library (hint: they should all"},{"line_number":921,"context_line":"        be in the os-traits library)."},{"line_number":922,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_249ac061","line":919,"range":{"start_line":919,"start_character":34,"end_line":919,"end_character":35},"updated":"2018-06-19 19:09:58.000000000","message":"i","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9db8bb2d372fcacc3fee5f35100938c331d1f156","unresolved":false,"context_lines":[{"line_number":916,"context_line":"    def capabilities_as_traits(self):"},{"line_number":917,"context_line":"        \"\"\"Returns this driver\u0027s capabilities dict where the keys are traits"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        Standard compute capabilityes traits from the os-traits library will"},{"line_number":920,"context_line":"        be used if available in the os-traits library (hint: they should all"},{"line_number":921,"context_line":"        be in the os-traits library)."},{"line_number":922,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_db716779","line":919,"range":{"start_line":919,"start_character":34,"end_line":919,"end_character":35},"in_reply_to":"5f7c97a3_249ac061","updated":"2018-06-20 00:03:19.000000000","message":"ha","commit_id":"7199a5a23932036a58ce66135f13a1cdef04b29f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                traits[\u0027CUSTOM_COMPUTE_%s\u0027 % capability.upper()] \u003d supported"},{"line_number":1035,"context_line":"        return traits"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_f7c76697","line":1034,"range":{"start_line":1034,"start_character":45,"end_line":1034,"end_character":63},"updated":"2019-02-25 22:57:20.000000000","message":"use os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                traits[\u0027CUSTOM_COMPUTE_%s\u0027 % capability.upper()] \u003d supported"},{"line_number":1035,"context_line":"        return traits"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9fdfeff1_3f2e1843","line":1034,"range":{"start_line":1034,"start_character":45,"end_line":1034,"end_character":63},"in_reply_to":"9fdfeff1_f7c76697","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051e167e70b980aba61afd103fa989c94390552f","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"# NOTE(aspiers): When adding new capabilities, ensure they are mirrored"},{"line_number":96,"context_line":"# in ComputeDriver.capabilities."},{"line_number":97,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":98,"context_line":"    # Added in os-traits 0.7.0."},{"line_number":99,"context_line":"    \"supports_attach_interface\": os_traits.COMPUTE_NET_ATTACH_INTERFACE,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_71b59031","line":96,"updated":"2019-02-27 19:49:01.000000000","message":"Add a note here that the values should always be standard traits. If something isn\u0027t a standard trait, it doesn\u0027t need to be a compute node capability trait; and if it needs to be a compute node capability trait, it needs to be (made) standard. More below.","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"# NOTE(aspiers): When adding new capabilities, ensure they are mirrored"},{"line_number":96,"context_line":"# in ComputeDriver.capabilities."},{"line_number":97,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":98,"context_line":"    # Added in os-traits 0.7.0."},{"line_number":99,"context_line":"    \"supports_attach_interface\": os_traits.COMPUTE_NET_ATTACH_INTERFACE,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_9c590dfe","line":96,"in_reply_to":"9fdfeff1_71b59031","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abb92ebf29ead4517b948726fd5af3ee67600c3d","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"# NOTE(aspiers): When adding new capabilities, ensure they are mirrored"},{"line_number":96,"context_line":"# in ComputeDriver.capabilities."},{"line_number":97,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":98,"context_line":"    # Added in os-traits 0.7.0."},{"line_number":99,"context_line":"    \"supports_attach_interface\": os_traits.COMPUTE_NET_ATTACH_INTERFACE,"},{"line_number":100,"context_line":"    \"supports_device_tagging\": os_traits.COMPUTE_DEVICE_TAGGING,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_718ef079","line":97,"updated":"2019-02-27 19:49:32.000000000","message":"Should also note that everything in here must be a standard trait (from os-traits).","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"# NOTE(aspiers): When adding new capabilities, ensure they are mirrored"},{"line_number":96,"context_line":"# in ComputeDriver.capabilities."},{"line_number":97,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":98,"context_line":"    # Added in os-traits 0.7.0."},{"line_number":99,"context_line":"    \"supports_attach_interface\": os_traits.COMPUTE_NET_ATTACH_INTERFACE,"},{"line_number":100,"context_line":"    \"supports_device_tagging\": os_traits.COMPUTE_DEVICE_TAGGING,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_3c74a167","line":97,"in_reply_to":"9fdfeff1_718ef079","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"abb92ebf29ead4517b948726fd5af3ee67600c3d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    \"\"\""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # NOTE(mriedem): When adding new capabilities, ensure they are mirrored"},{"line_number":143,"context_line":"    # in CAPABILITY_TRAITS_MAP and optionally the os-traits library."},{"line_number":144,"context_line":"    capabilities \u003d {"},{"line_number":145,"context_line":"        \"has_imagecache\": False,"},{"line_number":146,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_117e8469","line":143,"range":{"start_line":143,"start_character":31,"end_line":143,"end_character":68},"updated":"2019-02-27 19:49:32.000000000","message":"nix","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"868bfddef843c81bc69804ae78d55258e6abaa25","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    \"\"\""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # NOTE(mriedem): When adding new capabilities, ensure they are mirrored"},{"line_number":143,"context_line":"    # in CAPABILITY_TRAITS_MAP and optionally the os-traits library."},{"line_number":144,"context_line":"    capabilities \u003d {"},{"line_number":145,"context_line":"        \"has_imagecache\": False,"},{"line_number":146,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_8c6edb29","line":143,"range":{"start_line":143,"start_character":31,"end_line":143,"end_character":68},"in_reply_to":"9fdfeff1_117e8469","updated":"2019-02-27 20:51:22.000000000","message":"Actually, the \"and optionally...\" part is still correct. What\u0027s incorrect is the \"ensure\" part.","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    \"\"\""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # NOTE(mriedem): When adding new capabilities, ensure they are mirrored"},{"line_number":143,"context_line":"    # in CAPABILITY_TRAITS_MAP and optionally the os-traits library."},{"line_number":144,"context_line":"    capabilities \u003d {"},{"line_number":145,"context_line":"        \"has_imagecache\": False,"},{"line_number":146,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_9fbeda62","line":143,"range":{"start_line":143,"start_character":31,"end_line":143,"end_character":68},"in_reply_to":"9fdfeff1_8c6edb29","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051e167e70b980aba61afd103fa989c94390552f","unresolved":false,"context_lines":[{"line_number":1019,"context_line":"        Standard compute capabilities traits from the os-traits library will"},{"line_number":1020,"context_line":"        be used if available in the os-traits library (hint: they should all"},{"line_number":1021,"context_line":"        be in the os-traits library)."},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        Non-standard capabilities will be returned as"},{"line_number":1024,"context_line":"        CUSTOM_COMPUTE_\u003ccapability\u003e in upper-case."},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"        :returns: dict, keyed by trait, of this driver\u0027s capabilities where the"},{"line_number":1027,"context_line":"            values are booleans indicating if the driver supports the trait"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_c6092431","line":1024,"range":{"start_line":1022,"start_character":0,"end_line":1024,"end_character":50},"updated":"2019-02-27 19:49:01.000000000","message":"nix (see below)","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":1019,"context_line":"        Standard compute capabilities traits from the os-traits library will"},{"line_number":1020,"context_line":"        be used if available in the os-traits library (hint: they should all"},{"line_number":1021,"context_line":"        be in the os-traits library)."},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        Non-standard capabilities will be returned as"},{"line_number":1024,"context_line":"        CUSTOM_COMPUTE_\u003ccapability\u003e in upper-case."},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"        :returns: dict, keyed by trait, of this driver\u0027s capabilities where the"},{"line_number":1027,"context_line":"            values are booleans indicating if the driver supports the trait"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_621da40d","line":1024,"range":{"start_line":1022,"start_character":0,"end_line":1024,"end_character":50},"in_reply_to":"9fdfeff1_c6092431","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"            values are booleans indicating if the driver supports the trait"},{"line_number":1028,"context_line":"        \"\"\""},{"line_number":1029,"context_line":"        traits \u003d {}"},{"line_number":1030,"context_line":"        for capability, supported in self.capabilities.items():"},{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_bdf42fd0","line":1030,"range":{"start_line":1030,"start_character":24,"end_line":1030,"end_character":33},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this is a boolean","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"            values are booleans indicating if the driver supports the trait"},{"line_number":1028,"context_line":"        \"\"\""},{"line_number":1029,"context_line":"        traits \u003d {}"},{"line_number":1030,"context_line":"        for capability, supported in self.capabilities.items():"},{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_fd0e37e2","line":1030,"range":{"start_line":1030,"start_character":12,"end_line":1030,"end_character":22},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this is the capability name","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"dfe7e9adadafbae5cb8bd04e78e02b18a29fd4cd","unresolved":false,"context_lines":[{"line_number":1029,"context_line":"        traits \u003d {}"},{"line_number":1030,"context_line":"        for capability, supported in self.capabilities.items():"},{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                trait \u003d os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)"},{"line_number":1035,"context_line":"                traits[trait] \u003d supported"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_1d2f7b3f","line":1032,"range":{"start_line":1032,"start_character":23,"end_line":1032,"end_character":56},"updated":"2019-02-27 17:38:29.000000000","message":"note to self: this is the name of the trait corresponding to that capability","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f0839c8e419d8c44dae7e1335be1db9e2a76a08","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                trait \u003d os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)"},{"line_number":1035,"context_line":"                traits[trait] \u003d supported"},{"line_number":1036,"context_line":"        return traits"},{"line_number":1037,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_519f2cb3","line":1034,"updated":"2019-02-27 19:48:26.000000000","message":"I\u0027m assuming Eric is furiously typing this too but I think we\u0027ve concluded that we should only report capabilities as standard traits (from os-traits) and never report anything else as CUSTOM_* from here, e.g. CUSTOM_HAS_IMAGECACHE.","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                trait \u003d os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)"},{"line_number":1035,"context_line":"                traits[trait] \u003d supported"},{"line_number":1036,"context_line":"        return traits"},{"line_number":1037,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_0218581b","line":1034,"in_reply_to":"9fdfeff1_519f2cb3","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"051e167e70b980aba61afd103fa989c94390552f","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"        for capability, supported in self.capabilities.items():"},{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                trait \u003d os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)"},{"line_number":1035,"context_line":"                traits[trait] \u003d supported"},{"line_number":1036,"context_line":"        return traits"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_b141b83b","line":1035,"range":{"start_line":1033,"start_character":0,"end_line":1035,"end_character":41},"updated":"2019-02-27 19:49:01.000000000","message":"Per discussion in IRC [1], let\u0027s remove this.\n\nTL;DR: we should only decorate the compute RP with capability traits that an operator could reasonably want to schedule around; and those should be made standard traits in all cases. So we should not be creating custom traits for whatever else is in the capabilities dict.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2019-02-27.log.html#t2019-02-27T19:19:59","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"773137c43b1feb22515f931d020187513788d631","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"        for capability, supported in self.capabilities.items():"},{"line_number":1031,"context_line":"            if capability in CAPABILITY_TRAITS_MAP:"},{"line_number":1032,"context_line":"                traits[CAPABILITY_TRAITS_MAP[capability]] \u003d supported"},{"line_number":1033,"context_line":"            else:"},{"line_number":1034,"context_line":"                trait \u003d os_traits.normalize_name(\u0027COMPUTE_%s\u0027 % capability)"},{"line_number":1035,"context_line":"                traits[trait] \u003d supported"},{"line_number":1036,"context_line":"        return traits"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"    def get_available_resource(self, nodename):"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fdfeff1_22131c03","line":1035,"range":{"start_line":1033,"start_character":0,"end_line":1035,"end_character":41},"in_reply_to":"9fdfeff1_b141b83b","updated":"2019-02-28 23:19:11.000000000","message":"Done","commit_id":"055ac72ce50efd6686f00cce92b15076c6dc8247"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"72b52fc84020306f938697163f8c9649f24b9f86","unresolved":false,"context_lines":[{"line_number":97,"context_line":"# values should always be standard traits in os_traits.  If something"},{"line_number":98,"context_line":"# isn\u0027t a standard trait, it doesn\u0027t need to be a compute node"},{"line_number":99,"context_line":"# capability trait; and if it needs to be a compute node capability"},{"line_number":100,"context_line":"# trait, it needs to be (made) standard."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":103,"context_line":"    # Added in os-traits 0.7.0."}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_72400d07","line":100,"updated":"2019-02-28 23:25:41.000000000","message":"could also say that such traits should be prefixed with `COMPUTE_`","commit_id":"35487f971e1f0cc5512932f7c7775573ca098305"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"ff2069be4572ad1d48a96183bbcbda62d41034e2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"# values should always be standard traits in os_traits.  If something"},{"line_number":98,"context_line":"# isn\u0027t a standard trait, it doesn\u0027t need to be a compute node"},{"line_number":99,"context_line":"# capability trait; and if it needs to be a compute node capability"},{"line_number":100,"context_line":"# trait, it needs to be (made) standard."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"CAPABILITY_TRAITS_MAP \u003d {"},{"line_number":103,"context_line":"    # Added in os-traits 0.7.0."}],"source_content_type":"text/x-python","patch_set":20,"id":"9fdfeff1_5224e95f","line":100,"in_reply_to":"9fdfeff1_72400d07","updated":"2019-02-28 23:28:55.000000000","message":"Done","commit_id":"35487f971e1f0cc5512932f7c7775573ca098305"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2a5a5d85e67f81b94ee62483ded41e0c334f6373","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    # NOTE(mriedem): When adding new capabilities, consider whether they"},{"line_number":148,"context_line":"    # should also be added to CAPABILITY_TRAITS_MAP; if so, any new traits"},{"line_number":149,"context_line":"    # must also be added to the os-traits library."},{"line_number":150,"context_line":"    capabilities \u003d {"},{"line_number":151,"context_line":"        \"has_imagecache\": False,"},{"line_number":152,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_4f916e9a","line":149,"updated":"2019-03-04 16:14:04.000000000","message":"Kinda seems like we should just enforce them all being present, but I guess that introduces a dependency on a os-traits release before we could add a thing in nova. Just kinda unfortunate to have this diverge over time because nobody wants to schedule on a thing when it\u0027s added, and then later have to go figure out why we\u0027re not exposing something.\n\nMaybe add a test that asserts that all of these are mapped, and add an exclusion list to let the test pass for things we add in the future so we\u0027re explicit about it? We do that for things like migrations that don\u0027t need tests, among other things.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"312f65923bc2bdbda8575415deaa8dc618335c90","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    # NOTE(mriedem): When adding new capabilities, consider whether they"},{"line_number":148,"context_line":"    # should also be added to CAPABILITY_TRAITS_MAP; if so, any new traits"},{"line_number":149,"context_line":"    # must also be added to the os-traits library."},{"line_number":150,"context_line":"    capabilities \u003d {"},{"line_number":151,"context_line":"        \"has_imagecache\": False,"},{"line_number":152,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_8b91899d","line":149,"in_reply_to":"9fdfeff1_4f916e9a","updated":"2019-03-04 16:44:03.000000000","message":"We did talk this through - see the discussion at https://review.openstack.org/#/c/538498/19/nova/virt/driver.py@1035\n\nTLDR: We deliberately don\u0027t map all of these to traits - only the ones we would reasonably want to schedule on.\n\nIf someone decides later that they want to schedule on e.g. has_imagecache, they should add a standard COMPUTE_HAS_IMAGECACHE trait, release os-traits with it, and add it to the CAPABILITY_TRAITS_MAP with a l-c bump.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc4bd919fa7f1aa6942d101525e0025f1f7a4b40","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    # NOTE(mriedem): When adding new capabilities, consider whether they"},{"line_number":148,"context_line":"    # should also be added to CAPABILITY_TRAITS_MAP; if so, any new traits"},{"line_number":149,"context_line":"    # must also be added to the os-traits library."},{"line_number":150,"context_line":"    capabilities \u003d {"},{"line_number":151,"context_line":"        \"has_imagecache\": False,"},{"line_number":152,"context_line":"        \"supports_evacuate\": False,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9fdfeff1_14ba96bf","line":149,"in_reply_to":"9fdfeff1_8b91899d","updated":"2019-03-04 19:01:43.000000000","message":"Yeah, and these aren\u0027t all mapped here already. I\u0027m just saying maybe instead of opt-in to which we expose, they should be explicitly called out which ones we\u0027re excluding. If we expect, in general, for capabilities to be traits..","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"}],"releasenotes/notes/driver-capabilities-to-traits-152eb851cd016f4d.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":26,"context_line":"    removed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    However any custom traits which are removed from the Placement API"},{"line_number":29,"context_line":"    via the admin will not be reinstated until the compute service\u0027s"},{"line_number":30,"context_line":"    provider cache is reset.  This can be triggered via a SIGHUP."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"9fdfeff1_d7c26285","line":28,"range":{"start_line":28,"start_character":16,"end_line":28,"end_character":22},"updated":"2019-02-25 22:57:20.000000000","message":"strike","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":26,"context_line":"    removed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    However any custom traits which are removed from the Placement API"},{"line_number":29,"context_line":"    via the admin will not be reinstated until the compute service\u0027s"},{"line_number":30,"context_line":"    provider cache is reset.  This can be triggered via a SIGHUP."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"9fdfeff1_7fd6e0f4","line":28,"range":{"start_line":28,"start_character":16,"end_line":28,"end_character":22},"in_reply_to":"9fdfeff1_d7c26285","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"389be78a351956a1c6157432dcbf548e90b6ab06","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":26,"context_line":"    removed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    However any custom traits which are removed from the Placement API"},{"line_number":29,"context_line":"    via the admin will not be reinstated until the compute service\u0027s"},{"line_number":30,"context_line":"    provider cache is reset.  This can be triggered via a SIGHUP."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"9fdfeff1_573c3292","line":29,"range":{"start_line":28,"start_character":48,"end_line":29,"end_character":17},"updated":"2019-02-25 22:57:20.000000000","message":"by the admin from the compute node resource provider via the Placement API","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"00a442c16f88323c68c06920a06752979198a034","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":26,"context_line":"    removed."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    However any custom traits which are removed from the Placement API"},{"line_number":29,"context_line":"    via the admin will not be reinstated until the compute service\u0027s"},{"line_number":30,"context_line":"    provider cache is reset.  This can be triggered via a SIGHUP."}],"source_content_type":"text/x-yaml","patch_set":15,"id":"9fdfeff1_dfcd8c5d","line":29,"range":{"start_line":28,"start_character":48,"end_line":29,"end_character":17},"in_reply_to":"9fdfeff1_573c3292","updated":"2019-02-26 13:08:49.000000000","message":"Done","commit_id":"fd2279e7e2b0a128d54890bb27fc05ce02cc0013"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3baa2fd19289a6931c5ed6c6dd8a00f46f776df7","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":21,"context_line":"    removed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    However any traits which are removed by the admin from the compute"},{"line_number":24,"context_line":"    node resource provider via the Placement API will not be"},{"line_number":25,"context_line":"    reinstated until the compute service\u0027s provider cache is reset."},{"line_number":26,"context_line":"    This can be triggered via a ``SIGHUP``."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5fc1f717_c10000ae","line":26,"range":{"start_line":23,"start_character":4,"end_line":26,"end_character":43},"updated":"2019-03-18 16:20:14.000000000","message":"I\u0027m doing some testing with this and not seeing this be the case.\n\nFor example, I started with this:\n\n$ openstack --os-placement-api-version 1.6 resource provider trait list d9b3dbc4-50e2-42dd-be98-522f6edaab3f --sort-column name\n+---------------------------------------+\n| name                                  |\n+---------------------------------------+\n| COMPUTE_DEVICE_TAGGING                |\n| COMPUTE_NET_ATTACH_INTERFACE          |\n| COMPUTE_NET_ATTACH_INTERFACE_WITH_TAG |\n| COMPUTE_TRUSTED_CERTS                 |\n| COMPUTE_VOLUME_ATTACH_WITH_TAG        |\n| COMPUTE_VOLUME_EXTEND                 |\n| COMPUTE_VOLUME_MULTI_ATTACH           |\n| HW_CPU_X86_MMX                        |\n| HW_CPU_X86_SSE                        |\n| HW_CPU_X86_SSE2                       |\n| HW_CPU_X86_SVM                        |\n+---------------------------------------+\n\n\nI then deleted all traits for the provider:\n\nstack@devstack:~/devstack$ openstack --os-placement-api-version 1.6 resource provider trait delete d9b3dbc4-50e2-42dd-be98-522f6edaab3f\nstack@devstack:~/devstack$ openstack --os-placement-api-version 1.6 resource provider trait list d9b3dbc4-50e2-42dd-be98-522f6edaab3f --sort-column name\n\nBut after 60 seconds they were all back.\n\nSimilarly, I overwrote the traits to just two:\n\nstack@devstack:~/devstack$ openstack --os-placement-api-version 1.6 resource provider trait set d9b3dbc4-50e2-42dd-be98-522f6edaab3f --trait COMPUTE_DEVICE_TAGGING --trait COMPUTE_NET_ATTACH_INTERFACE\n+------------------------------+\n| name                         |\n+------------------------------+\n| COMPUTE_DEVICE_TAGGING       |\n| COMPUTE_NET_ATTACH_INTERFACE |\n+------------------------------+\nstack@devstack:~/devstack$ openstack --os-placement-api-version 1.6 resource provider trait list d9b3dbc4-50e2-42dd-be98-522f6edaab3f --sort-column name\n+------------------------------+\n| name                         |\n+------------------------------+\n| COMPUTE_DEVICE_TAGGING       |\n| COMPUTE_NET_ATTACH_INTERFACE |\n+------------------------------+\n\nBut after 60 seconds they all came back.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee87394cbcbaf1bc9f9de2e7b6a97e9f570615ad","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":21,"context_line":"    removed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    However any traits which are removed by the admin from the compute"},{"line_number":24,"context_line":"    node resource provider via the Placement API will not be"},{"line_number":25,"context_line":"    reinstated until the compute service\u0027s provider cache is reset."},{"line_number":26,"context_line":"    This can be triggered via a ``SIGHUP``."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5fc1f717_f0b38796","line":26,"range":{"start_line":23,"start_character":4,"end_line":26,"end_character":43},"in_reply_to":"5fc1f717_7cba13c1","updated":"2019-03-18 17:32:15.000000000","message":"Yeah you\u0027re right, once I set resource_provider_association_refresh\u003d0, restarted n-cpu and then went through this again I couldn\u0027t get the compute traits back without SIGHUPing the service.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"458351ab0546d90ae95644a5408efcee8a99b5b1","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    any traits later retracted by the driver will be automatically"},{"line_number":21,"context_line":"    removed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    However any traits which are removed by the admin from the compute"},{"line_number":24,"context_line":"    node resource provider via the Placement API will not be"},{"line_number":25,"context_line":"    reinstated until the compute service\u0027s provider cache is reset."},{"line_number":26,"context_line":"    This can be triggered via a ``SIGHUP``."}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5fc1f717_7cba13c1","line":26,"range":{"start_line":23,"start_character":4,"end_line":26,"end_character":43},"in_reply_to":"5fc1f717_c10000ae","updated":"2019-03-18 16:59:47.000000000","message":"I think if you set compute.resource_provider_association_refresh to something big, or to zero, you\u0027ll find you need to SIGHUP.","commit_id":"7ce265ebc5937a922efabedbfcec4fa0733ea511"}]}
