)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"62e20c83f23fb9f6eb34bdf19cade9b8e2b55aec","unresolved":false,"context_lines":[{"line_number":20,"context_line":"using the same SchedulerReportClient instance with the same"},{"line_number":21,"context_line":"ProviderTree cache since the set_traits_for_provider method"},{"line_number":22,"context_line":"relies on the cache to determine if updates are flushed back"},{"line_number":23,"context_line":"to Placement."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Part of blueprint pre-filter-disabled-computes"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_75cf6bb3","line":23,"updated":"2019-07-03 09:57:30.000000000","message":"Slightly related: For me the existence of a cache should not be visible from outside of the report client. So I think we have an architectural problem with this cache inside the reportclient.","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3ecf47f9bed4ced3a252e90555af6d3f32f2e47","unresolved":false,"context_lines":[{"line_number":20,"context_line":"using the same SchedulerReportClient instance with the same"},{"line_number":21,"context_line":"ProviderTree cache since the set_traits_for_provider method"},{"line_number":22,"context_line":"relies on the cache to determine if updates are flushed back"},{"line_number":23,"context_line":"to Placement."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Part of blueprint pre-filter-disabled-computes"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_88176155","line":23,"in_reply_to":"9fb8cfa7_75cf6bb3","updated":"2019-07-03 14:20:23.000000000","message":"I\u0027m sure Eric would enjoy discussing that for several hours.","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1143d1e11931b7e29d8bc6495c23b711ace8cfa4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"using the same SchedulerReportClient instance with the same"},{"line_number":21,"context_line":"ProviderTree cache since the set_traits_for_provider method"},{"line_number":22,"context_line":"relies on the cache to determine if updates are flushed back"},{"line_number":23,"context_line":"to Placement."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Part of blueprint pre-filter-disabled-computes"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_dcec4af5","line":23,"in_reply_to":"9fb8cfa7_88176155","updated":"2019-07-04 09:03:35.000000000","message":"I spent some time to figure out what could we do but I found noting easily actionable.","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"}],"nova/compute/manager.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bf9b0575bd4b4031a5bf658070c5bbe7dac36263","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            LOG.debug(\u0027Adding trait %s to compute node resource \u0027"},{"line_number":519,"context_line":"                      \u0027provider %s in placement.\u0027, trait_name, rp_uuid)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        if new_traits is not None:"},{"line_number":522,"context_line":"            self.reportclient.set_traits_for_provider("},{"line_number":523,"context_line":"                context, rp_uuid, new_traits)"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e9185b76","line":521,"range":{"start_line":521,"start_character":11,"end_line":521,"end_character":21},"updated":"2019-07-04 18:13:35.000000000","message":"ok so your defineing new_traits so that you can make this condtional on if there is somthing to change and skip the clal below oterwise.\n\n\ni was going to sugtges renameing original_traits to tratis and useing -\u003d and |\u003d instead but then we would lose the ablity to skip the call below so this makes sense","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"640d6a20b4b4ae81b0b64d22c4f9b99165ee02f3","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            LOG.debug(\u0027Adding trait %s to compute node resource \u0027"},{"line_number":519,"context_line":"                      \u0027provider %s in placement.\u0027, trait_name, rp_uuid)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        if new_traits is not None:"},{"line_number":522,"context_line":"            self.reportclient.set_traits_for_provider("},{"line_number":523,"context_line":"                context, rp_uuid, new_traits)"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1816e7a9","line":521,"range":{"start_line":521,"start_character":11,"end_line":521,"end_character":21},"in_reply_to":"7faddb67_e9185b76","updated":"2019-07-12 23:40:16.000000000","message":"But this is overkill anyway, as set_traits_for_provider already does a have_traits_changed check to skip processing.\n\nNTS: the get_provider_traits on L507 may pull content at a later generation than what\u0027s in the cache, but set_traits_for_provider will use whatever generation it had before, which would result in a 409 here. This is as yet unhandled (remember to check later in the series) but it\u0027s better than overwriting with the wrong traits.\n\nOTOH, it is technically possible (though wildly unlikely) for the cache to have the same value as we *want* to set here, despite placement having the opposite. In which case have_traits_changed will cause us to skip the update, resulting in the wrong value (remaining) in placement.\n\nThe right thing, as Matt and I have discussed (and which is probably encompassed in the TODO on L506), is to make sure whatever we do on L507 and whatever we do on L522 are using the same level (generation) of placement data. Right now they aren\u0027t necessarily.","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3cbbc213bff0973058e3b8e30deb542608fec1a1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        monitor_handler \u003d monitors.MonitorHandler(self)"},{"line_number":147,"context_line":"        self.monitors \u003d monitor_handler.monitors"},{"line_number":148,"context_line":"        self.old_resources \u003d collections.defaultdict(objects.ComputeNode)"},{"line_number":149,"context_line":"        self.reportclient \u003d reportclient or report.SchedulerReportClient()"},{"line_number":150,"context_line":"        self.ram_allocation_ratio \u003d CONF.ram_allocation_ratio"},{"line_number":151,"context_line":"        self.cpu_allocation_ratio \u003d CONF.cpu_allocation_ratio"},{"line_number":152,"context_line":"        self.disk_allocation_ratio \u003d CONF.disk_allocation_ratio"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_5eb59930","line":149,"range":{"start_line":149,"start_character":40,"end_line":149,"end_character":74},"updated":"2019-07-05 16:04:12.000000000","message":"This seems to be here purely for the sake of tests, since there\u0027s only one user of this class in the main code. Could you add a comment to this effect?","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"}],"nova/tests/unit/compute/test_resource_tracker.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3cbbc213bff0973058e3b8e30deb542608fec1a1","unresolved":false,"context_lines":[{"line_number":3539,"context_line":"        \"\"\"Simple test to make sure if a reportclient is provided it is used\"\"\""},{"line_number":3540,"context_line":"        rt \u003d resource_tracker.ResourceTracker("},{"line_number":3541,"context_line":"            _HOSTNAME, mock.sentinel.driver, mock.sentinel.reportclient)"},{"line_number":3542,"context_line":"        self.assertIs(rt.reportclient, mock.sentinel.reportclient)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_def749f5","line":3542,"updated":"2019-07-05 16:04:12.000000000","message":"This feels a tad OTT but okay","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"}],"nova/virt/virtapi.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"21dc98e818a3676bffd26074b1374996b3c21275","unresolved":false,"context_lines":[{"line_number":21,"context_line":"                                error_callback\u003dNone):"},{"line_number":22,"context_line":"        raise NotImplementedError()"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def update_compute_provider_status(self, context, rp_uuid, enabled):"},{"line_number":25,"context_line":"        \"\"\"Used to add/remove the COMPUTE_STATUS_DISABLED trait on the provider"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        :param context: nova auth RequestContext"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c91a3f16","line":24,"range":{"start_line":24,"start_character":63,"end_line":24,"end_character":70},"updated":"2019-07-04 18:55:28.000000000","message":"if we made this disabled we can avoid negations later\nsince the service field is called disabled\nhttps://github.com/openstack/nova/blob/4a8ef26a921c616a4b0ed7ba581616fffa932d96/nova/objects/service.py#L193","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3cbbc213bff0973058e3b8e30deb542608fec1a1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"                                error_callback\u003dNone):"},{"line_number":22,"context_line":"        raise NotImplementedError()"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def update_compute_provider_status(self, context, rp_uuid, enabled):"},{"line_number":25,"context_line":"        \"\"\"Used to add/remove the COMPUTE_STATUS_DISABLED trait on the provider"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"        :param context: nova auth RequestContext"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_fed1e558","line":24,"range":{"start_line":24,"start_character":63,"end_line":24,"end_character":70},"in_reply_to":"7faddb67_c91a3f16","updated":"2019-07-05 16:04:12.000000000","message":"Agreed","commit_id":"b7ad974723d2d4587e0fa90604c87f74087f0f45"}]}
