)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9d885df1e92f48b1e057340fae073363bfe763b5","unresolved":false,"context_lines":[{"line_number":3881,"context_line":"        \"\"\""},{"line_number":3882,"context_line":"        ephemerals \u003d driver.block_device_info_get_ephemerals(block_device_info)"},{"line_number":3883,"context_line":"        swap \u003d driver.block_device_info_get_swap(block_device_info)"},{"line_number":3884,"context_line":"        reassing_device_names \u003d False"},{"line_number":3885,"context_line":"        if ephemeral_sizes is not None:"},{"line_number":3886,"context_line":"            if not ephemerals and len(ephemeral_sizes) \u003d\u003d 1:"},{"line_number":3887,"context_line":"                bdm \u003d objects.BlockDeviceMapping("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_851dd411","line":3884,"updated":"2016-09-22 12:58:17.000000000","message":"What\u0027s \u0027reassing\u0027 short for, btw? I\u0027ve failed to work it out from context.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"0ced996556291753125914c6fb29218907157b77","unresolved":false,"context_lines":[{"line_number":3881,"context_line":"        \"\"\""},{"line_number":3882,"context_line":"        ephemerals \u003d driver.block_device_info_get_ephemerals(block_device_info)"},{"line_number":3883,"context_line":"        swap \u003d driver.block_device_info_get_swap(block_device_info)"},{"line_number":3884,"context_line":"        reassing_device_names \u003d False"},{"line_number":3885,"context_line":"        if ephemeral_sizes is not None:"},{"line_number":3886,"context_line":"            if not ephemerals and len(ephemeral_sizes) \u003d\u003d 1:"},{"line_number":3887,"context_line":"                bdm \u003d objects.BlockDeviceMapping("}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_745f9b72","line":3884,"in_reply_to":"5a8bc5a2_851dd411","updated":"2016-09-22 14:50:53.000000000","message":"right. it\u0027s raised if set of bdm is changed, so that another name is required.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9d885df1e92f48b1e057340fae073363bfe763b5","unresolved":false,"context_lines":[{"line_number":3893,"context_line":"                reassing_device_names \u003d True"},{"line_number":3894,"context_line":"            elif not ephemeral_sizes and len(ephemerals) \u003d\u003d 1:"},{"line_number":3895,"context_line":"                # TODO(ft): do not use protected members"},{"line_number":3896,"context_line":"                ephemerals[0]._bdm_obj.destroy()"},{"line_number":3897,"context_line":"                reassing_device_names \u003d True"},{"line_number":3898,"context_line":"            elif len(ephemerals) \u003d\u003d len(ephemeral_sizes):"},{"line_number":3899,"context_line":"                for eph, size in zip(ephemerals, ephemeral_sizes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_c0318aee","line":3896,"updated":"2016-09-22 12:58:17.000000000","message":"Hmm. I think you can\u0027t do this, because you can\u0027t revert it. Tricky. You probably need a separate commit action for this, and in the intervening period you might just have to set its size to zero or something.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"0ced996556291753125914c6fb29218907157b77","unresolved":false,"context_lines":[{"line_number":3893,"context_line":"                reassing_device_names \u003d True"},{"line_number":3894,"context_line":"            elif not ephemeral_sizes and len(ephemerals) \u003d\u003d 1:"},{"line_number":3895,"context_line":"                # TODO(ft): do not use protected members"},{"line_number":3896,"context_line":"                ephemerals[0]._bdm_obj.destroy()"},{"line_number":3897,"context_line":"                reassing_device_names \u003d True"},{"line_number":3898,"context_line":"            elif len(ephemerals) \u003d\u003d len(ephemeral_sizes):"},{"line_number":3899,"context_line":"                for eph, size in zip(ephemerals, ephemeral_sizes):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_377ef5e4","line":3896,"in_reply_to":"5a8bc5a2_c0318aee","updated":"2016-09-22 14:50:53.000000000","message":"It may lead us to use half-supported no_device flag, btw.\n\nI do not see a problem with create a new bdm instead of deleted one at revert resize stage. Could you point me at?\n\nHowever you probably right that using zero size (or even no_device) bdm is more fair. I\u0027ll think about it.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9d885df1e92f48b1e057340fae073363bfe763b5","unresolved":false,"context_lines":[{"line_number":3926,"context_line":"        if reassing_device_names:"},{"line_number":3927,"context_line":"            bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":3928,"context_line":"                    context, instance.uuid)"},{"line_number":3929,"context_line":"            self._default_block_device_names(instance, None, bdms)"},{"line_number":3930,"context_line":""},{"line_number":3931,"context_line":"    def _resize_ephemeral_bdms(self, context, instance):"},{"line_number":3932,"context_line":"        \"\"\"Resize ephemeral bdm objects in DB (for instance resizing)."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_604b562c","line":3929,"updated":"2016-09-22 12:58:17.000000000","message":"Why do we want to do this?","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"0ced996556291753125914c6fb29218907157b77","unresolved":false,"context_lines":[{"line_number":3926,"context_line":"        if reassing_device_names:"},{"line_number":3927,"context_line":"            bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":3928,"context_line":"                    context, instance.uuid)"},{"line_number":3929,"context_line":"            self._default_block_device_names(instance, None, bdms)"},{"line_number":3930,"context_line":""},{"line_number":3931,"context_line":"    def _resize_ephemeral_bdms(self, context, instance):"},{"line_number":3932,"context_line":"        \"\"\"Resize ephemeral bdm objects in DB (for instance resizing)."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_aa1d3811","line":3929,"in_reply_to":"5a8bc5a2_604b562c","updated":"2016-09-22 14:50:53.000000000","message":"We need to keep actual device names in DB. See the example:\n\non libvirt compute node an instance has the root disk and a volume attached. root\u0027s name is /dev/vda, the volume name id /dev/vdb. We resize the instance to a flavor with ephemeral space, creating a new disk. This disk will be attached to the instance between the root and the volume. I.e. the ephemeral name will be /dev/vdb, but the volume name will become /dev/vdc. We must store new name into the volume bdm. Moreover we must initialize the ephemeral bdms with its device name.\n\nHere we do this.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9d885df1e92f48b1e057340fae073363bfe763b5","unresolved":false,"context_lines":[{"line_number":3955,"context_line":"        ephemerals \u003d driver.block_device_info_get_ephemerals(block_device_info)"},{"line_number":3956,"context_line":"        ephemeral_sizes \u003d old_ephemeral_sizes \u003d None"},{"line_number":3957,"context_line":"        if (instance.new_flavor.ephemeral_gb !\u003d"},{"line_number":3958,"context_line":"                    instance.old_flavor.ephemeral_gb and"},{"line_number":3959,"context_line":"                sum(e[\u0027size\u0027] for e in ephemerals) \u003d\u003d"},{"line_number":3960,"context_line":"                    instance.old_flavor.ephemeral_gb):"},{"line_number":3961,"context_line":"            old_ephemeral_sizes \u003d list(e[\u0027size\u0027] for e in ephemerals)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_a51d7068","line":3958,"updated":"2016-09-22 12:58:17.000000000","message":"Please see this photo I took of the comment I made before gerrit threw it away: https://goo.gl/photos/UyFUCNLyrQgvgyuC7","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"0ced996556291753125914c6fb29218907157b77","unresolved":false,"context_lines":[{"line_number":3955,"context_line":"        ephemerals \u003d driver.block_device_info_get_ephemerals(block_device_info)"},{"line_number":3956,"context_line":"        ephemeral_sizes \u003d old_ephemeral_sizes \u003d None"},{"line_number":3957,"context_line":"        if (instance.new_flavor.ephemeral_gb !\u003d"},{"line_number":3958,"context_line":"                    instance.old_flavor.ephemeral_gb and"},{"line_number":3959,"context_line":"                sum(e[\u0027size\u0027] for e in ephemerals) \u003d\u003d"},{"line_number":3960,"context_line":"                    instance.old_flavor.ephemeral_gb):"},{"line_number":3961,"context_line":"            old_ephemeral_sizes \u003d list(e[\u0027size\u0027] for e in ephemerals)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_4a9f5403","line":3958,"in_reply_to":"5a8bc5a2_a51d7068","updated":"2016-09-22 14:50:53.000000000","message":"We cannot return from here, because we below handle swap resizing. But i could improve this with:\n\n ephemeral_space_resized \u003d ...\n all_ephemeral_space_allocated \u003d ...\n if (ephemeral_space_resized and all_ephemeral_space_allocated):\n\nWhould it be more readable?","commit_id":"907490e8de58af1d2c70799ef512c03028021605"}],"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9d885df1e92f48b1e057340fae073363bfe763b5","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        :filename: Name of the file in the image directory"},{"line_number":201,"context_line":"        :size: Size of created image in bytes (optional)"},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        filename \u003d self._get_original_template_name() or filename"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        @utils.synchronized(filename, external\u003dTrue, lock_path\u003dself.lock_path)"},{"line_number":206,"context_line":"        def fetch_func_sync(target, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_20feae6b","line":203,"updated":"2016-09-22 12:58:17.000000000","message":"Wouldn\u0027t surprise me to discover that this fixes a couple of edge cases nobody\u0027s complained about, yet.\n\nI hate this, but yeah.","commit_id":"907490e8de58af1d2c70799ef512c03028021605"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"0ced996556291753125914c6fb29218907157b77","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        :filename: Name of the file in the image directory"},{"line_number":201,"context_line":"        :size: Size of created image in bytes (optional)"},{"line_number":202,"context_line":"        \"\"\""},{"line_number":203,"context_line":"        filename \u003d self._get_original_template_name() or filename"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        @utils.synchronized(filename, external\u003dTrue, lock_path\u003dself.lock_path)"},{"line_number":206,"context_line":"        def fetch_func_sync(target, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_adff1233","line":203,"in_reply_to":"5a8bc5a2_20feae6b","updated":"2016-09-22 14:50:53.000000000","message":"It should probably be a template builder object, incapsulating all work with cache directory, including this filename generation and usage, having a filename property (to get it after a method like \u0027ensure template is ready\u0027 is called).","commit_id":"907490e8de58af1d2c70799ef512c03028021605"}]}
