)]}'
{"nova/virt/ironic/driver.py":[{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"f27b6184f484dc22a770ecd78d6d9d8cbed8a4d4","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        # Always checking allows us to catch the case where Nova thinks there"},{"line_number":321,"context_line":"        # are available resources on the Node, but Ironic does not (because it"},{"line_number":322,"context_line":"        # is not in a usable state): https://launchpad.net/bugs/1503453"},{"line_number":323,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":324,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":325,"context_line":"            # of its resources to Nova"},{"line_number":326,"context_line":"            vcpus \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5da102_300bd12b","line":323,"updated":"2016-11-02 13:47:36.000000000","message":"elif causes https://bugs.launchpad.net/nova/+bug/1503453","commit_id":"f5eb7ad3a1b9481c7f84bc441842d405ebe1951a"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"f52d480659010f5b3e21c87357596138b263b48d","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # keep NOSTATE around for compatibility"},{"line_number":185,"context_line":"        good_provision_states \u003d ["},{"line_number":186,"context_line":"            ironic_states.AVAILABLE, ironic_states.NOSTATE]"},{"line_number":187,"context_line":"        return (self._node_resources_used(node_obj) or"},{"line_number":188,"context_line":"                node_obj.maintenance or"},{"line_number":189,"context_line":"                node_obj.power_state in bad_power_states or"},{"line_number":190,"context_line":"                node_obj.provision_state not in good_provision_states)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_fa3eefd8","line":187,"updated":"2017-01-03 18:09:30.000000000","message":"If the node is in a good provision state and the resources are used, we report the resources as available and the resources as used. The resource tracker will have an accurate view of the system state. We only need to mark the resources as unavailable when Nova does not think the resources are used (i.e. when nova does not have an instance mapped to the node), and they are not available for scheduling to.","commit_id":"a7ca4dfc14c2abe9297f533a966fe20435d69fdb"},{"author":{"_account_id":22255,"name":"Tuan","email":"tuanla@vn.fujitsu.com","username":"Tuan"},"change_message_id":"ef9d7304ec08a24aeca77ffb7762c05e06c86211","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # keep NOSTATE around for compatibility"},{"line_number":185,"context_line":"        good_provision_states \u003d ["},{"line_number":186,"context_line":"            ironic_states.AVAILABLE, ironic_states.NOSTATE]"},{"line_number":187,"context_line":"        return (self._node_resources_used(node_obj) or"},{"line_number":188,"context_line":"                node_obj.maintenance or"},{"line_number":189,"context_line":"                node_obj.power_state in bad_power_states or"},{"line_number":190,"context_line":"                node_obj.provision_state not in good_provision_states)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a430d35_1b1390b9","line":187,"in_reply_to":"ba5201f7_fa3eefd8","updated":"2017-02-07 01:19:13.000000000","message":"In my opinion, When the node is used means that we cannot deploy an image in this node. Thus we set it as unavailable.","commit_id":"a7ca4dfc14c2abe9297f533a966fe20435d69fdb"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"c0140bc85cd6cd9dbb3582d44b20fd6fd3b95ea8","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        # keep NOSTATE around for compatibility"},{"line_number":185,"context_line":"        good_provision_states \u003d ["},{"line_number":186,"context_line":"            ironic_states.AVAILABLE, ironic_states.NOSTATE]"},{"line_number":187,"context_line":"        return (self._node_resources_used(node_obj) or"},{"line_number":188,"context_line":"                node_obj.maintenance or"},{"line_number":189,"context_line":"                node_obj.power_state in bad_power_states or"},{"line_number":190,"context_line":"                node_obj.provision_state not in good_provision_states)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_9d4a3d82","line":187,"in_reply_to":"ba5201f7_fa3eefd8","updated":"2017-01-03 18:44:21.000000000","message":"Sorry long holiday. What I wrote above is not quite right.\n\nThere are (at least) two places that instance / node mapping information is held and they might not match. First, there is an instance uuid on the node object that is held in the ironic db. Second there is the instance mappings that the resource tracker manages. We either need to be able to make those bits of information consistent or work around inconsistencies.\n\nWithout some insight / ability to make this information consistent (my assumption at this time), we need to report in such a way that if ironic thinks there is an instance on the node we prevent builds from going to it. One way to achieve that is mark the resources as available and prevent negative values as described here: https://review.openstack.org/#/c/306670/","commit_id":"a7ca4dfc14c2abe9297f533a966fe20435d69fdb"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"f52d480659010f5b3e21c87357596138b263b48d","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":314,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":315,"context_line":"            local_gb_used \u003d local_gb \u003d instance_info[\u0027local_gb\u0027]"},{"line_number":316,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":317,"context_line":"            # Checking allows us to catch the case where Nova thinks there"},{"line_number":318,"context_line":"            # are available resources on the Node, but Ironic does not"},{"line_number":319,"context_line":"            # (because it is not in a usable state)."}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_5aab7b1d","line":316,"updated":"2017-01-03 18:09:30.000000000","message":"This needs to be an if or nova will send builds to nodes that are unavailable due to resource tracker correcting usage. Just because the driver marks it as used, does not mean the resource tracker respects it since it won\u0027t match it\u0027s inaccurate view of the real system state. It will, however, respect the availability numbers being set to 0.\n\nI described this problem using an ascii table in a comment on this patch:  https://review.openstack.org/#/c/306670/ (a small follow-up patch by Jay was made to fully achieve this).","commit_id":"a7ca4dfc14c2abe9297f533a966fe20435d69fdb"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"c0140bc85cd6cd9dbb3582d44b20fd6fd3b95ea8","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":314,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":315,"context_line":"            local_gb_used \u003d local_gb \u003d instance_info[\u0027local_gb\u0027]"},{"line_number":316,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":317,"context_line":"            # Checking allows us to catch the case where Nova thinks there"},{"line_number":318,"context_line":"            # are available resources on the Node, but Ironic does not"},{"line_number":319,"context_line":"            # (because it is not in a usable state)."}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_dd3be5e9","line":316,"in_reply_to":"ba5201f7_5aab7b1d","updated":"2017-01-03 18:44:21.000000000","message":"I believe this is the other patch: https://review.openstack.org/#/c/323196/","commit_id":"a7ca4dfc14c2abe9297f533a966fe20435d69fdb"}]}
