)]}'
{"watcher/decision_engine/model/collector/nova.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aba6ff6c3db22d759d6ec06ee3d006cbba2fa085","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def add_compute_node(self, node):"},{"line_number":269,"context_line":"        # Build and add base node."},{"line_number":270,"context_line":"        node_info \u003d self.nova_helper.get_compute_node_by_id(node.id)"},{"line_number":271,"context_line":"        LOG.debug(\"node info: %s\", node_info)"},{"line_number":272,"context_line":"        compute_node \u003d self.build_compute_node(node_info)"},{"line_number":273,"context_line":"        self.model.add_node(compute_node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_f4fef6ac","line":270,"range":{"start_line":270,"start_character":8,"end_line":270,"end_character":68},"updated":"2019-05-17 20:13:01.000000000","message":"If we move this up to the condition on L265 then we can re-use the detailed node information in add_instance_node.\n\nAlternatively we could change get_compute_node_by_name to return details so then we can use https://developer.openstack.org/api-ref/compute/?expanded\u003d#list-hypervisors-details but that requires changes to python-novaclient since the list method there doesn\u0027t take the search option or with_servers:\n\nhttps://github.com/openstack/python-novaclient/blob/dfb84228a2748bed82f9b83c1209d5e2e0557bfa/novaclient/v2/hypervisors.py#L62\n\nSo it\u0027s probably easiest as the first step to use what we available now and document with TODOs what we can optimize later with changes to python-novaclient.","commit_id":"04ff60fcc3aa327055e0eecfd9540fa129b05d6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aba6ff6c3db22d759d6ec06ee3d006cbba2fa085","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        # build up the compute node."},{"line_number":301,"context_line":"        node_attributes \u003d {"},{"line_number":302,"context_line":"            \"id\": node.id,"},{"line_number":303,"context_line":"            \"uuid\": node.service[\"host\"],"},{"line_number":304,"context_line":"            \"hostname\": node.hypervisor_hostname,"},{"line_number":305,"context_line":"            \"memory\": node.memory_mb,"},{"line_number":306,"context_line":"            \"disk\": node.free_disk_gb,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_54402208","line":303,"range":{"start_line":303,"start_character":12,"end_line":303,"end_character":41},"updated":"2019-05-17 20:13:01.000000000","message":"OK I guess this comes from node_info \u003d self.nova_helper.get_compute_node_by_id(node.id) on L270 which is this API:\n\nhttps://developer.openstack.org/api-ref/compute/#show-hypervisor-details","commit_id":"04ff60fcc3aa327055e0eecfd9540fa129b05d6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aba6ff6c3db22d759d6ec06ee3d006cbba2fa085","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        if instances is None:"},{"line_number":355,"context_line":"            # no instances on this node"},{"line_number":356,"context_line":"            return"},{"line_number":357,"context_line":"        host \u003d node.service[\"host\"]"},{"line_number":358,"context_line":"        compute_node \u003d self.model.get_node_by_uuid(host)"},{"line_number":359,"context_line":"        # Get all servers on this compute host."},{"line_number":360,"context_line":"        instances \u003d self.nova_helper.get_instance_list({\u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_94369ab4","line":357,"updated":"2019-05-17 20:13:01.000000000","message":"Hmm this is failing:\n\nhttp://logs.openstack.org/88/659688/1/check/watcher-tempest-vm_workload_consolidation/031dc90/controller/logs/screen-watcher-decision-engine.txt.gz#_May_17_00_26_25_101148\n\nSo this comes from cnode \u003d self.nova_helper.get_compute_node_by_name(node_name,\n                                                      servers\u003dTrue) on L262\n\nWhich is this:\n\nhttps://github.com/openstack/python-novaclient/blob/dfb84228a2748bed82f9b83c1209d5e2e0557bfa/novaclient/v2/hypervisors.py#L94\n\nWhich is this API:\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003d#list-hypervisors\n\nWhich doesn\u0027t return the service information.","commit_id":"04ff60fcc3aa327055e0eecfd9540fa129b05d6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2caf9a5dd279310471e3ad34e7840fd5c4b58b3","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                self.add_compute_node(node_info)"},{"line_number":272,"context_line":"                # node.servers is a list of server objects"},{"line_number":273,"context_line":"                # New in nova version 2.53"},{"line_number":274,"context_line":"                instances \u003d getattr(node_info, \"servers\", None)"},{"line_number":275,"context_line":"                self.add_instance_node(node_info, instances)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def add_compute_node(self, node):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfb3d3c7_b41e3e6e","line":274,"updated":"2019-05-17 20:55:31.000000000","message":"This is wrong, this should be cnode[0].","commit_id":"6033ea18a564265ae58b83b24708eba9aae41e60"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"14e47a9ac9e53e568e41eb05ed7fb9ac946d2882","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                [node.hypervisor_hostname for node in all_nodes])"},{"line_number":260,"context_line":"        LOG.debug(\"compute nodes: %s\", compute_nodes)"},{"line_number":261,"context_line":"        for node_name in compute_nodes:"},{"line_number":262,"context_line":"            # TODO(mriedem): Change this to list hypervisors with details"},{"line_number":263,"context_line":"            # so we don\u0027t have to call get_compute_node_by_id. It requires"},{"line_number":264,"context_line":"            # changes to python-novaclient."},{"line_number":265,"context_line":"            cnode \u003d self.nova_helper.get_compute_node_by_name(node_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_6f18f380","line":262,"updated":"2019-05-17 22:18:08.000000000","message":"This is the novaclient change:\n\nhttps://review.opendev.org/#/c/659886/\n\nWe have to get it released though, and can follow up in a separate change since technically this patch could be backported if anyone needs it on stable/stein.","commit_id":"4ee9a9fa6fb0c9d139882decc124b5e820a4f338"}],"watcher/tests/decision_engine/cluster/test_nova_cdmc.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10e113cba63acc43e26bf191cefd603f71b2d733","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            tenant_id\u003d\u0027ff560f7e-dbc8-771f-960c-164482fce21b\u0027,"},{"line_number":69,"context_line":"        )"},{"line_number":70,"context_line":"        setattr(fake_instance, \u0027OS-EXT-STS:vm_state\u0027, \u0027VM_STATE\u0027)"},{"line_number":71,"context_line":"        m_nova_helper.get_compute_node_list.return_value \u003d [fake_compute_node]"},{"line_number":72,"context_line":"        m_nova_helper.get_compute_node_by_name.return_value \u003d ["},{"line_number":73,"context_line":"            fake_compute_node]"},{"line_number":74,"context_line":"        m_nova_helper.get_compute_node_by_id.return_value \u003d fake_compute_node"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_d4abb272","line":71,"updated":"2019-05-17 20:23:19.000000000","message":"This is https://developer.openstack.org/api-ref/compute/?expanded\u003d#list-hypervisors-details which is OK.","commit_id":"04ff60fcc3aa327055e0eecfd9540fa129b05d6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"10e113cba63acc43e26bf191cefd603f71b2d733","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        )"},{"line_number":70,"context_line":"        setattr(fake_instance, \u0027OS-EXT-STS:vm_state\u0027, \u0027VM_STATE\u0027)"},{"line_number":71,"context_line":"        m_nova_helper.get_compute_node_list.return_value \u003d [fake_compute_node]"},{"line_number":72,"context_line":"        m_nova_helper.get_compute_node_by_name.return_value \u003d ["},{"line_number":73,"context_line":"            fake_compute_node]"},{"line_number":74,"context_line":"        m_nova_helper.get_compute_node_by_id.return_value \u003d fake_compute_node"},{"line_number":75,"context_line":"        m_nova_helper.get_instance_list.return_value \u003d [fake_instance]"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_b4939e4f","line":73,"range":{"start_line":72,"start_character":8,"end_line":73,"end_character":30},"updated":"2019-05-17 20:23:19.000000000","message":"This is actually incorrect - this is like calling:\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003d#list-hypervisors\n\nwhich does not have a service entry in it. That\u0027s why the unit tests passed but tempest failed.","commit_id":"04ff60fcc3aa327055e0eecfd9540fa129b05d6c"}]}
