)]}'
{"nova_powervm/conf/powervm.py":[{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"               help\u003d\u0027The location where the config drive ISO files should be \u0027"},{"line_number":52,"context_line":"                    \u0027built.\u0027),"},{"line_number":53,"context_line":"    cfg.StrOpt(\u0027disk_driver\u0027,"},{"line_number":54,"context_line":"               choices\u003d[\u0027localdisk\u0027, \u0027ssp\u0027, \u0027fileio\u0027], ignore_case\u003dTrue,"},{"line_number":55,"context_line":"               default\u003d\u0027localdisk\u0027,"},{"line_number":56,"context_line":"               help\u003d\u0027The disk driver to use for PowerVM disks. \u0027"},{"line_number":57,"context_line":"               \u0027Valid options are: localdisk, ssp, fileio\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_57ea5310","line":54,"range":{"start_line":54,"start_character":45,"end_line":54,"end_character":51},"updated":"2017-03-08 21:32:17.000000000","message":"filesystem or file","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"}],"nova_powervm/virt/powervm/disk/fileio.py":[{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 IBM Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_b49b97c8","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":26},"updated":"2017-03-08 16:16:06.000000000","message":"All messages here should really have\nLOG.info(_LI(\"message\"), instance\u003dself.instance)\n\nAt a minimum, wherever you have the instance available.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2017 IBM Corp."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_3108942c","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":26},"in_reply_to":"9a30ddce_b49b97c8","updated":"2017-03-08 18:22:30.000000000","message":"Done","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"IMAGE_API \u003d image.API()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class FileIODiskAdapter(disk_dvr.DiskAdapter):"},{"line_number":42,"context_line":"    def __init__(self, adapter, host_uuid):"},{"line_number":43,"context_line":"        super(FileIODiskAdapter, self).__init__(adapter, host_uuid)"},{"line_number":44,"context_line":"        nl_vios_wrap \u003d pvm_tpar.get_mgmt_partition(self.adapter)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_f9ca68a0","line":41,"updated":"2017-03-08 16:16:06.000000000","message":"Lets add a comment here.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":38,"context_line":"IMAGE_API \u003d image.API()"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class FileIODiskAdapter(disk_dvr.DiskAdapter):"},{"line_number":42,"context_line":"    def __init__(self, adapter, host_uuid):"},{"line_number":43,"context_line":"        super(FileIODiskAdapter, self).__init__(adapter, host_uuid)"},{"line_number":44,"context_line":"        nl_vios_wrap \u003d pvm_tpar.get_mgmt_partition(self.adapter)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_74003a02","line":41,"in_reply_to":"9a30ddce_f9ca68a0","updated":"2017-03-08 18:22:30.000000000","message":"Done","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class FileIODiskAdapter(disk_dvr.DiskAdapter):"},{"line_number":42,"context_line":"    def __init__(self, adapter, host_uuid):"},{"line_number":43,"context_line":"        super(FileIODiskAdapter, self).__init__(adapter, host_uuid)"},{"line_number":44,"context_line":"        nl_vios_wrap \u003d pvm_tpar.get_mgmt_partition(self.adapter)"},{"line_number":45,"context_line":"        self._vios_uuid \u003d nl_vios_wrap.uuid"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_94c4d35f","line":42,"updated":"2017-03-08 16:16:06.000000000","message":"I think we need a \u0027capabilities\u0027 section in here?  Something for the image cache and shared_storage for instance.\n\nI think with fileio, we would need to figure out the whole \u0027shared storage\u0027 bit.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"class FileIODiskAdapter(disk_dvr.DiskAdapter):"},{"line_number":42,"context_line":"    def __init__(self, adapter, host_uuid):"},{"line_number":43,"context_line":"        super(FileIODiskAdapter, self).__init__(adapter, host_uuid)"},{"line_number":44,"context_line":"        nl_vios_wrap \u003d pvm_tpar.get_mgmt_partition(self.adapter)"},{"line_number":45,"context_line":"        self._vios_uuid \u003d nl_vios_wrap.uuid"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_34ca426e","line":42,"in_reply_to":"9a30ddce_94c4d35f","updated":"2017-03-08 18:22:30.000000000","message":"Set has_imagecache to False. Will be changed to true in future patchset when imagecache support is added.\n\nWhat is affected by changing the shared_storage field?","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        :param name: The name of the instance whose path is to be found."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        return os.path.join(CONF.instances_path, name)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def vios_uuids(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_f4dd0f43","line":53,"range":{"start_line":53,"start_character":49,"end_line":53,"end_character":53},"updated":"2017-03-08 16:16:06.000000000","message":"So you have logic that looks at the end of the path name to determine raw or qcow.  But the path doesn\u0027t seem to ever capture that...","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"60bd2899cbe650857847b7431611982717b55fd7","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        :param name: The name of the instance whose path is to be found."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        return os.path.join(CONF.instances_path, name)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def vios_uuids(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_cfbf965e","line":53,"range":{"start_line":53,"start_character":49,"end_line":53,"end_character":53},"in_reply_to":"9a30ddce_f4dd0f43","updated":"2017-03-08 17:15:41.000000000","message":"There is no logic that looks at the end of the path to determine the file format.\nThe format is determined by calling nova\u0027s qemu_img_info method. This calls `qemu-img info \u003cfile\u003e` and parses the output. file_format is a field in the output.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        # Make sure the remove function will run within the transaction manager"},{"line_number":139,"context_line":"        def rm_func(vios_w):"},{"line_number":140,"context_line":"            LOG.info(_LI(\"Disconnecting instance %(inst)s from storage \""},{"line_number":141,"context_line":"                         \"disks.\"), {\u0027inst\u0027: instance.name})"},{"line_number":142,"context_line":"            return tsk_map.remove_maps(vios_w, lpar_uuid,"},{"line_number":143,"context_line":"                                       match_func\u003dmatch_func)"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_549fbb4f","line":141,"updated":"2017-03-08 16:16:06.000000000","message":"ex...here the message should be...\n\nLOG.info(_LI(\"Disconnecting storage disks\"), instance\u003dinstance)","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        # Make sure the remove function will run within the transaction manager"},{"line_number":139,"context_line":"        def rm_func(vios_w):"},{"line_number":140,"context_line":"            LOG.info(_LI(\"Disconnecting instance %(inst)s from storage \""},{"line_number":141,"context_line":"                         \"disks.\"), {\u0027inst\u0027: instance.name})"},{"line_number":142,"context_line":"            return tsk_map.remove_maps(vios_w, lpar_uuid,"},{"line_number":143,"context_line":"                                       match_func\u003dmatch_func)"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_d40d6638","line":141,"in_reply_to":"9a30ddce_549fbb4f","updated":"2017-03-08 18:22:30.000000000","message":"Done","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        :param size: The total size (in bytes) after resize."},{"line_number":194,"context_line":"        :return: True if the file was resized, false otherwise."},{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        qemu_info \u003d images.qemu_img_info(path)"},{"line_number":197,"context_line":"        if qemu_info.file_format !\u003d \u0027raw\u0027:"},{"line_number":198,"context_line":"            LOG.info(_LI(\"Can only resize RAW images.\"))"},{"line_number":199,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_744cbf70","line":196,"range":{"start_line":196,"start_character":20,"end_line":196,"end_character":46},"updated":"2017-03-08 16:16:06.000000000","message":"Are we guaranteed that the path will have .raw on the end?  I thought we just pushed down the instance UUID.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"60bd2899cbe650857847b7431611982717b55fd7","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        :param size: The total size (in bytes) after resize."},{"line_number":194,"context_line":"        :return: True if the file was resized, false otherwise."},{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        qemu_info \u003d images.qemu_img_info(path)"},{"line_number":197,"context_line":"        if qemu_info.file_format !\u003d \u0027raw\u0027:"},{"line_number":198,"context_line":"            LOG.info(_LI(\"Can only resize RAW images.\"))"},{"line_number":199,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_0f160e55","line":196,"range":{"start_line":196,"start_character":20,"end_line":196,"end_character":46},"in_reply_to":"9a30ddce_744cbf70","updated":"2017-03-08 17:15:41.000000000","message":"See comment on 53","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        qemu_info \u003d images.qemu_img_info(path)"},{"line_number":197,"context_line":"        if qemu_info.file_format !\u003d \u0027raw\u0027:"},{"line_number":198,"context_line":"            LOG.info(_LI(\"Can only resize RAW images.\"))"},{"line_number":199,"context_line":"            return False"},{"line_number":200,"context_line":"        if size \u003c\u003d qemu_info.virtual_size:"},{"line_number":201,"context_line":"            LOG.info(_LI(\"Cannot shrink file size.\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_5436dbe7","line":198,"range":{"start_line":198,"start_character":0,"end_line":198,"end_character":56},"updated":"2017-03-08 16:16:06.000000000","message":"This feels like it needs to be a warning.  Should include path.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\""},{"line_number":196,"context_line":"        qemu_info \u003d images.qemu_img_info(path)"},{"line_number":197,"context_line":"        if qemu_info.file_format !\u003d \u0027raw\u0027:"},{"line_number":198,"context_line":"            LOG.info(_LI(\"Can only resize RAW images.\"))"},{"line_number":199,"context_line":"            return False"},{"line_number":200,"context_line":"        if size \u003c\u003d qemu_info.virtual_size:"},{"line_number":201,"context_line":"            LOG.info(_LI(\"Cannot shrink file size.\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_74759a96","line":198,"range":{"start_line":198,"start_character":0,"end_line":198,"end_character":56},"in_reply_to":"9a30ddce_5436dbe7","updated":"2017-03-08 18:22:30.000000000","message":"Changed to throw exception instead.\n_create_disk_from_image will catch the exception","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":198,"context_line":"            LOG.info(_LI(\"Can only resize RAW images.\"))"},{"line_number":199,"context_line":"            return False"},{"line_number":200,"context_line":"        if size \u003c\u003d qemu_info.virtual_size:"},{"line_number":201,"context_line":"            LOG.info(_LI(\"Cannot shrink file size.\"))"},{"line_number":202,"context_line":"            return False"},{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            utils.execute(\u0027qemu-img\u0027, \u0027resize\u0027, \u0027-f\u0027, \u0027raw\u0027, path, size)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_74359fd8","line":201,"range":{"start_line":201,"start_character":12,"end_line":201,"end_character":53},"updated":"2017-03-08 16:16:06.000000000","message":"Same.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            # If the vios doesn\u0027t match, just return"},{"line_number":237,"context_line":"            if vios_w.uuid !\u003d self._vios_uuid:"},{"line_number":238,"context_line":"                return None"},{"line_number":239,"context_line":"            LOG.info(_LI(\"Adding file-back disk connection between VM \""},{"line_number":240,"context_line":"                         \"%(vm)s and VIOS %(vios)s.\"),"},{"line_number":241,"context_line":"                     {\u0027vm\u0027: instance.name, \u0027vios\u0027: vios_w.name})"},{"line_number":242,"context_line":"            mapping \u003d tsk_map.build_vscsi_mapping("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_99ffaca9","line":239,"updated":"2017-03-08 16:16:06.000000000","message":"file backed","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            # If the vios doesn\u0027t match, just return"},{"line_number":237,"context_line":"            if vios_w.uuid !\u003d self._vios_uuid:"},{"line_number":238,"context_line":"                return None"},{"line_number":239,"context_line":"            LOG.info(_LI(\"Adding file-back disk connection between VM \""},{"line_number":240,"context_line":"                         \"%(vm)s and VIOS %(vios)s.\"),"},{"line_number":241,"context_line":"                     {\u0027vm\u0027: instance.name, \u0027vios\u0027: vios_w.name})"},{"line_number":242,"context_line":"            mapping \u003d tsk_map.build_vscsi_mapping("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_94784e91","line":239,"in_reply_to":"9a30ddce_99ffaca9","updated":"2017-03-08 18:22:30.000000000","message":"Done","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                     {\u0027vm\u0027: instance.name, \u0027vios\u0027: vios_w.name})"},{"line_number":242,"context_line":"            mapping \u003d tsk_map.build_vscsi_mapping("},{"line_number":243,"context_line":"                self.host_uuid, vios_w, lpar_uuid, disk_info, lua\u003dlua,"},{"line_number":244,"context_line":"                target_name\u003dtarget_name)"},{"line_number":245,"context_line":"            return tsk_map.add_map(vios_w, mapping)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        stg_ftsk.wrapper_tasks[self._vios_uuid].add_functor_subtask(add_func)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_5947f41c","line":244,"range":{"start_line":244,"start_character":39,"end_line":244,"end_character":40},"updated":"2017-03-08 16:16:06.000000000","message":"I thought we needed to specify a handler here.  Something to say QCOW?\n\nUpdate: Maybe this is handled on line 187?","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"60bd2899cbe650857847b7431611982717b55fd7","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                     {\u0027vm\u0027: instance.name, \u0027vios\u0027: vios_w.name})"},{"line_number":242,"context_line":"            mapping \u003d tsk_map.build_vscsi_mapping("},{"line_number":243,"context_line":"                self.host_uuid, vios_w, lpar_uuid, disk_info, lua\u003dlua,"},{"line_number":244,"context_line":"                target_name\u003dtarget_name)"},{"line_number":245,"context_line":"            return tsk_map.add_map(vios_w, mapping)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        stg_ftsk.wrapper_tasks[self._vios_uuid].add_functor_subtask(add_func)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_6b5f7de5","line":244,"range":{"start_line":244,"start_character":39,"end_line":244,"end_character":40},"in_reply_to":"9a30ddce_5947f41c","updated":"2017-03-08 17:15:41.000000000","message":"Correct, line 187 handles this.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        path \u003d self._get_path(vol_name)"},{"line_number":263,"context_line":"        disk_bytes \u003d self._disk_gb_to_bytes(size)"},{"line_number":264,"context_line":"        resized \u003d self._resize_file(path, disk_bytes)"},{"line_number":265,"context_line":"        if not resized:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        disk \u003d pvm_stg.FileIO.bld("},{"line_number":269,"context_line":"            self.adapter, path\u003dpath,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_54cdfb5b","line":266,"range":{"start_line":265,"start_character":0,"end_line":266,"end_character":18},"updated":"2017-03-08 16:16:06.000000000","message":"Doesn\u0027t raise an error?  Should it?  Feels like if it returns that indicates it was fine.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"9c5d82f56f5373840a0311c1014328ff5a48ddce","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        path \u003d self._get_path(vol_name)"},{"line_number":263,"context_line":"        disk_bytes \u003d self._disk_gb_to_bytes(size)"},{"line_number":264,"context_line":"        resized \u003d self._resize_file(path, disk_bytes)"},{"line_number":265,"context_line":"        if not resized:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        disk \u003d pvm_stg.FileIO.bld("},{"line_number":269,"context_line":"            self.adapter, path\u003dpath,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_346402e3","line":266,"range":{"start_line":265,"start_character":0,"end_line":266,"end_character":18},"in_reply_to":"9a30ddce_54cdfb5b","updated":"2017-03-08 18:22:30.000000000","message":"Modified _resize_file to account for this","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"ffe498df90930c6fd61b7fc771e9c2163db1b25e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        if not resized:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        disk \u003d pvm_stg.FileIO.bld("},{"line_number":269,"context_line":"            self.adapter, path\u003dpath,"},{"line_number":270,"context_line":"            backstore_type\u003dpvm_stg.BackStoreType.USER_QCOW)"},{"line_number":271,"context_line":"        # Get mapping before removing to save target_name and lua"},{"line_number":272,"context_line":"        lpar_uuid \u003d vm.get_pvm_uuid(instance)"},{"line_number":273,"context_line":"        vios_w \u003d pvm_vios.VIOS.get(self.adapter, uuid\u003dself._vios_uuid,"},{"line_number":274,"context_line":"                                   xag\u003d[pvm_const.XAG.VIO_SMAP])"},{"line_number":275,"context_line":"        mappings \u003d tsk_map.find_maps(vios_w.scsi_mappings,"},{"line_number":276,"context_line":"                                     client_lpar_id\u003dlpar_uuid, stg_elem\u003ddisk)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # Remap the disk to refresh the size"},{"line_number":279,"context_line":"        for mapping in mappings:"},{"line_number":280,"context_line":"            self.disconnect_image_disk(context, instance)"},{"line_number":281,"context_line":"            target_dev \u003d mapping.target_dev"},{"line_number":282,"context_line":"            self.connect_disk(context, instance, disk, lua\u003dtarget_dev.lua,"},{"line_number":283,"context_line":"                              target_name\u003dtarget_dev.name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_543b3b38","line":283,"range":{"start_line":268,"start_character":0,"end_line":283,"end_character":58},"updated":"2017-03-08 16:16:06.000000000","message":"This doesn\u0027t seem right.  I don\u0027t think we can unmap and remap the disk.  We\u0027d rip it completely out.\n\nI think seroyer has ideas on how we can do this without being so severe.","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":21099,"name":"Taylor Jakobson","email":"tjakobs@us.ibm.com","username":"tjakobs"},"change_message_id":"60bd2899cbe650857847b7431611982717b55fd7","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        if not resized:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        disk \u003d pvm_stg.FileIO.bld("},{"line_number":269,"context_line":"            self.adapter, path\u003dpath,"},{"line_number":270,"context_line":"            backstore_type\u003dpvm_stg.BackStoreType.USER_QCOW)"},{"line_number":271,"context_line":"        # Get mapping before removing to save target_name and lua"},{"line_number":272,"context_line":"        lpar_uuid \u003d vm.get_pvm_uuid(instance)"},{"line_number":273,"context_line":"        vios_w \u003d pvm_vios.VIOS.get(self.adapter, uuid\u003dself._vios_uuid,"},{"line_number":274,"context_line":"                                   xag\u003d[pvm_const.XAG.VIO_SMAP])"},{"line_number":275,"context_line":"        mappings \u003d tsk_map.find_maps(vios_w.scsi_mappings,"},{"line_number":276,"context_line":"                                     client_lpar_id\u003dlpar_uuid, stg_elem\u003ddisk)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # Remap the disk to refresh the size"},{"line_number":279,"context_line":"        for mapping in mappings:"},{"line_number":280,"context_line":"            self.disconnect_image_disk(context, instance)"},{"line_number":281,"context_line":"            target_dev \u003d mapping.target_dev"},{"line_number":282,"context_line":"            self.connect_disk(context, instance, disk, lua\u003dtarget_dev.lua,"},{"line_number":283,"context_line":"                              target_name\u003dtarget_dev.name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_2b5ae54f","line":283,"range":{"start_line":268,"start_character":0,"end_line":283,"end_character":58},"in_reply_to":"9a30ddce_543b3b38","updated":"2017-03-08 17:15:41.000000000","message":"From my understanding of the openstack flow, the ephemeral disk won\u0027t be resized without the VM being powered off. In this case remapping shouldn\u0027t cause any issues.\n\nCould we add a check here to make sure the VM is off?\n\nI think the alternative here is to write directly to configFS","commit_id":"8ef0900ee301e15adada8c804460d854840170a1"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":"from oslo_utils import units"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_17e9bb14","line":15,"updated":"2017-03-08 21:32:17.000000000","message":"(nit) space here for consistency","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"from oslo_log import log as logging"},{"line_number":18,"context_line":"from oslo_utils import units"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_8ab102e4","line":15,"in_reply_to":"9a30ddce_17e9bb14","updated":"2017-03-08 22:28:14.000000000","message":"I think flake8-import-order is now also going to ding you on the groupings.  I believe:\n\n- os needs to stand alone (stdlib)\n- oslo_* need to go down with pypowervm (3rd party)\n- (Not so sure about this one) nova.* also need to go with 3rd party.","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    @property"},{"line_number":91,"context_line":"    def capacity(self):"},{"line_number":92,"context_line":"        \"\"\"Capacity of the storage in gigabytes.\"\"\""},{"line_number":93,"context_line":"        statvfs \u003d os.statvfs(CONF.instances_path)"},{"line_number":94,"context_line":"        total \u003d statvfs.f_frsize * statvfs.f_blocks / float(units.Mi)"},{"line_number":95,"context_line":"        return total"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_174b7bca","line":93,"range":{"start_line":93,"start_character":8,"end_line":93,"end_character":49},"updated":"2017-03-08 21:32:17.000000000","message":"Shouldn\u0027t we be checking this through REST?","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @property"},{"line_number":91,"context_line":"    def capacity(self):"},{"line_number":92,"context_line":"        \"\"\"Capacity of the storage in gigabytes.\"\"\""},{"line_number":93,"context_line":"        statvfs \u003d os.statvfs(CONF.instances_path)"},{"line_number":94,"context_line":"        total \u003d statvfs.f_frsize * statvfs.f_blocks / float(units.Mi)"},{"line_number":95,"context_line":"        return total"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_779f57b4","line":94,"range":{"start_line":92,"start_character":38,"end_line":94,"end_character":69},"updated":"2017-03-08 22:28:14.000000000","message":"Won\u0027t this wind up being in MiB?","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    @property"},{"line_number":98,"context_line":"    def capacity_used(self):"},{"line_number":99,"context_line":"        \"\"\"Capacity of the storage in gigabytes that is used.\"\"\""},{"line_number":100,"context_line":"        statvfs \u003d os.statvfs(CONF.instances_path)"},{"line_number":101,"context_line":"        free \u003d statvfs.f_frsize * statvfs.f_bfree / float(units.Mi)"},{"line_number":102,"context_line":"        return self.capacity - free"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_571333b8","line":100,"range":{"start_line":100,"start_character":0,"end_line":100,"end_character":49},"updated":"2017-03-08 21:32:17.000000000","message":"Shouldn\u0027t we be checking this through REST?","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\""},{"line_number":113,"context_line":"        for storage in storage_elems:"},{"line_number":114,"context_line":"            path \u003d self._get_path(storage.name)"},{"line_number":115,"context_line":"            if os.path.exists(path):"},{"line_number":116,"context_line":"                LOG.info(_LI(\u0027Deleting file-backed disk %(file)s \u0027),"},{"line_number":117,"context_line":"                         {\u0027file\u0027: storage.name}, instance\u003dinstance)"},{"line_number":118,"context_line":"                os.remove(path)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_f7ab47d4","line":115,"range":{"start_line":115,"start_character":12,"end_line":115,"end_character":36},"updated":"2017-03-08 22:28:14.000000000","message":"Should we warn if the path doesn\u0027t exist?","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        # Ensure we have a transaction manager."},{"line_number":140,"context_line":"        if stg_ftsk is None:"},{"line_number":141,"context_line":"            stg_ftsk \u003d pvm_tpar.build_active_vio_feed_task("},{"line_number":142,"context_line":"                self.adapter, name\u003d\u0027fileio\u0027, xag\u003d[pvm_const.XAG.VIO_SMAP])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # Build the match function"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_0a0512bb","line":141,"range":{"start_line":141,"start_character":23,"end_line":141,"end_character":59},"updated":"2017-03-08 22:28:14.000000000","message":"I don\u0027t think this is right.  We want to build this FeedTask for just the NovaLink partition.  Which begs the question: If they pass one in, how do we make sure we\u0027re invoking these operations only for the NovaLink partition?\n\nI suppose perhaps that\u0027s why you\u0027re digging into the specific wrapper_task below.\n\nI don\u0027t like this.  At the very least, we can make this call get the FeedTask for just the NovaLink.  But let\u0027s talk about the other thing too.","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            return tsk_map.remove_maps(vios_w, lpar_uuid,"},{"line_number":152,"context_line":"                                       match_func\u003dmatch_func)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        stg_ftsk.wrapper_tasks[self._vios_uuid].add_functor_subtask(rm_func)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Find the disk directly."},{"line_number":157,"context_line":"        vios_w \u003d stg_ftsk.wrapper_tasks[self._vios_uuid].wrapper"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_f7918753","line":154,"range":{"start_line":154,"start_character":0,"end_line":154,"end_character":76},"updated":"2017-03-08 22:28:14.000000000","message":"Just use\n\n stg_ftsk.add_functor_subtask(add_func)\n\nExplicitly delving into wrapper_tasks[self._vios_uuid] prematurely GETs the VIOS wrapper, which could result in etag mismatch on the first POST, and an unnecessary retry.\n\nHere, it makes less of a difference, because we\u0027re needing to retrieve that wrapper below to pull out the mappings.  But it\u0027s better form.","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        try:"},{"line_number":197,"context_line":"            self._resize_file(path, disk_bytes)"},{"line_number":198,"context_line":"        except nova_exc.ResizeError:"},{"line_number":199,"context_line":"            LOG.warning(_LW(\"Resize failed to complete. Only extending RAW \""},{"line_number":200,"context_line":"                            \"files is supported.\"), instance\u003dinstance)"},{"line_number":201,"context_line":"        return pvm_stg.FileIO.bld("},{"line_number":202,"context_line":"            self.adapter, path\u003dpath,"},{"line_number":203,"context_line":"            backstore_type\u003dpvm_stg.BackStoreType.USER_QCOW)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_1757fbce","line":200,"range":{"start_line":199,"start_character":0,"end_line":200,"end_character":70},"updated":"2017-03-08 21:32:17.000000000","message":"We should probably have a doc for this restriction unless we\u0027re planning for it to go away soon.","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            raise nova_exc.ResizeError(reason\u003d\"Can only resize RAW files.\")"},{"line_number":215,"context_line":"        elif size \u003c qemu_info.virtual_size:"},{"line_number":216,"context_line":"            raise nova_exc.ResizeError(reason\u003d\"Cannot shrink file size.\")"},{"line_number":217,"context_line":"        utils.execute(\u0027qemu-img\u0027, \u0027resize\u0027, \u0027-f\u0027, \u0027raw\u0027, path, size)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def connect_disk(self, context, instance, disk_info, stg_ftsk\u003dNone,"},{"line_number":220,"context_line":"                     lua\u003dNone, target_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_f7f42788","line":217,"range":{"start_line":217,"start_character":67,"end_line":217,"end_character":68},"updated":"2017-03-08 21:32:17.000000000","message":"Also do we have a guaranteed dependency on something pulling in qemu-utils?","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":13883,"name":"Adam Reznechek","email":"adreznec@us.ibm.com","username":"adrez"},"change_message_id":"ca16811ac6e3b6294400f1ecc9c2a1d249404cfb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            raise nova_exc.ResizeError(reason\u003d\"Can only resize RAW files.\")"},{"line_number":215,"context_line":"        elif size \u003c qemu_info.virtual_size:"},{"line_number":216,"context_line":"            raise nova_exc.ResizeError(reason\u003d\"Cannot shrink file size.\")"},{"line_number":217,"context_line":"        utils.execute(\u0027qemu-img\u0027, \u0027resize\u0027, \u0027-f\u0027, \u0027raw\u0027, path, size)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def connect_disk(self, context, instance, disk_info, stg_ftsk\u003dNone,"},{"line_number":220,"context_line":"                     lua\u003dNone, target_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_5705f377","line":217,"range":{"start_line":217,"start_character":8,"end_line":217,"end_character":68},"updated":"2017-03-08 21:32:17.000000000","message":"Calling this directly kind of breaks our convention that REST is drives storage operations (e.g. to support independent IO servers)","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"68050dbee9e2450bb2c7751dd79ba150f59f541a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                target_name\u003dtarget_name)"},{"line_number":257,"context_line":"            return tsk_map.add_map(vios_w, mapping)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        stg_ftsk.wrapper_tasks[self._vios_uuid].add_functor_subtask(add_func)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # Run the transaction manager if built locally."},{"line_number":262,"context_line":"        if stg_ftsk.name \u003d\u003d \u0027fileio\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_d7e803e5","line":259,"range":{"start_line":259,"start_character":8,"end_line":259,"end_character":77},"updated":"2017-03-08 22:28:14.000000000","message":"As above:\n\n stg_ftsk.add_functor_subtask(add_func)\n\nHere it actually matters.","commit_id":"6bf9d7a506d8d4e210d238e037c0800fa2fa89f0"}]}
