)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fbc7f7f8c8c0eb2a5a2b4911060b8695773aaf5b","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        \"\"\"Check that node is mapped to this conductor.\"\"\""},{"line_number":643,"context_line":"        if driver in self.drivers:"},{"line_number":644,"context_line":"            mapped_hosts \u003d self.driver_rings[driver].get_hosts(node_uuid)"},{"line_number":645,"context_line":"            return self.host in mapped_hosts"},{"line_number":646,"context_line":"        return False"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"    @messaging.client_exceptions(exception.NodeLocked)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9Ses%3D","line":645,"updated":"2014-04-07 11:14:41.000000000","message":"One suggestion here, instead of testing whether this host is part of the list of all the conductors that contains this driver I think it should check whether this conductor is the conductor responsible for managing this node specific, just like the rpcapi.get_topic_for() does when sending the RPC request to the specific conductor responsible for managing a giving node... Otherwise we will end up having N trying to sync the power_state of the same node (In case they all have the driver to manage that node).\n\nSo one way to do it (just like the rpcapi.get_topic_for()[1]) is to check if the first item of that list is this conductor:\n\ne.g:\n\nreturn self.host \u003d\u003d mapped_hosts[0]\n\n[1] https://github.com/openstack/ironic/blob/master/ironic/conductor/rpcapi.py#L93-L95","commit_id":"86bcfca3fa3921509e6666761572880fbf7eea2d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d3a2c86cae66cac89b97892b78f53b73004b3f33","unresolved":false,"context_lines":[{"line_number":642,"context_line":"        \"\"\"Check that node is mapped to this conductor.\"\"\""},{"line_number":643,"context_line":"        if driver in self.drivers:"},{"line_number":644,"context_line":"            mapped_hosts \u003d self.driver_rings[driver].get_hosts(node_uuid)"},{"line_number":645,"context_line":"            return self.host in mapped_hosts"},{"line_number":646,"context_line":"        return False"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"    @messaging.client_exceptions(exception.NodeLocked)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9STc%3D","line":645,"in_reply_to":"AAAAWH%2F9Ses%3D","updated":"2014-04-07 11:42:43.000000000","message":"Done","commit_id":"86bcfca3fa3921509e6666761572880fbf7eea2d"}]}
