)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5772dd09073993817e34b7708fae31c3765ca480","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            LOG.info(msg, args)"},{"line_number":167,"context_line":"            return self._get_resource_provider(uuid)"},{"line_number":168,"context_line":"        else:"},{"line_number":169,"context_line":"            msg \u003d _LE(\"Failed to create resource provider record in \""},{"line_number":170,"context_line":"                      \"placement API for UUID %(uuid)s. \""},{"line_number":171,"context_line":"                      \"Got %(status_code)d: %(err_text)s.\")"},{"line_number":172,"context_line":"            args \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_2bf7898d","line":169,"updated":"2016-08-31 01:06:29.000000000","message":"I\u0027m not sure why, and it\u0027s not a problem for this patch, but we\u0027re hitting this early:\n\nhttp://logs.openstack.org/61/363061/2/experimental/gate-tempest-dsvm-neutron-placement-full-ubuntu-xenial-nv/780cd4a/logs/screen-n-cpu.txt.gz?level\u003dTRACE#_2016-08-30_23_25_52_632","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"40a5833d8510f59b232bddb01e151b915b79127e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        inventories \u003d ["},{"line_number":209,"context_line":"            {\u0027resource_class\u0027: \u0027VCPU\u0027,"},{"line_number":210,"context_line":"             \u0027total\u0027: compute_node.vcpus,"},{"line_number":211,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":212,"context_line":"             \u0027min_unit\u0027: 1,"},{"line_number":213,"context_line":"             \u0027max_unit\u0027: 1,"},{"line_number":214,"context_line":"             \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_cfca7e6e","line":211,"range":{"start_line":211,"start_character":25,"end_line":211,"end_character":26},"updated":"2016-08-31 14:30:50.000000000","message":"This is affected by vcpu_pin_set, but lets ignore that, like the current scheduler does. We could add a TODO, but thats probably a distraction.","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"40a5833d8510f59b232bddb01e151b915b79127e","unresolved":false,"context_lines":[{"line_number":215,"context_line":"             \u0027allocation_ratio\u0027: compute_node.cpu_allocation_ratio},"},{"line_number":216,"context_line":"            {\u0027resource_class\u0027: \u0027MEMORY_MB\u0027,"},{"line_number":217,"context_line":"             \u0027total\u0027: compute_node.memory_mb,"},{"line_number":218,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":219,"context_line":"             \u0027min_unit\u0027: 1,"},{"line_number":220,"context_line":"             \u0027max_unit\u0027: 1,"},{"line_number":221,"context_line":"             \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_0fbb860f","line":218,"range":{"start_line":218,"start_character":25,"end_line":218,"end_character":26},"updated":"2016-08-31 14:30:50.000000000","message":"CONF.reserved_host_memory_mb?","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7b15845745f7f161cabeab867ea005b225f411b2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"             \u0027allocation_ratio\u0027: compute_node.cpu_allocation_ratio},"},{"line_number":216,"context_line":"            {\u0027resource_class\u0027: \u0027MEMORY_MB\u0027,"},{"line_number":217,"context_line":"             \u0027total\u0027: compute_node.memory_mb,"},{"line_number":218,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":219,"context_line":"             \u0027min_unit\u0027: 1,"},{"line_number":220,"context_line":"             \u0027max_unit\u0027: 1,"},{"line_number":221,"context_line":"             \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_ccb5297f","line":218,"range":{"start_line":218,"start_character":25,"end_line":218,"end_character":26},"in_reply_to":"fa7ab95a_0fbb860f","updated":"2016-08-31 14:59:31.000000000","message":"Nope, that field is very different, that\u0027s a bit difficult to explain but it\u0027s used for getting a good free_ram_mb field.","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0278c335a85a89c21e5db3609d3251fa4e4d9142","unresolved":false,"context_lines":[{"line_number":215,"context_line":"             \u0027allocation_ratio\u0027: compute_node.cpu_allocation_ratio},"},{"line_number":216,"context_line":"            {\u0027resource_class\u0027: \u0027MEMORY_MB\u0027,"},{"line_number":217,"context_line":"             \u0027total\u0027: compute_node.memory_mb,"},{"line_number":218,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":219,"context_line":"             \u0027min_unit\u0027: 1,"},{"line_number":220,"context_line":"             \u0027max_unit\u0027: 1,"},{"line_number":221,"context_line":"             \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_f5f710f3","line":218,"range":{"start_line":218,"start_character":25,"end_line":218,"end_character":26},"in_reply_to":"fa7ab95a_ccb5297f","updated":"2016-08-31 15:34:48.000000000","message":"I\u0027m not sure why that field isn\u0027t useful. I\u0027m going to change this to do it and we can correct later if needed. These values are updated every minute after all :P","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"40a5833d8510f59b232bddb01e151b915b79127e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"             \u0027allocation_ratio\u0027: compute_node.ram_allocation_ratio},"},{"line_number":223,"context_line":"            {\u0027resource_class\u0027: \u0027DISK_GB\u0027,"},{"line_number":224,"context_line":"             \u0027total\u0027: compute_node.local_gb,"},{"line_number":225,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":226,"context_line":"             \u0027min_unit\u0027: 1,"},{"line_number":227,"context_line":"             \u0027max_unit\u0027: 1,"},{"line_number":228,"context_line":"             \u0027step_size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_6ff25208","line":225,"range":{"start_line":225,"start_character":25,"end_line":225,"end_character":26},"updated":"2016-08-31 14:30:50.000000000","message":"CONF.reserved_host_disk_mb?\n\nhttps://github.com/openstack/nova/blob/master/nova/conf/compute.py#L143","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5772dd09073993817e34b7708fae31c3765ca480","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            del self._resource_providers[compute_node.uuid]"},{"line_number":248,"context_line":"            self._ensure_resource_provider("},{"line_number":249,"context_line":"                compute_node.uuid, compute_node.hypervisor_hostname)"},{"line_number":250,"context_line":"            LOG.info(\u0027Retrying update inventory for %s\u0027 % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_8ba9757e","line":250,"updated":"2016-08-31 01:06:29.000000000","message":"bingo:\n\nhttp://logs.openstack.org/61/363061/2/experimental/gate-tempest-dsvm-neutron-placement-full-ubuntu-xenial-nv/780cd4a/logs/screen-n-cpu.txt.gz#_2016-08-30_23_27_01_079","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5772dd09073993817e34b7708fae31c3765ca480","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        if result.status_code \u003d\u003d 200:"},{"line_number":262,"context_line":"            self._resource_providers[compute_node.uuid].generation \u003d ("},{"line_number":263,"context_line":"                generation + 1)"},{"line_number":264,"context_line":"            LOG.debug(\u0027Updated inventory for %s at generation %i\u0027 % ("},{"line_number":265,"context_line":"                compute_node.uuid, generation))"},{"line_number":266,"context_line":"            return result.json()"},{"line_number":267,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_4bc68d4a","line":264,"updated":"2016-08-31 01:06:29.000000000","message":"http://logs.openstack.org/61/363061/2/experimental/gate-tempest-dsvm-neutron-placement-full-ubuntu-xenial-nv/780cd4a/logs/screen-n-cpu.txt.gz#_2016-08-30_23_27_01_105","commit_id":"d7d7a05791aa34290a164a7141b2bc52f524a6f0"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"51331e0c072f6e0400f593398602499c119d4cac","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _compute_node_inventory(self, compute_node):"},{"line_number":204,"context_line":"        inventories \u003d ["},{"line_number":205,"context_line":"            {\u0027resource_class\u0027: \u0027VCPU\u0027,"},{"line_number":206,"context_line":"             \u0027total\u0027: compute_node.vcpus,"},{"line_number":207,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":208,"context_line":"             \u0027min_unit\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_0096f093","line":205,"range":{"start_line":205,"start_character":32,"end_line":205,"end_character":36},"updated":"2016-08-31 15:56:34.000000000","message":"nit: should probably use the constant \"ResourceClass.VCPU\" from nova/objects/fields for this and other class names.","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"870e056fc6bc9af7218f757d8be1859c09cb5d1a","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _compute_node_inventory(self, compute_node):"},{"line_number":204,"context_line":"        inventories \u003d ["},{"line_number":205,"context_line":"            {\u0027resource_class\u0027: \u0027VCPU\u0027,"},{"line_number":206,"context_line":"             \u0027total\u0027: compute_node.vcpus,"},{"line_number":207,"context_line":"             \u0027reserved\u0027: 0,"},{"line_number":208,"context_line":"             \u0027min_unit\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_4058f856","line":205,"range":{"start_line":205,"start_character":32,"end_line":205,"end_character":36},"in_reply_to":"fa7ab95a_0096f093","updated":"2016-08-31 15:58:22.000000000","message":"Yeah, I meant to come back and do that, but did this because I wasn\u0027t sure if the api wanted the string or the int. If I have to respin I\u0027ll fix.","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9abb369dce514389d06e4f4ebe5d97b1b1c101e4","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        }"},{"line_number":232,"context_line":"        return data"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _update_inventory(self, compute_node):"},{"line_number":235,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % compute_node.uuid"},{"line_number":236,"context_line":"        data \u003d self._compute_node_inventory(compute_node)"},{"line_number":237,"context_line":"        result \u003d self.put(url, data)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_36aa5b1a","line":234,"updated":"2016-08-31 17:07:46.000000000","message":"this needs the safe_connect wrapper on it, right?","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c1dd289866acef0238bffe6f55947f53fdaefc93","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        }"},{"line_number":232,"context_line":"        return data"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _update_inventory(self, compute_node):"},{"line_number":235,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % compute_node.uuid"},{"line_number":236,"context_line":"        data \u003d self._compute_node_inventory(compute_node)"},{"line_number":237,"context_line":"        result \u003d self.put(url, data)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_093e18b8","line":234,"in_reply_to":"fa7ab95a_36aa5b1a","updated":"2016-08-31 17:10:24.000000000","message":"Yeah, wrote this before that was a thing.","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9abb369dce514389d06e4f4ebe5d97b1b1c101e4","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % compute_node.uuid"},{"line_number":236,"context_line":"        data \u003d self._compute_node_inventory(compute_node)"},{"line_number":237,"context_line":"        result \u003d self.put(url, data)"},{"line_number":238,"context_line":"        if result is None:"},{"line_number":239,"context_line":"            LOG.error("},{"line_number":240,"context_line":"                _LE(\u0027Failed to update inventory for %s\u0027) % compute_node.uuid)"},{"line_number":241,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_36209bf7","line":238,"updated":"2016-08-31 17:07:46.000000000","message":"is this a real possibility?","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c1dd289866acef0238bffe6f55947f53fdaefc93","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % compute_node.uuid"},{"line_number":236,"context_line":"        data \u003d self._compute_node_inventory(compute_node)"},{"line_number":237,"context_line":"        result \u003d self.put(url, data)"},{"line_number":238,"context_line":"        if result is None:"},{"line_number":239,"context_line":"            LOG.error("},{"line_number":240,"context_line":"                _LE(\u0027Failed to update inventory for %s\u0027) % compute_node.uuid)"},{"line_number":241,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_495f400e","line":238,"in_reply_to":"fa7ab95a_36209bf7","updated":"2016-08-31 17:10:24.000000000","message":"Yeah, seems to happen if I don\u0027t have placement set up :)","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"9abb369dce514389d06e4f4ebe5d97b1b1c101e4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        elif not result:"},{"line_number":253,"context_line":"            LOG.error(_LE(\u0027Failed to update inventory for \u0027"},{"line_number":254,"context_line":"                          \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"},{"line_number":255,"context_line":"                \u0027uuid\u0027: compute_node.uuid, \u0027status\u0027: result.status_code,"},{"line_number":256,"context_line":"                \u0027text\u0027: result.text})"},{"line_number":257,"context_line":"            return"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_765f8375","line":255,"updated":"2016-08-31 17:07:46.000000000","message":"if result is false, how does it have status_code / text?","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c1dd289866acef0238bffe6f55947f53fdaefc93","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        elif not result:"},{"line_number":253,"context_line":"            LOG.error(_LE(\u0027Failed to update inventory for \u0027"},{"line_number":254,"context_line":"                          \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"},{"line_number":255,"context_line":"                \u0027uuid\u0027: compute_node.uuid, \u0027status\u0027: result.status_code,"},{"line_number":256,"context_line":"                \u0027text\u0027: result.text})"},{"line_number":257,"context_line":"            return"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa7ab95a_c980b049","line":255,"in_reply_to":"fa7ab95a_765f8375","updated":"2016-08-31 17:10:24.000000000","message":"result is false-y here. True if 2xx, False if \u003e\u003d4xx. This is how requests\u0027 Response object works and it\u0027s super nice :)","commit_id":"1bb69d39c5ccaa8c782707b2d4d3d11b756c3323"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"81a7a99ceaf3eccd2a1859b3ba11c7dcd17e3080","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        url \u003d \u0027/resource_providers/%s/inventories\u0027 % compute_node.uuid"},{"line_number":237,"context_line":"        data \u003d self._compute_node_inventory(compute_node)"},{"line_number":238,"context_line":"        result \u003d self.put(url, data)"},{"line_number":239,"context_line":"        if result is None:"},{"line_number":240,"context_line":"            LOG.error("},{"line_number":241,"context_line":"                _LE(\u0027Failed to update inventory for %s\u0027) % compute_node.uuid)"},{"line_number":242,"context_line":"            return"},{"line_number":243,"context_line":"        elif result.status_code \u003d\u003d 409:"},{"line_number":244,"context_line":"            # Generation fail, re-poll and then re-try"},{"line_number":245,"context_line":"            del self._resource_providers[compute_node.uuid]"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_ccd51eba","line":242,"range":{"start_line":239,"start_character":7,"end_line":242,"end_character":18},"updated":"2016-08-31 17:29:30.000000000","message":"this can be deleted","commit_id":"c87fbbffb8ee3a4897f16491360ca31b7f9c7e66"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"81a7a99ceaf3eccd2a1859b3ba11c7dcd17e3080","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            return"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        generation \u003d data[\u0027resource_provider_generation\u0027]"},{"line_number":261,"context_line":"        if result and result.status_code \u003d\u003d 200:"},{"line_number":262,"context_line":"            self._resource_providers[compute_node.uuid].generation \u003d ("},{"line_number":263,"context_line":"                generation + 1)"},{"line_number":264,"context_line":"            LOG.debug(\u0027Updated inventory for %s at generation %i\u0027 % ("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_cc87ded5","line":261,"range":{"start_line":261,"start_character":11,"end_line":261,"end_character":22},"updated":"2016-08-31 17:29:30.000000000","message":"don\u0027t need this right, we\u0027re checking for status code","commit_id":"c87fbbffb8ee3a4897f16491360ca31b7f9c7e66"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"322058c2ff18b12549671d4f6ee89a327c187595","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            return"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        generation \u003d data[\u0027resource_provider_generation\u0027]"},{"line_number":261,"context_line":"        if result and result.status_code \u003d\u003d 200:"},{"line_number":262,"context_line":"            self._resource_providers[compute_node.uuid].generation \u003d ("},{"line_number":263,"context_line":"                generation + 1)"},{"line_number":264,"context_line":"            LOG.debug(\u0027Updated inventory for %s at generation %i\u0027 % ("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_22f131ce","line":261,"range":{"start_line":261,"start_character":11,"end_line":261,"end_character":22},"in_reply_to":"fa7ab95a_cc87ded5","updated":"2016-08-31 17:57:07.000000000","message":"unsure if line252 could return None?","commit_id":"c87fbbffb8ee3a4897f16491360ca31b7f9c7e66"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"81a7a99ceaf3eccd2a1859b3ba11c7dcd17e3080","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            LOG.debug(\u0027Updated inventory for %s at generation %i\u0027 % ("},{"line_number":265,"context_line":"                compute_node.uuid, generation))"},{"line_number":266,"context_line":"            return result.json()"},{"line_number":267,"context_line":"        elif result:"},{"line_number":268,"context_line":"            LOG.error(_LE(\u0027Failed to update inventory for %(uuid)s \u0027"},{"line_number":269,"context_line":"                          \u0027at generation %(gen)i: %(text)s\u0027) % {"},{"line_number":270,"context_line":"                \u0027uuid\u0027: compute_node.uuid,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_0c51c662","line":267,"updated":"2016-08-31 17:29:30.000000000","message":"Shouldn\u0027t this be not?","commit_id":"c87fbbffb8ee3a4897f16491360ca31b7f9c7e66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        result \u003d self.put(url, data)"},{"line_number":245,"context_line":"        if result.status_code \u003d\u003d 409:"},{"line_number":246,"context_line":"            # Generation fail, re-poll and then re-try"},{"line_number":247,"context_line":"            del self._resource_providers[compute_node.uuid]"},{"line_number":248,"context_line":"            self._ensure_resource_provider("},{"line_number":249,"context_line":"                compute_node.uuid, compute_node.hypervisor_hostname)"},{"line_number":250,"context_line":"            LOG.info(_LI(\u0027Retrying update inventory for %s\u0027) % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_e0d2de33","line":249,"range":{"start_line":247,"start_character":12,"end_line":249,"end_character":68},"updated":"2016-08-31 19:35:10.000000000","message":"Why do we need to do this? Why can\u0027t we just call self._get_resource_provider? I guess because self._compute_node_inventory relies on _ensure_resource_provider updating self._resource_providers. Eww, I\u0027m definitely not crazy with all of the tight coupling of updating and massaging member variables throughout all of this code, it would be cleaner IMO to just be passing the resource provider objects around to the methods that need them, and update the cache only when necessary. But that could all be done later.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"792e45fca2f5c43c19289d6ad309414a0ea7e664","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        result \u003d self.put(url, data)"},{"line_number":245,"context_line":"        if result.status_code \u003d\u003d 409:"},{"line_number":246,"context_line":"            # Generation fail, re-poll and then re-try"},{"line_number":247,"context_line":"            del self._resource_providers[compute_node.uuid]"},{"line_number":248,"context_line":"            self._ensure_resource_provider("},{"line_number":249,"context_line":"                compute_node.uuid, compute_node.hypervisor_hostname)"},{"line_number":250,"context_line":"            LOG.info(_LI(\u0027Retrying update inventory for %s\u0027) % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_23e770e5","line":249,"range":{"start_line":247,"start_character":12,"end_line":249,"end_character":68},"in_reply_to":"fa7ab95a_038b4c1f","updated":"2016-08-31 19:48:21.000000000","message":"No I\u0027m not, just was thinking through the code flow logic here and mentioned it. Definitely not something to address for FF.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"489c0cc9ee3c39fe186c2782b259590e48a74980","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        result \u003d self.put(url, data)"},{"line_number":245,"context_line":"        if result.status_code \u003d\u003d 409:"},{"line_number":246,"context_line":"            # Generation fail, re-poll and then re-try"},{"line_number":247,"context_line":"            del self._resource_providers[compute_node.uuid]"},{"line_number":248,"context_line":"            self._ensure_resource_provider("},{"line_number":249,"context_line":"                compute_node.uuid, compute_node.hypervisor_hostname)"},{"line_number":250,"context_line":"            LOG.info(_LI(\u0027Retrying update inventory for %s\u0027) % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_038b4c1f","line":249,"range":{"start_line":247,"start_character":12,"end_line":249,"end_character":68},"in_reply_to":"fa7ab95a_e0d2de33","updated":"2016-08-31 19:43:14.000000000","message":"We specifically need to invalidate our cache. So yeah, we could have another method for it, or a force\u003dTrue for the _ensure method. However, as below, it\u0027s just an implementation detail of this class and this method is a part of that, so I don\u0027t really see this as a huge deal.\n\nI\u0027ll not make this change in the interest of time, unless you or someone else ends up feeling really strongly about it.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            del self._resource_providers[compute_node.uuid]"},{"line_number":248,"context_line":"            self._ensure_resource_provider("},{"line_number":249,"context_line":"                compute_node.uuid, compute_node.hypervisor_hostname)"},{"line_number":250,"context_line":"            LOG.info(_LI(\u0027Retrying update inventory for %s\u0027) % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_200f66e2","line":251,"range":{"start_line":250,"start_character":61,"end_line":251,"end_character":35},"updated":"2016-08-31 19:35:10.000000000","message":"nit: pass the arg rather than %","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"eaa105cff50fc5f55d6e131e14c5cab9dad06b10","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            LOG.info(_LI(\u0027Retrying update inventory for %s\u0027) % ("},{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_2e5af783","line":253,"updated":"2016-08-31 20:14:23.000000000","message":"Is regenerating all the data, rather than simply updating the generation important?","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d1968de2fb93cd3370788a761d2b1f5db0dae7a8","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_c2afa592","line":254,"updated":"2016-08-31 17:58:09.000000000","message":"could this return None?","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"20f0564e558e38d79f7e600ebba0890f45ef9ec1","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_988270c7","line":254,"in_reply_to":"fa7ab95a_3846c4bf","updated":"2016-08-31 18:36:10.000000000","message":"put is basically just a pass through to requests, that will have a valid response, or an exception, which gets caught by the decorator","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_e003be74","line":254,"in_reply_to":"fa7ab95a_988270c7","updated":"2016-08-31 19:35:10.000000000","message":"Which decorator? safe_connect? And doesn\u0027t passing raise_exc\u003dFalse to ksa affect what\u0027s happening for error handling? I might just be confusing different error cases here, i.e. errors where KSA can\u0027t make the request, those are handled in safe_connect, but errors from the request, e.g. the 409, are not raised as exceptions, and we get a result back.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"bf81a125a160b5e5e0f2cf5a991425fc3c7906dc","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                compute_node.uuid))"},{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_3846c4bf","line":254,"in_reply_to":"fa7ab95a_c2afa592","updated":"2016-08-31 18:35:02.000000000","message":"no","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"},{"line_number":258,"context_line":"                \u0027uuid\u0027: compute_node.uuid, \u0027status\u0027: result.status_code,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_a09376f9","line":255,"updated":"2016-08-31 19:35:10.000000000","message":"Is this checking for None or other? Because if it\u0027s None, then L245 would already fail. Or does this evaluate to True if the response code is \u003c400?","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d117ffe92bca3bb90fb54f50a5ec60882768351","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Regenerate the body with the new generation"},{"line_number":253,"context_line":"            data \u003d self._compute_node_inventory(compute_node)"},{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"},{"line_number":258,"context_line":"                \u0027uuid\u0027: compute_node.uuid, \u0027status\u0027: result.status_code,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_033a6c98","line":255,"in_reply_to":"fa7ab95a_a09376f9","updated":"2016-08-31 19:38:15.000000000","message":"Right, it evaluates to true if it\u0027s determined to be successful by HTTP standards. Avoids checking lots of options and/or a bunch of \"if \u003c300\" type stuff. That logic is already in requests and (hopefully) correct.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            result \u003d self.put(url, data)"},{"line_number":255,"context_line":"        elif not result:"},{"line_number":256,"context_line":"            LOG.warning(_LW(\u0027Failed to update inventory for \u0027"},{"line_number":257,"context_line":"                            \u0027%(uuid)s: %(status)i %(text)s\u0027) % {"},{"line_number":258,"context_line":"                \u0027uuid\u0027: compute_node.uuid, \u0027status\u0027: result.status_code,"},{"line_number":259,"context_line":"                \u0027text\u0027: result.text})"},{"line_number":260,"context_line":"            return False"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        generation \u003d data[\u0027resource_provider_generation\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_c01b1ac9","line":259,"range":{"start_line":257,"start_character":61,"end_line":259,"end_character":36},"updated":"2016-08-31 19:35:10.000000000","message":"nit: pass as args rather than using %","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        if result.status_code \u003d\u003d 200:"},{"line_number":264,"context_line":"            self._resource_providers[compute_node.uuid].generation \u003d ("},{"line_number":265,"context_line":"                generation + 1)"},{"line_number":266,"context_line":"            LOG.debug(\u0027Updated inventory for %s at generation %i\u0027 % ("},{"line_number":267,"context_line":"                compute_node.uuid, generation))"},{"line_number":268,"context_line":"            return True"},{"line_number":269,"context_line":"        elif result.status_code \u003d\u003d 409:"},{"line_number":270,"context_line":"            LOG.info(_LI(\u0027Double generation clash updating inventory \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_6025eec0","line":267,"range":{"start_line":266,"start_character":66,"end_line":267,"end_character":46},"updated":"2016-08-31 19:35:10.000000000","message":"pass args","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            return True"},{"line_number":269,"context_line":"        elif result.status_code \u003d\u003d 409:"},{"line_number":270,"context_line":"            LOG.info(_LI(\u0027Double generation clash updating inventory \u0027"},{"line_number":271,"context_line":"                         \u0027for %(uuid)s at generation %(gen)i\u0027) % {"},{"line_number":272,"context_line":"                             \u0027uuid\u0027: compute_node.uuid,"},{"line_number":273,"context_line":"                             \u0027gen\u0027: generation})"},{"line_number":274,"context_line":"            return False"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        LOG.info(_LI(\u0027Received unexpected response code %(code)i while \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_001b4281","line":273,"range":{"start_line":271,"start_character":63,"end_line":273,"end_character":47},"updated":"2016-08-31 19:35:10.000000000","message":"pass args","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            return False"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        LOG.info(_LI(\u0027Received unexpected response code %(code)i while \u0027"},{"line_number":277,"context_line":"                     \u0027trying to update inventory for %(uuid)s \u0027"},{"line_number":278,"context_line":"                     \u0027at generation %(gen)i: %(text)s\u0027) % {"},{"line_number":279,"context_line":"                         \u0027uuid\u0027: compute_node.uuid,"},{"line_number":280,"context_line":"                         \u0027code\u0027: result.status_code,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_0350ac09","line":277,"range":{"start_line":277,"start_character":49,"end_line":277,"end_character":52},"updated":"2016-08-31 19:35:10.000000000","message":"nit: I\u0027d qualify this with \"compute node\" for context, i.e. trying to update inventory for compute node %(uuid)s at generation...","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5d117ffe92bca3bb90fb54f50a5ec60882768351","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            return False"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        LOG.info(_LI(\u0027Received unexpected response code %(code)i while \u0027"},{"line_number":277,"context_line":"                     \u0027trying to update inventory for %(uuid)s \u0027"},{"line_number":278,"context_line":"                     \u0027at generation %(gen)i: %(text)s\u0027) % {"},{"line_number":279,"context_line":"                         \u0027uuid\u0027: compute_node.uuid,"},{"line_number":280,"context_line":"                         \u0027code\u0027: result.status_code,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_e35d88ed","line":277,"range":{"start_line":277,"start_character":49,"end_line":277,"end_character":52},"in_reply_to":"fa7ab95a_0350ac09","updated":"2016-08-31 19:38:15.000000000","message":"The resource-provider purist would argue that it\u0027s not right to call it a compute node, but .. okay :)","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5544c0fc4a9619eac51eeefe5b92e0581d2c9adb","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        compute_node.save()"},{"line_number":291,"context_line":"        self._ensure_resource_provider(compute_node.uuid,"},{"line_number":292,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":293,"context_line":"        if compute_node.uuid in self._resource_providers:"},{"line_number":294,"context_line":"            self._update_inventory(compute_node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_c0507ad7","line":293,"updated":"2016-08-31 19:35:10.000000000","message":"nit: we could avoid needing to know the inner workings of how _ensure_resource_provider populates _resource_providers if we just checked the result of calling _ensure_resource_provider, which will be None or the ResourceProvider object.\n\nNot a big deal, just a style nit of mine.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"792e45fca2f5c43c19289d6ad309414a0ea7e664","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        compute_node.save()"},{"line_number":291,"context_line":"        self._ensure_resource_provider(compute_node.uuid,"},{"line_number":292,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":293,"context_line":"        if compute_node.uuid in self._resource_providers:"},{"line_number":294,"context_line":"            self._update_inventory(compute_node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_e37828fb","line":293,"in_reply_to":"fa7ab95a_6395f83e","updated":"2016-08-31 19:48:21.000000000","message":"It only matters in that a year from now when this code changes in some subtle way in one of these methods, but we didn\u0027t remember to tweak how something depends on how another method behaves, we have some kind of really weird failure. Yes it\u0027s all contained within this single class, which is minimal good, but I\u0027m just never crazy about this type of coupling because of the maintenance issues. Again, not something that needs addressing before FF.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"489c0cc9ee3c39fe186c2782b259590e48a74980","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        compute_node.save()"},{"line_number":291,"context_line":"        self._ensure_resource_provider(compute_node.uuid,"},{"line_number":292,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":293,"context_line":"        if compute_node.uuid in self._resource_providers:"},{"line_number":294,"context_line":"            self._update_inventory(compute_node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_6395f83e","line":293,"in_reply_to":"fa7ab95a_c0507ad7","updated":"2016-08-31 19:43:14.000000000","message":"But that internal implementation detail is one of the class, which this and all the other methods here are a part. So I don\u0027t really see why it matters.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873c7b56882a0a66eaa557791923398564aa447","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        compute_node.save()"},{"line_number":291,"context_line":"        self._ensure_resource_provider(compute_node.uuid,"},{"line_number":292,"context_line":"                                       compute_node.hypervisor_hostname)"},{"line_number":293,"context_line":"        if compute_node.uuid in self._resource_providers:"},{"line_number":294,"context_line":"            self._update_inventory(compute_node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_ee5d6fed","line":293,"in_reply_to":"fa7ab95a_e37828fb","updated":"2016-08-31 20:01:10.000000000","message":"We also don\u0027t have a unit test for this.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f0ffaed0f03646df17a2a9ce0afee7f5b5a5d538","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            return False"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        LOG.info(_LI(\u0027Received unexpected response code %(code)i while \u0027"},{"line_number":278,"context_line":"                     \u0027trying to update inventory for compute node %(uuid)s \u0027"},{"line_number":279,"context_line":"                     \u0027at generation %(gen)i: %(text)s\u0027),"},{"line_number":280,"context_line":"                 {\u0027uuid\u0027: compute_node.uuid,"},{"line_number":281,"context_line":"                  \u0027code\u0027: result.status_code,"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_4944951a","line":278,"range":{"start_line":278,"start_character":53,"end_line":278,"end_character":65},"updated":"2016-08-31 20:21:27.000000000","message":"Just to annoy the shit out of you, I just realized we don\u0027t qualify this anywhere else either, but I\u0027ll let someone else care about that.","commit_id":"a160e2078d2dc20c5dc99d4fe43fbb96c4c21ee1"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"403a7000ac7b16840f4b842e7a847503932f80ba","unresolved":false,"context_lines":[{"line_number":502,"context_line":"                                 hypervisor_hostname\u003d\u0027host1\u0027)"},{"line_number":503,"context_line":"        self.client.update_resource_stats(cn)"},{"line_number":504,"context_line":"        mock_save.assert_called_once_with()"},{"line_number":505,"context_line":"        mock_ensure.assert_called_once_with(uuids.compute_node, \u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_af2a977c","line":505,"updated":"2016-08-31 15:02:16.000000000","message":"I forgot to amend that UT... Will do later this evening or in a follow-up.","commit_id":"b38fceba569d133e51277aab5a801efb28e89ded"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873c7b56882a0a66eaa557791923398564aa447","unresolved":false,"context_lines":[{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":372,"context_line":"                \u0027_ensure_resource_provider\u0027)"},{"line_number":373,"context_line":"    def test_update_inventory_conflicts_and_then_succeedes(self, ensure_mock):"},{"line_number":374,"context_line":"        # Ensure _update_inventory() fails if we have a conflict when updating"},{"line_number":375,"context_line":"        # but retries correctly."},{"line_number":376,"context_line":"        uuid \u003d uuids.compute_node"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_0e029309","line":373,"range":{"start_line":373,"start_character":49,"end_line":373,"end_character":58},"updated":"2016-08-31 20:01:10.000000000","message":"nit: succeeds","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873c7b56882a0a66eaa557791923398564aa447","unresolved":false,"context_lines":[{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # Make sure the ResourceProvider exists for preventing to call the API"},{"line_number":389,"context_line":"        def fake_ensure_rp(uuid, name\u003dNone):"},{"line_number":390,"context_line":"            self.client._resource_providers[uuid] \u003d rp"},{"line_number":391,"context_line":"        ensure_mock.side_effect \u003d fake_ensure_rp"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"        self.client._resource_providers[uuid] \u003d rp"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_ae6287d6","line":390,"updated":"2016-08-31 20:01:10.000000000","message":"Should we simulate updating the generation on the rp here?","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873c7b56882a0a66eaa557791923398564aa447","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                          raise_exc\u003dFalse),"},{"line_number":413,"context_line":"                mock.call(expected_url,"},{"line_number":414,"context_line":"                          endpoint_filter\u003dmock.ANY,"},{"line_number":415,"context_line":"                          json\u003dexpected_payload,"},{"line_number":416,"context_line":"                          raise_exc\u003dFalse),"},{"line_number":417,"context_line":"            ])"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_ee73afb2","line":415,"range":{"start_line":415,"start_character":31,"end_line":415,"end_character":47},"updated":"2016-08-31 20:01:10.000000000","message":"Realistically if we had a conflict, wouldn\u0027t the 2nd payload actually have a different generation?","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4873c7b56882a0a66eaa557791923398564aa447","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        self.assertTrue(result)"},{"line_number":420,"context_line":"        # Make sure the generation bit has been incremented"},{"line_number":421,"context_line":"        rp \u003d self.client._resource_providers[compute_node.uuid]"},{"line_number":422,"context_line":"        self.assertEqual(original_generation + 1, rp.generation)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":425,"context_line":"                \u0027_ensure_resource_provider\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_2ea59703","line":422,"updated":"2016-08-31 20:01:10.000000000","message":"I would think this would be original + 2.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ffa7ee0beaf202aa0064523845261300bf54d2d","unresolved":false,"context_lines":[{"line_number":419,"context_line":"        self.assertTrue(result)"},{"line_number":420,"context_line":"        # Make sure the generation bit has been incremented"},{"line_number":421,"context_line":"        rp \u003d self.client._resource_providers[compute_node.uuid]"},{"line_number":422,"context_line":"        self.assertEqual(original_generation + 1, rp.generation)"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @mock.patch(\u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":425,"context_line":"                \u0027_ensure_resource_provider\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_6edb1fee","line":422,"in_reply_to":"fa7ab95a_2ea59703","updated":"2016-08-31 20:12:48.000000000","message":"In real life maybe (or maybe +10) but we only increment at the end when we\u0027ve succeeded, so no matter how many times we try, we just get one increment.","commit_id":"ac659cae949a93a5cce958cb3060ce7ec125b7a0"}]}
