)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29f68f80ccb966cb47a8a05819f22f0e40b36632","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, when boot from volume, the block device allocate may timeout"},{"line_number":10,"context_line":", then the VM will set ERROR, but volume would be available later. And"},{"line_number":11,"context_line":"the volume won\u0027t be deleted automatically by deleting the VM. Actually,"},{"line_number":12,"context_line":"the volume is useless and should be removed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":15,"context_line":"timeout."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7ad32947_5951e761","line":12,"updated":"2015-04-27 14:05:05.000000000","message":"Why is the volume useless?  It\u0027s still persistent data.\n\nMaybe I have instance A using the volume, then something goes wrong with instance A and I need to delete it but I want to re-use the volume, so I boot instance B from the volume.  That times out for whatever reason, maybe the system is overloaded, that doesn\u0027t mean I want to delete the volume that has my data, maybe I will just retry to boot instance (C) from the same volume.\n\nThis seems like a very risky assumption that could lead to data loss.  There is also the volume multi-attach feature in cinder, can the volume be attached to another instance X while trying to boot an instance against it?","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when boot instance from block device, user can choose three"},{"line_number":10,"context_line":"kinds of sources: (blank, snapshot or image), and compute manager will"},{"line_number":11,"context_line":"create an volume from one of them. But the volume may create failed or"},{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_f371c5e1","line":11,"updated":"2015-06-05 11:56:53.000000000","message":"s/an/a/ \n\ns/volume may create failed/volume creation may fail/","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when boot instance from block device, user can choose three"},{"line_number":10,"context_line":"kinds of sources: (blank, snapshot or image), and compute manager will"},{"line_number":11,"context_line":"create an volume from one of them. But the volume may create failed or"},{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_87936bfa","line":11,"in_reply_to":"3afb71cf_f371c5e1","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, when boot instance from block device, user can choose three"},{"line_number":10,"context_line":"kinds of sources: (blank, snapshot or image), and compute manager will"},{"line_number":11,"context_line":"create an volume from one of them. But the volume may create failed or"},{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_7355d51b","line":12,"updated":"2015-06-05 11:56:53.000000000","message":"s/boot will be failed/boot will fail/","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, when boot instance from block device, user can choose three"},{"line_number":10,"context_line":"kinds of sources: (blank, snapshot or image), and compute manager will"},{"line_number":11,"context_line":"create an volume from one of them. But the volume may create failed or"},{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_a78667b7","line":12,"in_reply_to":"3afb71cf_7355d51b","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_b3222db8","line":15,"updated":"2015-06-05 11:56:53.000000000","message":"I would rephrase the above like so:\n\n During cleanup, the failed volume cannot be deleted, and becomes\n unusable.","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":12,"context_line":"timeout at this time, then the process of instance boot will be failed."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_c78963cc","line":15,"in_reply_to":"3afb71cf_b3222db8","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1447884"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_331d1d74","line":17,"updated":"2015-06-05 11:56:53.000000000","message":"s/remove/removes/","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This result in the cleanup of instance won\u0027t cleanup the corresponding"},{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1447884"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_07b65b8a","line":17,"in_reply_to":"3afb71cf_331d1d74","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1447884"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_13122163","line":18,"updated":"2015-06-05 11:56:53.000000000","message":"s/failed or timeout/fails or times out/","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":15,"context_line":"volume, and the volume is useless at that moment."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch remove the corresponding volume when block device allocation"},{"line_number":18,"context_line":"failed or timeout."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-Bug: #1447884"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_27c157e5","line":18,"in_reply_to":"3afb71cf_13122163","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29f68f80ccb966cb47a8a05819f22f0e40b36632","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"    def _get_instance_nw_info(self, context, instance):"},{"line_number":1365,"context_line":"        \"\"\"Get a list of dictionaries of network data of an instance.\"\"\""},{"line_number":1366,"context_line":"        return self.network_api.get_instance_nw_info(context, instance)"},{"line_number":1367,"context_line":""},{"line_number":1368,"context_line":"    def _await_block_device_map_created(self, context, vol_id):"},{"line_number":1369,"context_line":"        # TODO(yamahata): creating volume simultaneously"},{"line_number":1370,"context_line":"        #                 reduces creation time?"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_56ce545b","line":1367,"updated":"2015-04-27 14:05:05.000000000","message":"This is also called in unshelve and rebuild operations, are we sure that we want to delete the volume in those cases?  Would we even get into a situation where the volume status is not available in those operations?  For example, what if I booted from an image, then attached a volume and did a rebuild or shelve/unshelve?","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"2e43cc853a60ae609809b2b2ff55ed94f1a84ea4","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_1a96a14c","line":1391,"updated":"2015-04-28 08:46:49.000000000","message":"Done, thanks all for your time.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"43e057740f5b703974c3d7a62b5b9304d7905f5b","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_bce6a9e6","line":1391,"updated":"2015-04-27 14:16:50.000000000","message":"For a separate patch, but we should have the current volume_status in here before we exit - that would help with debugging.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"be3fcc4e0c8ccbc624ab748991d782d24572f5ea","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_5fce675b","line":1391,"in_reply_to":"7ad32947_9cec0d91","updated":"2015-04-27 14:36:28.000000000","message":"By the way, this change doesn\u0027t actually fix your bug because this code is returning before your volume_api.delete call is made.  From your bug report you hit this:\n\n\"2015-03-30 23:22:46.920 6445 WARNING nova.compute.manager [-] Volume id: 551ea616-e1c4-4ef2-9bf3-b0ca6d4474dc finished being created but was not set as \u0027available\u0027\"\n\nSo you\u0027re exiting this method before even getting to your volume_api.delete call below.\n\nLike I said above, I\u0027m not sure why we\u0027re not just failing when we timeout here since we just fail later trying to attach the volume that\u0027s not available yet and Cinder rejects the request.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"045e335e459a7e0b0bb4926a234b1eb24647f0eb","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_bf9e9b05","line":1391,"in_reply_to":"7ad32947_9cec0d91","updated":"2015-04-27 14:43:05.000000000","message":"It does seem that a failing here and just getting out would be good.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"700b264df69f61b01906f9ccd9024a0bcd762731","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_9354f354","line":1391,"in_reply_to":"7ad32947_9cec0d91","updated":"2015-04-27 17:05:14.000000000","message":"agree , we should fail here , otherwise the \noperation after this will check the status and fail right way as \nbug reported","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ca7d3b1b577005cc4ff1f06624cbc352edfb539a","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %s finished being created but \""},{"line_number":1391,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1392,"context_line":"                return attempt"},{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_9cec0d91","line":1391,"in_reply_to":"7ad32947_bce6a9e6","updated":"2015-04-27 14:20:45.000000000","message":"Actually, why don\u0027t we just fail here?  From the bug report it looks like we get down into the block device attach code where it tries to attach the volume to the instance and cinder pukes because the volume status is not \u0027available\u0027, but we already know that here.  Then later after we\u0027ve waited long enough, the volume status is \u0027available\u0027 but as noted we don\u0027t need it since the instance is already in ERROR status at that point.\n\nIt seems odd that we wouldn\u0027t just fail right here....","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"2e43cc853a60ae609809b2b2ff55ed94f1a84ea4","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"},{"line_number":1395,"context_line":"        try:"},{"line_number":1396,"context_line":"            self.volume_api.delete(context, vol_id)"},{"line_number":1397,"context_line":"        except Exception as exc:"},{"line_number":1398,"context_line":"            LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":1399,"context_line":"                         \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_ba9c4d6a","line":1396,"updated":"2015-04-28 08:46:49.000000000","message":"Done, thanks all for your time.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b32b353442b0b25ce6fb63aa4a8376c95eeafc61","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"},{"line_number":1395,"context_line":"        try:"},{"line_number":1396,"context_line":"            self.volume_api.delete(context, vol_id)"},{"line_number":1397,"context_line":"        except Exception as exc:"},{"line_number":1398,"context_line":"            LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":1399,"context_line":"                         \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_7f72437e","line":1396,"updated":"2015-04-27 14:32:34.000000000","message":"Looking into this more, this wait method is only used for blank, snapshot and image block devices, not volumes (you bring your own for those).\n\nSo I think this kind of logic should actually be down in the nova.virt.block_device code where it\u0027s doing the volume_api.create calls and then if wait_func (this) fails, that code decides what to do with it (cleanup the volume it was trying to create).\n\nGranted, this would be more centralized so we wouldn\u0027t have to copy that cleanup code in those 3 block device implementations...but this is very tightly coupled with the implementation of those block devices down in the virt layer, which is kind of sad.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"045e335e459a7e0b0bb4926a234b1eb24647f0eb","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"},{"line_number":1395,"context_line":"        try:"},{"line_number":1396,"context_line":"            self.volume_api.delete(context, vol_id)"},{"line_number":1397,"context_line":"        except Exception as exc:"},{"line_number":1398,"context_line":"            LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":1399,"context_line":"                         \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_ff62d315","line":1396,"in_reply_to":"7ad32947_7f72437e","updated":"2015-04-27 14:43:05.000000000","message":"I\u0027m not at all clear here on why we would let Nova delete the Cinder resource at all?  This could be really unexpected/bad I think for an end user that created said resources in Cinder, brought them to Nova.... something goes wrong and \"boom\" their data is gone.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"39350855779c929502e1a301cdf0efd9d9f41d54","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"},{"line_number":1395,"context_line":"        try:"},{"line_number":1396,"context_line":"            self.volume_api.delete(context, vol_id)"},{"line_number":1397,"context_line":"        except Exception as exc:"},{"line_number":1398,"context_line":"            LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":1399,"context_line":"                         \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_2a7487fb","line":1396,"in_reply_to":"7ad32947_ff62d315","updated":"2015-04-27 14:57:36.000000000","message":"Matt pointed out to me that the idea here is to only do this with the resources created by nova in block_device layer.  Makes sense, but seems like pushing this up to the manager makes it pretty easy to make a mistake and delete something we shouldn\u0027t.\n\nMatt\u0027s idea of localizing all of this in the block_dev layer makes sense, would like to see that avenue explored I think.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0987c5b4300aadbd7b18cb0a25e76660c3d1a545","unresolved":false,"context_lines":[{"line_number":1393,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1394,"context_line":"        # NOTE(lan): Remove the useless volume"},{"line_number":1395,"context_line":"        try:"},{"line_number":1396,"context_line":"            self.volume_api.delete(context, vol_id)"},{"line_number":1397,"context_line":"        except Exception as exc:"},{"line_number":1398,"context_line":"            LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":1399,"context_line":"                         \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_0abaebe1","line":1396,"in_reply_to":"7ad32947_ff62d315","updated":"2015-04-27 14:52:40.000000000","message":"Yeah that\u0027s what I was confused about originally, this method is actually only used for blank/snapshot/image bdm\u0027s, not \"volume\" BDMs that pre-exist prior to the boot request.  They are created down in nova.virt.block_device:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n318\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n340\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/block_device.py#n363\n\nBy default you get 3 minutes for this to work (60 loops with a 3 second sleep in between each loop).\n\nWe really need the commit message updated to clarify how this is being used and the coupling going on with the nova.virt.block_device code, which is sort of why I was saying I\u0027d like the virt layer code to handle the volume delete rather than the compute manager.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"033ad3c8906ad1696874d25acfefea373f99a9cc","unresolved":false,"context_lines":[{"line_number":1959,"context_line":"                        self.driver, do_check_attach\u003ddo_check_attach) +"},{"line_number":1960,"context_line":"                    driver_block_device.attach_block_devices("},{"line_number":1961,"context_line":"                        driver_block_device.convert_snapshots(bdms),"},{"line_number":1962,"context_line":"                        context, instance, self.volume_api,"},{"line_number":1963,"context_line":"                        self.driver, self._await_block_device_map_created,"},{"line_number":1964,"context_line":"                        do_check_attach\u003ddo_check_attach) +"},{"line_number":1965,"context_line":"                    driver_block_device.attach_block_devices("}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad32947_8af83b7e","line":1962,"updated":"2015-04-27 14:55:04.000000000","message":"Note to reviewers, _await_block_device_map_created is only called here and it\u0027s passed in as the wait_func for the snapshot/image/blank bdm attach methods - which also doing the volume_api.create call.","commit_id":"21319360b20ba94eaa29041065efc4f5f760bfe4"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"86b7a7a327dd9225fc7a976470ab04ef8f14119f","unresolved":false,"context_lines":[{"line_number":1386,"context_line":"            volume \u003d self.volume_api.get(context, vol_id)"},{"line_number":1387,"context_line":"            volume_status \u003d volume[\u0027status\u0027]"},{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %(vol_id)s finished being \""},{"line_number":1391,"context_line":"                                    \"created but was not set as \u0027available\u0027, \""},{"line_number":1392,"context_line":"                                    \"actual status is %(vol_status)s.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_1cff9268","line":1389,"updated":"2015-05-01 13:08:24.000000000","message":"nit: IMO it\u0027s clearer to put:\n\n    if volume_status \u003d\u003d \u0027available\u0027:\n        return attempt  # success!\n    LOG.warning(...)\n    attempts \u003d attempt\n    break","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"a550d67ace2b22b3ea3ce699459c9fd9acc03f73","unresolved":false,"context_lines":[{"line_number":1386,"context_line":"            volume \u003d self.volume_api.get(context, vol_id)"},{"line_number":1387,"context_line":"            volume_status \u003d volume[\u0027status\u0027]"},{"line_number":1388,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1389,"context_line":"                if volume_status !\u003d \u0027available\u0027:"},{"line_number":1390,"context_line":"                    LOG.warning(_LW(\"Volume id: %(vol_id)s finished being \""},{"line_number":1391,"context_line":"                                    \"created but was not set as \u0027available\u0027, \""},{"line_number":1392,"context_line":"                                    \"actual status is %(vol_status)s.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_aa0954df","line":1389,"in_reply_to":"3acd31a7_1cff9268","updated":"2015-05-04 04:57:13.000000000","message":"Done","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"76210d1804f845203032f549757c141f04f09526","unresolved":false,"context_lines":[{"line_number":1402,"context_line":"        if retries \u003e\u003d 1:"},{"line_number":1403,"context_line":"            attempts \u003d retries + 1"},{"line_number":1404,"context_line":"        for attempt in range(1, attempts + 1):"},{"line_number":1405,"context_line":"            volume \u003d self.volume_api.get(context, vol_id)"},{"line_number":1406,"context_line":"            volume_status \u003d volume[\u0027status\u0027]"},{"line_number":1407,"context_line":"            if volume_status not in [\u0027creating\u0027, \u0027downloading\u0027]:"},{"line_number":1408,"context_line":"                if volume_status \u003d\u003d \u0027available\u0027:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_0a976291","line":1405,"updated":"2015-05-06 21:38:18.000000000","message":"This is probably a separate bug - but reading this code made me realize that if this raises an exception (a network issue) we would just bail and never wait on the volume to be created even though it actually might.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3d220e3eaaf794b3392fc3b07f2757a406c98c68","unresolved":false,"context_lines":[{"line_number":1409,"context_line":"                    return attempt"},{"line_number":1410,"context_line":"                LOG.warning(_LW(\"Volume id: %(vol_id)s finished being \""},{"line_number":1411,"context_line":"                                \"created but was not set as \u0027available\u0027, \""},{"line_number":1412,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1413,"context_line":"                               {\u0027vol_id\u0027: vol_id,"},{"line_number":1414,"context_line":"                               \u0027vol_status\u0027: volume_status})"},{"line_number":1415,"context_line":"                attempts \u003d attempt"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_520c9aec","line":1412,"range":{"start_line":1412,"start_character":33,"end_line":1412,"end_character":65},"updated":"2015-05-08 20:38:43.000000000","message":"Excellent addition.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"                                \"created but was not set as \u0027available\u0027, \""},{"line_number":1412,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1413,"context_line":"                               {\u0027vol_id\u0027: vol_id,"},{"line_number":1414,"context_line":"                               \u0027vol_status\u0027: volume_status})"},{"line_number":1415,"context_line":"                attempts \u003d attempt"},{"line_number":1416,"context_line":"                break"},{"line_number":1417,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_12c58a5a","line":1414,"updated":"2015-05-09 21:54:34.000000000","message":"nit: alignment is off here","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"                                \"created but was not set as \u0027available\u0027, \""},{"line_number":1412,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1413,"context_line":"                               {\u0027vol_id\u0027: vol_id,"},{"line_number":1414,"context_line":"                               \u0027vol_status\u0027: volume_status})"},{"line_number":1415,"context_line":"                attempts \u003d attempt"},{"line_number":1416,"context_line":"                break"},{"line_number":1417,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_ec3a22e7","line":1414,"in_reply_to":"9af37de9_12c58a5a","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3d220e3eaaf794b3392fc3b07f2757a406c98c68","unresolved":false,"context_lines":[{"line_number":1412,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1413,"context_line":"                               {\u0027vol_id\u0027: vol_id,"},{"line_number":1414,"context_line":"                               \u0027vol_status\u0027: volume_status})"},{"line_number":1415,"context_line":"                attempts \u003d attempt"},{"line_number":1416,"context_line":"                break"},{"line_number":1417,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1418,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_f2a5e6a1","line":1415,"updated":"2015-05-08 20:38:43.000000000","message":"Rather than doing this why not just pass attempts\u003dattempt below?","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":1412,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1413,"context_line":"                               {\u0027vol_id\u0027: vol_id,"},{"line_number":1414,"context_line":"                               \u0027vol_status\u0027: volume_status})"},{"line_number":1415,"context_line":"                attempts \u003d attempt"},{"line_number":1416,"context_line":"                break"},{"line_number":1417,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1418,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_cc3f5ed5","line":1415,"in_reply_to":"1aca2d91_f2a5e6a1","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":8574,"name":"Qin Zhao","username":"zhaoqin","inactive":true},"change_message_id":"d003e63f4e95963e16a02b5ebe16b3cf4c943c9d","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"                                \"created but was not set as \u0027available\u0027, \""},{"line_number":1402,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1403,"context_line":"                            {\u0027vol_id\u0027: vol_id,"},{"line_number":1404,"context_line":"                             \u0027vol_status\u0027: volume_status})"},{"line_number":1405,"context_line":"                break"},{"line_number":1406,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1407,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a0c5dc1_e152f7dc","line":1404,"updated":"2015-05-13 05:28:37.000000000","message":"I feel this log message with actual volume status value is very helpful, but the sentence seems to be a little wordy. I will write \"Volume id: %(vol_id)s finished being created but its status is %(vol_status)s.\"","commit_id":"7fcc553e9ba668ae0f5e28ca5d12d29a1d24881e"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"0977703d402f51446fe4452660e003061b44ac60","unresolved":false,"context_lines":[{"line_number":1401,"context_line":"                                \"created but was not set as \u0027available\u0027, \""},{"line_number":1402,"context_line":"                                \"actual status is %(vol_status)s.\"),"},{"line_number":1403,"context_line":"                            {\u0027vol_id\u0027: vol_id,"},{"line_number":1404,"context_line":"                             \u0027vol_status\u0027: volume_status})"},{"line_number":1405,"context_line":"                break"},{"line_number":1406,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1407,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a0c5dc1_083f68b5","line":1404,"in_reply_to":"9a0c5dc1_e152f7dc","updated":"2015-05-13 08:47:01.000000000","message":"Done","commit_id":"7fcc553e9ba668ae0f5e28ca5d12d29a1d24881e"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4e7777be2543c3f5543bf64d9b60894de390628a","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1382,"context_line":"                return attempt"},{"line_number":1383,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1384,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"},{"line_number":1385,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1386,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1387,"context_line":"                                         attempts\u003dattempts)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_8f062f84","side":"PARENT","line":1384,"updated":"2015-06-01 08:20:52.000000000","message":"This whole note can probably be removed - We are making confusion between a NOTE on something \"strange\" and documenting the code.","commit_id":"11f49af663ba5608a519d14bad5b872503da3427"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"67144b7975137867a6d306f175a826ae658c4fef","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1382,"context_line":"                return attempt"},{"line_number":1383,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1384,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"},{"line_number":1385,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1386,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1387,"context_line":"                                         attempts\u003dattempts)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_de1c3215","side":"PARENT","line":1384,"in_reply_to":"5afe65bd_859d5e5b","updated":"2015-06-04 02:19:59.000000000","message":"Done","commit_id":"11f49af663ba5608a519d14bad5b872503da3427"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"60deb5d57e194c4e5d60972ba1471445004f6458","unresolved":false,"context_lines":[{"line_number":1381,"context_line":"                                    \"was not set as \u0027available\u0027\"), vol_id)"},{"line_number":1382,"context_line":"                return attempt"},{"line_number":1383,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1384,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"},{"line_number":1385,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1386,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1387,"context_line":"                                         attempts\u003dattempts)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_859d5e5b","side":"PARENT","line":1384,"in_reply_to":"7a016987_8f062f84","updated":"2015-06-03 16:26:27.000000000","message":"agreed","commit_id":"11f49af663ba5608a519d14bad5b872503da3427"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"60deb5d57e194c4e5d60972ba1471445004f6458","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"                                \"created but its status is %(vol_status)s.\"),"},{"line_number":1383,"context_line":"                            {\u0027vol_id\u0027: vol_id,"},{"line_number":1384,"context_line":"                             \u0027vol_status\u0027: volume_status})"},{"line_number":1385,"context_line":"                break"},{"line_number":1386,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1387,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"},{"line_number":1388,"context_line":"        # or volume create failed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_e683f854","line":1385,"updated":"2015-06-03 16:26:27.000000000","message":"So this changes the behaviour in such a way that this would fail even if the create was succesfull (due to a race with another attach for example).\n\nThis is surely not what we want to do here - here we fail if and only if we don\u0027t succeed to create it.","commit_id":"b342d82c4f2f57903d27b5c3d848d141b333f5b1"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"67144b7975137867a6d306f175a826ae658c4fef","unresolved":false,"context_lines":[{"line_number":1382,"context_line":"                                \"created but its status is %(vol_status)s.\"),"},{"line_number":1383,"context_line":"                            {\u0027vol_id\u0027: vol_id,"},{"line_number":1384,"context_line":"                             \u0027vol_status\u0027: volume_status})"},{"line_number":1385,"context_line":"                break"},{"line_number":1386,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1387,"context_line":"        # NOTE(harlowja): Should only happen if we ran out of attempts"},{"line_number":1388,"context_line":"        # or volume create failed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_fe96ce4a","line":1385,"in_reply_to":"5afe65bd_e683f854","updated":"2015-06-04 02:19:59.000000000","message":"Actually, this won\u0027t change the behaviour.\nIf volume_status not in one of \"creating\", \"downloading\" and \"available\", it should be failed.\n\nAnd we fail here only if  volume create failed or exit max attempts.","commit_id":"b342d82c4f2f57903d27b5c3d848d141b333f5b1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58f5c224756a0170952087fd6ed767a2fefbfd04","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1397,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1398,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1399,"context_line":"                                         attempts\u003dattempt)"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def _decode_files(self, injected_files):"},{"line_number":1402,"context_line":"        \"\"\"Base64 decode the list of files to inject.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_e87c2422","line":1399,"updated":"2015-06-05 18:33:19.000000000","message":"This is slightly confusing now, since we log a warning that it was created, but just not with the status that we wanted.  We aren\u0027t passing in \u0027attempts\u0027 anymore so the message here is a bit off now:\n\nclass VolumeNotCreated(NovaException):\n    msg_fmt \u003d _(\"Volume %(volume_id)s did not finish being created\"\n                \" even after we waited %(seconds)s seconds or %(attempts)s\"\n                \" attempts.\")\n\nBecause that could look like we didn\u0027t wait the full CONF.block_device_allocate_retries time.\n\nMaybe doesn\u0027t matter...","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"4923d90a2801fa4ae7eef4fbb2aff470a7b9b86c","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1397,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1398,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1399,"context_line":"                                         attempts\u003dattempt)"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def _decode_files(self, injected_files):"},{"line_number":1402,"context_line":"        \"\"\"Base64 decode the list of files to inject.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_747362b2","line":1399,"in_reply_to":"3afb71cf_a8774c01","updated":"2015-06-06 02:10:38.000000000","message":"Done","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf32b8080788fc39ce7cd8aac0efe770c594433f","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"            greenthread.sleep(CONF.block_device_allocate_retries_interval)"},{"line_number":1397,"context_line":"        raise exception.VolumeNotCreated(volume_id\u003dvol_id,"},{"line_number":1398,"context_line":"                                         seconds\u003dint(time.time() - start),"},{"line_number":1399,"context_line":"                                         attempts\u003dattempt)"},{"line_number":1400,"context_line":""},{"line_number":1401,"context_line":"    def _decode_files(self, injected_files):"},{"line_number":1402,"context_line":"        \"\"\"Base64 decode the list of files to inject.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_a8774c01","line":1399,"in_reply_to":"3afb71cf_e87c2422","updated":"2015-06-05 18:34:04.000000000","message":"Maybe we should put the volume_status in the VolumeNotCreated exception message?","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fe11117ccdb35742bffd4c5c3ec89b5ae275eb29","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                          self.context, \u00271\u0027)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    def test_await_block_device_created_failed(self):"},{"line_number":496,"context_line":"        c \u003d self.compute"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        def fail_get(context, vol_id):"},{"line_number":499,"context_line":"            return {"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_1c9884bf","line":496,"updated":"2015-05-04 16:17:51.000000000","message":"I think we can remove this local var","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"c0b93cdb1fd18867ae3337df949338cadd9ae50b","unresolved":false,"context_lines":[{"line_number":493,"context_line":"                          self.context, \u00271\u0027)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"    def test_await_block_device_created_failed(self):"},{"line_number":496,"context_line":"        c \u003d self.compute"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"        def fail_get(context, vol_id):"},{"line_number":499,"context_line":"            return {"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_6ee450e0","line":496,"in_reply_to":"3acd31a7_1c9884bf","updated":"2015-05-05 02:16:26.000000000","message":"Just want to keep the same as the other test cases like line 509.\nAnd this local var was used at line 504.","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fe11117ccdb35742bffd4c5c3ec89b5ae275eb29","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        self.stubs.Set(c.volume_api, \u0027get\u0027, fail_get)"},{"line_number":505,"context_line":"        self.assertRaises(exception.VolumeNotCreated,"},{"line_number":506,"context_line":"            self.compute._await_block_device_map_created,"},{"line_number":507,"context_line":"            self.context, \u00271\u0027)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def test_await_block_device_created_slow(self):"},{"line_number":510,"context_line":"        c \u003d self.compute"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_fc92689e","line":507,"updated":"2015-05-04 16:17:51.000000000","message":"nit: use mock if you can , not a big deal","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"c0b93cdb1fd18867ae3337df949338cadd9ae50b","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        self.stubs.Set(c.volume_api, \u0027get\u0027, fail_get)"},{"line_number":505,"context_line":"        self.assertRaises(exception.VolumeNotCreated,"},{"line_number":506,"context_line":"            self.compute._await_block_device_map_created,"},{"line_number":507,"context_line":"            self.context, \u00271\u0027)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def test_await_block_device_created_slow(self):"},{"line_number":510,"context_line":"        c \u003d self.compute"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_4efcf471","line":507,"in_reply_to":"3acd31a7_fc92689e","updated":"2015-05-05 02:16:26.000000000","message":"Just refer the other test cases like line 493 :)","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                \u0027id\u0027: \u0027blah\u0027,"},{"line_number":502,"context_line":"            }"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"        self.stubs.Set(c.volume_api, \u0027get\u0027, fail_get)"},{"line_number":505,"context_line":"        self.assertRaises(exception.VolumeNotCreated,"},{"line_number":506,"context_line":"            c._await_block_device_map_created,"},{"line_number":507,"context_line":"            self.context, \u00271\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_7295f63e","line":504,"updated":"2015-05-09 21:54:34.000000000","message":"I think someone pointed this out earlier, but new tests should be written using mock.  It should be easy enough to create a mock object for c.volume_api.get with side_effect\u003dfail_get, I think you can do this:\n\nwith mock.patch.object(c.volume_api, \u0027get\u0027, side_effect\u003dfail_get):\n    self.assertRaises(...)","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                \u0027id\u0027: \u0027blah\u0027,"},{"line_number":502,"context_line":"            }"},{"line_number":503,"context_line":""},{"line_number":504,"context_line":"        self.stubs.Set(c.volume_api, \u0027get\u0027, fail_get)"},{"line_number":505,"context_line":"        self.assertRaises(exception.VolumeNotCreated,"},{"line_number":506,"context_line":"            c._await_block_device_map_created,"},{"line_number":507,"context_line":"            self.context, \u00271\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_02040f13","line":504,"in_reply_to":"9af37de9_7295f63e","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"52befd5278fae4e080ea3474adf2afa09b3f0862","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                \u0027id\u0027: \u0027blah\u0027,"},{"line_number":462,"context_line":"            }"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        with mock.patch.object(c.volume_api, \u0027get\u0027, side_effect\u003dfail_get):"},{"line_number":465,"context_line":"            self.assertRaises(exception.VolumeNotCreated,"},{"line_number":466,"context_line":"                c._await_block_device_map_created,"},{"line_number":467,"context_line":"                self.context, \u00271\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_a9ec95f3","line":464,"updated":"2015-06-04 09:44:53.000000000","message":"I don\u0027t think you need \u0027side_effect\u0027 and define a new function \u0027fail_get\u0027, \u0027return_value\u0027 is more readable, and checking mock.assert_called_once_with make sense for this case.","commit_id":"8cb1eddbb09bf6c06b0d3fe1fc740120bebe1241"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"7167032eea9f576d6efb084de52cd63b1c4dc076","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                \u0027id\u0027: \u0027blah\u0027,"},{"line_number":462,"context_line":"            }"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"        with mock.patch.object(c.volume_api, \u0027get\u0027, side_effect\u003dfail_get):"},{"line_number":465,"context_line":"            self.assertRaises(exception.VolumeNotCreated,"},{"line_number":466,"context_line":"                c._await_block_device_map_created,"},{"line_number":467,"context_line":"                self.context, \u00271\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_8f4f996a","line":464,"in_reply_to":"5afe65bd_a9ec95f3","updated":"2015-06-04 10:01:49.000000000","message":"Done","commit_id":"8cb1eddbb09bf6c06b0d3fe1fc740120bebe1241"}],"nova/tests/unit/virt/test_block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":640,"context_line":"                        self.virt_driver, wait_func)"},{"line_number":641,"context_line":"        self.assertEqual(test_bdm.volume_id, \u0027fake-volume-id-2\u0027)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def test_image_attach_fail_volume(self):"},{"line_number":644,"context_line":"        fail_volume_image \u003d self.image_bdm.copy()"},{"line_number":645,"context_line":"        fail_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":646,"context_line":"        test_bdm \u003d self.driver_classes[\u0027image\u0027](fail_volume_image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_727cd620","line":643,"updated":"2015-05-09 21:54:34.000000000","message":"Can\u0027t we create a private common test method that these 3 different types can re-use, most of this test code is duplicated in the 3 new tests.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":640,"context_line":"                        self.virt_driver, wait_func)"},{"line_number":641,"context_line":"        self.assertEqual(test_bdm.volume_id, \u0027fake-volume-id-2\u0027)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def test_image_attach_fail_volume(self):"},{"line_number":644,"context_line":"        fail_volume_image \u003d self.image_bdm.copy()"},{"line_number":645,"context_line":"        fail_volume_image[\u0027volume_id\u0027] \u003d None"},{"line_number":646,"context_line":"        test_bdm \u003d self.driver_classes[\u0027image\u0027](fail_volume_image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_425fb70e","line":643,"in_reply_to":"9af37de9_727cd620","updated":"2015-05-11 06:54:07.000000000","message":"I was trying to create a private common test method, but seems not that easy, these 3 tests have different logic, may need several \"if ...elif..\" in common test method, may hard to read.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"43b30f4db5bf12c2e5cf046c269b19ce1ed94454","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                              wait_func\u003dwait_func,"},{"line_number":363,"context_line":"                              volume_api\u003dself.volume_api,"},{"line_number":364,"context_line":"                              volume_id\u003d\u0027fake-id\u0027)"},{"line_number":365,"context_line":"            self.assertFalse(vol_delete.called)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _test_volume_attach(self, driver_bdm, bdm_dict,"},{"line_number":368,"context_line":"                            fake_volume, check_attach\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_b6c1fb82","line":365,"updated":"2015-06-05 11:56:53.000000000","message":"Please remove the duplication in the above tests. You could do something like this:\n\n def _test_call_wait_func(self, delete_on_termination):\n     test_bdm \u003d self.driver_classes[\u0027volume\u0027](self.volume_bdm)\n     test_bdm[\u0027delete_on_termination\u0027] \u003d delete_on_termination\n     with mock.patch.object(self.volume_api, \u0027delete\u0027) as vol_delete:\n         wait_func \u003d mock.MagicMock()\n         mock_exception \u003d exception.VolumeNotCreated(volume_id\u003d\u0027fake-id\u0027\n                                                         seconds\u003d1,\n                                                         attempts\u003d1)\n         wait_func.return_value \u003d mock_exception\n         self.assertRaises(exception.VolumeNotCreated,\n                               test_bdm._call_wait_func,\n                               context\u003dself.context,\n                               wait_func\u003dwait_func,\n                               volume_api\u003dself.volume_api,\n                               volume_id\u003d\u0027fake-id\u0027)\n         vol_delete.assert_called_once_with(self.context, \u0027fake-id\u0027\n         self.assertEqual(delete_on_termination, vol_delete.called)\n\n def test_call_wait_delete_volume(self):\n     self._test_call_wait_func(True)\n\n def test_call_wait_no_delete_volume(self):\n     self._test_call_wait_func(False)","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f27ee6f5dd2c5c44d66d5064ab819fd967a2f307","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                              wait_func\u003dwait_func,"},{"line_number":363,"context_line":"                              volume_api\u003dself.volume_api,"},{"line_number":364,"context_line":"                              volume_id\u003d\u0027fake-id\u0027)"},{"line_number":365,"context_line":"            self.assertFalse(vol_delete.called)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _test_volume_attach(self, driver_bdm, bdm_dict,"},{"line_number":368,"context_line":"                            fake_volume, check_attach\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_0783fbcd","line":365,"in_reply_to":"3afb71cf_b6c1fb82","updated":"2015-06-05 13:32:54.000000000","message":"Done","commit_id":"0a00eabe4a7553ae072cfabc2b9dfd91cc3575be"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58f5c224756a0170952087fd6ed767a2fefbfd04","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    def _test_call_wait_func(self, delete_on_termination):"},{"line_number":333,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volume\u0027](self.volume_bdm)"},{"line_number":334,"context_line":"        test_bdm[\u0027delete_on_termination\u0027] \u003d delete_on_termination"},{"line_number":335,"context_line":"        with mock.patch.object(self.volume_api, \u0027delete\u0027) as vol_delete:"},{"line_number":336,"context_line":"            wait_func \u003d mock.MagicMock()"},{"line_number":337,"context_line":"            mock_exception \u003d exception.VolumeNotCreated(volume_id\u003d\u0027fake-id\u0027,"},{"line_number":338,"context_line":"                                                        seconds\u003d1,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_e83f8423","line":335,"updated":"2015-06-05 18:33:19.000000000","message":"Raise an exception as a side_effect to vol_delete so you test that exception gets handled in the case that delete_on_termination is True.","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"4923d90a2801fa4ae7eef4fbb2aff470a7b9b86c","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    def _test_call_wait_func(self, delete_on_termination):"},{"line_number":333,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volume\u0027](self.volume_bdm)"},{"line_number":334,"context_line":"        test_bdm[\u0027delete_on_termination\u0027] \u003d delete_on_termination"},{"line_number":335,"context_line":"        with mock.patch.object(self.volume_api, \u0027delete\u0027) as vol_delete:"},{"line_number":336,"context_line":"            wait_func \u003d mock.MagicMock()"},{"line_number":337,"context_line":"            mock_exception \u003d exception.VolumeNotCreated(volume_id\u003d\u0027fake-id\u0027,"},{"line_number":338,"context_line":"                                                        seconds\u003d1,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_946edec7","line":335,"in_reply_to":"3afb71cf_e83f8423","updated":"2015-06-06 02:10:38.000000000","message":"Done","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c9aa25e31722b9defb83fa98a6b6738015a63536","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        self.assertEqual(\u0027fake-volume-id-2\u0027, test_bdm.volume_id)"},{"line_number":330,"context_line":"        self.assertEqual(3, test_bdm.volume_size)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _test_call_wait_func(self, delete_on_termination, delete_fail\u003dFalse):"},{"line_number":333,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volume\u0027](self.volume_bdm)"},{"line_number":334,"context_line":"        test_bdm[\u0027delete_on_termination\u0027] \u003d delete_on_termination"},{"line_number":335,"context_line":"        with mock.patch.object(self.volume_api, \u0027delete\u0027) as vol_delete:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_647291e7","line":332,"updated":"2015-06-06 13:26:32.000000000","message":"I don\u0027t think we actually need the kwarg here since we only hit this path when delete_on_termination is True so we could have just tested the vol_delete failure as part of that, but I won\u0027t block on this.","commit_id":"8772653ddec24ae68a0bcd9440e9e6ec81ea301b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c9aa25e31722b9defb83fa98a6b6738015a63536","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            wait_func.side_effect \u003d mock_exception"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"            if delete_on_termination and delete_fail:"},{"line_number":344,"context_line":"                vol_delete.side_effect \u003d Exception()"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"            self.assertRaises(exception.VolumeNotCreated,"},{"line_number":347,"context_line":"                              test_bdm._call_wait_func,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_846d8d06","line":344,"updated":"2015-06-06 13:26:32.000000000","message":"nit: I\u0027d probably use something like test.TestingException() here, but this is OK.","commit_id":"8772653ddec24ae68a0bcd9440e9e6ec81ea301b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c9aa25e31722b9defb83fa98a6b6738015a63536","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self._test_call_wait_func(True)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def test_call_wait_delete_volume_fail(self):"},{"line_number":358,"context_line":"        self._test_call_wait_func(True, True)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def test_call_wait_no_delete_volume(self):"},{"line_number":361,"context_line":"        self._test_call_wait_func(False)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_2475b9ca","line":358,"updated":"2015-06-06 13:26:32.000000000","message":"nit: when we have more than one primitive kwarg in a test, I prefer to see them passed with named kwargs, e.g. delete_on_termination\u003dTrue, delete_fail\u003dTrue, for clarity in the test code, but I won\u0027t block on this.","commit_id":"8772653ddec24ae68a0bcd9440e9e6ec81ea301b"}],"nova/virt/block_device.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"77d15ee2b802dd66eaa603fbc6e59a7931abd85e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, \u0027\u0027, \u0027\u0027,"},{"line_number":321,"context_line":"                                    snapshot, availability_zone\u003dav_zone)"},{"line_number":322,"context_line":"            if wait_func:"},{"line_number":323,"context_line":"                try:"},{"line_number":324,"context_line":"                    wait_func(context, vol[\u0027id\u0027])"},{"line_number":325,"context_line":"                except exception.VolumeNotCreated as e:"},{"line_number":326,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_7ff546c9","line":323,"updated":"2015-05-02 15:17:46.000000000","message":"Could we move this to a function or a method to avoid code duplication?","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"a550d67ace2b22b3ea3ce699459c9fd9acc03f73","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            vol \u003d volume_api.create(context, self.volume_size, \u0027\u0027, \u0027\u0027,"},{"line_number":321,"context_line":"                                    snapshot, availability_zone\u003dav_zone)"},{"line_number":322,"context_line":"            if wait_func:"},{"line_number":323,"context_line":"                try:"},{"line_number":324,"context_line":"                    wait_func(context, vol[\u0027id\u0027])"},{"line_number":325,"context_line":"                except exception.VolumeNotCreated as e:"},{"line_number":326,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_2acb0474","line":323,"in_reply_to":"3acd31a7_7ff546c9","updated":"2015-05-04 04:57:13.000000000","message":"Done","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"77d15ee2b802dd66eaa603fbc6e59a7931abd85e","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                    try:"},{"line_number":327,"context_line":"                        volume_api.delete(context, vol[\u0027id\u0027])"},{"line_number":328,"context_line":"                    except Exception as exc:"},{"line_number":329,"context_line":"                        LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":330,"context_line":"                         \u0027due to %(exc)s\u0027),"},{"line_number":331,"context_line":"                        {\u0027volume_id\u0027: vol[\u0027id\u0027], \u0027exc\u0027: exc})"},{"line_number":332,"context_line":"                    finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_5f072a1c","line":329,"updated":"2015-05-02 15:17:46.000000000","message":"Probably, LOG.exception is more appropriate","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"a550d67ace2b22b3ea3ce699459c9fd9acc03f73","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                    try:"},{"line_number":327,"context_line":"                        volume_api.delete(context, vol[\u0027id\u0027])"},{"line_number":328,"context_line":"                    except Exception as exc:"},{"line_number":329,"context_line":"                        LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":330,"context_line":"                         \u0027due to %(exc)s\u0027),"},{"line_number":331,"context_line":"                        {\u0027volume_id\u0027: vol[\u0027id\u0027], \u0027exc\u0027: exc})"},{"line_number":332,"context_line":"                    finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_0aca886d","line":329,"in_reply_to":"3acd31a7_5f072a1c","updated":"2015-05-04 04:57:13.000000000","message":"Done","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"77d15ee2b802dd66eaa603fbc6e59a7931abd85e","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                         \u0027due to %(exc)s\u0027),"},{"line_number":331,"context_line":"                        {\u0027volume_id\u0027: vol[\u0027id\u0027], \u0027exc\u0027: exc})"},{"line_number":332,"context_line":"                    finally:"},{"line_number":333,"context_line":"                        raise e"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            self.volume_id \u003d vol[\u0027id\u0027]"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_da09082e","line":333,"updated":"2015-05-02 15:17:46.000000000","message":"Does this really reraise the exception saving original traceback?","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"a550d67ace2b22b3ea3ce699459c9fd9acc03f73","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                         \u0027due to %(exc)s\u0027),"},{"line_number":331,"context_line":"                        {\u0027volume_id\u0027: vol[\u0027id\u0027], \u0027exc\u0027: exc})"},{"line_number":332,"context_line":"                    finally:"},{"line_number":333,"context_line":"                        raise e"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            self.volume_id \u003d vol[\u0027id\u0027]"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3acd31a7_eac4ec5f","line":333,"in_reply_to":"3acd31a7_da09082e","updated":"2015-05-04 04:57:13.000000000","message":"Done","commit_id":"c38c1af5713c7b873adff3b7d13c77583e48f796"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"416dcf0d1d06541f8fc4196bba88eb691b1bcba2","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                volume_api.delete(context, volume_id)"},{"line_number":312,"context_line":"            except Exception as exc:"},{"line_number":313,"context_line":"                LOG.exception(_LE(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_7187abd7","line":314,"updated":"2015-05-04 11:39:55.000000000","message":"IIANM, you can don\u0027t print exception data by yourself, because LOG.exception does it by itself.","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fe11117ccdb35742bffd4c5c3ec89b5ae275eb29","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                volume_api.delete(context, volume_id)"},{"line_number":312,"context_line":"            except Exception as exc:"},{"line_number":313,"context_line":"                LOG.exception(_LE(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_b902c209","line":314,"in_reply_to":"3acd31a7_7187abd7","updated":"2015-05-04 16:17:51.000000000","message":"I think we don\u0027t need to use LOG.exception here\nwarning should be ok","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"c0b93cdb1fd18867ae3337df949338cadd9ae50b","unresolved":false,"context_lines":[{"line_number":311,"context_line":"                volume_api.delete(context, volume_id)"},{"line_number":312,"context_line":"            except Exception as exc:"},{"line_number":313,"context_line":"                LOG.exception(_LE(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_ae9a686c","line":314,"in_reply_to":"3acd31a7_b902c209","updated":"2015-05-05 02:16:26.000000000","message":"Agree with Ji Chen here, warn level is enough.","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"416dcf0d1d06541f8fc4196bba88eb691b1bcba2","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"class DriverSnapshotBlockDevice(DriverVolumeBlockDevice):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_d1055f7a","line":317,"updated":"2015-05-04 11:39:55.000000000","message":"Since greenthread engine can clear an exception context, save_and_reraise_exception is usually used. Are you sure you don\u0027t need to use it here?","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"c0b93cdb1fd18867ae3337df949338cadd9ae50b","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"class DriverSnapshotBlockDevice(DriverVolumeBlockDevice):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_8e8a0c1a","line":317,"in_reply_to":"3acd31a7_5c0a7c22","updated":"2015-05-05 02:16:26.000000000","message":"Done","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fe11117ccdb35742bffd4c5c3ec89b5ae275eb29","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                  \u0027due to %(exc)s\u0027),"},{"line_number":315,"context_line":"                                  {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":316,"context_line":"            finally:"},{"line_number":317,"context_line":"                raise"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"class DriverSnapshotBlockDevice(DriverVolumeBlockDevice):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_5c0a7c22","line":317,"in_reply_to":"3acd31a7_d1055f7a","updated":"2015-05-04 16:17:51.000000000","message":"++","commit_id":"baa570b12e72c1861cf3dec56bd0b83546f21a4f"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"e0aaa7c2e12c5d6faacea7c054c328abd88de3a4","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            pass"},{"line_number":305,"context_line":"        super(DriverVolumeBlockDevice, self).save()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    def _call_wait_func(self, context, wait_func, volume_api, volume_id):"},{"line_number":308,"context_line":"        try:"},{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_6e828054","line":307,"updated":"2015-05-06 13:27:16.000000000","message":"This would be more natural imo as a context manager. That way you wouldn\u0027t have to pass in wait_func. But I won\u0027t -1 as you\u0027d still have to pass in volume_api and volume_id.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3d220e3eaaf794b3392fc3b07f2757a406c98c68","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aca2d91_32fc7e71","line":313,"updated":"2015-05-08 20:38:43.000000000","message":"It seems like this should be conditional on the delete_on_terminate flag on the instance, or somehow optional.  A workflow that some users have adopted is to try to boot from a volume and if it times out they wait for the volume to be created and then use it to boot from.  Arguably they should just create the volume first and then try to boot. *shrug*","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_329f6e61","line":313,"in_reply_to":"1aca2d91_32fc7e71","updated":"2015-05-09 21:54:34.000000000","message":"Agree, we should honor the delete_on_termination flag in the block device mapping.  I *think* you can just check if self.delete_on_termination here since the parent class has the delete_on_termination field.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"25c945ddae403aeeaa8b30baf850b9442ef79e25","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_d86281ad","line":313,"in_reply_to":"9af37de9_329f6e61","updated":"2015-05-11 07:39:07.000000000","message":"\u003e\u003e A workflow that some users have adopted is to try to boot from a volume and if it times out they wait for the volume to be created and then use it to boot from.\n\nBut users can use this trick regardless of delete_on_terminaton value. Also for beginner users the behavior dependence of this flag whould be unclear, because there is no termination without a start, but the start is incomplete.\n\nSo if you stand for the preservation of this workflow, i think it should be related not to this flag, but to timeout explicitly. Because there is no reason  to preserve volumes that have error state.\n\nAlso the behavior you asked (even if delete error state volumes) has other disadvantages. It can not be automatized, since the volume id is unknown. If a user asked more than one volume with the same size, he can not recognize which volue is left. It\u0027s inconsistent, it leaves garbage after failed launch. And finally it doesn\u0027t resolve the bug LP#1447884 for which this review was started!\n\nI wonder that we want to keep the inconsistent behavior instead of give users more explicit and consistent way to operate with long-created volumes.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_e7111d5f","line":313,"in_reply_to":"9af37de9_329f6e61","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"},{"line_number":317,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_32764e3f","line":314,"updated":"2015-05-09 21:54:34.000000000","message":"We don\u0027t have a unit test for this case, you could add a simple one which just tests this private helper method, not the entire flow from attach.  We just want to make sure the error is handled if the volume_api.delete fails.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                try:"},{"line_number":313,"context_line":"                    volume_api.delete(context, volume_id)"},{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"},{"line_number":317,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_a2b0a38c","line":314,"in_reply_to":"9af37de9_32764e3f","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d491f1da2193c42298e324df11969d4cde6d769","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"},{"line_number":317,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"class DriverSnapshotBlockDevice(DriverVolumeBlockDevice):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_5292f258","line":317,"updated":"2015-05-09 21:54:34.000000000","message":"nit: alignment, the dict kwargs should align with the _LW arg above.","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"9c8b2e1e94615bfda4a435d7c887652ffaeabb42","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                except Exception as exc:"},{"line_number":315,"context_line":"                    LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":316,"context_line":"                                 \u0027due to %(exc)s\u0027),"},{"line_number":317,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"class DriverSnapshotBlockDevice(DriverVolumeBlockDevice):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9af37de9_ac0c1a43","line":317,"in_reply_to":"9af37de9_5292f258","updated":"2015-05-11 06:54:07.000000000","message":"Done","commit_id":"629dea964ef099a94a7fccd321bca90f65e80ed7"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"395354542ffefc915ba7e9dbcbe74ee7916bfd22","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                if self.get(\u0027delete_on_termination\u0027):"},{"line_number":313,"context_line":"                    try:"},{"line_number":314,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":315,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9af37de9_5de556a6","line":312,"updated":"2015-05-11 07:44:16.000000000","message":"But now this patch doesn\u0027t close the bug, does it?","commit_id":"9886a72c22e699bb94df3d56e86c80382928114a"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"ef99cbafde533934d6d34b18ebf836e2e72440b1","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                if self.get(\u0027delete_on_termination\u0027):"},{"line_number":313,"context_line":"                    try:"},{"line_number":314,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":315,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_fa3088a0","line":312,"in_reply_to":"9a0c5dc1_d02a527e","updated":"2015-05-12 11:44:15.000000000","message":"Well, you\u0027re the bug reporter, you decide.","commit_id":"9886a72c22e699bb94df3d56e86c80382928114a"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f6f972752cdf3663a7e66c0aa9bb987c9d7cd949","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                if self.get(\u0027delete_on_termination\u0027):"},{"line_number":313,"context_line":"                    try:"},{"line_number":314,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":315,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_d02a527e","line":312,"in_reply_to":"9af37de9_5de556a6","updated":"2015-05-12 03:03:09.000000000","message":"The error volume can be removed when user specify \"shutdown\u003dremove\" when boot an instance. So I think it can still fulfill the bug requirement.","commit_id":"9886a72c22e699bb94df3d56e86c80382928114a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"60deb5d57e194c4e5d60972ba1471445004f6458","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                if self.get(\u0027delete_on_termination\u0027):"},{"line_number":313,"context_line":"                    try:"},{"line_number":314,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":315,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_25ca2a6e","line":312,"updated":"2015-06-03 16:26:27.000000000","message":"There really is no need for the get here - self[\u0027delete_on_termination\u0027] should work here","commit_id":"b342d82c4f2f57903d27b5c3d848d141b333f5b1"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"67144b7975137867a6d306f175a826ae658c4fef","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            wait_func(context, volume_id)"},{"line_number":310,"context_line":"        except exception.VolumeNotCreated:"},{"line_number":311,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":312,"context_line":"                if self.get(\u0027delete_on_termination\u0027):"},{"line_number":313,"context_line":"                    try:"},{"line_number":314,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":315,"context_line":"                    except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_7e89be25","line":312,"in_reply_to":"5afe65bd_25ca2a6e","updated":"2015-06-04 02:19:59.000000000","message":"Done","commit_id":"b342d82c4f2f57903d27b5c3d848d141b333f5b1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"58f5c224756a0170952087fd6ed767a2fefbfd04","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                if self[\u0027delete_on_termination\u0027]:"},{"line_number":314,"context_line":"                    try:"},{"line_number":315,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":316,"context_line":"                    except Exception as exc:"},{"line_number":317,"context_line":"                        LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":318,"context_line":"                                     \u0027due to %(exc)s\u0027),"},{"line_number":319,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_e8f8a47e","line":316,"updated":"2015-06-05 18:33:19.000000000","message":"I don\u0027t see this tested anywhere.","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"4923d90a2801fa4ae7eef4fbb2aff470a7b9b86c","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                if self[\u0027delete_on_termination\u0027]:"},{"line_number":314,"context_line":"                    try:"},{"line_number":315,"context_line":"                        volume_api.delete(context, volume_id)"},{"line_number":316,"context_line":"                    except Exception as exc:"},{"line_number":317,"context_line":"                        LOG.warn(_LW(\u0027Failed to delete volume: %(volume_id)s \u0027"},{"line_number":318,"context_line":"                                     \u0027due to %(exc)s\u0027),"},{"line_number":319,"context_line":"                                 {\u0027volume_id\u0027: volume_id, \u0027exc\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_b479da95","line":316,"in_reply_to":"3afb71cf_e8f8a47e","updated":"2015-06-06 02:10:38.000000000","message":"Done","commit_id":"3c168e21e85fe59df3505c519b22ee8544e3a9bf"}]}
