)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b5980cb39bdfdac9e44a3c7b6d30966144944bd1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix nova backup for volume-backed instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now nova backup doesn\u0027t honour the instance with"},{"line_number":10,"context_line":"volume backend. This patch will fix the issue and"},{"line_number":11,"context_line":"add unit test for that."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1313573"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a80dd14_4a337362","line":10,"updated":"2015-03-16 17:22:29.000000000","message":"*How* does this patch fix the issue? :) The commit message should explain how and why the patch does what it does, not just that the patch fixes something.","commit_id":"02526491cb550960a264f4c867b289e7922583fe"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"57c0fb7c6007828abf09c846f53fb4e5f0cceda1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Fei Long Wang \u003cflwang@catalyst.net.nz\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-17 16:27:45 +1300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix nova backup for volume-backed instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now nova backup doesn\u0027t honour the instance with"},{"line_number":10,"context_line":"volume backend. This patch will fix the issue by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_29752932","line":7,"updated":"2015-03-17 20:31:06.000000000","message":"I will fix the typo later :)","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f81c2b5b44a479cd80c112df281fa894b1c1432d","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"baa041b7_4f87c461","line":17,"updated":"2015-04-02 02:06:48.000000000","message":"I don\u0027t see any unit tests (or code even) in this patch that indicates that PAUSED or SUSPENDED instances can\u0027t be backed up if they are boot from volume... Is this note just stating a previous condition for *any* backup? In other words, can a normal image-backed instance in PAUSED or SUSPENDED vm_state be backed up? If not I don\u0027t see any need for this note, and I think it\u0027s confusing...","commit_id":"e3e19b469a6d65b1e3ff00b21ae350c36467fa66"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"d5dae0c8febf3a534e749f598df4db9ac9d110eb","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7aaa499b_791eab64","line":17,"in_reply_to":"baa041b7_4f87c461","updated":"2015-04-14 01:51:01.000000000","message":"Good point.\n\n1. I don\u0027t see any unit tests (or code even) in this patch that indicates that PAUSED or SUSPENDED instances can\u0027t be backed up if they are boot from volume\n\nI will add a new test case for that. \n\n2. Can a normal image-backed instance in PAUSED or SUSPENDED vm_state be backed up? \n\nYes. For image-backed instance, they can be backuped in PAUSED or SUSPENDED.","commit_id":"e3e19b469a6d65b1e3ff00b21ae350c36467fa66"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f989969fe50cc9297da9c9069e66f2ab555f5f3c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"handle the image creating."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"bab921fb_da824f52","line":16,"updated":"2015-04-23 17:29:27.000000000","message":"s/backuped/backed up/","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1901070ab2a4ce0c7026ba1f1be8a375a3beea8e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"handle the image creating."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"7ad32947_24ca65a2","line":16,"in_reply_to":"bab921fb_da824f52","updated":"2015-04-30 22:52:22.000000000","message":"Done","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c2bbe56c0f37c63c2dd2890022c1d0db252739d8","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"bab921fb_af6d1f06","line":17,"updated":"2015-04-23 17:20:55.000000000","message":"Also, this looks wrapped way too early. Kindof a nit, but should be easy to fix.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1901070ab2a4ce0c7026ba1f1be8a375a3beea8e","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Note: For volume-backed instance, the instance"},{"line_number":16,"context_line":"can\u0027t be backuped if its vm_state is in PAUSED"},{"line_number":17,"context_line":"or SUSPENDED."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1313573"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"7ad32947_04cf69b1","line":17,"in_reply_to":"bab921fb_af6d1f06","updated":"2015-04-30 22:52:22.000000000","message":"Done","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ace10196ed91e65a2294d1716973258a4fadf5ca","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and then call existing snapshot_volume_backed method to handle the"},{"line_number":12,"context_line":"image creating."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Note: For volume-backed instance, the instance can\u0027t be backed up"},{"line_number":15,"context_line":"if its vm_state is in PAUSED or SUSPENDED."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1313573"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7a016987_00a3d39f","line":14,"updated":"2015-05-26 21:17:42.000000000","message":"I don\u0027t see you checking for this anywhere.","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f70528e7701f4d96ea19f17bc9079e1115340f5e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and then call existing snapshot_volume_backed method to handle the"},{"line_number":12,"context_line":"image creating."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Note: For volume-backed instance, the instance can\u0027t be backed up"},{"line_number":15,"context_line":"if its vm_state is in PAUSED or SUSPENDED."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1313573"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7a016987_f2f8864b","line":14,"in_reply_to":"7a016987_00a3d39f","updated":"2015-05-28 03:31:08.000000000","message":"I think it\u0027s covered by https://review.openstack.org/#/c/164494/17/nova/tests/unit/compute/test_compute_api.py line 1894.","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"}],"nova/api/openstack/compute/contrib/admin_actions.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9e40f62dde8f32f70a5ecf0a4c50fe8010c5eba","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, id)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":289,"context_line":"                    context, id)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        try:"},{"line_number":292,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6a01176a","line":289,"updated":"2015-03-16 17:21:30.000000000","message":"This is going to be immediately re-queried in compute_api. Not cool to put it here, IMHO.","commit_id":"02526491cb550960a264f4c867b289e7922583fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9e40f62dde8f32f70a5ecf0a4c50fe8010c5eba","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                if not img:"},{"line_number":296,"context_line":"                    properties \u003d bdms.root_metadata("},{"line_number":297,"context_line":"                            context, self.compute_api.image_api,"},{"line_number":298,"context_line":"                            self.compute_api.volume_api)"},{"line_number":299,"context_line":"                    image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":300,"context_line":"                else:"},{"line_number":301,"context_line":"                    image_meta \u003d self.compute_api.image_api.get(context, img)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_aa45cf16","line":298,"updated":"2015-03-16 17:21:30.000000000","message":"The nesting level is getting pretty deep here. Please break this apart somehow for clarity, if this code stays.","commit_id":"02526491cb550960a264f4c867b289e7922583fe"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b5980cb39bdfdac9e44a3c7b6d30966144944bd1","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                                                       instance,"},{"line_number":306,"context_line":"                                                       image_meta,"},{"line_number":307,"context_line":"                                                       image_name,"},{"line_number":308,"context_line":"                                                       extra_properties\u003dprops)"},{"line_number":309,"context_line":"            else:"},{"line_number":310,"context_line":"                image \u003d self.compute_api.backup(context, instance, image_name,"},{"line_number":311,"context_line":"                    backup_type, rotation, extra_properties\u003dprops)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_2a639f42","line":308,"updated":"2015-03-16 17:22:29.000000000","message":"All of this logic needs to go into the compute_api.backup() method, not here in the REST API controller...","commit_id":"02526491cb550960a264f4c867b289e7922583fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9e40f62dde8f32f70a5ecf0a4c50fe8010c5eba","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                                                       image_name,"},{"line_number":308,"context_line":"                                                       extra_properties\u003dprops)"},{"line_number":309,"context_line":"            else:"},{"line_number":310,"context_line":"                image \u003d self.compute_api.backup(context, instance, image_name,"},{"line_number":311,"context_line":"                    backup_type, rotation, extra_properties\u003dprops)"},{"line_number":312,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":313,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_ead507e6","line":310,"updated":"2015-03-16 17:21:30.000000000","message":"This seems wrong to me. Why make the volume-backed case so different at this layer? Seems like this could follow the same process all the way down to (probably) the compute manager, where the slightly different flow is taken if it\u0027s volume-backed. Also, you\u0027re skipping all the backup_type and rotation bits here.\n\nIMHO, this is too high a level to distinguish between these two things.","commit_id":"02526491cb550960a264f4c867b289e7922583fe"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9e40f62dde8f32f70a5ecf0a4c50fe8010c5eba","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            else:"},{"line_number":310,"context_line":"                image \u003d self.compute_api.backup(context, instance, image_name,"},{"line_number":311,"context_line":"                    backup_type, rotation, extra_properties\u003dprops)"},{"line_number":312,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":313,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":314,"context_line":"                    \u0027createBackup\u0027, id)"},{"line_number":315,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_aa1a2f16","line":312,"updated":"2015-03-16 17:21:30.000000000","message":"You have a lot of stuff inside this try..except now. I doubt all of it can actually raise InstanceInvalidState (like is_volume_backed), right?","commit_id":"02526491cb550960a264f4c867b289e7922583fe"}],"nova/api/openstack/compute/plugins/v3/create_backup.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b5980cb39bdfdac9e44a3c7b6d30966144944bd1","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                                       instance,"},{"line_number":85,"context_line":"                                                       image_meta,"},{"line_number":86,"context_line":"                                                       image_name,"},{"line_number":87,"context_line":"                                                       extra_properties\u003dprops)"},{"line_number":88,"context_line":"            else:"},{"line_number":89,"context_line":"                image \u003d self.compute_api.backup(context, instance, image_name,"},{"line_number":90,"context_line":"                        backup_type, rotation, extra_properties\u003dprops)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6a5d9779","line":87,"updated":"2015-03-16 17:22:29.000000000","message":"Ditto from previous page...","commit_id":"02526491cb550960a264f4c867b289e7922583fe"}],"nova/cells/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ace10196ed91e65a2294d1716973258a4fadf5ca","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    def snapshot_instance(self, ctxt, instance, image_id):"},{"line_number":562,"context_line":"        \"\"\"Snapshot an instance in its cell.\"\"\""},{"line_number":563,"context_line":"        self.msg_runner.snapshot_instance(ctxt, instance, image_id)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type, rotation):"},{"line_number":566,"context_line":"        \"\"\"Backup an instance in its cell.\"\"\""},{"line_number":567,"context_line":"        self.msg_runner.backup_instance(ctxt, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_20b48fcf","line":564,"updated":"2015-05-26 21:17:42.000000000","message":"Doesn\u0027t this need updating?","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f70528e7701f4d96ea19f17bc9079e1115340f5e","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    def snapshot_instance(self, ctxt, instance, image_id):"},{"line_number":562,"context_line":"        \"\"\"Snapshot an instance in its cell.\"\"\""},{"line_number":563,"context_line":"        self.msg_runner.snapshot_instance(ctxt, instance, image_id)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type, rotation):"},{"line_number":566,"context_line":"        \"\"\"Backup an instance in its cell.\"\"\""},{"line_number":567,"context_line":"        self.msg_runner.backup_instance(ctxt, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_d25fca73","line":564,"in_reply_to":"7a016987_20b48fcf","updated":"2015-05-28 03:31:08.000000000","message":"Done","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"}],"nova/cells/messaging.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cf1f40ba0434b80bd01b53c9ead4274d61cd050","unresolved":false,"context_lines":[{"line_number":919,"context_line":"        self.compute_rpcapi.snapshot_instance(message.ctxt,"},{"line_number":920,"context_line":"                                              instance,"},{"line_number":921,"context_line":"                                              image_id)"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def backup_instance(self, message, instance, image_id,"},{"line_number":924,"context_line":"                        backup_type, rotation):"},{"line_number":925,"context_line":"        \"\"\"Backup an instance in its cell.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a016987_2cdf8c6a","line":922,"updated":"2015-05-28 21:40:13.000000000","message":"I\u0027m not a cells guy but I assume this is your problem.","commit_id":"a044b574098f713a2256ccdb1f87868d5cac392a"}],"nova/cells/rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":644,"context_line":"                        is_volume_backend\u003dFalse):"},{"line_number":645,"context_line":"        if not CONF.cells.enable:"},{"line_number":646,"context_line":"            return"},{"line_number":647,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.24\u0027)"},{"line_number":648,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"},{"line_number":649,"context_line":"                   instance\u003dinstance,"},{"line_number":650,"context_line":"                   image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_889b0066","line":647,"updated":"2015-05-05 22:49:41.000000000","message":"This is not the right version. Also, where is the logic to avoid sending the new param if version\u003c1.35?","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ace10196ed91e65a2294d1716973258a4fadf5ca","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                   instance\u003dinstance, image_id\u003dimage_id)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type, rotation,"},{"line_number":644,"context_line":"                        is_volume_backend\u003dFalse):"},{"line_number":645,"context_line":"        if not CONF.cells.enable:"},{"line_number":646,"context_line":"            return"},{"line_number":647,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_e0c67748","line":644,"updated":"2015-05-26 21:17:42.000000000","message":"Can we name this is_volume_backed?\n\nIt\u0027s not a \u0027backend\u0027, it\u0027s volume-backed, as in backed up by a volume.","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f70528e7701f4d96ea19f17bc9079e1115340f5e","unresolved":false,"context_lines":[{"line_number":641,"context_line":"                   instance\u003dinstance, image_id\u003dimage_id)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type, rotation,"},{"line_number":644,"context_line":"                        is_volume_backend\u003dFalse):"},{"line_number":645,"context_line":"        if not CONF.cells.enable:"},{"line_number":646,"context_line":"            return"},{"line_number":647,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_e74566b3","line":644,"in_reply_to":"7a016987_e0c67748","updated":"2015-05-28 03:31:08.000000000","message":"Done","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":653,"context_line":"                    \u0027is_volume_backed\u0027: is_volume_backed"},{"line_number":654,"context_line":"                    }"},{"line_number":655,"context_line":"        if not self.client.can_send_version(\u00271.35\u0027):"},{"line_number":656,"context_line":"            version \u003d \u00271.24\u0027"},{"line_number":657,"context_line":"            del msg_args[\u0027is_volume_backed\u0027]"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"        cctxt \u003d self.client.prepare(version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_60b2194e","line":656,"updated":"2015-06-04 18:56:40.000000000","message":"Do we need to check if is_volume_backed is True and raise an exception if that\u0027s the case?  Otherwise someone is just trying to backup a volume-backed instance where it\u0027s not going to work.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9db0fc9045acc069c358663fa3b61216ef26bcf","unresolved":false,"context_lines":[{"line_number":2112,"context_line":"               extra_properties\u003dNone):"},{"line_number":2113,"context_line":"        \"\"\"Backup the given instance"},{"line_number":2114,"context_line":""},{"line_number":2115,"context_line":"        :param instance: nova.db.sqlalchemy.models.Instance"},{"line_number":2116,"context_line":"        :param name: name of the backup"},{"line_number":2117,"context_line":"        :param backup_type: \u0027daily\u0027 or \u0027weekly\u0027"},{"line_number":2118,"context_line":"        :param rotation: int representing how many backups to keep around;"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_89a375b0","line":2115,"updated":"2015-03-17 20:39:53.000000000","message":"This is wrong, but not something to fix in this patch.","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a2d256de08e5e35daeee91fabab6923a0212776f","unresolved":false,"context_lines":[{"line_number":2112,"context_line":"               extra_properties\u003dNone):"},{"line_number":2113,"context_line":"        \"\"\"Backup the given instance"},{"line_number":2114,"context_line":""},{"line_number":2115,"context_line":"        :param instance: nova.db.sqlalchemy.models.Instance"},{"line_number":2116,"context_line":"        :param name: name of the backup"},{"line_number":2117,"context_line":"        :param backup_type: \u0027daily\u0027 or \u0027weekly\u0027"},{"line_number":2118,"context_line":"        :param rotation: int representing how many backups to keep around;"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_515cbf19","line":2115,"in_reply_to":"9a80dd14_89a375b0","updated":"2015-03-18 23:04:37.000000000","message":"It\u0027s fixed by https://review.openstack.org/165213","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9db0fc9045acc069c358663fa3b61216ef26bcf","unresolved":false,"context_lines":[{"line_number":2121,"context_line":"                                 when creating the image."},{"line_number":2122,"context_line":"        :returns: A dict containing image metadata"},{"line_number":2123,"context_line":"        \"\"\""},{"line_number":2124,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":2125,"context_line":"            context, instance.uuid)"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_89be1563","line":2124,"updated":"2015-03-17 20:39:53.000000000","message":"So this basically copies the logic from the servers API:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1059\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/plugins/v3/servers.py#n1022\n\nWhich is fine except it\u0027s sad we would have three different places now doing this same logic.  I wonder if we could split this out into a common function in nova.compute.api and then refactor this code and the server API extensions to use it.\n\nI know you want to backport this change to stable so a refactor like that would have to come after the bug is fixed.","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a2d256de08e5e35daeee91fabab6923a0212776f","unresolved":false,"context_lines":[{"line_number":2121,"context_line":"                                 when creating the image."},{"line_number":2122,"context_line":"        :returns: A dict containing image metadata"},{"line_number":2123,"context_line":"        \"\"\""},{"line_number":2124,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("},{"line_number":2125,"context_line":"            context, instance.uuid)"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_d1f50fee","line":2124,"in_reply_to":"9a80dd14_89be1563","updated":"2015-03-18 23:04:37.000000000","message":"Yep, good point. I agree it deserves a refactor to make it clean. But we do need to backport this to Juno and Icehouse. So I would prefer to do that after this bug is fixed.","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e43605b6f2931e42096dc1bbdcc749dcdd8d80bb","unresolved":false,"context_lines":[{"line_number":2133,"context_line":"            else:"},{"line_number":2134,"context_line":"                image_meta \u003d self.image_api.get(context, img)"},{"line_number":2135,"context_line":""},{"line_number":2136,"context_line":"            image_meta \u003d self.snapshot_volume_backed("},{"line_number":2137,"context_line":"                                           context,"},{"line_number":2138,"context_line":"                                           instance,"},{"line_number":2139,"context_line":"                                           image_meta,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a4086029","line":2136,"updated":"2015-03-17 20:41:32.000000000","message":"at least we need to check \nsnapshot_volume_backed only supports \nACTIVE and STOPPED\nso this change will affect original feature ..\n\nneed update commit message if we have to do so","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a2d256de08e5e35daeee91fabab6923a0212776f","unresolved":false,"context_lines":[{"line_number":2133,"context_line":"            else:"},{"line_number":2134,"context_line":"                image_meta \u003d self.image_api.get(context, img)"},{"line_number":2135,"context_line":""},{"line_number":2136,"context_line":"            image_meta \u003d self.snapshot_volume_backed("},{"line_number":2137,"context_line":"                                           context,"},{"line_number":2138,"context_line":"                                           instance,"},{"line_number":2139,"context_line":"                                           image_meta,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4c6186d2","line":2136,"in_reply_to":"9a80dd14_a4086029","updated":"2015-03-18 23:04:37.000000000","message":"It\u0027s a good point. I\u0027m just thinking where to place the note. Thanks.","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e9db0fc9045acc069c358663fa3b61216ef26bcf","unresolved":false,"context_lines":[{"line_number":2138,"context_line":"                                           instance,"},{"line_number":2139,"context_line":"                                           image_meta,"},{"line_number":2140,"context_line":"                                           name,"},{"line_number":2141,"context_line":"                                           extra_properties\u003dextra_properties)"},{"line_number":2142,"context_line":"        else:"},{"line_number":2143,"context_line":"            props_copy \u003d dict(extra_properties, backup_type\u003dbackup_type)"},{"line_number":2144,"context_line":"            image_meta \u003d self._create_image(context, instance,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a93af9e4","line":2141,"updated":"2015-03-17 20:39:53.000000000","message":"Hmm, since snapshot_volume_backed doesn\u0027t take image_type for \u0027snapshot\u0027 or \u0027backup\u0027, shouldn\u0027t we update extra_properties to add {\u0027image_type\u0027: \u0027backup\u0027}?","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a2d256de08e5e35daeee91fabab6923a0212776f","unresolved":false,"context_lines":[{"line_number":2138,"context_line":"                                           instance,"},{"line_number":2139,"context_line":"                                           image_meta,"},{"line_number":2140,"context_line":"                                           name,"},{"line_number":2141,"context_line":"                                           extra_properties\u003dextra_properties)"},{"line_number":2142,"context_line":"        else:"},{"line_number":2143,"context_line":"            props_copy \u003d dict(extra_properties, backup_type\u003dbackup_type)"},{"line_number":2144,"context_line":"            image_meta \u003d self._create_image(context, instance,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_fd702275","line":2141,"in_reply_to":"9a80dd14_a93af9e4","updated":"2015-03-18 23:04:37.000000000","message":"Good point, will fix in next PS.","commit_id":"0056d98d5b999fb6dd6c7a6556a772f577eb0031"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28823d9c40e580f5b3504d0782dca24e3d557029","unresolved":false,"context_lines":[{"line_number":2133,"context_line":"            if not img:"},{"line_number":2134,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2135,"context_line":"                                                self.volume_api)"},{"line_number":2136,"context_line":"                image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":2137,"context_line":"            else:"},{"line_number":2138,"context_line":"                image_meta \u003d self.image_api.get(context, img)"},{"line_number":2139,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_0bd4861e","line":2136,"updated":"2015-03-19 11:32:36.000000000","message":"In what way can a volume-backed instance have an image_ref property for the instance?","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e85faaf57c76df95ed9753559793dfbec9dfb1ae","unresolved":false,"context_lines":[{"line_number":2133,"context_line":"            if not img:"},{"line_number":2134,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2135,"context_line":"                                                self.volume_api)"},{"line_number":2136,"context_line":"                image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":2137,"context_line":"            else:"},{"line_number":2138,"context_line":"                image_meta \u003d self.image_api.get(context, img)"},{"line_number":2139,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_da003a03","line":2136,"in_reply_to":"9a80dd14_0bd4861e","updated":"2015-03-20 14:56:23.000000000","message":"Jay, note that this was basically copied from the servers API:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py?id\u003d2015.1.0b3#n1059\n\nSo I\u0027m a bit concerned if we don\u0027t have the same logic here.  I\u0027m not sure it\u0027s correct, but if it\u0027s not we should at least cleanup the servers API too...(just not in this patch).","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":2125,"context_line":"            context, instance.uuid)"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2128,"context_line":"            properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2129,"context_line":"                                            self.volume_api)"},{"line_number":2130,"context_line":"            image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":2131,"context_line":"            props_copy[\u0027image_type\u0027] \u003d \u0027backup\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_da9cbac2","line":2128,"updated":"2015-03-20 14:15:43.000000000","message":"This is a change from how the servers API is doing volume-backed snapshots, I also noted this in response to Jay\u0027s comment in patch set 6:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py?id\u003d2015.1.0b3#n1059\n\nI\u0027m not sure if it matters though, this should work also.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":2125,"context_line":"            context, instance.uuid)"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2128,"context_line":"            properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2129,"context_line":"                                            self.volume_api)"},{"line_number":2130,"context_line":"            image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":2131,"context_line":"            props_copy[\u0027image_type\u0027] \u003d \u0027backup\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a75e904_35d5ba43","line":2128,"in_reply_to":"9a80dd14_da9cbac2","updated":"2015-03-24 03:30:53.000000000","message":"Yes, you\u0027re right. I think http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py?id\u003d2015.1.0b3#n1059 should be improved as well, since there is no image ref for a volume based instance. I\u0027m going to submit a patch to fix that.\n\nSee https://bugs.launchpad.net/nova/+bug/1435596","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5603be219e2dead28fa2140b555619ab465f30f9","unresolved":false,"context_lines":[{"line_number":2141,"context_line":"                                            name, \u0027backup\u0027,"},{"line_number":2142,"context_line":"                                            extra_properties\u003dprops_copy)"},{"line_number":2143,"context_line":""},{"line_number":2144,"context_line":"        # NOTE(comstud): Any changes to this method should also be made"},{"line_number":2145,"context_line":"        # to the backup_instance() method in nova/cells/messaging.py"},{"line_number":2146,"context_line":""},{"line_number":2147,"context_line":"        instance.task_state \u003d task_states.IMAGE_BACKUP"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_b343b13d","line":2144,"updated":"2015-03-20 14:56:18.000000000","message":"Looks like we\u0027re OK regarding this note:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/cells/messaging.py#n940","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":2141,"context_line":"                                            name, \u0027backup\u0027,"},{"line_number":2142,"context_line":"                                            extra_properties\u003dprops_copy)"},{"line_number":2143,"context_line":""},{"line_number":2144,"context_line":"        # NOTE(comstud): Any changes to this method should also be made"},{"line_number":2145,"context_line":"        # to the backup_instance() method in nova/cells/messaging.py"},{"line_number":2146,"context_line":""},{"line_number":2147,"context_line":"        instance.task_state \u003d task_states.IMAGE_BACKUP"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_f17e9de3","line":2144,"in_reply_to":"9a80dd14_b343b13d","updated":"2015-03-24 03:30:53.000000000","message":"Yep","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f989969fe50cc9297da9c9069e66f2ab555f5f3c","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"            context, instance.uuid)"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2103,"context_line":"            img \u003d instance.image_ref"},{"line_number":2104,"context_line":"            if not img:"},{"line_number":2105,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2106,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_5a4cff41","line":2103,"updated":"2015-04-23 17:29:27.000000000","message":"Per your commit message, don\u0027t you need to check the vm_state in here since you can\u0027t backup a paused/suspended volume-backed instance?","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1901070ab2a4ce0c7026ba1f1be8a375a3beea8e","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"            context, instance.uuid)"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2103,"context_line":"            img \u003d instance.image_ref"},{"line_number":2104,"context_line":"            if not img:"},{"line_number":2105,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2106,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7ad32947_41bf93d0","line":2103,"in_reply_to":"bab921fb_5a4cff41","updated":"2015-04-30 22:52:22.000000000","message":"It will be handled by line 2203, snapshot_volume_backed().","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"de415ab8187bd10b501134c21b785c1ff99414f8","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"            context, instance.uuid)"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2103,"context_line":"            img \u003d instance.image_ref"},{"line_number":2104,"context_line":"            if not img:"},{"line_number":2105,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2106,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_fa74f3fd","line":2103,"in_reply_to":"bab921fb_5a4cff41","updated":"2015-04-23 17:35:41.000000000","message":"Yeah, good call. But it also kinda sucks for these instances to have to behave differently. Definitely confusing to the user.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c4c7e2696f565b2793d64dfda850b20aadb86340","unresolved":false,"context_lines":[{"line_number":2100,"context_line":"            context, instance.uuid)"},{"line_number":2101,"context_line":""},{"line_number":2102,"context_line":"        if self.is_volume_backed_instance(context, instance, bdms):"},{"line_number":2103,"context_line":"            img \u003d instance.image_ref"},{"line_number":2104,"context_line":"            if not img:"},{"line_number":2105,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2106,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_30ade7e9","line":2103,"in_reply_to":"bab921fb_fa74f3fd","updated":"2015-04-23 18:51:47.000000000","message":"This seems to be a complicated enough scenario that a Tempest test might be in order.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ace10196ed91e65a2294d1716973258a4fadf5ca","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"            # string freeze (Liberty)."},{"line_number":2098,"context_line":"            LOG.debug(\"It\u0027s not supported to backup volume backed instance.\","},{"line_number":2099,"context_line":"                      context\u003dcontext, instance\u003dinstance)"},{"line_number":2100,"context_line":"            raise exception.InvalidRequest()"},{"line_number":2101,"context_line":"        else:"},{"line_number":2102,"context_line":"            image_meta \u003d self._create_image(context, instance,"},{"line_number":2103,"context_line":"                                            name, \u0027backup\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_a01cffc1","side":"PARENT","line":2100,"updated":"2015-05-26 21:17:42.000000000","message":"We still expect this to fail on computes before RPC 4.1 right?","commit_id":"3841b8254e0dd820d26377312b6c004f4bd9b58e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f70528e7701f4d96ea19f17bc9079e1115340f5e","unresolved":false,"context_lines":[{"line_number":2097,"context_line":"            # string freeze (Liberty)."},{"line_number":2098,"context_line":"            LOG.debug(\"It\u0027s not supported to backup volume backed instance.\","},{"line_number":2099,"context_line":"                      context\u003dcontext, instance\u003dinstance)"},{"line_number":2100,"context_line":"            raise exception.InvalidRequest()"},{"line_number":2101,"context_line":"        else:"},{"line_number":2102,"context_line":"            image_meta \u003d self._create_image(context, instance,"},{"line_number":2103,"context_line":"                                            name, \u0027backup\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_52f87a7c","side":"PARENT","line":2100,"in_reply_to":"7a016987_a01cffc1","updated":"2015-05-28 03:31:08.000000000","message":"Yes","commit_id":"3841b8254e0dd820d26377312b6c004f4bd9b58e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":2124,"context_line":"        # NOTE(comstud): Any changes to this method should also be made"},{"line_number":2125,"context_line":"        # to the backup_instance() method in nova/cells/messaging.py"},{"line_number":2126,"context_line":""},{"line_number":2127,"context_line":"        instance.task_state \u003d task_states.IMAGE_BACKUP"},{"line_number":2128,"context_line":"        instance.save(expected_task_state\u003d[None])"},{"line_number":2129,"context_line":""},{"line_number":2130,"context_line":"        self.compute_rpcapi.backup_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3afb71cf_441d8e0e","line":2127,"updated":"2015-06-04 18:56:40.000000000","message":"Thinking out loud, I wonder if this should be VOLUME_BACKUP if it\u0027s a volume-backed instance, but maybe it doesn\u0027t make a difference.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"71836f211a6ec09ae1dc1ab979324390ebcaac33","unresolved":false,"context_lines":[{"line_number":2108,"context_line":"                                                          instance,"},{"line_number":2109,"context_line":"                                                          bdms)"},{"line_number":2110,"context_line":"        if is_volume_backed:"},{"line_number":2111,"context_line":"            img \u003d instance.image_ref"},{"line_number":2112,"context_line":"            if not img:"},{"line_number":2113,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2114,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_7c64a448","line":2111,"updated":"2015-07-06 06:42:03.000000000","message":"On what circumstances will an volume backed instance having image_ref?","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"cd177dc990551e599988728ade743054f31df2ee","unresolved":false,"context_lines":[{"line_number":2108,"context_line":"                                                          instance,"},{"line_number":2109,"context_line":"                                                          bdms)"},{"line_number":2110,"context_line":"        if is_volume_backed:"},{"line_number":2111,"context_line":"            img \u003d instance.image_ref"},{"line_number":2112,"context_line":"            if not img:"},{"line_number":2113,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2114,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_d26cb738","line":2111,"in_reply_to":"ba3cc151_7c64a448","updated":"2015-07-07 07:06:01.000000000","message":"if the instance is booted from a volume-backed image\n\nsee also https://review.openstack.org/#/c/198958/","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"98fbf23197c58d6c8645dfbf07841daec257c3eb","unresolved":false,"context_lines":[{"line_number":2108,"context_line":"                                                          instance,"},{"line_number":2109,"context_line":"                                                          bdms)"},{"line_number":2110,"context_line":"        if is_volume_backed:"},{"line_number":2111,"context_line":"            img \u003d instance.image_ref"},{"line_number":2112,"context_line":"            if not img:"},{"line_number":2113,"context_line":"                properties \u003d bdms.root_metadata(context, self.image_api,"},{"line_number":2114,"context_line":"                                                self.volume_api)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_3fa7830c","line":2111,"in_reply_to":"ba3cc151_d26cb738","updated":"2015-07-08 04:50:34.000000000","message":"Thanks for help answering the question, Feodor.","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"274e999d4a2e5a3803d98e9faa91613525f8b187","unresolved":false,"context_lines":[{"line_number":2124,"context_line":"            image_meta \u003d self.snapshot_volume_backed("},{"line_number":2125,"context_line":"                                               context,"},{"line_number":2126,"context_line":"                                               instance,"},{"line_number":2127,"context_line":"                                               image_meta,"},{"line_number":2128,"context_line":"                                               name,"},{"line_number":2129,"context_line":"                                               extra_properties\u003dprops_copy)"},{"line_number":2130,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a4dcd0f_3becd891","line":2127,"updated":"2015-08-14 06:58:03.000000000","message":"Since If3efa2a274517a9ad51d5dfff0134ae9e8e702a4 is merged you no longer need to specify image_meta","commit_id":"b3d59f9a14312f9911eab9e38e0ce259c2e4df1d"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bedafc15c5b17307a27e4e9534b739443f563c2f","unresolved":false,"context_lines":[{"line_number":5009,"context_line":"        :param instance: dict of instance data"},{"line_number":5010,"context_line":"        :param dest_check_data: result of check_can_live_migrate_destination"},{"line_number":5011,"context_line":"        :returns: a dict containing migration info"},{"line_number":5012,"context_line":"        \"\"\""},{"line_number":5013,"context_line":"        is_volume_backed \u003d self.compute_api.is_volume_backed_instance(ctxt,"},{"line_number":5014,"context_line":"                                                                      instance)"},{"line_number":5015,"context_line":"        dest_check_data[\u0027is_volume_backed\u0027] \u003d is_volume_backed"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_b1e4ada8","line":5012,"updated":"2015-03-19 20:48:39.000000000","message":"Why don\u0027t we just do something like this rather than change the method signature for backup_instance and mess with the rpc stuff which would complicate backporting the fix to stable.","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":3139,"context_line":"        :param backup_type: daily | weekly"},{"line_number":3140,"context_line":"        :param rotation: int representing how many backups to keep around"},{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_da4bda84","line":3142,"updated":"2015-03-20 14:15:43.000000000","message":"Need a test for this in nova.tests.unit.compute.test_compute_mgr, should assert that _do_snapshot_instance is not called.  Should be as easy as mocking out the three methods used in here.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":3139,"context_line":"        :param backup_type: daily | weekly"},{"line_number":3140,"context_line":"        :param rotation: int representing how many backups to keep around"},{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_cc2668ba","line":3142,"in_reply_to":"9a80dd14_da4bda84","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":3146,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation)"},{"line_number":3147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_babc66b6","line":3144,"updated":"2015-03-20 14:15:43.000000000","message":"Shouldn\u0027t this be \u0027assume the snapshot has *not* been done\u0027?","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":3146,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation)"},{"line_number":3147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_8c62b0d6","line":3144,"in_reply_to":"9a80dd14_443b8dd0","updated":"2015-03-24 03:30:53.000000000","message":"Good point, thanks.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9f23fa4d8ed9be1ef556c55deaa20a79ae691c48","unresolved":false,"context_lines":[{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":3146,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation)"},{"line_number":3147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_de5ae580","line":3144,"in_reply_to":"9a80dd14_443b8dd0","updated":"2015-03-20 17:31:52.000000000","message":"Technically this probably still needs a version bump. If we have a kilo control plane talking to a juno compute node, it will assume that it can ask for a backup of the volume-backed instance, which I assume will fail, right?\n\nThus, we need a version bump in manager, and make rpcapi fail to send the message if the versions are pinned in such a way that the new version can\u0027t be honored.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9f74168a5552439df22f3c664a18f7f4f8b63db4","unresolved":false,"context_lines":[{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":3146,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation)"},{"line_number":3147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_443b8dd0","line":3144,"in_reply_to":"9a80dd14_babc66b6","updated":"2015-03-20 15:59:10.000000000","message":"@mriedem: Correct. Either that, or change the line 3143 to read \"is based on volume\" :)","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":3141,"context_line":"        \"\"\""},{"line_number":3142,"context_line":"        if not self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3143,"context_line":"            # NOTE(flwang): If the instance is not based on volume, then we"},{"line_number":3144,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":3145,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":3146,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation)"},{"line_number":3147,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_2c261cb8","line":3144,"in_reply_to":"9a80dd14_babc66b6","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"a53db3c2acb8923c6e45c0cef45aae77287ec7d3","unresolved":false,"context_lines":[{"line_number":650,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":651,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    target \u003d messaging.Target(version\u003d\u00274.1\u0027)"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    # How long to wait in seconds before re-issuing a shutdown"},{"line_number":656,"context_line":"    # signal to a instance during power off.  The overall"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_299b72cb","line":653,"updated":"2015-04-22 23:34:21.000000000","message":"I\u0027m not sure if the correct version should be 4.1, because if i set it with 4.1, then some attach-volumed related test cases will fail. But if not, the new test cases added in this patch will fail.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dac84d7d40334856dc2a3c7690726fd4a31fc2f9","unresolved":false,"context_lines":[{"line_number":650,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":651,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    target \u003d messaging.Target(version\u003d\u00274.1\u0027)"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    # How long to wait in seconds before re-issuing a shutdown"},{"line_number":656,"context_line":"    # signal to a instance during power off.  The overall"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_8f0edb32","line":653,"in_reply_to":"bab921fb_299b72cb","updated":"2015-04-23 17:07:12.000000000","message":"I\u0027ve lost a bit of the issues here, but went back to this:\n\nhttps://review.openstack.org/#/c/164494/8/nova/compute/manager.py\n\nDan has a comment that a kilo controller won\u0027t be able to send this to a juno compute since the juno compute won\u0027t have the fix in the compute manager code, so I think that means that in the compute rpcapi if we get a request for an incompatible version we have to fail, but I need to confirm that with Dan.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a754e0f7debdf233b50054464bcc0bd6ccc516c","unresolved":false,"context_lines":[{"line_number":650,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":651,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    target \u003d messaging.Target(version\u003d\u00274.1\u0027)"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"    # How long to wait in seconds before re-issuing a shutdown"},{"line_number":656,"context_line":"    # signal to a instance during power off.  The overall"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_4fad63e8","line":653,"in_reply_to":"bab921fb_8f0edb32","updated":"2015-04-23 17:09:13.000000000","message":"Maybe this goes back to patch set 6 where you were passing is_volume_backed to the rpcapi method and we could pop that from the incompatible versions that couldn\u0027t handle it (\u003c 4.1).","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":660,"context_line":"class ComputeManager(manager.Manager):"},{"line_number":661,"context_line":"    \"\"\"Manages the running instances from creation to destruction.\"\"\""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    target \u003d messaging.Target(version\u003d\u00273.40\u0027)"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"    # How long to wait in seconds before re-issuing a shutdown"},{"line_number":666,"context_line":"    # signal to a instance during power off.  The overall"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_68cc246a","side":"PARENT","line":663,"updated":"2015-05-05 22:49:41.000000000","message":"This is wrong and breaks the whole of RPC v3 handling. The 4.1 version would need to be added to the proxy below, but then you\u0027d also need to make the method in this class reject the new attribute if it got it via 3.x. It\u0027s complicated. Hence my previous comment about waiting until after the \"drop 3.x\" patch merges.","commit_id":"8a688009c8acca3fbc5c7aad75f9d765bf9d8bed"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":3216,"context_line":"    @reverts_task_state"},{"line_number":3217,"context_line":"    @wrap_instance_fault"},{"line_number":3218,"context_line":"    def backup_instance(self, context, image_id, instance, backup_type,"},{"line_number":3219,"context_line":"                        rotation, is_volume_backend\u003dFalse):"},{"line_number":3220,"context_line":"        \"\"\"Backup an instance on this host."},{"line_number":3221,"context_line":""},{"line_number":3222,"context_line":"        :param backup_type: daily | weekly"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_08bff0aa","line":3219,"updated":"2015-05-05 22:49:41.000000000","message":"This can\u0027t be honored in 3.x and be legit.","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":2896,"context_line":"        :param rotation: int representing how many backups to keep around"},{"line_number":2897,"context_line":"        :param is_volume_backed: True if the instance is volume backed"},{"line_number":2898,"context_line":"        \"\"\""},{"line_number":2899,"context_line":"        if not is_volume_backed:"},{"line_number":2900,"context_line":"            # NOTE(flwang): If the instance is based on volume, then we"},{"line_number":2901,"context_line":"            # assume the snapshot has been done at the compute api layer."},{"line_number":2902,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_e00729c8","line":2899,"updated":"2015-06-04 18:56:40.000000000","message":"nit: this is a personal preference but I like to avoid negative logic like this, I\u0027d just write this as:\n\nif is_volume_backed:\n    instance.task_state \u003d None\n    instance.save(expected_task_state\u003dtask_states.IMAGE_BACKUP)\nelse:\n   # NOTE(flwang): ....\n   self._do_snapshot_instance(context, image_id, instance, rotation)\nself._rotate_backups(context, instance, backup_type, rotation,\n                     is_volume_backed)","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":2902,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":2903,"context_line":"        else:"},{"line_number":2904,"context_line":"            instance.task_state \u003d None"},{"line_number":2905,"context_line":"            instance.save(expected_task_state\u003dtask_states.IMAGE_BACKUP)"},{"line_number":2906,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation,"},{"line_number":2907,"context_line":"                             is_volume_backed)"},{"line_number":2908,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_2019c122","line":2905,"updated":"2015-06-04 18:56:40.000000000","message":"The IMAGE_BACKUP task_state seems a bit odd here, we\u0027re really doing a VOLUME_BACKUP here, but I\u0027m not sure it matters.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8784d9354cba419aade0adf2c68cffab461cd880","unresolved":false,"context_lines":[{"line_number":2902,"context_line":"            self._do_snapshot_instance(context, image_id, instance, rotation)"},{"line_number":2903,"context_line":"        else:"},{"line_number":2904,"context_line":"            instance.task_state \u003d None"},{"line_number":2905,"context_line":"            instance.save(expected_task_state\u003dtask_states.IMAGE_BACKUP)"},{"line_number":2906,"context_line":"        self._rotate_backups(context, instance, backup_type, rotation,"},{"line_number":2907,"context_line":"                             is_volume_backed)"},{"line_number":2908,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_0e72d3ad","line":2905,"in_reply_to":"5afe65bd_2019c122","updated":"2015-06-15 20:13:48.000000000","message":"Perhaps we want to wait until finish of snapshots creation before to clear the task?","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"                   \u0027property-backup_type\u0027: backup_type,"},{"line_number":3033,"context_line":"                   \u0027property-instance_uuid\u0027: instance.uuid}"},{"line_number":3034,"context_line":""},{"line_number":3035,"context_line":"        images \u003d self.image_api.get_all(context, filters\u003dfilters,"},{"line_number":3036,"context_line":"                                        sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027)"},{"line_number":3037,"context_line":"        num_images \u003d len(images)"},{"line_number":3038,"context_line":"        LOG.debug(\"Found %(num_images)d images (rotation: %(rotation)d)\","}],"source_content_type":"text/x-python","patch_set":20,"id":"3afb71cf_8486e611","line":3035,"updated":"2015-06-04 18:56:40.000000000","message":"For a volume-backed instance, this is going to return 0 possibly since the compute API isn\u0027t calling _create_image to create the image snapshot in that case, right?  So shouldn\u0027t this be doing something like calling volume_api.get_all and filtering by snapshots with backup properties like above?\n\nReally seems like _rotate_backups here would become _rotate_image_backups and we\u0027d have a new/similar method _rotate_volume_backups which is dealing with the volume_api rather than the image_api at all.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2132c984c27ac3997b8b794a5ef243b647ab6c53","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"                   \u0027property-backup_type\u0027: backup_type,"},{"line_number":3033,"context_line":"                   \u0027property-instance_uuid\u0027: instance.uuid}"},{"line_number":3034,"context_line":""},{"line_number":3035,"context_line":"        images \u003d self.image_api.get_all(context, filters\u003dfilters,"},{"line_number":3036,"context_line":"                                        sort_key\u003d\u0027created_at\u0027, sort_dir\u003d\u0027desc\u0027)"},{"line_number":3037,"context_line":"        num_images \u003d len(images)"},{"line_number":3038,"context_line":"        LOG.debug(\"Found %(num_images)d images (rotation: %(rotation)d)\","}],"source_content_type":"text/x-python","patch_set":20,"id":"3afb71cf_274974d1","line":3035,"in_reply_to":"3afb71cf_8486e611","updated":"2015-06-04 19:35:31.000000000","message":"I see now that nova.compute.api.snapshot_volume_backed will call self.image_api.create(context, image_meta) to create an image and the image will have the image_type\u003d\u0027backup\u0027 property set, so I guess this should return something after all.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":3052,"context_line":"                          instance\u003dinstance)"},{"line_number":3053,"context_line":"                self.image_api.delete(context, image_id)"},{"line_number":3054,"context_line":""},{"line_number":3055,"context_line":"                # NOTE(flwang): The volume snapshot won\u0027t be deleted even the"},{"line_number":3056,"context_line":"                # image has been deleted if it\u0027s volume backed. So we need to"},{"line_number":3057,"context_line":"                # make sure the volume snapshot is deleted as well to avoid"},{"line_number":3058,"context_line":"                # too many volume snapshots left or backup failure due to"}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_40dddd6d","line":3055,"updated":"2015-06-04 18:56:40.000000000","message":"This first sentence is a bit confusing, we could probably just omit it.  I know what the intent is, it\u0027s saying that glance isn\u0027t going to automatically delete the volume snapshot even if we delete the image it was created from, but it\u0027s a bit confusing here.\n\nJust say:\n\n\"We need to make sure the volume snapshot....\"","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8784d9354cba419aade0adf2c68cffab461cd880","unresolved":false,"context_lines":[{"line_number":3057,"context_line":"                # make sure the volume snapshot is deleted as well to avoid"},{"line_number":3058,"context_line":"                # too many volume snapshots left or backup failure due to"},{"line_number":3059,"context_line":"                # exceeding Cinder\u0027s quota."},{"line_number":3060,"context_line":"                if is_volume_backed:"},{"line_number":3061,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3062,"context_line":"                    for s in snapshots:"},{"line_number":3063,"context_line":"                        self.volume_api.delete_snapshot(context,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_2ea237af","line":3060,"updated":"2015-06-15 20:13:48.000000000","message":"i think we can simplify this method and delete linked snapshots for all kinds of images","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8784d9354cba419aade0adf2c68cffab461cd880","unresolved":false,"context_lines":[{"line_number":3058,"context_line":"                # too many volume snapshots left or backup failure due to"},{"line_number":3059,"context_line":"                # exceeding Cinder\u0027s quota."},{"line_number":3060,"context_line":"                if is_volume_backed:"},{"line_number":3061,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3062,"context_line":"                    for s in snapshots:"},{"line_number":3063,"context_line":"                        self.volume_api.delete_snapshot(context,"},{"line_number":3064,"context_line":"                                                        s.get(\u0027snapshot_id\u0027))"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_898c9d80","line":3061,"updated":"2015-06-15 20:13:48.000000000","message":"probably the better way is to use compute.api._get_image_defined_bdms, but it\u0027s not available here...","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"8784d9354cba419aade0adf2c68cffab461cd880","unresolved":false,"context_lines":[{"line_number":3059,"context_line":"                # exceeding Cinder\u0027s quota."},{"line_number":3060,"context_line":"                if is_volume_backed:"},{"line_number":3061,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3062,"context_line":"                    for s in snapshots:"},{"line_number":3063,"context_line":"                        self.volume_api.delete_snapshot(context,"},{"line_number":3064,"context_line":"                                                        s.get(\u0027snapshot_id\u0027))"},{"line_number":3065,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_a921614f","line":3062,"updated":"2015-06-15 20:13:48.000000000","message":"iianm bdm can also contain ephemerals and other local devices. so you should verify that snapshot_id is present","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":3060,"context_line":"                if is_volume_backed:"},{"line_number":3061,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3062,"context_line":"                    for s in snapshots:"},{"line_number":3063,"context_line":"                        self.volume_api.delete_snapshot(context,"},{"line_number":3064,"context_line":"                                                        s.get(\u0027snapshot_id\u0027))"},{"line_number":3065,"context_line":""},{"line_number":3066,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_c0330daa","line":3063,"updated":"2015-06-04 18:56:40.000000000","message":"Let\u0027s log a debug level message about the snapshot that we\u0027re deleting, like is done for the image_id above before image_api.delete is called.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"cd177dc990551e599988728ade743054f31df2ee","unresolved":false,"context_lines":[{"line_number":3009,"context_line":"                # NOTE(flwang): We need to make sure the volume snapshot is"},{"line_number":3010,"context_line":"                # deleted as well to avoid too many volume snapshots left or"},{"line_number":3011,"context_line":"                # backup failure due to exceeding Cinder\u0027s quota."},{"line_number":3012,"context_line":"                if is_volume_backed:"},{"line_number":3013,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3014,"context_line":"                    for s in snapshots:"},{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_0a7cf5e9","line":3012,"updated":"2015-07-07 07:06:01.000000000","message":"why do you check it? the code placed below is almost adopted to work with image-based snapshots","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"98fbf23197c58d6c8645dfbf07841daec257c3eb","unresolved":false,"context_lines":[{"line_number":3009,"context_line":"                # NOTE(flwang): We need to make sure the volume snapshot is"},{"line_number":3010,"context_line":"                # deleted as well to avoid too many volume snapshots left or"},{"line_number":3011,"context_line":"                # backup failure due to exceeding Cinder\u0027s quota."},{"line_number":3012,"context_line":"                if is_volume_backed:"},{"line_number":3013,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3014,"context_line":"                    for s in snapshots:"},{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_8518c0d4","line":3012,"in_reply_to":"ba3cc151_0a7cf5e9","updated":"2015-07-08 04:50:34.000000000","message":"Because for a image based backup, you won\u0027t get the \u0027block_device_mapping\u0027.\n\n\n+---------------------------+--------------------------------------+\n| Property                  | Value                                |\n+---------------------------+--------------------------------------+\n| Property \u0027backup_type\u0027    | daily                                |\n| Property \u0027base_image_ref\u0027 | e57cac48-0829-4094-acd7-b13e44718c3b |\n| Property \u0027image_location\u0027 | snapshot                             |\n| Property \u0027image_state\u0027    | available                            |\n| Property \u0027image_type\u0027     | backup                               |\n| Property \u0027instance_uuid\u0027  | c63f1b96-9193-4350-8e9a-9b3766bcd06b |\n| Property \u0027kernel_id\u0027      | 22cef166-5511-4ebb-83cf-f90863796d46 |\n| Property \u0027owner_id\u0027       | 866fa38ffec44bf78635e641da5a3e51     |\n| Property \u0027ramdisk_id\u0027     | 1045cd56-8e74-471d-b0f2-45488d7b6c93 |\n| Property \u0027user_id\u0027        | dadc5529bdff43a2afb88f17fd08484b     |\n| checksum                  | c03f07278a1235d765c82221b8d43c18     |\n| container_format          | ami                                  |\n| created_at                | 2015-07-08T04:01:40.000000           |\n| deleted                   | False                                |\n| disk_format               | ami                                  |\n| id                        | 6927fc09-3663-423f-99a6-2899afac1531 |\n| is_public                 | False                                |\n| min_disk                  | 1                                    |\n| min_ram                   | 0                                    |\n| name                      | a-backup                             |\n| owner                     | 866fa38ffec44bf78635e641da5a3e51     |\n| protected                 | False                                |\n| size                      | 10813440                             |\n| status                    | active                               |\n| updated_at                | 2015-07-08T04:01:44.000000           |\n+---------------------------+--------------------------------------+","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"ec01bc0e07e6fdef2b440fcafbe6c6d582fe4a49","unresolved":false,"context_lines":[{"line_number":3009,"context_line":"                # NOTE(flwang): We need to make sure the volume snapshot is"},{"line_number":3010,"context_line":"                # deleted as well to avoid too many volume snapshots left or"},{"line_number":3011,"context_line":"                # backup failure due to exceeding Cinder\u0027s quota."},{"line_number":3012,"context_line":"                if is_volume_backed:"},{"line_number":3013,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3014,"context_line":"                    for s in snapshots:"},{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_9a7fbadf","line":3012,"in_reply_to":"ba3cc151_8518c0d4","updated":"2015-07-08 05:52:14.000000000","message":"if you use ...get(\u0027block_device_mapping\u0027, []) in the next line, you will get the code wich works fine with or without block_device_mapping property in the image\n\nthis allows to remove this condition, and therefore don\u0027t pass is_volume_backed flag to the function. i.e. this can simplifiy internal api","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"cd177dc990551e599988728ade743054f31df2ee","unresolved":false,"context_lines":[{"line_number":3010,"context_line":"                # deleted as well to avoid too many volume snapshots left or"},{"line_number":3011,"context_line":"                # backup failure due to exceeding Cinder\u0027s quota."},{"line_number":3012,"context_line":"                if is_volume_backed:"},{"line_number":3013,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3014,"context_line":"                    for s in snapshots:"},{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_ca5a8df2","line":3013,"updated":"2015-07-07 07:06:01.000000000","message":"if you\u0027re not sure that the key exists in the dict, set default value to [] to prevent fail in the next line","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"98fbf23197c58d6c8645dfbf07841daec257c3eb","unresolved":false,"context_lines":[{"line_number":3010,"context_line":"                # deleted as well to avoid too many volume snapshots left or"},{"line_number":3011,"context_line":"                # backup failure due to exceeding Cinder\u0027s quota."},{"line_number":3012,"context_line":"                if is_volume_backed:"},{"line_number":3013,"context_line":"                    snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027)"},{"line_number":3014,"context_line":"                    for s in snapshots:"},{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_7f88ab71","line":3013,"in_reply_to":"ba3cc151_ca5a8df2","updated":"2015-07-08 04:50:34.000000000","message":"Good catch. Will fix it in next patch set.","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"cd177dc990551e599988728ade743054f31df2ee","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_89bed6fd","line":3018,"updated":"2015-07-07 07:06:01.000000000","message":"how does it work for snapshot_id\u003d\u003dNone?\n\nsnapshot_id is None for ephemeral disks","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"04bcfbacdd1af1f4b0df59638152ea5bc7f32e68","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_3ce81610","line":3018,"in_reply_to":"9a41bdd9_f3af6fe1","updated":"2015-07-13 21:56:19.000000000","message":"As a Glance core member, I would say \"Glance just stores image properties but doesn\u0027t handle their content. \" is not really accurate. Glance does handle the image data. For example, in RBD driver, Glance is responsible for deleting the image data from Ceph. As for this case, now I believe it\u0027s in the Glance\u0027s scope as well. And the compromise proposal could be do it as here, and propose it in Glance in parallel, and we can submit another patch when the proposal is accepted in Glance.","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"cedfc9004d6eedb866695567038e81872c736ee5","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_49039242","line":3018,"in_reply_to":"ba3cc151_3a6a2eee","updated":"2015-07-08 16:44:04.000000000","message":"i\u0027ve checked:\n\n nova flavor-create --swap 100 t1.nano-swap 142 64 0 1\n nova boot --flavor t1.nano-swap --swap 50 --block-device source\u003dimage,id\u003d\u003ccirros_id\u003e,dest\u003dvolume,size\u003d1,bootindex\u003d0 inst\n\nworks correct. If you create a snapshot from inst and show it, you\u0027ll see 2 bdm records: for the root volume and for the swap disk\n\n nova image-create inst volback\n glance image-show volback","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"99a664d697b354a2910641e07e80bfeebf9d581a","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_f3efe41a","line":3018,"in_reply_to":"ba3cc151_49039242","updated":"2015-07-13 04:08:26.000000000","message":"That\u0027s what I did. And finally, I just figured out it\u0027s caused by my bad Cinder service.\n\nAfter more thinking, I\u0027m going to move this part as a fix in Glance, because I confirmed nova snapshot has the similar issue. I mean if snapshot a volume baked instance, then delete it from glance. The snapshot volume won\u0027t be deleted from cinder. The longer I worked on this patch, the more I think it\u0027s in the scope of Glance.\n\nThanks again for raising this. Now I\u0027m using this bug to track the change on Glance side: https://bugs.launchpad.net/glance/+bug/1473827","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"98fbf23197c58d6c8645dfbf07841daec257c3eb","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_b773b74d","line":3018,"in_reply_to":"ba3cc151_89bed6fd","updated":"2015-07-08 04:50:34.000000000","message":"Hmm... Could you please let me know how can you create an instance with ephemeral disk and based on volume? I tried but it always failed.","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"ec01bc0e07e6fdef2b440fcafbe6c6d582fe4a49","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba3cc151_3a6a2eee","line":3018,"in_reply_to":"ba3cc151_b773b74d","updated":"2015-07-08 05:52:14.000000000","message":"in theory, at the first you should have appropriate flavor which allows ephemerals or swap\n\nthen you can use swap or ephemeral parameters with nova boot command in shell\n\nwhat errors did you get by your attempts?","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"7b6854b4cab7674f07936b3045ee506284e438d5","unresolved":false,"context_lines":[{"line_number":3015,"context_line":"                        snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3016,"context_line":"                        LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3017,"context_line":"                          instance\u003dinstance)"},{"line_number":3018,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"},{"line_number":3019,"context_line":""},{"line_number":3020,"context_line":"    @wrap_exception()"},{"line_number":3021,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a41bdd9_f3af6fe1","line":3018,"in_reply_to":"ba3cc151_f3efe41a","updated":"2015-07-13 05:47:17.000000000","message":"Hmm, interestingly. Swap/ephemeral disks are managed by only Nova, Cinder doesn\u0027t know anything about them. It\u0027s somewhat unexpected for me that Cinder affects those disks on your deployment.\n\nAFAIK currently Glance doesn\u0027t know anything about volume-backed images. Glance just stores image properties but doesn\u0027t handle their content. Moreover Nova uses a little hack to create them (it doesn\u0027t specify container_format and disk_format properties, but if it specify them as None, Glance will reject the request).\n\nSo your bug may become a start point to learn Glance to work with volume-backed images. But the work will be long.","commit_id":"cefc8a4718f7eb9d482fccf38fe717e9d963f974"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"496bbd0aa2e4e6e2d12b746f604c01f15bbb8030","unresolved":false,"context_lines":[{"line_number":2833,"context_line":""},{"line_number":2834,"context_line":"    @delete_image_on_error"},{"line_number":2835,"context_line":"    def _do_snapshot_instance(self, context, image_id, instance, rotation):"},{"line_number":2836,"context_line":"        if rotation \u003c 0:"},{"line_number":2837,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2838,"context_line":"        self._snapshot_instance(context, image_id, instance,"},{"line_number":2839,"context_line":"                                task_states.IMAGE_BACKUP)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_511c3477","line":2836,"updated":"2015-07-24 06:14:02.000000000","message":"Should this check be performed for volume-backed backup?","commit_id":"6dcc1af30972b75a3dbfdbde9760755101b635f3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"21af8bfb2b719ce046a32926827cfde3f388f024","unresolved":false,"context_lines":[{"line_number":2833,"context_line":""},{"line_number":2834,"context_line":"    @delete_image_on_error"},{"line_number":2835,"context_line":"    def _do_snapshot_instance(self, context, image_id, instance, rotation):"},{"line_number":2836,"context_line":"        if rotation \u003c 0:"},{"line_number":2837,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2838,"context_line":"        self._snapshot_instance(context, image_id, instance,"},{"line_number":2839,"context_line":"                                task_states.IMAGE_BACKUP)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_013ee827","line":2836,"in_reply_to":"3a50d1a3_511c3477","updated":"2015-07-27 21:32:46.000000000","message":"Done","commit_id":"6dcc1af30972b75a3dbfdbde9760755101b635f3"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"496bbd0aa2e4e6e2d12b746f604c01f15bbb8030","unresolved":false,"context_lines":[{"line_number":3011,"context_line":"                snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027, [])"},{"line_number":3012,"context_line":"                for s in snapshots:"},{"line_number":3013,"context_line":"                    snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3014,"context_line":"                    LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3015,"context_line":"                              instance\u003dinstance)"},{"line_number":3016,"context_line":"                    if snapshot_id:"},{"line_number":3017,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a41bdd9_bd99fbc5","line":3014,"updated":"2015-07-24 06:14:02.000000000","message":"Do your forget to put it under \u0027if\u0027 clause below?","commit_id":"6dcc1af30972b75a3dbfdbde9760755101b635f3"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"21af8bfb2b719ce046a32926827cfde3f388f024","unresolved":false,"context_lines":[{"line_number":3011,"context_line":"                snapshots \u003d image[\u0027properties\u0027].get(\u0027block_device_mapping\u0027, [])"},{"line_number":3012,"context_line":"                for s in snapshots:"},{"line_number":3013,"context_line":"                    snapshot_id \u003d s.get(\u0027snapshot_id\u0027)"},{"line_number":3014,"context_line":"                    LOG.debug(\"Deleting snapshot %s\", snapshot_id,"},{"line_number":3015,"context_line":"                              instance\u003dinstance)"},{"line_number":3016,"context_line":"                    if snapshot_id:"},{"line_number":3017,"context_line":"                        self.volume_api.delete_snapshot(context, snapshot_id)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_e1409ca7","line":3014,"in_reply_to":"9a41bdd9_bd99fbc5","updated":"2015-07-27 21:32:46.000000000","message":"Done","commit_id":"6dcc1af30972b75a3dbfdbde9760755101b635f3"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"674e807eb117cbc2d7a8ac9b80395eadad43fa33","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"        :param is_volume_backed: True if the instance is volume backed"},{"line_number":2855,"context_line":"        \"\"\""},{"line_number":2856,"context_line":"        if rotation \u003c 0:"},{"line_number":2857,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2858,"context_line":""},{"line_number":2859,"context_line":"        if is_volume_backed:"},{"line_number":2860,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_f3b25d93","line":2857,"updated":"2015-07-29 10:48:21.000000000","message":"this leaves the image undeleted\n\nsee also https://github.com/openstack/nova/commit/3824051b1e5618388a17c88867a3037397bc96b7","commit_id":"3513bde0fe66cea6dbff2ee2d586248847948296"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"67fe91f98a03eac71bb96f74040b7f91cfef30d4","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"        :param is_volume_backed: True if the instance is volume backed"},{"line_number":2855,"context_line":"        \"\"\""},{"line_number":2856,"context_line":"        if rotation \u003c 0:"},{"line_number":2857,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2858,"context_line":""},{"line_number":2859,"context_line":"        if is_volume_backed:"},{"line_number":2860,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_796600f0","line":2857,"in_reply_to":"3a50d1a3_1f7567f9","updated":"2015-07-30 05:08:30.000000000","message":"Agree with you that this check should not be performed here, and its removing out of here is a deal for a separate patch.","commit_id":"3513bde0fe66cea6dbff2ee2d586248847948296"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b82bd3348c2498d92dd67107ba99bb62abb9edce","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"        :param is_volume_backed: True if the instance is volume backed"},{"line_number":2855,"context_line":"        \"\"\""},{"line_number":2856,"context_line":"        if rotation \u003c 0:"},{"line_number":2857,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2858,"context_line":""},{"line_number":2859,"context_line":"        if is_volume_backed:"},{"line_number":2860,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_1f7567f9","line":2857,"in_reply_to":"3a50d1a3_f0d46f47","updated":"2015-07-29 23:22:39.000000000","message":"After deeper investigation, I think we don\u0027t need this change. Because the image based backup is different from the volume based one. The big difference is, for volume backed backup, we\u0027re calling/resuing the snapshot_volume_backed, which will snapshot the volume firstly and then create the image. And which has done at the compute/api.py. But as for the image backed backup, it will create image firstly and then do the snapshot. So we don\u0027t have to worry about the issue fixed by https://github.com/openstack/nova/commit/3824051b1e5618388a17c88867a3037397bc96b7\n\nBesides, I don\u0027t think we need the rotation check at this level, because I\u0027m sure it has been verified at the api level, see https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/admin_actions.py#L266 unless I missed something. FWIW, i will submit a patch to remove the check from here, since it doesn\u0027t make any sense to check it at here.\n\nThanks again for review my patch.","commit_id":"3513bde0fe66cea6dbff2ee2d586248847948296"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"db0946ee3757e821ec8a82f3af9c402ed6ff03b7","unresolved":false,"context_lines":[{"line_number":2854,"context_line":"        :param is_volume_backed: True if the instance is volume backed"},{"line_number":2855,"context_line":"        \"\"\""},{"line_number":2856,"context_line":"        if rotation \u003c 0:"},{"line_number":2857,"context_line":"            raise exception.RotationRequiredForBackup()"},{"line_number":2858,"context_line":""},{"line_number":2859,"context_line":"        if is_volume_backed:"},{"line_number":2860,"context_line":"            instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_f0d46f47","line":2857,"in_reply_to":"3a50d1a3_f3b25d93","updated":"2015-07-29 21:17:10.000000000","message":"Ah, shxt. Will dig into how to fix it. Thanks for the heads up.","commit_id":"3513bde0fe66cea6dbff2ee2d586248847948296"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"63512528686c977830440eb2726b2bcfdf8329b6","unresolved":false,"context_lines":[{"line_number":2247,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2248,"context_line":"                LOG.debug(\u0027Ignoring DiskNotFound: %s\u0027, exc,"},{"line_number":2249,"context_line":"                          instance\u003dinstance)"},{"line_number":2250,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2251,"context_line":"                LOG.debug(\u0027Ignoring VolumeNotFound: %s\u0027, exc,"},{"line_number":2252,"context_line":"                          instance\u003dinstance)"},{"line_number":2253,"context_line":"            except (cinder_exception.EndpointNotFound,"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a4dcd0f_ee31cbed","line":2250,"updated":"2015-08-04 06:48:16.000000000","message":"[1]","commit_id":"d2995a6babc4028207741687e0a26a5f096a706b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"63512528686c977830440eb2726b2bcfdf8329b6","unresolved":false,"context_lines":[{"line_number":3023,"context_line":"                        try:"},{"line_number":3024,"context_line":"                            self.volume_api.delete_snapshot(context,"},{"line_number":3025,"context_line":"                                                            snapshot_id)"},{"line_number":3026,"context_line":"                        except Exception:"},{"line_number":3027,"context_line":"                            # NOTE(flwang): The snapshot deletion may fail due"},{"line_number":3028,"context_line":"                            # to a failure of Cinder. For example, the snapshot"},{"line_number":3029,"context_line":"                            # may have been deleted from Cinder side. For this"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a4dcd0f_8e74c79c","line":3026,"updated":"2015-08-04 06:48:16.000000000","message":"I think we should convert exception.VolumeNotFound to a debug message. See [1]","commit_id":"d2995a6babc4028207741687e0a26a5f096a706b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bbfa1e393f5bc44e2c76bb2e74cef218b88eae8c","unresolved":false,"context_lines":[{"line_number":3023,"context_line":"                        try:"},{"line_number":3024,"context_line":"                            self.volume_api.delete_snapshot(context,"},{"line_number":3025,"context_line":"                                                            snapshot_id)"},{"line_number":3026,"context_line":"                        except Exception:"},{"line_number":3027,"context_line":"                            # NOTE(flwang): The snapshot deletion may fail due"},{"line_number":3028,"context_line":"                            # to a failure of Cinder. For example, the snapshot"},{"line_number":3029,"context_line":"                            # may have been deleted from Cinder side. For this"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a4dcd0f_7ee244d7","line":3026,"in_reply_to":"1a4dcd0f_8e74c79c","updated":"2015-08-04 08:42:41.000000000","message":"Make sense for me.","commit_id":"d2995a6babc4028207741687e0a26a5f096a706b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"807d15edfefddfa6c283098f9760d9670bac14f7","unresolved":false,"context_lines":[{"line_number":3023,"context_line":"                        try:"},{"line_number":3024,"context_line":"                            self.volume_api.delete_snapshot(context,"},{"line_number":3025,"context_line":"                                                            snapshot_id)"},{"line_number":3026,"context_line":"                        except Exception:"},{"line_number":3027,"context_line":"                            # NOTE(flwang): The snapshot deletion may fail due"},{"line_number":3028,"context_line":"                            # to a failure of Cinder. For example, the snapshot"},{"line_number":3029,"context_line":"                            # may have been deleted from Cinder side. For this"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a4dcd0f_55154299","line":3026,"updated":"2015-08-06 20:47:06.000000000","message":"I meant to handle VolumeNotFound separately as _shutdown_instance does. But keep common exception handler with LOG.exception","commit_id":"b3d59f9a14312f9911eab9e38e0ce259c2e4df1d"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28823d9c40e580f5b3504d0782dca24e3d557029","unresolved":false,"context_lines":[{"line_number":816,"context_line":""},{"line_number":817,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type,"},{"line_number":818,"context_line":"                        rotation, is_volume_backend\u003dFalse):"},{"line_number":819,"context_line":"        version \u003d \u00273.0\u0027"},{"line_number":820,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":821,"context_line":"                version\u003dversion)"},{"line_number":822,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_aba0da90","line":819,"updated":"2015-03-19 11:32:36.000000000","message":"The RPC API version needs to be bumped (along with the manager version). And you will need to pop the is_volume_backend kwarg from being sent to clients (nova-compute workers) that do not understand the is_volume_backend kwarg...","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"749a663388f9076bb512f2c28fcaa9915d3c203a","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type,"},{"line_number":845,"context_line":"                        rotation):"},{"line_number":846,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":847,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":848,"context_line":"                version\u003dversion)"},{"line_number":849,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_0ff08b8f","line":846,"updated":"2015-04-23 17:18:23.000000000","message":"You can\u0027t do this, as this breaks compatibility with calling to computes that only support 4.0.\n\nYou need to figure out if this instance is volume-backed, and control your version accordingly. You need to check the upgrade level to see if 4.1 is allowed, and if so, send that, otherwise send 4.0 if it\u0027s not volume-backed, and fail to send if it is.\n\nPresumably you should add a new argument to this method to signal the volume-backed-ness, but not actually pass it on the wire of course.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"27b3572e2ebbb736f5a987e0522bebd827db54d3","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type,"},{"line_number":845,"context_line":"                        rotation):"},{"line_number":846,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":847,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":848,"context_line":"                version\u003dversion)"},{"line_number":849,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_7a2583a9","line":846,"in_reply_to":"bab921fb_0ff08b8f","updated":"2015-04-23 17:24:42.000000000","message":"OK, yeah, that goes back to patch set 6 where the compute api was passing in the is_volume_backed bool so we have that info.\n\nThen if we can send 4.1, send it.  If not 4.1 and is_volume_backed \u003d\u003d False, send 4.0 but pop the is_volume_backed kwarg before sending (see reserve_block_device_name above), else fail.\n\nI\u0027m not sure how to explicitly fail in here though, are there examples?","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f989969fe50cc9297da9c9069e66f2ab555f5f3c","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type,"},{"line_number":845,"context_line":"                        rotation):"},{"line_number":846,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":847,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":848,"context_line":"                version\u003dversion)"},{"line_number":849,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_9a0f37e1","line":846,"in_reply_to":"bab921fb_7a2583a9","updated":"2015-04-23 17:29:27.000000000","message":"I guess we just raise some exception in here and that fails the operation.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"de415ab8187bd10b501134c21b785c1ff99414f8","unresolved":false,"context_lines":[{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def backup_instance(self, ctxt, instance, image_id, backup_type,"},{"line_number":845,"context_line":"                        rotation):"},{"line_number":846,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":847,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":848,"context_line":"                version\u003dversion)"},{"line_number":849,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab921fb_1a21e7fb","line":846,"in_reply_to":"bab921fb_9a0f37e1","updated":"2015-04-23 17:35:41.000000000","message":"Just make sure the caller handles it and replicates the existing \"this isn\u0027t supported\" behavior gracefully when it happens. Thus when the compute pin is lifted, post-upgrade, the api will just start working for these instances.","commit_id":"fda8a44c84514750591cef0d62410335e4ebc86f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        kw \u003d {\u0027instance\u0027: instance, \u0027bdm\u0027: bdm}"},{"line_number":360,"context_line":"        if self.client.can_send_version(\u00274.0\u0027):"},{"line_number":361,"context_line":"            version \u003d \u00274.0\u0027"},{"line_number":362,"context_line":"            if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":363,"context_line":"                version \u003d \u00274.1\u0027"},{"line_number":364,"context_line":"                kw[\u0027mountpoint\u0027] \u003d mountpoint"},{"line_number":365,"context_line":"                kw[\u0027volume_id\u0027] \u003d volume_id"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_68e9c4e5","line":362,"updated":"2015-05-05 22:49:41.000000000","message":"Why are you changing attach_volume at all?","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":362,"context_line":"            if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":363,"context_line":"                version \u003d \u00274.1\u0027"},{"line_number":364,"context_line":"                kw[\u0027mountpoint\u0027] \u003d mountpoint"},{"line_number":365,"context_line":"                kw[\u0027volume_id\u0027] \u003d volume_id"},{"line_number":366,"context_line":"        else:"},{"line_number":367,"context_line":"            version \u003d \u00273.16\u0027"},{"line_number":368,"context_line":"            kw[\u0027mountpoint\u0027] \u003d mountpoint"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_28ef4cea","line":365,"updated":"2015-05-05 22:49:41.000000000","message":"These were not present in 4.0, deprecated in 3.x, so you should not add them back.","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":856,"context_line":"                    }"},{"line_number":857,"context_line":"        if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":858,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":859,"context_line":"            msg_args[\u0027is_volume_backend\u0027] \u003d True"},{"line_number":860,"context_line":"        else:"},{"line_number":861,"context_line":"            version \u003d self._compat_ver(\u00274.0\u0027, \u00273.0\u0027)"},{"line_number":862,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_c8a7b8bb","line":859,"updated":"2015-05-05 22:49:41.000000000","message":"You probably want to wait for this to land: \n\n  https://review.openstack.org/#/c/179951/\n\nBecause it will make your work here simpler.","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"                   mapping\u003dmapping)"},{"line_number":1067,"context_line":""},{"line_number":1068,"context_line":"    def refresh_security_group_rules(self, ctxt, security_group_id, host):"},{"line_number":1069,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":1070,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost, version\u003dversion)"},{"line_number":1071,"context_line":"        cctxt.cast(ctxt, \u0027refresh_security_group_rules\u0027,"},{"line_number":1072,"context_line":"                   security_group_id\u003dsecurity_group_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_289d0c66","line":1069,"updated":"2015-05-05 22:49:41.000000000","message":"Why are you changing this?","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"    def refresh_security_group_members(self, ctxt, security_group_id,"},{"line_number":1075,"context_line":"            host):"},{"line_number":1076,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":1077,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost, version\u003dversion)"},{"line_number":1078,"context_line":"        cctxt.cast(ctxt, \u0027refresh_security_group_members\u0027,"},{"line_number":1079,"context_line":"                   security_group_id\u003dsecurity_group_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_089a506e","line":1076,"updated":"2015-05-05 22:49:41.000000000","message":"and this?","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f6a13eb5d87545c457f7aa2110b8b82eb874baf","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"                   security_group_id\u003dsecurity_group_id)"},{"line_number":1080,"context_line":""},{"line_number":1081,"context_line":"    def refresh_instance_security_rules(self, ctxt, host, instance):"},{"line_number":1082,"context_line":"        version \u003d self._compat_ver(\u00274.1\u0027, \u00273.0\u0027)"},{"line_number":1083,"context_line":"        instance_p \u003d jsonutils.to_primitive(instance)"},{"line_number":1084,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":1085,"context_line":"                version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3acd31a7_e8895427","line":1082,"updated":"2015-05-05 22:49:41.000000000","message":"and this?","commit_id":"e0fa7dc84f0e61971943d430fbbfe5643fe7da22"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ace10196ed91e65a2294d1716973258a4fadf5ca","unresolved":false,"context_lines":[{"line_number":750,"context_line":"                    }"},{"line_number":751,"context_line":"        if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":752,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":753,"context_line":"            msg_args[\u0027is_volume_backend\u0027] \u003d is_volume_backend"},{"line_number":754,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":755,"context_line":"                version\u003dversion)"},{"line_number":756,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_4082ebc9","line":753,"updated":"2015-05-26 21:17:42.000000000","message":"I thought that we said earlier that if is_volume_backend \u003d\u003d True and we can\u0027t send this version, we were supposed to fail with an rpc client (like if we couldn\u0027t cast it) and then the compute API would handle that and return an error to the user (which is what you were doing with the InvalidRequest before).","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"f70528e7701f4d96ea19f17bc9079e1115340f5e","unresolved":false,"context_lines":[{"line_number":750,"context_line":"                    }"},{"line_number":751,"context_line":"        if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":752,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":753,"context_line":"            msg_args[\u0027is_volume_backend\u0027] \u003d is_volume_backend"},{"line_number":754,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":755,"context_line":"                version\u003dversion)"},{"line_number":756,"context_line":"        cctxt.cast(ctxt, \u0027backup_instance\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a016987_32a05e90","line":753,"in_reply_to":"7a016987_4082ebc9","updated":"2015-05-28 03:31:08.000000000","message":"Done","commit_id":"09a40883a75ffbb726c6cc162c3bef7358008d37"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        if self.client.can_send_version(\u00274.1\u0027):"},{"line_number":752,"context_line":"            version \u003d \u00274.1\u0027"},{"line_number":753,"context_line":"            msg_args[\u0027is_volume_backed\u0027] \u003d is_volume_backed"},{"line_number":754,"context_line":"        elif not is_volume_backed:"},{"line_number":755,"context_line":"            raise exception.InvalidRequest()"},{"line_number":756,"context_line":"        cctxt \u003d self.client.prepare(server\u003d_compute_host(None, instance),"},{"line_number":757,"context_line":"                version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":20,"id":"5afe65bd_c0a8ad8f","line":754,"updated":"2015-06-04 18:56:40.000000000","message":"Shouldn\u0027t this be\n\nelif is_volume_backed:\n\n?  Since if you can\u0027t send 4.1 but you\u0027re trying to backup a volume-backed instance, it\u0027s not going to work and it\u0027s an invalid request.\n\nYou\u0027re also missing a unit test for this case.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28823d9c40e580f5b3504d0782dca24e3d557029","unresolved":false,"context_lines":[{"line_number":1934,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1935,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_snapshot_volume_backed.called)"},{"line_number":1938,"context_line":"            self.assertEqual(image, resp)"},{"line_number":1939,"context_line":""},{"line_number":1940,"context_line":"    def _test_snapshot_volume_backed(self, quiesce_required, quiesce_fails,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_ebebb2a1","line":1937,"updated":"2015-03-19 11:32:36.000000000","message":"These are kind of weak assertions. How about using assert_called_once_with() and specifying the expected call signatures?","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"28823d9c40e580f5b3504d0782dca24e3d557029","unresolved":false,"context_lines":[{"line_number":1935,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_snapshot_volume_backed.called)"},{"line_number":1938,"context_line":"            self.assertEqual(image, resp)"},{"line_number":1939,"context_line":""},{"line_number":1940,"context_line":"    def _test_snapshot_volume_backed(self, quiesce_required, quiesce_fails,"},{"line_number":1941,"context_line":"                                     vm_state\u003dvm_states.ACTIVE):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_ab6a9a17","line":1938,"updated":"2015-03-19 11:32:36.000000000","message":"I don\u0027t believe there are any ways in which a volume-backed instance has an image_ref property on the Instance object. However, in this patch, you have a code path that does check this condition. However, you don\u0027t have a unit test that stresses that code path.","commit_id":"2391338602d9d9f47f6543d033922ca821b2f668"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1897,"context_line":"        self._test_snapshot_and_backup(is_snapshot\u003dFalse,"},{"line_number":1898,"context_line":"                                       with_base_ref\u003dTrue)"},{"line_number":1899,"context_line":""},{"line_number":1900,"context_line":"    def test_backup_volume_backend(self):"},{"line_number":1901,"context_line":"        image \u003d dict(id\u003d\u0027fake-image-id\u0027, status\u003d\u0027ACTIVE\u0027, name\u003d\u0027ImageName\u0027,"},{"line_number":1902,"context_line":"                     properties\u003d{})"},{"line_number":1903,"context_line":"        instance \u003d self._create_instance_obj()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_ba50e62c","line":1900,"updated":"2015-03-20 14:15:43.000000000","message":"nit: I might name this \"test_backup_volume_backed_instance\".","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1897,"context_line":"        self._test_snapshot_and_backup(is_snapshot\u003dFalse,"},{"line_number":1898,"context_line":"                                       with_base_ref\u003dTrue)"},{"line_number":1899,"context_line":""},{"line_number":1900,"context_line":"    def test_backup_volume_backend(self):"},{"line_number":1901,"context_line":"        image \u003d dict(id\u003d\u0027fake-image-id\u0027, status\u003d\u0027ACTIVE\u0027, name\u003d\u0027ImageName\u0027,"},{"line_number":1902,"context_line":"                     properties\u003d{})"},{"line_number":1903,"context_line":"        instance \u003d self._create_instance_obj()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_d160c137","line":1900,"in_reply_to":"9a80dd14_ba50e62c","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1903,"context_line":"        instance \u003d self._create_instance_obj()"},{"line_number":1904,"context_line":"        expected_extra_properties \u003d {\u0027image_type\u0027: \u0027backup\u0027,"},{"line_number":1905,"context_line":"                                     \u0027backup_type\u0027: \u0027fake-backup-type\u0027}"},{"line_number":1906,"context_line":"        instance.image_ref \u003d None"},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"        values \u003d {\u0027id\u0027: 1, \u0027source_type\u0027: \u0027volume\u0027, \u0027volume_id\u0027: \u0027fake-vol-id\u0027,"},{"line_number":1909,"context_line":"                  \u0027destination_type\u0027: \u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_fa16dea5","line":1906,"updated":"2015-03-20 14:15:43.000000000","message":"Seems you don\u0027t need this anymore.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1903,"context_line":"        instance \u003d self._create_instance_obj()"},{"line_number":1904,"context_line":"        expected_extra_properties \u003d {\u0027image_type\u0027: \u0027backup\u0027,"},{"line_number":1905,"context_line":"                                     \u0027backup_type\u0027: \u0027fake-backup-type\u0027}"},{"line_number":1906,"context_line":"        instance.image_ref \u003d None"},{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"        values \u003d {\u0027id\u0027: 1, \u0027source_type\u0027: \u0027volume\u0027, \u0027volume_id\u0027: \u0027fake-vol-id\u0027,"},{"line_number":1909,"context_line":"                  \u0027destination_type\u0027: \u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_31603532","line":1906,"in_reply_to":"9a80dd14_fa16dea5","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"        values \u003d {\u0027id\u0027: 1, \u0027source_type\u0027: \u0027volume\u0027, \u0027volume_id\u0027: \u0027fake-vol-id\u0027,"},{"line_number":1909,"context_line":"                  \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":1910,"context_line":"                  \u0027instance_uuid\u0027: \u0027fake-instance\u0027,"},{"line_number":1911,"context_line":"                  \u0027boot_index\u0027: 0, \u0027destination_type\u0027: \u0027volume\u0027}"},{"line_number":1912,"context_line":"        bdm \u003d objects.block_device.BlockDeviceMapping(context\u003dself.context,"},{"line_number":1913,"context_line":"                                                      **values)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_7a22ee01","line":1910,"updated":"2015-03-20 14:15:43.000000000","message":"nit: use instance.uuid here.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1907,"context_line":""},{"line_number":1908,"context_line":"        values \u003d {\u0027id\u0027: 1, \u0027source_type\u0027: \u0027volume\u0027, \u0027volume_id\u0027: \u0027fake-vol-id\u0027,"},{"line_number":1909,"context_line":"                  \u0027destination_type\u0027: \u0027volume\u0027,"},{"line_number":1910,"context_line":"                  \u0027instance_uuid\u0027: \u0027fake-instance\u0027,"},{"line_number":1911,"context_line":"                  \u0027boot_index\u0027: 0, \u0027destination_type\u0027: \u0027volume\u0027}"},{"line_number":1912,"context_line":"        bdm \u003d objects.block_device.BlockDeviceMapping(context\u003dself.context,"},{"line_number":1913,"context_line":"                                                      **values)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_5154d153","line":1910,"in_reply_to":"9a80dd14_7a22ee01","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1929,"context_line":"        ):"},{"line_number":1930,"context_line":"            resp \u003d self.compute_api.backup(self.context, instance,"},{"line_number":1931,"context_line":"                                           \u0027fake-name\u0027,"},{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_da967aef","line":1932,"updated":"2015-03-20 14:15:43.000000000","message":"nit: Let\u0027s use a real value, i.e. \u0027weekly\u0027.","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1929,"context_line":"        ):"},{"line_number":1930,"context_line":"            resp \u003d self.compute_api.backup(self.context, instance,"},{"line_number":1931,"context_line":"                                           \u0027fake-name\u0027,"},{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_914e49c0","line":1932,"in_reply_to":"9a80dd14_da967aef","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1930,"context_line":"            resp \u003d self.compute_api.backup(self.context, instance,"},{"line_number":1931,"context_line":"                                           \u0027fake-name\u0027,"},{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_3a5b1687","line":1933,"updated":"2015-03-20 14:15:43.000000000","message":"nit: Let\u0027s use a real value, i.e. 1","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1930,"context_line":"            resp \u003d self.compute_api.backup(self.context, instance,"},{"line_number":1931,"context_line":"                                           \u0027fake-name\u0027,"},{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_d1c7e110","line":1933,"in_reply_to":"9a80dd14_3a5b1687","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_fa1c1e79","line":1935,"updated":"2015-03-20 14:15:43.000000000","message":"Use this instead:\n\nmock_get_by_instance_uuid.assert_called_once_with(self.context, instance.uuid)","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1932,"context_line":"                                           \u0027fake-backup-type\u0027,"},{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_11d259d2","line":1935,"in_reply_to":"9a80dd14_fa1c1e79","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"},{"line_number":1939,"context_line":"                                    instance,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_7d0f482e","line":1936,"updated":"2015-03-20 14:15:43.000000000","message":"Use this instead:\n\nmock_is_volume_backed_instance.assert_called_once_with(self.context, instance, bdms)","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1933,"context_line":"                                           \u0027fake-rotation\u0027,"},{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"},{"line_number":1939,"context_line":"                                    instance,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_31d755c3","line":1936,"in_reply_to":"9a80dd14_7d0f482e","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"666ddb85b148d881c2169f18a1f979f1818f333c","unresolved":false,"context_lines":[{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"},{"line_number":1939,"context_line":"                                    instance,"},{"line_number":1940,"context_line":"                                    {\u0027properties\u0027: {}},"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_bdb1c045","line":1937,"updated":"2015-03-20 14:15:43.000000000","message":"use this instead:\n\nmock_root_metadata.assert_called_once_with(self.context, self.compute_api.image_api, self.compute_api.volume_api)","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"73c932808cff4d44b24e8b0ea38665c01da2ede1","unresolved":false,"context_lines":[{"line_number":1934,"context_line":"                                           extra_properties\u003d{})"},{"line_number":1935,"context_line":"            self.assertTrue(mock_get_by_instance_uuid.called)"},{"line_number":1936,"context_line":"            self.assertTrue(mock_is_volume_backed_instance.called)"},{"line_number":1937,"context_line":"            self.assertTrue(mock_root_metadata.called)"},{"line_number":1938,"context_line":"            mock_snapshot_volume_backed.assert_called_once_with(self.context,"},{"line_number":1939,"context_line":"                                    instance,"},{"line_number":1940,"context_line":"                                    {\u0027properties\u0027: {}},"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_51dbf1ec","line":1937,"in_reply_to":"9a80dd14_bdb1c045","updated":"2015-03-24 03:30:53.000000000","message":"Done","commit_id":"dcf0557df424f0e265e722dccc200b99e0f979cf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1394dd803e69e19288b7c7ee1b2692d9f22bfc8c","unresolved":false,"context_lines":[{"line_number":1893,"context_line":""},{"line_number":1894,"context_line":"    def test_backup_volume_backed_instance_invalid_state(self):"},{"line_number":1895,"context_line":"        instance \u003d self._create_instance_obj()"},{"line_number":1896,"context_line":"        instance.vm_state \u003d vm_states.SUSPENDED"},{"line_number":1897,"context_line":"        instance.task_state \u003d None"},{"line_number":1898,"context_line":"        instance.image_ref \u003d None"},{"line_number":1899,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3afb71cf_4437cee3","line":1896,"updated":"2015-06-04 18:56:40.000000000","message":"nit: could have a loop in this test for both SUSPENDED and PAUSED since those are called out and checked in the backup compute API method which calls snapshot_volume_backed.","commit_id":"7ca8116d3d6967e7f5189b11febbb0ac7c934708"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"63512528686c977830440eb2726b2bcfdf8329b6","unresolved":false,"context_lines":[{"line_number":2503,"context_line":"                         {\u0027id\u0027: \u0027backup_image_id_2\u0027},"},{"line_number":2504,"context_line":"                         {\u0027id\u0027: \u0027backup_image_id_3\u0027,"},{"line_number":2505,"context_line":"                          \u0027properties\u0027: {\u0027instance_uuid\u0027: inst1.uuid,"},{"line_number":2506,"context_line":"                                \u0027block_device_mapping\u0027: [{\u0027snapshot_id\u0027:"},{"line_number":2507,"context_line":"                                                          snapshot_id}],"},{"line_number":2508,"context_line":"                                \u0027backup_type\u0027: \u0027daily\u0027,"},{"line_number":2509,"context_line":"                                \u0027image_type\u0027: \u0027backup\u0027}},"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a4dcd0f_2e93335d","line":2506,"updated":"2015-08-04 06:48:16.000000000","message":"Could we have here an additonal snapshot for check of exception handling, and a virtual device (ephemeral or swap) for check of processing this kind of bdm (when snapshot_id is None)?","commit_id":"d2995a6babc4028207741687e0a26a5f096a706b"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"bbfa1e393f5bc44e2c76bb2e74cef218b88eae8c","unresolved":false,"context_lines":[{"line_number":2503,"context_line":"                         {\u0027id\u0027: \u0027backup_image_id_2\u0027},"},{"line_number":2504,"context_line":"                         {\u0027id\u0027: \u0027backup_image_id_3\u0027,"},{"line_number":2505,"context_line":"                          \u0027properties\u0027: {\u0027instance_uuid\u0027: inst1.uuid,"},{"line_number":2506,"context_line":"                                \u0027block_device_mapping\u0027: [{\u0027snapshot_id\u0027:"},{"line_number":2507,"context_line":"                                                          snapshot_id}],"},{"line_number":2508,"context_line":"                                \u0027backup_type\u0027: \u0027daily\u0027,"},{"line_number":2509,"context_line":"                                \u0027image_type\u0027: \u0027backup\u0027}},"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a4dcd0f_3eb59ccc","line":2506,"in_reply_to":"1a4dcd0f_2e93335d","updated":"2015-08-04 08:42:41.000000000","message":"Good point.","commit_id":"d2995a6babc4028207741687e0a26a5f096a706b"}]}
