)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f2dc5f4671dbac25aece50f9485738756cc852b","unresolved":false,"context_lines":[{"line_number":14,"context_line":"resource provider by PUT\u0027ing an empty set of inventory records to the placement"},{"line_number":15,"context_line":"API."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Partial-bug: #1651678"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I10b22606f704abcb970939fb2cd77f026d4d6322"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da4df55a_79e62016","line":17,"updated":"2016-12-28 17:28:50.000000000","message":"Why isn\u0027t this Closes-Bug?","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bce71244ce683eee88e6498896d441ab964e3a4","unresolved":false,"context_lines":[{"line_number":14,"context_line":"resource provider by PUT\u0027ing an empty set of inventory records to the placement"},{"line_number":15,"context_line":"API."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Partial-bug: #1651678"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I10b22606f704abcb970939fb2cd77f026d4d6322"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da4df55a_5904fc48","line":17,"in_reply_to":"da4df55a_79e62016","updated":"2016-12-28 18:03:00.000000000","message":"Because the change in the Ironic driver from vdrok here:\n\nhttps://review.openstack.org/#/c/414603/1/nova/virt/ironic/driver.py\n\nis actually something we should consider, IMHO.","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d25c65efe326045122290a6579b1449a31d78262","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            reason \u003d _(\"Missing keys: %s\") % missing_keys"},{"line_number":960,"context_line":"            raise exception.InvalidInput(reason\u003dreason)"},{"line_number":961,"context_line":"        if resources[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":962,"context_line":"            uuid \u003d self.compute_node.uuid"},{"line_number":963,"context_line":"            raise exception.InvalidInput(reason\u003d\"VCPUs is 0 for %s!\" % uuid)"},{"line_number":964,"context_line":""},{"line_number":965,"context_line":"    def _get_instance_type(self, context, instance, prefix, migration):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da4df55a_fe4d0d9a","line":962,"updated":"2016-12-23 06:42:18.000000000","message":"This fails\n\nhttp://logs.openstack.org/26/414426/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-multinode-ubuntu-xenial-nv/af7b923/logs/screen-n-cpu.txt.gz?level\u003dWARNING#_2016-12-23_06_21_16_401","commit_id":"ab84a7df236780b088cfec2976c5179033194ec5"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"fbeccdd10640fb7fa867fdf249e64287355d786c","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # NOTE(jaypipes): Ironic virt driver will return 0 values for vcpus,"},{"line_number":71,"context_line":"    # memory_mb and disk_gb if the Ironic node is not available/operable"},{"line_number":72,"context_line":"    if compute_node.vcpus \u003e 0:"},{"line_number":73,"context_line":"        result[VCPU] \u003d {"},{"line_number":74,"context_line":"            \u0027total\u0027: compute_node.vcpus,"},{"line_number":75,"context_line":"            \u0027reserved\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4df55a_0a48b486","line":72,"range":{"start_line":72,"start_character":1,"end_line":72,"end_character":6},"updated":"2016-12-23 17:31:28.000000000","message":"If vcpus, memory_mb and disk_gb are all zero, empty dict is returned.\n\nI wonder if a node with vcpus \u003d 0, memory_gb \u003e 0 and disk_gb \u003e 0 is considered available or operable.","commit_id":"6392025bee8c960f04c5d8fde399bb2010b88103"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ebb64e7ddc1c1147e9f85d0fbfe1f154b09476d7","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # NOTE(jaypipes): Ironic virt driver will return 0 values for vcpus,"},{"line_number":71,"context_line":"    # memory_mb and disk_gb if the Ironic node is not available/operable"},{"line_number":72,"context_line":"    if compute_node.vcpus \u003e 0:"},{"line_number":73,"context_line":"        result[VCPU] \u003d {"},{"line_number":74,"context_line":"            \u0027total\u0027: compute_node.vcpus,"},{"line_number":75,"context_line":"            \u0027reserved\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4df55a_656df397","line":72,"range":{"start_line":72,"start_character":1,"end_line":72,"end_character":6},"in_reply_to":"da4df55a_0a48b486","updated":"2016-12-23 17:39:00.000000000","message":"Looking here https://github.com/openstack/nova/blob/0c6145d97daad719e2d5407f0384f486a97e8ab4/nova/api/openstack/placement/handlers/inventory.py#L354-L358 it should not be an issue, just the resource classes present in request will be set.","commit_id":"6392025bee8c960f04c5d8fde399bb2010b88103"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bd429cbb8521a2089b3af6366dca5ece7661182e","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # NOTE(jaypipes): Ironic virt driver will return 0 values for vcpus,"},{"line_number":71,"context_line":"    # memory_mb and disk_gb if the Ironic node is not available/operable"},{"line_number":72,"context_line":"    if compute_node.vcpus \u003e 0:"},{"line_number":73,"context_line":"        result[VCPU] \u003d {"},{"line_number":74,"context_line":"            \u0027total\u0027: compute_node.vcpus,"},{"line_number":75,"context_line":"            \u0027reserved\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4df55a_854577b4","line":72,"range":{"start_line":72,"start_character":1,"end_line":72,"end_character":6},"in_reply_to":"da4df55a_656df397","updated":"2016-12-23 17:53:09.000000000","message":"@vdrok: Well, we will still send a set inventory HTTP request, but with an empty inventories dict in the request payload. That\u0027s why I added the conditional on line 376...","commit_id":"6392025bee8c960f04c5d8fde399bb2010b88103"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"281ba8bf46ed1a1c806b3d2dae810bdf178544d9","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            \u0027step_size\u0027: 1,"},{"line_number":97,"context_line":"            \u0027allocation_ratio\u0027: compute_node.disk_allocation_ratio,"},{"line_number":98,"context_line":"        }"},{"line_number":99,"context_line":"    return result"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"def _instance_to_allocations_dict(instance):"},{"line_number":102,"context_line":"    \"\"\"Given an `objects.Instance` object, return a dict, keyed by resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"da4df55a_ea445075","line":99,"updated":"2016-12-23 17:24:52.000000000","message":"Tiny issue here, pep8 complains, need another blank line.","commit_id":"6392025bee8c960f04c5d8fde399bb2010b88103"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"f8193ffea5461ccc0db31456c2d071487ebefee2","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # NOTE(jaypipes): Ironic virt driver will return 0 values for vcpus,"},{"line_number":71,"context_line":"    # memory_mb and disk_gb if the Ironic node is not available/operable"},{"line_number":72,"context_line":"    if compute_node.vcpus \u003e 0:"},{"line_number":73,"context_line":"        result[VCPU] \u003d {"},{"line_number":74,"context_line":"            \u0027total\u0027: compute_node.vcpus,"},{"line_number":75,"context_line":"            \u0027reserved\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_44eefab4","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":30},"updated":"2016-12-27 09:20:47.000000000","message":"I am curious there are cases vpus \u003d 0 but the other values are not 0..\n\nI mean is there any value we need to store inventory which consists of some resources without vcpus?\n\nCan we change like\n\n if !compute_node.vcpus:\n     # NOTE: ...\n     return {}\n\nfor simple code?","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c29d5d453cdd8460de3f3ab71fba67100aaddf50","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # NOTE(jaypipes): Ironic virt driver will return 0 values for vcpus,"},{"line_number":71,"context_line":"    # memory_mb and disk_gb if the Ironic node is not available/operable"},{"line_number":72,"context_line":"    if compute_node.vcpus \u003e 0:"},{"line_number":73,"context_line":"        result[VCPU] \u003d {"},{"line_number":74,"context_line":"            \u0027total\u0027: compute_node.vcpus,"},{"line_number":75,"context_line":"            \u0027reserved\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_060a2c79","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":30},"in_reply_to":"da4df55a_44eefab4","updated":"2016-12-27 17:14:12.000000000","message":"Yeah, I thought about that, but then I figured that this way was more explicit and would handle a wider variety of cases in the long run...","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7712447f9181aa637619c8f454ad4f786ed692ae","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":376,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":377,"context_line":"        if inv_data:"},{"line_number":378,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":379,"context_line":"        else:"},{"line_number":380,"context_line":"            msg \u003d _LW(\"Compute node %(uuid)s (%(name)s) has no inventory \""},{"line_number":381,"context_line":"                      \"to save.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_c605847a","line":378,"updated":"2016-12-27 17:04:08.000000000","message":"You don\u0027t have a unit test to make sure this *isn\u0027t* called.","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c29d5d453cdd8460de3f3ab71fba67100aaddf50","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":376,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":377,"context_line":"        if inv_data:"},{"line_number":378,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":379,"context_line":"        else:"},{"line_number":380,"context_line":"            msg \u003d _LW(\"Compute node %(uuid)s (%(name)s) has no inventory \""},{"line_number":381,"context_line":"                      \"to save.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_6625b807","line":378,"in_reply_to":"da4df55a_c605847a","updated":"2016-12-27 17:14:12.000000000","message":"k, will add shortly.","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55a253306fa91e0e50601fc771a7f097d607e08a","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":377,"context_line":"        if inv_data:"},{"line_number":378,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":379,"context_line":"        else:"},{"line_number":380,"context_line":"            msg \u003d _LW(\"Compute node %(uuid)s (%(name)s) has no inventory \""},{"line_number":381,"context_line":"                      \"to save.\")"},{"line_number":382,"context_line":"            msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_e6952833","line":379,"updated":"2016-12-27 17:02:52.000000000","message":"From talking with vdrok and looking at https://review.openstack.org/#/c/414603/ it looks like an Ironic node can go into error state or be in some kind of maintenance mode:\n\nhttps://github.com/openstack/nova/blob/d442488ebe19a6b3ddea6ec8668f92c7e2a0a644/nova/virt/ironic/driver.py#L173\n\nFor example the power state is error or the provision state is not available. But for the maintenance mode case, what if we had previously reported inventory for this node (resource provider), shouldn\u0027t we now delete that inventory so that the nova-scheduler doesn\u0027t try to place new builds on it? Or is Ironic so much of a snowflake that once built it doesn\u0027t even work that way anymore for scheduling?","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"c29d5d453cdd8460de3f3ab71fba67100aaddf50","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":377,"context_line":"        if inv_data:"},{"line_number":378,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":379,"context_line":"        else:"},{"line_number":380,"context_line":"            msg \u003d _LW(\"Compute node %(uuid)s (%(name)s) has no inventory \""},{"line_number":381,"context_line":"                      \"to save.\")"},{"line_number":382,"context_line":"            msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_e6660850","line":379,"in_reply_to":"da4df55a_e6952833","updated":"2016-12-27 17:14:12.000000000","message":"Yeah, we should delete the inventory instead of logging a warning about no inventory. I\u0027ll change this up.","commit_id":"f0c597d4e9fec2955dfa8a7d78afabfaf539939a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8db9d68cebd66649f241b330642deb4cbb954265","unresolved":false,"context_lines":[{"line_number":33,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"^Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_3929f837","line":36,"updated":"2016-12-28 17:28:13.000000000","message":"Yikes...so if this ever changes, or is translated to non-English, this will fail.","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bce71244ce683eee88e6498896d441ab964e3a4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"^Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_b94968b9","line":36,"in_reply_to":"da4df55a_3929f837","updated":"2016-12-28 18:03:00.000000000","message":"Yes, until we have fault codes that can allow us to differentiate :(","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8db9d68cebd66649f241b330642deb4cbb954265","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            \u0027resource_provider_generation\u0027: cur_rp_gen,"},{"line_number":393,"context_line":"            \u0027inventories\u0027: {},"},{"line_number":394,"context_line":"        }"},{"line_number":395,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":396,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":397,"context_line":"            LOG.info(_LI(\u0027Deleted all inventory for resource provider %s\u0027),"},{"line_number":398,"context_line":"                     rp_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_19c8b4a7","line":395,"updated":"2016-12-28 17:28:13.000000000","message":"At some point we should update the inventories REST API to allow deleting all inventories at once, so we don\u0027t have to workaround this using PUT with empty inventory. So add a TODO in here if you need to respin.","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bce71244ce683eee88e6498896d441ab964e3a4","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            \u0027resource_provider_generation\u0027: cur_rp_gen,"},{"line_number":393,"context_line":"            \u0027inventories\u0027: {},"},{"line_number":394,"context_line":"        }"},{"line_number":395,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":396,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":397,"context_line":"            LOG.info(_LI(\u0027Deleted all inventory for resource provider %s\u0027),"},{"line_number":398,"context_line":"                     rp_uuid)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_d9c8ec24","line":395,"in_reply_to":"da4df55a_19c8b4a7","updated":"2016-12-28 18:03:00.000000000","message":"++","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8bead4fc297c07a21f6dd52670c8e07af709726b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"^Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_fce62ee7","line":36,"range":{"start_line":36,"start_character":29,"end_line":36,"end_character":30},"updated":"2016-12-29 18:04:32.000000000","message":"This isn\u0027t matching because it\u0027s not the beginning of the error response text, see:\n\nhttp://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial/ca6db1e/logs/screen-n-cpu.txt.gz?level\u003dTRACE#_2016-12-28_19_06_17_518\n\n409 Conflict\n\nThere was a conflict when trying to complete your request.\n\n update conflict: Inventory for \u0027VCPU, MEMORY_MB, DISK_GB\u0027 on resource provider \u002736f5d78a-4e7a-4ea5-9033-0e7fd9fefaae\u0027 in use.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8af788d484c6e7bedb807b8ee7d982307667a2cc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"^Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_3cb0b68b","line":36,"range":{"start_line":36,"start_character":29,"end_line":36,"end_character":30},"in_reply_to":"ba5201f7_7cdb1e1c","updated":"2016-12-29 18:28:07.000000000","message":"Done","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f39623646165ca0f5f5a42c27095f942fa2d7685","unresolved":false,"context_lines":[{"line_number":33,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"^Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_7cdb1e1c","line":36,"range":{"start_line":36,"start_character":29,"end_line":36,"end_character":30},"in_reply_to":"ba5201f7_fce62ee7","updated":"2016-12-29 18:05:44.000000000","message":"Ya, I\u0027m working on fixing this up to use the actual Exception message in the unit test... will fix shortly.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"02a78e0da4324ce617822039bf7f0f456424c0e3","unresolved":false,"context_lines":[{"line_number":395,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":396,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":397,"context_line":"            LOG.info(_LI(\u0027Deleted all inventory for resource provider %s\u0027),"},{"line_number":398,"context_line":"                     rp_uuid)"},{"line_number":399,"context_line":"            return"},{"line_number":400,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":401,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da4df55a_8dbc59bc","line":398,"updated":"2016-12-29 01:26:45.000000000","message":"we need to update the cached generation?","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f26b087732b511b14c4bc4e870991cb1b2fcd0d3","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                     rp_uuid)"},{"line_number":399,"context_line":"            return"},{"line_number":400,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":401,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":402,"context_line":"            if rc_str is not None:"},{"line_number":403,"context_line":"                msg \u003d _LW(\"We cannot delete inventory %(rc_str)s for resource \""},{"line_number":404,"context_line":"                          \"provider %(rp_uuid)s because the inventory is \""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_a64657bd","line":401,"range":{"start_line":401,"start_character":21,"end_line":401,"end_character":46},"updated":"2016-12-29 16:03:15.000000000","message":"Sorry for stupid question but when inventory is marked as in use? When at least one instance is associated with resource provider?","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a79d09ccddee89e62a9a2be823b8208ec646482b","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                     rp_uuid)"},{"line_number":399,"context_line":"            return"},{"line_number":400,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":401,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":402,"context_line":"            if rc_str is not None:"},{"line_number":403,"context_line":"                msg \u003d _LW(\"We cannot delete inventory %(rc_str)s for resource \""},{"line_number":404,"context_line":"                          \"provider %(rp_uuid)s because the inventory is \""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_06e8037c","line":401,"range":{"start_line":401,"start_character":21,"end_line":401,"end_character":46},"in_reply_to":"ba5201f7_a64657bd","updated":"2016-12-29 16:04:31.000000000","message":"There is no such thing as a stupid question, Vasyl! :)\n\nTechnically, \"in use\" simply means that there is a record in the allocations table that refers to the resource provider. That\u0027s it! :)\n\n-jay","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"02a78e0da4324ce617822039bf7f0f456424c0e3","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":429,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":430,"context_line":"        if inv_data:"},{"line_number":431,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            msg \u003d _LI(\"Compute node %(uuid)s (%(name)s) reported no \""},{"line_number":434,"context_line":"                      \"inventory. Deleting any inventory records.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"da4df55a_0da22999","line":431,"updated":"2016-12-29 01:26:45.000000000","message":"Emm....If we are calling this method directly, it does the same thing as _delete_inventory.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9db97dee4ca22f21698b4f4cf95c738f7f94ab21","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":429,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":430,"context_line":"        if inv_data:"},{"line_number":431,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            msg \u003d _LI(\"Compute node %(uuid)s (%(name)s) reported no \""},{"line_number":434,"context_line":"                      \"inventory. Deleting any inventory records.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_c6943bea","line":431,"in_reply_to":"ba5201f7_66ac6fee","updated":"2016-12-29 16:06:44.000000000","message":"Well, yes, that\u0027s a difference. However, in response to Alex, the reason I did it this way was to differentiate updating inventory from simply removing all inventory. I was actually surprised that we didn\u0027t have an implementation of DELETE /resource_providers/{uuid}/inventories in the placement API. I created a Wishlist bug for just that reason earlier today:\n\nhttps://bugs.launchpad.net/nova/+bug/1653122\n\nBest,\n\n-jay","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3b690d76a6e76bfe372006532f784388d636ef86","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":429,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":430,"context_line":"        if inv_data:"},{"line_number":431,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            msg \u003d _LI(\"Compute node %(uuid)s (%(name)s) reported no \""},{"line_number":434,"context_line":"                      \"inventory. Deleting any inventory records.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"da4df55a_2ddb6d1c","line":431,"in_reply_to":"da4df55a_0da22999","updated":"2016-12-29 01:30:11.000000000","message":"I mean it does the same thing https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L307\n\nor maybe i\u0027m missing something.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f26b087732b511b14c4bc4e870991cb1b2fcd0d3","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":429,"context_line":"        inv_data \u003d _compute_node_to_inventory_dict(compute_node)"},{"line_number":430,"context_line":"        if inv_data:"},{"line_number":431,"context_line":"            self._update_inventory(compute_node.uuid, inv_data)"},{"line_number":432,"context_line":"        else:"},{"line_number":433,"context_line":"            msg \u003d _LI(\"Compute node %(uuid)s (%(name)s) reported no \""},{"line_number":434,"context_line":"                      \"inventory. Deleting any inventory records.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_66ac6fee","line":431,"in_reply_to":"da4df55a_2ddb6d1c","updated":"2016-12-29 16:03:15.000000000","message":"The difference is that _update_inventory() do 3 attempts with 1 sec sleep. And if API returns error it means that we lock whole compute for 3 sec which is not good.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f26b087732b511b14c4bc4e870991cb1b2fcd0d3","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                \u0027name\u0027: compute_node.hypervisor_hostname,"},{"line_number":438,"context_line":"            }"},{"line_number":439,"context_line":"            LOG.info(msg, msg_args)"},{"line_number":440,"context_line":"            self._delete_inventory(compute_node.uuid)"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def _get_allocations_for_instance(self, rp_uuid, instance):"},{"line_number":443,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % instance.uuid"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5201f7_c6035b75","line":440,"updated":"2016-12-29 16:03:15.000000000","message":"When ironic deploying node it also reports resources as 0 [0], [1] and Nova can\u0027t delete inventory data as instance using it. This behaviour should be fixed before this patch in ironic virt driver, we should report [vcpus|memory_mb|local_gb]_used  \u003d\u003d [vcpus|memory_mb|local_gb] when do deploying.\n\n[0] https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L321-L326\n[1] https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L189\n[3] http://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-multitenant-network-ubuntu-xenial/3762be2/logs/screen-n-cpu.txt.gz?level\u003dERROR#_2016-12-28_19_14_27_024","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aedebcbc824d2157c638781616134627fb0b323f","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            \u0027inventories\u0027: {},"},{"line_number":394,"context_line":"        }"},{"line_number":395,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":396,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":397,"context_line":"            LOG.info(_LI(\u0027Deleted all inventory for resource provider %s\u0027),"},{"line_number":398,"context_line":"                     rp_uuid)"},{"line_number":399,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_6c127f64","line":396,"updated":"2016-12-30 18:07:39.000000000","message":"In an earlier patch set Alex had asked if we need to update the cached generation? I\u0027m asking because I\u0027m seeing this failing with 409s on resource provider generation conflicts:\n\nhttp://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial/bfe55c9/logs/screen-n-cpu.txt.gz?level\u003dTRACE","commit_id":"b55eb554993fa73fad8f79c5391ce84dd2df1aca"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"618ff220c662fb0d517ee3d75295c432b1c61e13","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            \u0027inventories\u0027: {},"},{"line_number":394,"context_line":"        }"},{"line_number":395,"context_line":"        r \u003d self.put(url, payload)"},{"line_number":396,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":397,"context_line":"            LOG.info(_LI(\u0027Deleted all inventory for resource provider %s\u0027),"},{"line_number":398,"context_line":"                     rp_uuid)"},{"line_number":399,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_474f42bd","line":396,"in_reply_to":"ba5201f7_6c127f64","updated":"2017-01-02 17:13:58.000000000","message":"Done","commit_id":"b55eb554993fa73fad8f79c5391ce84dd2df1aca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"39de36e8d75d55d7f8a4491615b9153e77bc90d8","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            updated_inv \u003d r.json()"},{"line_number":402,"context_line":"            new_gen \u003d updated_inv[\u0027resource_provider_generation\u0027]"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"            self._resource_providers[rp_uuid].generation \u003d new_gen"},{"line_number":405,"context_line":"            return"},{"line_number":406,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":407,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_ed265715","line":404,"updated":"2017-01-02 21:01:05.000000000","message":"nit: looking at L364 we could log something like it does there too:\n\nLOG.debug(\u0027Updated inventory for %s at generation %i\u0027,\n                  rp_uuid, new_gen)\n\ne.g. \u0027Deleted inventory for %s at generation %i\u0027 but only address that if you have to respin.","commit_id":"863d41d6c31b21ce4d0fc9b8a91a4d19e98b9ad0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"813436c791aa25919ea9c425c51277142f2fea85","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    :returns: String of resource classes or None if there was no InventoryInUse"},{"line_number":129,"context_line":"              error in the response body."},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    match \u003d _RE_INV_IN_USE.match(body)"},{"line_number":132,"context_line":"    if match:"},{"line_number":133,"context_line":"        return match.group(1)"},{"line_number":134,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_73eec48c","line":131,"range":{"start_line":131,"start_character":27,"end_line":131,"end_character":32},"updated":"2017-01-03 02:15:01.000000000","message":"We need to use search since match looks at the beginning of the string, I got this to work as we want using search() instead:\n\n\u003e\u003e\u003e body\n\"\\n409 Conflict\\n\\nThere was a conflict when trying to complete your request.\\n\\n update conflict: Inventory for \u0027VCPU, MEMORY_MB, DISK_GB\u0027 on resource provider \u0027509fd779-f79a-4b44-8168-03b6892f1674\u0027 in use.\\n\"\n\u003e\u003e\u003e _RE_INV_IN_USE \u003d re.compile(\"Inventory for (.+) on resource provider (.+) in use.\")\n\u003e\u003e\u003e match \u003d _RE_INV_IN_USE.match(body)\n\u003e\u003e\u003e match\n\u003e\u003e\u003e match \u003d\u003d None\nTrue\n\u003e\u003e\u003e match \u003d _RE_INV_IN_USE.search(body)\n\u003e\u003e\u003e match \u003d\u003d None\nFalse\n\u003e\u003e\u003e print match.group(1)\n\u0027VCPU, MEMORY_MB, DISK_GB\u0027\n\u003e\u003e\u003e","commit_id":"714052d7d2033c58a423358abab7967aa836763c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"feb5070470abfe4ef1bdcd6a9eec6bdd02e2f0af","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    :returns: String of resource classes or None if there was no InventoryInUse"},{"line_number":129,"context_line":"              error in the response body."},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    match \u003d _RE_INV_IN_USE.match(body)"},{"line_number":132,"context_line":"    if match:"},{"line_number":133,"context_line":"        return match.group(1)"},{"line_number":134,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_e52659b9","line":131,"range":{"start_line":131,"start_character":27,"end_line":131,"end_character":32},"in_reply_to":"ba5201f7_37ba5a6f","updated":"2017-01-03 15:23:18.000000000","message":"FWIW I wouldn\u0027t have known either way except that match() was failing so I started digging into the re module docs and saw search() and started playing with a recreate.","commit_id":"714052d7d2033c58a423358abab7967aa836763c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ec4b9bbb5ebdc783016cf63d95b1d145dc5714f1","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    :returns: String of resource classes or None if there was no InventoryInUse"},{"line_number":129,"context_line":"              error in the response body."},{"line_number":130,"context_line":"    \"\"\""},{"line_number":131,"context_line":"    match \u003d _RE_INV_IN_USE.match(body)"},{"line_number":132,"context_line":"    if match:"},{"line_number":133,"context_line":"        return match.group(1)"},{"line_number":134,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_37ba5a6f","line":131,"range":{"start_line":131,"start_character":27,"end_line":131,"end_character":32},"in_reply_to":"ba5201f7_73eec48c","updated":"2017-01-03 13:44:21.000000000","message":"doh. can\u0027t believe I made this mistake... :(","commit_id":"714052d7d2033c58a423358abab7967aa836763c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cff30a4c2a04a3401a7e87f79af56fcfad1ab586","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":421,"context_line":"                return"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        msg \u003d _LE(\"Failed to delete inventory for resource provider \""},{"line_number":424,"context_line":"                  \"%(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":425,"context_line":"        msg_args \u003d {"},{"line_number":426,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5201f7_7903f042","line":423,"updated":"2017-01-03 17:04:20.000000000","message":"I don\u0027t know what\u0027s causing this but we still seem to be leaking resource provider generation id conflicts:\n\nhttp://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial/4d54452/logs/screen-n-cpu.txt.gz?level\u003dTRACE","commit_id":"8ee93fbaa7e2e3edb769449078a0ecd0e8e1a0dc"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"17187d2bf6c3ffa34fc93838dbbaed451c6344b9","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":421,"context_line":"                return"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        msg \u003d _LE(\"Failed to delete inventory for resource provider \""},{"line_number":424,"context_line":"                  \"%(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":425,"context_line":"        msg_args \u003d {"},{"line_number":426,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5201f7_f4ee058a","line":423,"in_reply_to":"ba5201f7_7903f042","updated":"2017-01-03 17:32:59.000000000","message":"Matt, the above link is from a different patch...\n\nThe last patchset in this patch doesn\u0027t show the conflicts:\n\nhttp://logs.openstack.org/14/414214/10/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial-nv/4188484/logs/screen-n-cpu.txt.gz?level\u003dTRACE","commit_id":"8ee93fbaa7e2e3edb769449078a0ecd0e8e1a0dc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2378e5cc93668e86409005db10242b2cd25d1c0c","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                LOG.warning(msg, msg_args)"},{"line_number":421,"context_line":"                return"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        msg \u003d _LE(\"Failed to delete inventory for resource provider \""},{"line_number":424,"context_line":"                  \"%(rp_uuid)s. Got error response: %(err)s\")"},{"line_number":425,"context_line":"        msg_args \u003d {"},{"line_number":426,"context_line":"            \u0027rp_uuid\u0027: rp_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5201f7_208a08c0","line":423,"in_reply_to":"ba5201f7_f4ee058a","updated":"2017-01-03 19:14:51.000000000","message":"It doesn\u0027t show it because that job doesn\u0027t run the placement-api, that\u0027s what https://review.openstack.org/#/c/415523/ is for and depends-on this change.","commit_id":"8ee93fbaa7e2e3edb769449078a0ecd0e8e1a0dc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c4d8651c178bee3acbf479d57cd38753f111be86","unresolved":false,"context_lines":[{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_24ce95b4","line":37,"updated":"2017-01-03 22:34:06.000000000","message":"add:\n\n re.MULTILINE","commit_id":"e2ad542f4146a0abe2da524fda87af4bcb4d99b2"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"81e278b913af25ad69efc868de0fe9f5d53aef3a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_a4ed25f1","line":37,"in_reply_to":"ba5201f7_24ce95b4","updated":"2017-01-03 22:39:02.000000000","message":"never mind, previous comment","commit_id":"e2ad542f4146a0abe2da524fda87af4bcb4d99b2"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"142b27bf3ba98d3a91db791f4f538c914a1d39f8","unresolved":false,"context_lines":[{"line_number":34,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":35,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":36,"context_line":"_RE_INV_IN_USE \u003d re.compile(\"Inventory for (.+) on resource provider \""},{"line_number":37,"context_line":"                            \"(.+) in use.$\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba5201f7_4478f9c4","line":37,"in_reply_to":"ba5201f7_a4ed25f1","updated":"2017-01-03 22:54:06.000000000","message":"Actually re.MULTILINE would have fixed issue since was using \u0027$\u0027 here. But removing \u0027$\u0027 also fixes issue :)","commit_id":"e2ad542f4146a0abe2da524fda87af4bcb4d99b2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b9642af2a5545dca3f94d9a422059a0bbe8a74b","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            LOG.debug(msg, rp_uuid)"},{"line_number":404,"context_line":"            return"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        msg \u003d _LI(\"Compute node %s reported no inventory but previous \""},{"line_number":407,"context_line":"                  \"inventory was detected. Deleting existing inventory \""},{"line_number":408,"context_line":"                  \"records.\")"},{"line_number":409,"context_line":"        LOG.info(msg, rp_uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5201f7_0b48bc86","line":406,"range":{"start_line":406,"start_character":19,"end_line":406,"end_character":31},"updated":"2017-01-04 01:57:23.000000000","message":"nit: I think we have generally tried to not say \u0027compute node\u0027 in this code and you had a patch at one point to scrub that and make it more generic by just saying \u0027resource provider\u0027, so probably want to do that here too if you need to respin.","commit_id":"3c217acb9c55d647ca362320d697e80d7cfa5ceb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0b9642af2a5545dca3f94d9a422059a0bbe8a74b","unresolved":false,"context_lines":[{"line_number":430,"context_line":"                     msg_args)"},{"line_number":431,"context_line":"            return"},{"line_number":432,"context_line":"        elif r.status_code \u003d\u003d 409:"},{"line_number":433,"context_line":"            rc_str \u003d _extract_inventory_in_use(r.text)"},{"line_number":434,"context_line":"            if rc_str is not None:"},{"line_number":435,"context_line":"                msg \u003d _LW(\"We cannot delete inventory %(rc_str)s for resource \""},{"line_number":436,"context_line":"                          \"provider %(rp_uuid)s because the inventory is \""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba5201f7_eb9ff800","line":433,"updated":"2017-01-04 01:57:23.000000000","message":"This is working now:\n\nhttp://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial/15dd658/logs/screen-n-cpu.txt.gz?level\u003dTRACE#_2017-01-04_00_19_32_511","commit_id":"3c217acb9c55d647ca362320d697e80d7cfa5ceb"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8db9d68cebd66649f241b330642deb4cbb954265","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.assertIsNone(result)"},{"line_number":513,"context_line":"        self.assertFalse(mock_extract.called)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report._extract_inventory_in_use\u0027)"},{"line_number":516,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":517,"context_line":"                \u0027put\u0027)"},{"line_number":518,"context_line":"    def test_delete_inventory_inventory_in_use(self, mock_put, mock_extract):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_19db5450","line":515,"range":{"start_line":515,"start_character":4,"end_line":515,"end_character":73},"updated":"2016-12-28 17:28:13.000000000","message":"I\u0027d prefer to not mock this out and actually use a real instance of the InventoryInUse exception so that we are sure we\u0027re properly parsing that error and pulling out the resource class we care about, and that also future proofs it in case someone changes the message format in InventoryInUse.","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"3bce71244ce683eee88e6498896d441ab964e3a4","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        self.assertIsNone(result)"},{"line_number":513,"context_line":"        self.assertFalse(mock_extract.called)"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report._extract_inventory_in_use\u0027)"},{"line_number":516,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":517,"context_line":"                \u0027put\u0027)"},{"line_number":518,"context_line":"    def test_delete_inventory_inventory_in_use(self, mock_put, mock_extract):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_7901c037","line":515,"range":{"start_line":515,"start_character":4,"end_line":515,"end_character":73},"in_reply_to":"da4df55a_19db5450","updated":"2016-12-28 18:03:00.000000000","message":"Done","commit_id":"e35f7a8f9a02c63ecdfec91b0acf20bba1478c82"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6481a7f21617a09c1e13f845a4ddb1a5d5f6860","unresolved":false,"context_lines":[{"line_number":523,"context_line":""},{"line_number":524,"context_line":"        mock_put.return_value.status_code \u003d 409"},{"line_number":525,"context_line":"        mock_put.return_value.text \u003d ("},{"line_number":526,"context_line":"            \u0027Inventory for VCPU on resource provider 42 in use.\u0027"},{"line_number":527,"context_line":"        )"},{"line_number":528,"context_line":"        mock_put.return_value.json.return_value \u003d {"},{"line_number":529,"context_line":"            \u0027resource_provider_generation\u0027: 44,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da4df55a_ad3afde4","line":526,"updated":"2016-12-29 01:50:21.000000000","message":"This just hard-codes what is checked in the report client. I\u0027d prefer that we actually construct and use the InventoryInUse exception type, set it\u0027s kwargs, etc, then use six.text_type on it to turn it into a string and use *that* for the text response here. The reason being, if someone re-words the msg_fmt for InventoryInUse, this will still pass, but in practice our regex might fail.","commit_id":"b1334800b1512def6f3dd61878dea4d5ab9df670"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"813436c791aa25919ea9c425c51277142f2fea85","unresolved":false,"context_lines":[{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        mock_put.return_value.status_code \u003d 409"},{"line_number":529,"context_line":"        rc_str \u003d \"VCPU, MEMORY_MB\""},{"line_number":530,"context_line":"        in_use_exc \u003d exception.InventoryInUse("},{"line_number":531,"context_line":"            resource_classes\u003drc_str,"},{"line_number":532,"context_line":"            resource_provider\u003dcn.uuid,"},{"line_number":533,"context_line":"        )"},{"line_number":534,"context_line":"        mock_put.return_value.text \u003d six.text_type(in_use_exc)"},{"line_number":535,"context_line":"        mock_put.return_value.json.return_value \u003d {"},{"line_number":536,"context_line":"            \u0027resource_provider_generation\u0027: 44,"},{"line_number":537,"context_line":"            \u0027inventories\u0027: {"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_531e20bb","line":534,"range":{"start_line":530,"start_character":8,"end_line":534,"end_character":62},"updated":"2017-01-03 02:15:01.000000000","message":"I\u0027m still seeing this show up as an error:\n\nhttp://logs.openstack.org/23/415523/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ipmitool-tinyipa-ubuntu-xenial/2f2198b/logs/screen-n-cpu.txt.gz?level\u003dTRACE\n\nWhat we\u0027re comparing against is something like this:\n\n\n--\n\n409 Conflict\n\nThere was a conflict when trying to complete your request.\n\n update conflict: Inventory for \u0027VCPU, MEMORY_MB, DISK_GB\u0027 on resource provider \u0027509fd779-f79a-4b44-8168-03b6892f1674\u0027 in use.","commit_id":"714052d7d2033c58a423358abab7967aa836763c"}]}
