)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3e4d0a2ae8346c66920460b7ee37e7b5b3a37d9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Tagged attach compute manager and net API support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds support to the compute manager and Neutron API for"},{"line_number":10,"context_line":"tagged attach of network interfaces and block devices."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I1f25f8098a495c49e7021eb92b2cd5f048ced484"},{"line_number":13,"context_line":"Implements: blueprint virt-device-tagged-attach-detach"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da4df55a_c3bd7669","line":10,"updated":"2016-12-27 16:32:51.000000000","message":"This patch is obviously just starting the changes for tagging VIFs when attaching them. When you do the BDM tagging work, please do that in a separate patch to keep the review size manageable in the series.","commit_id":"07aa36d0a59d234ea388d2a67f26b851a0f3577d"}],"nova/api/openstack/compute/volumes.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"54d957562d84fe1551c54673dffb41c18ee2217c","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":49,"id":"7f231b9d_38876812","line":351,"range":{"start_line":351,"start_character":16,"end_line":351,"end_character":54},"updated":"2017-06-13 16:16:47.000000000","message":"I missed this before :/","commit_id":"4a73a94fd5f33f61f540c50e403dfbd4c6aab2d0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3defe44d1bca58345f315338f98913c2f1cb1d0d","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_7ca2884d","line":351,"updated":"2017-06-22 14:01:39.000000000","message":"We\u0027re missing a unit test for this case.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_9f84360e","line":351,"in_reply_to":"5f201791_7ca2884d","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"87d4020d34281cf2fe253881527e2208d8d2b0c8","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_3523ecaa","line":351,"updated":"2017-06-23 06:41:22.000000000","message":"there are three exceptions in https://review.openstack.org/#/c/391941/56/nova/exception.py\nYou only catch one of them.\n\nAnd that exception catching should be done at API layer patch, and add unit tests for those exception catches.","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54ff0f049cd13f652537f27d24448e9ca8d325b0","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_3bb75bf9","line":351,"in_reply_to":"5f201791_3523ecaa","updated":"2017-06-23 10:04:46.000000000","message":"\u003e there are three exceptions in\n\u003e https://review.openstack.org/#/c/391941/56/nova/exception.py\n\u003e You only catch one of them.\n\nTaggedAttachmentNotSupported is the base class for the other two, so I\u0027m catching only it.\n\n\u003e And that exception catching should be done at API layer\n\u003e patch\n\nMatt specifically asked [1] for the other way around. I don\u0027t really care either way, but please come to a consensus :)\n\n\u003e and add unit tests for those exception catches.\n\nI did: https://review.openstack.org/#/c/391941/56/nova/tests/unit/api/openstack/compute/test_volumes.py\n\n[1] https://review.openstack.org/#/c/376021/49/nova/api/openstack/compute/attach_interfaces.py@144","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c70316e34398bf47b3b6d57b31b3a4214057adb3","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        except (exception.InvalidVolume,"},{"line_number":349,"context_line":"                exception.InvalidDevicePath,"},{"line_number":350,"context_line":"                exception.InvalidInput,"},{"line_number":351,"context_line":"                exception.TaggedAttachmentNotSupported) as e:"},{"line_number":352,"context_line":"            raise exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # The attach is async"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_3ec17b2f","line":351,"in_reply_to":"5f201791_3bb75bf9","updated":"2017-06-23 16:46:07.000000000","message":"Right I asked that the change that introduced the new exceptions getting raised up also add the code to handle them in the REST API controller code, otherwise as a reviewer you lose context on which change is doing what, i.e. when I review the REST API code changes for the new microversion, I don\u0027t want to also make sure that everything else below this is remembered to be covered, like error handling.","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"}],"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5ccf58506fe37667cf3b0122b4eadd16869bbd6","unresolved":false,"context_lines":[{"line_number":3552,"context_line":"                                    vm_states.SOFT_DELETED, vm_states.SHELVED,"},{"line_number":3553,"context_line":"                                    vm_states.SHELVED_OFFLOADED])"},{"line_number":3554,"context_line":"    def attach_volume(self, context, instance, volume_id, device\u003dNone,"},{"line_number":3555,"context_line":"                       disk_bus\u003dNone, device_type\u003dNone, tag\u003dNone):"},{"line_number":3556,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":3557,"context_line":"        # NOTE(vish): Fail fast if the device is not going to pass. This"},{"line_number":3558,"context_line":"        #             will need to be removed along with the test if we"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_af9e6d04","line":3555,"updated":"2017-01-23 18:47:52.000000000","message":"Alignment is wrong here. It was wrong before, but I think you should fix it since you\u0027ve hit the line anyway.","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"7514a51a73fe2a13461f231892299c9c8a255895","unresolved":false,"context_lines":[{"line_number":3552,"context_line":"                                    vm_states.SOFT_DELETED, vm_states.SHELVED,"},{"line_number":3553,"context_line":"                                    vm_states.SHELVED_OFFLOADED])"},{"line_number":3554,"context_line":"    def attach_volume(self, context, instance, volume_id, device\u003dNone,"},{"line_number":3555,"context_line":"                       disk_bus\u003dNone, device_type\u003dNone, tag\u003dNone):"},{"line_number":3556,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":3557,"context_line":"        # NOTE(vish): Fail fast if the device is not going to pass. This"},{"line_number":3558,"context_line":"        #             will need to be removed along with the test if we"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_1601223a","line":3555,"in_reply_to":"5a3905b3_af9e6d04","updated":"2017-01-24 18:24:20.000000000","message":"Done","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":3779,"context_line":"                                                         device,"},{"line_number":3780,"context_line":"                                                         disk_bus,"},{"line_number":3781,"context_line":"                                                         device_type)"},{"line_number":3782,"context_line":""},{"line_number":3783,"context_line":"        return self._attach_volume(context, instance, volume_id, device,"},{"line_number":3784,"context_line":"                                   disk_bus, device_type)"},{"line_number":3785,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_7ce9a37e","side":"PARENT","line":3782,"updated":"2017-05-17 21:23:05.000000000","message":"nit: unrelated","commit_id":"7280f4fc4c5a2203ac2f59a9df0525488ac2c1ff"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":3779,"context_line":"                                                         device,"},{"line_number":3780,"context_line":"                                                         disk_bus,"},{"line_number":3781,"context_line":"                                                         device_type)"},{"line_number":3782,"context_line":""},{"line_number":3783,"context_line":"        return self._attach_volume(context, instance, volume_id, device,"},{"line_number":3784,"context_line":"                                   disk_bus, device_type)"},{"line_number":3785,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_56e470ac","side":"PARENT","line":3782,"in_reply_to":"ff0f0b1f_7ce9a37e","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"7280f4fc4c5a2203ac2f59a9df0525488ac2c1ff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":3683,"context_line":"            # a valid one."},{"line_number":3684,"context_line":"            # We leave the setting of that value when the actual attach"},{"line_number":3685,"context_line":"            # happens on the compute manager"},{"line_number":3686,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3687,"context_line":"                context\u003dcontext,"},{"line_number":3688,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"},{"line_number":3689,"context_line":"                instance_uuid\u003dinstance.uuid, boot_index\u003dNone,"},{"line_number":3690,"context_line":"                volume_id\u003dvolume_id,"},{"line_number":3691,"context_line":"                device_name\u003dNone, guest_format\u003dNone,"},{"line_number":3692,"context_line":"                disk_bus\u003ddisk_bus, device_type\u003ddevice_type)"},{"line_number":3693,"context_line":"            volume_bdm.create()"},{"line_number":3694,"context_line":"        else:"},{"line_number":3695,"context_line":"            # NOTE(vish): This is done on the compute host because we want"},{"line_number":3696,"context_line":"            #             to avoid a race where two devices are requested at"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_5cb6dfdb","line":3693,"range":{"start_line":3686,"start_character":12,"end_line":3693,"end_character":31},"updated":"2017-05-17 21:23:05.000000000","message":"Why don\u0027t you tag the BDM in the case of attaching a volume to a shelved-offloaded instance? That\u0027s what the \u0027local\u0027 case is here, see microversion 2.20:\n\nhttps://docs.openstack.org/developer/nova/api_microversion_history.html#id18\n\nI guess I see now below that we don\u0027t support tagging a shelved offloaded instance because we can\u0027t rpc call to the compute to reserve the bdm and check if we support tagging.\n\nProbably should add a comment here in this block about why we don\u0027t support tagging volumes attached to shelved offloaded instances.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":3683,"context_line":"            # a valid one."},{"line_number":3684,"context_line":"            # We leave the setting of that value when the actual attach"},{"line_number":3685,"context_line":"            # happens on the compute manager"},{"line_number":3686,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3687,"context_line":"                context\u003dcontext,"},{"line_number":3688,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"},{"line_number":3689,"context_line":"                instance_uuid\u003dinstance.uuid, boot_index\u003dNone,"},{"line_number":3690,"context_line":"                volume_id\u003dvolume_id,"},{"line_number":3691,"context_line":"                device_name\u003dNone, guest_format\u003dNone,"},{"line_number":3692,"context_line":"                disk_bus\u003ddisk_bus, device_type\u003ddevice_type)"},{"line_number":3693,"context_line":"            volume_bdm.create()"},{"line_number":3694,"context_line":"        else:"},{"line_number":3695,"context_line":"            # NOTE(vish): This is done on the compute host because we want"},{"line_number":3696,"context_line":"            #             to avoid a race where two devices are requested at"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_16a158aa","line":3693,"range":{"start_line":3686,"start_character":12,"end_line":3693,"end_character":31},"in_reply_to":"ff0f0b1f_5cb6dfdb","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        if is_shelved_offloaded:"},{"line_number":3777,"context_line":"            if tag:"},{"line_number":3778,"context_line":"                # NOTE(artom) By refusing to perform a tagged attach when the"},{"line_number":3779,"context_line":"                # instance is shelved/offloaded, we avoid the problem of a cast"},{"line_number":3780,"context_line":"                # to the compute manager potentially raising"},{"line_number":3781,"context_line":"                # TaggedAttachmentNotSupported and not being able to propagate"},{"line_number":3782,"context_line":"                # that exception back to the user (because of the cast). It"},{"line_number":3783,"context_line":"                # also makes sense, since we don\u0027t know whether the compute"},{"line_number":3784,"context_line":"                # host that the instance ends up being unshelved on will"},{"line_number":3785,"context_line":"                # support tagged attach."}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_fcf2539a","line":3782,"range":{"start_line":3779,"start_character":75,"end_line":3782,"end_character":72},"updated":"2017-05-17 21:23:05.000000000","message":"If it\u0027s shelved offloaded, there is no compute host you can rpc call (it would be a call to reserve_block_device_name, not a cast btw). You\u0027d tag the volume when it\u0027s attached during unshelve, assuming the virt driver / compute can handle it, as noted here.\n\nWe can check to see if a nova-compute service is new enough to handle this, but not if the given compute driver supports it (from the API) since we don\u0027t have capabilities exposed through the API.\n\nWe could just drop it when we unshelve if it\u0027s not supported but that\u0027s kind of odd, but it\u0027s not like there aren\u0027t other operations that we fail on the compute after an rpc cast because the backing driver doesn\u0027t support it, e.g. swap volume. I guess I don\u0027t have a very good answer here.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        if is_shelved_offloaded:"},{"line_number":3777,"context_line":"            if tag:"},{"line_number":3778,"context_line":"                # NOTE(artom) By refusing to perform a tagged attach when the"},{"line_number":3779,"context_line":"                # instance is shelved/offloaded, we avoid the problem of a cast"},{"line_number":3780,"context_line":"                # to the compute manager potentially raising"},{"line_number":3781,"context_line":"                # TaggedAttachmentNotSupported and not being able to propagate"},{"line_number":3782,"context_line":"                # that exception back to the user (because of the cast). It"},{"line_number":3783,"context_line":"                # also makes sense, since we don\u0027t know whether the compute"},{"line_number":3784,"context_line":"                # host that the instance ends up being unshelved on will"},{"line_number":3785,"context_line":"                # support tagged attach."}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_f6cb841b","line":3782,"range":{"start_line":3779,"start_character":75,"end_line":3782,"end_character":72},"in_reply_to":"ff0f0b1f_fcf2539a","updated":"2017-05-18 15:20:08.000000000","message":"Yeah, I wrangled with this and settled on just not supporting it. I\u0027m not a fan of the \"fail later mysteriously\" approach.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":3783,"context_line":"                # also makes sense, since we don\u0027t know whether the compute"},{"line_number":3784,"context_line":"                # host that the instance ends up being unshelved on will"},{"line_number":3785,"context_line":"                # support tagged attach."},{"line_number":3786,"context_line":"                raise exception.VolumeTaggedAttachToShelvedNotSupported()"},{"line_number":3787,"context_line":"            return self._attach_volume_shelved_offloaded(context,"},{"line_number":3788,"context_line":"                                                         instance,"},{"line_number":3789,"context_line":"                                                         volume_id,"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_57d0f850","line":3786,"range":{"start_line":3786,"start_character":32,"end_line":3786,"end_character":71},"updated":"2017-05-17 21:23:05.000000000","message":"This needs to be handled in the REST API otherwise it\u0027s going to result in a 500 error.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":3783,"context_line":"                # also makes sense, since we don\u0027t know whether the compute"},{"line_number":3784,"context_line":"                # host that the instance ends up being unshelved on will"},{"line_number":3785,"context_line":"                # support tagged attach."},{"line_number":3786,"context_line":"                raise exception.VolumeTaggedAttachToShelvedNotSupported()"},{"line_number":3787,"context_line":"            return self._attach_volume_shelved_offloaded(context,"},{"line_number":3788,"context_line":"                                                         instance,"},{"line_number":3789,"context_line":"                                                         volume_id,"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_e4ae1ce6","line":3786,"range":{"start_line":3786,"start_character":32,"end_line":3786,"end_character":71},"in_reply_to":"ff0f0b1f_57d0f850","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ef1012dc719b07ceb756eab80d67406edd70103","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"            # support device tagging because we have no way to call the compute"},{"line_number":3731,"context_line":"            # manager to check that it supports device tagging: while"},{"line_number":3732,"context_line":"            # reserve_block_device_name is a call and can send meaningful"},{"line_number":3733,"context_line":"            # information back, attach_volume is a cast and we cannot know if"},{"line_number":3734,"context_line":"            # it failed or not."},{"line_number":3735,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3736,"context_line":"                context\u003dcontext,"},{"line_number":3737,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_a364b8ba","line":3734,"range":{"start_line":3733,"start_character":32,"end_line":3734,"end_character":31},"updated":"2017-06-20 22:02:57.000000000","message":"To be clear, we don\u0027t actually do an rpc cast of attach_volume in the local attach case for a shelved-offloaded instance, because there is no instance.host to rpc cast that message to. The \"attached\" bdm is processed when the instance is unshelved:\n\nhttps://github.com/openstack/nova/blob/4e6a7c18b1c8340b9fdc93ee02e56b5a29a99648/nova/compute/manager.py#L4507\n\nAnd it\u0027s at that point that we\u0027d have to fail if the bdm is tagged but the driver doesn\u0027t support device tags.\n\nYou can think of unshelve really more like server create, since when we unshelve an offloaded instance, conductor asks the scheduler for a host and then it unshelves the instance on that host - and unshelving is really similar to server create (spawn() and _prep_block_devices is called in the manager).\n\nSo really checking the driver \"supports_tagged_attach_volume\" capability is less correct for a shelved offloaded instance. The \"supports_device_tagging\" flag would be more appropriate probably, although we still don\u0027t know until we unshelve if we can do that - basically like server create.\n\nThis kind of begs the question then, if we support creating a server with tagged devices knowing those can fail in the compute and result in a BuildAbortException and the instance going into ERROR state, why wouldn\u0027t we also support them for shelved offloaded instances?","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa264f07083c0877a4670dd0eb3df68a49d8f0da","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"            # support device tagging because we have no way to call the compute"},{"line_number":3731,"context_line":"            # manager to check that it supports device tagging: while"},{"line_number":3732,"context_line":"            # reserve_block_device_name is a call and can send meaningful"},{"line_number":3733,"context_line":"            # information back, attach_volume is a cast and we cannot know if"},{"line_number":3734,"context_line":"            # it failed or not."},{"line_number":3735,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3736,"context_line":"                context\u003dcontext,"},{"line_number":3737,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_25f09590","line":3734,"range":{"start_line":3733,"start_character":32,"end_line":3734,"end_character":31},"in_reply_to":"5f201791_3bae842e","updated":"2017-06-21 14:49:25.000000000","message":"Alex, when building a new instance, if it has tagged devices but the virt driver doesn\u0027t support tagged devices, the build is aborted and the instance is put into ERROR state.\n\nFor unshelve, the instance is never put into ERROR state even if unshelve fails. An instance fault is recorded and the task_state is reverted so the user can try again, but we don\u0027t do a good job of cleaning up from an unshelve failure, like by terminating volume connections, for example.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"72c1cea2f3716261e6e0f17d82c5482aa63f9a92","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"            # support device tagging because we have no way to call the compute"},{"line_number":3731,"context_line":"            # manager to check that it supports device tagging: while"},{"line_number":3732,"context_line":"            # reserve_block_device_name is a call and can send meaningful"},{"line_number":3733,"context_line":"            # information back, attach_volume is a cast and we cannot know if"},{"line_number":3734,"context_line":"            # it failed or not."},{"line_number":3735,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3736,"context_line":"                context\u003dcontext,"},{"line_number":3737,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_baf82ec4","line":3734,"range":{"start_line":3733,"start_character":32,"end_line":3734,"end_character":31},"in_reply_to":"5f201791_a364b8ba","updated":"2017-06-22 07:13:49.000000000","message":"\u003e To be clear, we don\u0027t actually do an rpc cast of\n\u003e attach_volume in the local attach case for a\n\u003e shelved-offloaded instance, because there is no\n\u003e instance.host to rpc cast that message to. The \n\u003e \"attached\" bdm is processed when the instance is\n\u003e unshelved\n\nI\u0027ve adjusted the NOTE\u0027s wording.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7eedaa6aa7b344afeba138677f26c6ef249a3188","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"            # support device tagging because we have no way to call the compute"},{"line_number":3731,"context_line":"            # manager to check that it supports device tagging: while"},{"line_number":3732,"context_line":"            # reserve_block_device_name is a call and can send meaningful"},{"line_number":3733,"context_line":"            # information back, attach_volume is a cast and we cannot know if"},{"line_number":3734,"context_line":"            # it failed or not."},{"line_number":3735,"context_line":"            volume_bdm \u003d objects.BlockDeviceMapping("},{"line_number":3736,"context_line":"                context\u003dcontext,"},{"line_number":3737,"context_line":"                source_type\u003d\u0027volume\u0027, destination_type\u003d\u0027volume\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_3bae842e","line":3734,"range":{"start_line":3733,"start_character":32,"end_line":3734,"end_character":31},"in_reply_to":"5f201791_a364b8ba","updated":"2017-06-21 09:22:20.000000000","message":"@Matt, do you mean set the instance into ERROR state when the tagged device isn\u0027t supported?\n\nAt least I feel that is pain for user, the ERROR state instance means that the user have to delete that instance, there is no way to get that instance back.\n\nHow about we load the unshelve failed in the instance-action, but still keep the instance status back to the shelve_offloaded status?","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ef1012dc719b07ceb756eab80d67406edd70103","unresolved":false,"context_lines":[{"line_number":3824,"context_line":"        is_shelved_offloaded \u003d instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED"},{"line_number":3825,"context_line":"        if is_shelved_offloaded:"},{"line_number":3826,"context_line":"            if tag:"},{"line_number":3827,"context_line":"                # NOTE(artom) By refusing to perform a tagged attach when the"},{"line_number":3828,"context_line":"                # instance is shelved/offloaded, we avoid the problem of a cast"},{"line_number":3829,"context_line":"                # to the compute manager potentially raising"},{"line_number":3830,"context_line":"                # TaggedAttachmentNotSupported and not being able to propagate"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_a38ef82b","line":3827,"updated":"2017-06-20 22:02:57.000000000","message":"Your note on L3729 is actually better here, since we wouldn\u0027t even get in _create_volume_bdm because _attach_volume_shelved_offloaded calls _create_volume_bdm but if tag is provided then we don\u0027t call _attach_volume_shelved_offloaded. Also, this comment is confusing/wrong because there is no rpc cast to the compute in a shelved offloaded state, as noted above.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"72c1cea2f3716261e6e0f17d82c5482aa63f9a92","unresolved":false,"context_lines":[{"line_number":3824,"context_line":"        is_shelved_offloaded \u003d instance.vm_state \u003d\u003d vm_states.SHELVED_OFFLOADED"},{"line_number":3825,"context_line":"        if is_shelved_offloaded:"},{"line_number":3826,"context_line":"            if tag:"},{"line_number":3827,"context_line":"                # NOTE(artom) By refusing to perform a tagged attach when the"},{"line_number":3828,"context_line":"                # instance is shelved/offloaded, we avoid the problem of a cast"},{"line_number":3829,"context_line":"                # to the compute manager potentially raising"},{"line_number":3830,"context_line":"                # TaggedAttachmentNotSupported and not being able to propagate"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_3ad3fe3a","line":3827,"in_reply_to":"5f201791_a38ef82b","updated":"2017-06-22 07:13:49.000000000","message":"I\u0027ve repeated the note from L3279 here. I\u0027ve also kept in above, since I think it\u0027s important to explain why we\u0027re not creating the bdm object with the tag.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"}],"nova/compute/cells_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"943bbead5ab5d50f9f9b31dd34429f7bb2ba3b91","unresolved":false,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"    @check_instance_cell"},{"line_number":444,"context_line":"    def _attach_volume(self, context, instance, volume_id, device,"},{"line_number":445,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":446,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":447,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":448,"context_line":"        self.volume_api.check_availability_zone(context, volume,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_34eab174","line":445,"updated":"2017-01-07 18:15:08.000000000","message":"FWIW we don\u0027t care about supporting this via cells v1, so you can add this here so we don\u0027t blow up when passing tag in but we don\u0027t need to pass it on to the cell.","commit_id":"367f86a2bcea17ccc63de5df4173e9754cd0c2fb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7a426d6a186bb37fed458917df31a92a55ce103c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"9a30ddce_6e8c5eda","updated":"2017-03-13 12:19:47.000000000","message":"Is this cells v1 or v2? If the former, should we be making modifications, seeing as it\u0027s deprecated?","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b8e91cf22d17c1a2d6fe5d50dfee39465b5a63b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"9a30ddce_a1be64ab","in_reply_to":"9a30ddce_6e8c5eda","updated":"2017-03-13 14:07:23.000000000","message":"This is for cellsv1. We need to make modifications to it only inasmuch as it needs to keep working.\n\nI\u0027d be okay not plumbing the tag through to the bottom, but that may not be possible because of how this works. This layer is basically responsible for intercepting compute/api calls at the top layer and forwarding to the child cell to be replayed there. If we change compute/api in certain ways we have to change this to remain compatible.","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"df978543143ab5ced7015d6b2abec28bb0adc929","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"9a30ddce_9cc2a351","in_reply_to":"9a30ddce_a1be64ab","updated":"2017-03-13 14:27:40.000000000","message":"\u003e This is for cellsv1. We need to make modifications to it only inasmuch as it needs to keep working.\n\nGotcha\n\n \u003e I\u0027d be okay not plumbing the tag through to the bottom, but that may not be possible because of how this works. This layer is basically responsible for intercepting compute/api calls at the top layer and forwarding to the child cell to be replayed there. If we change compute/api in certain ways we have to change this to remain compatible.\n\nI\u0027ve no issue with plumbing things down so long as it\u0027s low impact/risk. Is there anything more than the below necessary? If not, this looks slight enough to me as things stand. If there is, I\u0027ll have to defer to others\u0027 judgement.","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1ef1012dc719b07ceb756eab80d67406edd70103","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                                                instance\u003dinstance)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        return self._call_to_cells(context, instance, \u0027attach_volume\u0027,"},{"line_number":468,"context_line":"                volume_id, device, disk_bus, device_type, tag\u003dtag)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @check_instance_cell"},{"line_number":471,"context_line":"    def _detach_volume(self, context, instance, volume):"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_233b0839","line":468,"range":{"start_line":468,"start_character":58,"end_line":468,"end_character":65},"updated":"2017-06-20 22:02:57.000000000","message":"Might want to ask dansmith about this one, I\u0027m not sure we should be passing this through for cells v1. The _attach_volume method we\u0027re in has to match the signature from nova.compute.api.API, but I don\u0027t think we need to pass this through, we don\u0027t have API feature parity for cells v1.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e261f088f3501e0382ff397001bb025feabc6cf4","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                                                instance\u003dinstance)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        return self._call_to_cells(context, instance, \u0027attach_volume\u0027,"},{"line_number":468,"context_line":"                volume_id, device, disk_bus, device_type, tag\u003dtag)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @check_instance_cell"},{"line_number":471,"context_line":"    def _detach_volume(self, context, instance, volume):"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_6360e033","line":468,"range":{"start_line":468,"start_character":58,"end_line":468,"end_character":65},"in_reply_to":"5f201791_233b0839","updated":"2017-06-20 22:05:38.000000000","message":"Definitely don\u0027t need to pass it through, and I\u0027d argue we should just fail here if there is a tag. Like we would if service version is too low.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"395592ff6ea1d4ae00ceb04b2cbd62aca4935442","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                                                instance\u003dinstance)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        return self._call_to_cells(context, instance, \u0027attach_volume\u0027,"},{"line_number":468,"context_line":"                volume_id, device, disk_bus, device_type, tag\u003dtag)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @check_instance_cell"},{"line_number":471,"context_line":"    def _detach_volume(self, context, instance, volume):"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_8313fc66","line":468,"range":{"start_line":468,"start_character":58,"end_line":468,"end_character":65},"in_reply_to":"5f201791_6360e033","updated":"2017-06-20 22:24:04.000000000","message":"Good point on failing here if tag is provided, then it\u0027s a fail-fast scenario for non-support with cells v1 in the API.","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"72c1cea2f3716261e6e0f17d82c5482aa63f9a92","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                                                instance\u003dinstance)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        return self._call_to_cells(context, instance, \u0027attach_volume\u0027,"},{"line_number":468,"context_line":"                volume_id, device, disk_bus, device_type, tag\u003dtag)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"    @check_instance_cell"},{"line_number":471,"context_line":"    def _detach_volume(self, context, instance, volume):"}],"source_content_type":"text/x-python","patch_set":50,"id":"5f201791_9acc528a","line":468,"range":{"start_line":468,"start_character":58,"end_line":468,"end_character":65},"in_reply_to":"5f201791_8313fc66","updated":"2017-06-22 07:13:49.000000000","message":"Done","commit_id":"c6cd2b43b0ebe892eadc36e1240d2a5fe5d2b7a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2eb4565728cc0791532278251466ad33fce6dd75","unresolved":false,"context_lines":[{"line_number":460,"context_line":"    def _attach_volume(self, context, instance, volume_id, device,"},{"line_number":461,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":463,"context_line":"        if tag:"},{"line_number":464,"context_line":"            raise CellsV1TaggedAttachmentNotSupported()"},{"line_number":465,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":466,"context_line":"        self.volume_api.check_availability_zone(context, volume,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_fc4338ae","line":463,"updated":"2017-06-22 13:48:46.000000000","message":"You\u0027re missing a test for this.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":460,"context_line":"    def _attach_volume(self, context, instance, volume_id, device,"},{"line_number":461,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":463,"context_line":"        if tag:"},{"line_number":464,"context_line":"            raise CellsV1TaggedAttachmentNotSupported()"},{"line_number":465,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":466,"context_line":"        self.volume_api.check_availability_zone(context, volume,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_daa4fcbb","line":463,"in_reply_to":"5f201791_fc4338ae","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2eb4565728cc0791532278251466ad33fce6dd75","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":463,"context_line":"        if tag:"},{"line_number":464,"context_line":"            raise CellsV1TaggedAttachmentNotSupported()"},{"line_number":465,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":466,"context_line":"        self.volume_api.check_availability_zone(context, volume,"},{"line_number":467,"context_line":"                                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_3cf53084","line":464,"range":{"start_line":464,"start_character":18,"end_line":464,"end_character":53},"updated":"2017-06-22 13:48:46.000000000","message":"exception.CellsV1TaggedAttachmentNotSupported()?\n\nAlso, TaggedAttachmentNotSupported would also be OK here. The end user shouldn\u0027t know if the cloud is running cells v1.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":463,"context_line":"        if tag:"},{"line_number":464,"context_line":"            raise CellsV1TaggedAttachmentNotSupported()"},{"line_number":465,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":466,"context_line":"        self.volume_api.check_availability_zone(context, volume,"},{"line_number":467,"context_line":"                                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_bf9ed2b5","line":464,"range":{"start_line":464,"start_character":18,"end_line":464,"end_character":53},"in_reply_to":"5f201791_1f1dc665","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3defe44d1bca58345f315338f98913c2f1cb1d0d","unresolved":false,"context_lines":[{"line_number":461,"context_line":"                       disk_bus, device_type, tag\u003dNone):"},{"line_number":462,"context_line":"        \"\"\"Attach an existing volume to an existing instance.\"\"\""},{"line_number":463,"context_line":"        if tag:"},{"line_number":464,"context_line":"            raise CellsV1TaggedAttachmentNotSupported()"},{"line_number":465,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":466,"context_line":"        self.volume_api.check_availability_zone(context, volume,"},{"line_number":467,"context_line":"                                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_1f1dc665","line":464,"range":{"start_line":464,"start_character":18,"end_line":464,"end_character":53},"in_reply_to":"5f201791_3cf53084","updated":"2017-06-22 14:01:39.000000000","message":"Actually use VolumeTaggedAttachNotSupported.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5ccf58506fe37667cf3b0122b4eadd16869bbd6","unresolved":false,"context_lines":[{"line_number":4734,"context_line":"    def reserve_block_device_name(self, context, instance, device,"},{"line_number":4735,"context_line":"                                  volume_id, disk_bus, device_type, tag\u003dNone):"},{"line_number":4736,"context_line":"        if tag and not self.driver.capabilities[\u0027supports_device_tagging\u0027]:"},{"line_number":4737,"context_line":"            raise exception.DeviceTaggingNotSupported()"},{"line_number":4738,"context_line":""},{"line_number":4739,"context_line":"        @utils.synchronized(instance.uuid)"},{"line_number":4740,"context_line":"        def do_reserve():"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_8f37f1fd","line":4737,"updated":"2017-01-23 18:47:52.000000000","message":"This is part of a call, so maybe we\u0027ll get to indicate to the client early when this is running that tagging isn\u0027t supported?","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5c64a3f01fda65c2bf7c414ae7bea6718df2dbc9","unresolved":false,"context_lines":[{"line_number":4734,"context_line":"    def reserve_block_device_name(self, context, instance, device,"},{"line_number":4735,"context_line":"                                  volume_id, disk_bus, device_type, tag\u003dNone):"},{"line_number":4736,"context_line":"        if tag and not self.driver.capabilities[\u0027supports_device_tagging\u0027]:"},{"line_number":4737,"context_line":"            raise exception.DeviceTaggingNotSupported()"},{"line_number":4738,"context_line":""},{"line_number":4739,"context_line":"        @utils.synchronized(instance.uuid)"},{"line_number":4740,"context_line":"        def do_reserve():"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a25e98e_4f55c5c4","line":4737,"in_reply_to":"5a3905b3_8f37f1fd","updated":"2017-03-13 19:36:57.000000000","message":"I\u0027m not sure I understand, where would you move it? It can\u0027t leave the manager, can it? Only the manager knows about what the virt driver does and doesn\u0027t support...","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5ccf58506fe37667cf3b0122b4eadd16869bbd6","unresolved":false,"context_lines":[{"line_number":4766,"context_line":"    def attach_volume(self, context, instance, bdm, tag\u003dNone):"},{"line_number":4767,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":4768,"context_line":"        if tag and not self.driver.capabilities[\u0027supports_device_tagging\u0027]:"},{"line_number":4769,"context_line":"            raise exception.DeviceTaggingNotSupported()"},{"line_number":4770,"context_line":""},{"line_number":4771,"context_line":"        driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":4772,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_2f58bd55","line":4769,"updated":"2017-01-23 18:47:52.000000000","message":"This method runs as part of a cast, which means this will just stack trace in the logs and not be noticed by the client.\n\nSince we can\u0027t indicate to the client what is going on, I\u0027m not sure what the best thing to do is (ignore the tag or fail), but regardless, we should just log and return here I think if we stick with what you have.","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5c64a3f01fda65c2bf7c414ae7bea6718df2dbc9","unresolved":false,"context_lines":[{"line_number":4766,"context_line":"    def attach_volume(self, context, instance, bdm, tag\u003dNone):"},{"line_number":4767,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":4768,"context_line":"        if tag and not self.driver.capabilities[\u0027supports_device_tagging\u0027]:"},{"line_number":4769,"context_line":"            raise exception.DeviceTaggingNotSupported()"},{"line_number":4770,"context_line":""},{"line_number":4771,"context_line":"        driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":4772,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a25e98e_9afe1d04","line":4769,"in_reply_to":"5a3905b3_2f58bd55","updated":"2017-03-13 19:36:57.000000000","message":"If we disallow tagged attachment to shelved/offloaded instances (which kinda makes sense, since they\u0027re not associated with any compute manager while in that state, so we can\u0027t know whether the tagged attachment will work once it\u0027s unshelved), we can avoid the cast issue altogether by only keeping the tag parameter in reserve_block_device_name. Next patchset will show what I have in mind.","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":4811,"context_line":"        if (tag and not"},{"line_number":4812,"context_line":"                self.driver.capabilities.get(\u0027supports_tagged_attach_volume\u0027,"},{"line_number":4813,"context_line":"                                             False)):"},{"line_number":4814,"context_line":"            raise exception.VolumeTaggedAttachNotSupported()"},{"line_number":4815,"context_line":""},{"line_number":4816,"context_line":"        @utils.synchronized(instance.uuid)"},{"line_number":4817,"context_line":"        def do_reserve():"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_77277c66","line":4814,"range":{"start_line":4814,"start_character":28,"end_line":4814,"end_character":58},"updated":"2017-05-17 21:23:05.000000000","message":"If this leaks through to the REST API it\u0027s going to result in a 500 error.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":4811,"context_line":"        if (tag and not"},{"line_number":4812,"context_line":"                self.driver.capabilities.get(\u0027supports_tagged_attach_volume\u0027,"},{"line_number":4813,"context_line":"                                             False)):"},{"line_number":4814,"context_line":"            raise exception.VolumeTaggedAttachNotSupported()"},{"line_number":4815,"context_line":""},{"line_number":4816,"context_line":"        @utils.synchronized(instance.uuid)"},{"line_number":4817,"context_line":"        def do_reserve():"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_ec93a84e","line":4814,"range":{"start_line":4814,"start_character":28,"end_line":4814,"end_character":58},"in_reply_to":"ff0f0b1f_77277c66","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"943bbead5ab5d50f9f9b31dd34429f7bb2ba3b91","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        return cctxt.call(ctxt, \u0027get_host_uptime\u0027)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"    def reserve_block_device_name(self, ctxt, instance, device, volume_id,"},{"line_number":923,"context_line":"                                  disk_bus\u003dNone, device_type\u003dNone, tag\u003dNone):"},{"line_number":924,"context_line":"        kw \u003d {\u0027instance\u0027: instance, \u0027device\u0027: device,"},{"line_number":925,"context_line":"              \u0027volume_id\u0027: volume_id, \u0027disk_bus\u0027: disk_bus,"},{"line_number":926,"context_line":"              \u0027device_type\u0027: device_type, \u0027tag\u0027: tag}"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_54057543","line":923,"updated":"2017-01-07 18:15:08.000000000","message":"You have to bump the rpc version for this.","commit_id":"367f86a2bcea17ccc63de5df4173e9754cd0c2fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"943bbead5ab5d50f9f9b31dd34429f7bb2ba3b91","unresolved":false,"context_lines":[{"line_number":923,"context_line":"                                  disk_bus\u003dNone, device_type\u003dNone, tag\u003dNone):"},{"line_number":924,"context_line":"        kw \u003d {\u0027instance\u0027: instance, \u0027device\u0027: device,"},{"line_number":925,"context_line":"              \u0027volume_id\u0027: volume_id, \u0027disk_bus\u0027: disk_bus,"},{"line_number":926,"context_line":"              \u0027device_type\u0027: device_type, \u0027tag\u0027: tag}"},{"line_number":927,"context_line":"        version \u003d \u00274.0\u0027"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"        cctxt \u003d self.router.by_instance(ctxt, instance).prepare("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_94fb5d46","line":926,"range":{"start_line":926,"start_character":42,"end_line":926,"end_character":52},"updated":"2017-01-07 18:15:08.000000000","message":"This can\u0027t go in kw if we can\u0027t send the version, so you\u0027ll need a version check for that.","commit_id":"367f86a2bcea17ccc63de5df4173e9754cd0c2fb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5ccf58506fe37667cf3b0122b4eadd16869bbd6","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        can handle the version_cap being set to 4.13"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        * 4.14 - Add tag argument to attach_volume() and"},{"line_number":322,"context_line":"                 reserve_block_device_name()"},{"line_number":323,"context_line":"    \u0027\u0027\u0027"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    VERSION_ALIASES \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_ef0f9534","line":322,"updated":"2017-01-23 18:47:52.000000000","message":"As I indicated in my comment a few patches ago, it seems like this is not really necessary. Instead of using tag as just a flag for regenerating metadata, why not just avoid this rpc bump and instead just always regen metadata on attach?","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5c64a3f01fda65c2bf7c414ae7bea6718df2dbc9","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        can handle the version_cap being set to 4.13"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        * 4.14 - Add tag argument to attach_volume() and"},{"line_number":322,"context_line":"                 reserve_block_device_name()"},{"line_number":323,"context_line":"    \u0027\u0027\u0027"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    VERSION_ALIASES \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a25e98e_cf1ff559","line":322,"in_reply_to":"5a3905b3_ef0f9534","updated":"2017-03-13 19:36:57.000000000","message":"I\u0027ve removed passing the tag to the virt driver, but we still need to get it to the manager, no? The latter needs to check whether the virt driver actually supports tagged attach.","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7a426d6a186bb37fed458917df31a92a55ce103c","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        client \u003d self.router.by_instance(ctxt, instance)"},{"line_number":433,"context_line":"        if not client.can_send_version(version):"},{"line_number":434,"context_line":"            if tag:"},{"line_number":435,"context_line":"                raise exception.TaggedAttachmentNotSupported()"},{"line_number":436,"context_line":"            else:"},{"line_number":437,"context_line":"                version \u003d \u00274.0\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a30ddce_89c26c83","line":434,"updated":"2017-03-13 12:19:47.000000000","message":"Could you add a small note explaining what you\u0027re trying to do here? From reading the exception, I\u0027m guessing every compute node needs to support this version before we can use it?","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"c95787e7f1f245ac10e88efadd5fb923aed05e76","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        client \u003d self.router.by_instance(ctxt, instance)"},{"line_number":433,"context_line":"        if not client.can_send_version(version):"},{"line_number":434,"context_line":"            if tag:"},{"line_number":435,"context_line":"                raise exception.TaggedAttachmentNotSupported()"},{"line_number":436,"context_line":"            else:"},{"line_number":437,"context_line":"                version \u003d \u00274.0\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a25e98e_f011ed5e","line":434,"in_reply_to":"7a25e98e_ec24bfb0","updated":"2017-03-13 21:50:55.000000000","message":"Actually, I\u0027ve ended up removing the modifications to attach_volume entirely (see my replies to Dan Smith).","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3a764fafcad76253308d5042ba27e56f9b75b920","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        client \u003d self.router.by_instance(ctxt, instance)"},{"line_number":433,"context_line":"        if not client.can_send_version(version):"},{"line_number":434,"context_line":"            if tag:"},{"line_number":435,"context_line":"                raise exception.TaggedAttachmentNotSupported()"},{"line_number":436,"context_line":"            else:"},{"line_number":437,"context_line":"                version \u003d \u00274.0\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a25e98e_ec24bfb0","line":434,"in_reply_to":"9a30ddce_89c26c83","updated":"2017-03-13 18:58:31.000000000","message":"Done","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"001d2ef79804957e7a7b631dce8ad2e0b46990b1","unresolved":false,"context_lines":[{"line_number":913,"context_line":"              \u0027device_type\u0027: device_type, \u0027tag\u0027: tag}"},{"line_number":914,"context_line":"        version \u003d \u00274.14\u0027"},{"line_number":915,"context_line":""},{"line_number":916,"context_line":"        client \u003d self.router.client(ctxt, instance)"},{"line_number":917,"context_line":"        if not client.can_send_version(version):"},{"line_number":918,"context_line":"            if tag:"},{"line_number":919,"context_line":"                # NOTE(artom) Reserve attempted with a device role tag, but"}],"source_content_type":"text/x-python","patch_set":30,"id":"5ff73747_512209a6","line":916,"range":{"start_line":916,"start_character":40,"end_line":916,"end_character":50},"updated":"2017-04-26 02:49:31.000000000","message":"Redundant. So the test cases failed. And run the test cases before you commit the code, please.","commit_id":"2502d5d7db3592fcbb6e2c508e069103852c4eca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                # NOTE(artom) Reserve attempted with a device role tag, but"},{"line_number":920,"context_line":"                # we\u0027re pinned to less than 4.14 - ie, not all nodes have"},{"line_number":921,"context_line":"                # received the Pike code yet."},{"line_number":922,"context_line":"                raise exception.TaggedAttachmentNotSupported()"},{"line_number":923,"context_line":"            else:"},{"line_number":924,"context_line":"                version \u003d \u00274.0\u0027"},{"line_number":925,"context_line":"                kw.pop(\u0027tag\u0027)"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_d71768ed","line":922,"range":{"start_line":922,"start_character":32,"end_line":922,"end_character":60},"updated":"2017-05-17 21:23:05.000000000","message":"If this leaks through to the REST API it\u0027s going to result in a 500 error.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                # NOTE(artom) Reserve attempted with a device role tag, but"},{"line_number":920,"context_line":"                # we\u0027re pinned to less than 4.14 - ie, not all nodes have"},{"line_number":921,"context_line":"                # received the Pike code yet."},{"line_number":922,"context_line":"                raise exception.TaggedAttachmentNotSupported()"},{"line_number":923,"context_line":"            else:"},{"line_number":924,"context_line":"                version \u003d \u00274.0\u0027"},{"line_number":925,"context_line":"                kw.pop(\u0027tag\u0027)"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_ac9db05a","line":922,"range":{"start_line":922,"start_character":32,"end_line":922,"end_character":60},"in_reply_to":"ff0f0b1f_d71768ed","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"}],"nova/exception.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5ccf58506fe37667cf3b0122b4eadd16869bbd6","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class TaggedAttachmentNotSupported(Invalid):"},{"line_number":270,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment with API 2.42 requires all the \""},{"line_number":271,"context_line":"                \"Ocata upgrade to be complete before it is available.\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class InvalidKeypair(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a3905b3_2a1d0b66","line":271,"updated":"2017-01-23 18:47:52.000000000","message":"Since you\u0027re not catching these anywhere in the API, won\u0027t we get 500s if this happens? Maybe not because of the Invalid? If the latter, can you add a test somewhere in the api plumbing to prove it?","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5c64a3f01fda65c2bf7c414ae7bea6718df2dbc9","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class TaggedAttachmentNotSupported(Invalid):"},{"line_number":270,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment with API 2.42 requires all the \""},{"line_number":271,"context_line":"                \"Ocata upgrade to be complete before it is available.\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class InvalidKeypair(Invalid):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a25e98e_3a3c492f","line":271,"in_reply_to":"5a3905b3_2a1d0b66","updated":"2017-03-13 19:36:57.000000000","message":"I\u0027ve made a note to add a functional/api_sample (not sure which yet at this point in time) test for this in the API.","commit_id":"90f7747b460307790cbc1106bd8273a606d70556"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class TaggedAttachmentNotSupported(Invalid):"},{"line_number":270,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment with API 2.46 requires all the \""},{"line_number":271,"context_line":"                \"Pike upgrade to be complete before it is available.\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_3712245a","line":270,"range":{"start_line":270,"start_character":65,"end_line":270,"end_character":68},"updated":"2017-05-17 21:23:05.000000000","message":"Are you sure? You\u0027re checking the rpc client version based on the compute service for this, which could be mixed results during a rolling upgrade, e.g. if I\u0027m attaching a volume to an instance running on a pike host with libvirt then it should work, but if trying on an ocata host it\u0027s going to fail. That\u0027s sort of leaking information back through to the user.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a98e6ef4ce72ba01177392504f2a0219f627db2d","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class TaggedAttachmentNotSupported(Invalid):"},{"line_number":270,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment with API 2.46 requires all the \""},{"line_number":271,"context_line":"                \"Pike upgrade to be complete before it is available.\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_77d09cca","line":270,"range":{"start_line":270,"start_character":65,"end_line":270,"end_character":68},"in_reply_to":"ff0f0b1f_3712245a","updated":"2017-05-17 21:30:56.000000000","message":"Sorry after looking into this further it\u0027s not per-host, it\u0027s the rpc version pin, so yeah I guess once you upgrade your computes to pike and unpin rpc then you can do this thing.\n\nHaving said that, I think the error message, if leaked to the end user, is a bit too specific to the deployment - the end user doesn\u0027t need to know the cloud\u0027s computes aren\u0027t at pike yet, or need to get to pike. It might be simpler to just say something like, \"Tagged device attachment is not yet available.\"","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class TaggedAttachmentNotSupported(Invalid):"},{"line_number":270,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment with API 2.46 requires all the \""},{"line_number":271,"context_line":"                \"Pike upgrade to be complete before it is available.\")"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_3c51ddd9","line":270,"range":{"start_line":270,"start_character":65,"end_line":270,"end_character":68},"in_reply_to":"ff0f0b1f_77d09cca","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a98e6ef4ce72ba01177392504f2a0219f627db2d","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class VolumeTaggedAttachNotSupported(TaggedAttachmentNotSupported):"},{"line_number":275,"context_line":"    msg_fmt \u003d _(\"Tagged volume attachment is not supported by the virt driver\")"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class VolumeTaggedAttachToShelvedNotSupported(TaggedAttachmentNotSupported):"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_f7e38ca3","line":275,"range":{"start_line":275,"start_character":17,"end_line":275,"end_character":77},"updated":"2017-05-17 21:30:56.000000000","message":"This might be more specific than we want for an API user since it leaks details about the backend hypervisor that the instance is running on. It might be easier to just say something like, \"Tagged volume attachment is not supported for this server instance.\"","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"class VolumeTaggedAttachNotSupported(TaggedAttachmentNotSupported):"},{"line_number":275,"context_line":"    msg_fmt \u003d _(\"Tagged volume attachment is not supported by the virt driver\")"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class VolumeTaggedAttachToShelvedNotSupported(TaggedAttachmentNotSupported):"}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_9c734981","line":275,"range":{"start_line":275,"start_character":17,"end_line":275,"end_character":77},"in_reply_to":"ff0f0b1f_f7e38ca3","updated":"2017-05-18 15:20:08.000000000","message":"Done","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b9d7579089d0d285f4a1b856a2afa73a79044c32","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class VolumeTaggedAttachToShelvedNotSupported(TaggedAttachmentNotSupported):"},{"line_number":279,"context_line":"    msg_fmt \u003d _(\"Tagged volume attachment is not supported for shelved \""},{"line_number":280,"context_line":"                \"instances.\")"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_77f2dc08","line":279,"range":{"start_line":279,"start_character":63,"end_line":279,"end_character":70},"updated":"2017-05-17 21:23:05.000000000","message":"It\u0027s really shelved-offloaded instances which don\u0027t have a host and that\u0027s what the API is checking for. Shelved instances have a host until a timer runs out and they are offloaded.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"9bd5d847f95b0574c1f3af5041b8fdd629a257c0","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class VolumeTaggedAttachToShelvedNotSupported(TaggedAttachmentNotSupported):"},{"line_number":279,"context_line":"    msg_fmt \u003d _(\"Tagged volume attachment is not supported for shelved \""},{"line_number":280,"context_line":"                \"instances.\")"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"ff0f0b1f_bc13ad0d","line":279,"range":{"start_line":279,"start_character":63,"end_line":279,"end_character":70},"in_reply_to":"ff0f0b1f_77f2dc08","updated":"2017-05-18 15:20:08.000000000","message":"TIL shelved !\u003d shelved-offloaded\nDone.","commit_id":"b3771507c54baae26544a272d68379d508aba57d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2eb4565728cc0791532278251466ad33fce6dd75","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not yet available.\")"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"class CellsV1TaggedAttachmentNotSupported(TaggedAttachmentNotSupported):"},{"line_number":277,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not supported with cells v1.\")"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_dc2bdce8","line":276,"range":{"start_line":276,"start_character":6,"end_line":276,"end_character":41},"updated":"2017-06-22 13:48:46.000000000","message":"Let\u0027s just use TaggedAttachmentNotSupported - the end user shouldn\u0027t know cells v1 is being used in the cloud.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not yet available.\")"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"class CellsV1TaggedAttachmentNotSupported(TaggedAttachmentNotSupported):"},{"line_number":277,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not supported with cells v1.\")"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_3fd8827d","line":276,"range":{"start_line":276,"start_character":6,"end_line":276,"end_character":41},"in_reply_to":"5f201791_7f0cba3a","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3defe44d1bca58345f315338f98913c2f1cb1d0d","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not yet available.\")"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"class CellsV1TaggedAttachmentNotSupported(TaggedAttachmentNotSupported):"},{"line_number":277,"context_line":"    msg_fmt \u003d _(\"Tagged device attachment is not supported with cells v1.\")"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_7f0cba3a","line":276,"range":{"start_line":276,"start_character":6,"end_line":276,"end_character":41},"in_reply_to":"5f201791_dc2bdce8","updated":"2017-06-22 14:01:39.000000000","message":"Actually use VolumeTaggedAttachNotSupported.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"943bbead5ab5d50f9f9b31dd34429f7bb2ba3b91","unresolved":false,"context_lines":[{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"    def allocate_port_for_instance(self, context, instance, port_id,"},{"line_number":1189,"context_line":"                                   network_id\u003dNone, requested_ip\u003dNone,"},{"line_number":1190,"context_line":"                                   bind_host_id\u003dNone, tag\u003dNone):"},{"line_number":1191,"context_line":"        \"\"\"Allocate a port for the instance.\"\"\""},{"line_number":1192,"context_line":"        requested_networks \u003d objects.NetworkRequestList("},{"line_number":1193,"context_line":"            objects\u003d[objects.NetworkRequest(network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_b4f6a15a","line":1190,"updated":"2017-01-07 18:15:08.000000000","message":"I thought this patch was about BDMs only?","commit_id":"367f86a2bcea17ccc63de5df4173e9754cd0c2fb"}],"nova/tests/unit/api/openstack/compute/test_volumes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"872f03c9364bda19ea70070089e8ea0928bf79ea","unresolved":false,"context_lines":[{"line_number":491,"context_line":"                         result[\u0027volumeAttachment\u0027][\u0027id\u0027])"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def test_attach_volume_not_supported(self):"},{"line_number":494,"context_line":"        self.stubs.Set(compute_api.API,"},{"line_number":495,"context_line":"                       \u0027attach_volume\u0027,"},{"line_number":496,"context_line":"                       fake_attach_volume_not_supported)"},{"line_number":497,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: FAKE_UUID_A,"},{"line_number":498,"context_line":"                                    \u0027device\u0027: \u0027/dev/fake\u0027}}"},{"line_number":499,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.attachments.create,"}],"source_content_type":"text/x-python","patch_set":55,"id":"5f201791_2a4b902b","line":496,"range":{"start_line":494,"start_character":8,"end_line":496,"end_character":56},"updated":"2017-06-22 21:56:31.000000000","message":"Shouldn\u0027t use stubs anymore for new tests as that\u0027s just mox under the covers.\n\nThis is easily done with a mock method decorator:\n\n@mock.patch.object(compute_api.API, \u0027attach_volume\u0027, side_effect\u003dexception.VolumeTaggedAttachNotSupported())","commit_id":"2291d612b0c262848cd509f5cce611e715cdf0a0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"872f03c9364bda19ea70070089e8ea0928bf79ea","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                       \u0027attach_volume\u0027,"},{"line_number":496,"context_line":"                       fake_attach_volume_not_supported)"},{"line_number":497,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: FAKE_UUID_A,"},{"line_number":498,"context_line":"                                    \u0027device\u0027: \u0027/dev/fake\u0027}}"},{"line_number":499,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.attachments.create,"},{"line_number":500,"context_line":"                          self.req, FAKE_UUID, body\u003dbody)"},{"line_number":501,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"5f201791_8a63c4b1","line":498,"updated":"2017-06-22 21:56:31.000000000","message":"alignment","commit_id":"2291d612b0c262848cd509f5cce611e715cdf0a0"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"aa05e56f2602ada31b31f3a64072fd006e33d3ea","unresolved":false,"context_lines":[{"line_number":10089,"context_line":""},{"line_number":10090,"context_line":"            mock_reserve_bdm.assert_called_once_with("},{"line_number":10091,"context_line":"                    self.context, instance, \u0027/dev/vdb\u0027, \u0027fake-volume-id\u0027,"},{"line_number":10092,"context_line":"                    disk_bus\u003d\u0027ide\u0027, device_type\u003d\u0027cdrom\u0027, tag\u003dNone)"},{"line_number":10093,"context_line":"            self.assertEqual(mock_get.call_args,"},{"line_number":10094,"context_line":"                             mock.call(self.context, \u0027fake-volume-id\u0027))"},{"line_number":10095,"context_line":"            self.assertEqual(mock_check_availability_zone.call_args,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_553b089b","line":10092,"range":{"start_line":10092,"start_character":57,"end_line":10092,"end_character":65},"updated":"2017-06-23 06:52:20.000000000","message":"It will be better to have unittest for passing a valid tag.","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54ff0f049cd13f652537f27d24448e9ca8d325b0","unresolved":false,"context_lines":[{"line_number":10089,"context_line":""},{"line_number":10090,"context_line":"            mock_reserve_bdm.assert_called_once_with("},{"line_number":10091,"context_line":"                    self.context, instance, \u0027/dev/vdb\u0027, \u0027fake-volume-id\u0027,"},{"line_number":10092,"context_line":"                    disk_bus\u003d\u0027ide\u0027, device_type\u003d\u0027cdrom\u0027, tag\u003dNone)"},{"line_number":10093,"context_line":"            self.assertEqual(mock_get.call_args,"},{"line_number":10094,"context_line":"                             mock.call(self.context, \u0027fake-volume-id\u0027))"},{"line_number":10095,"context_line":"            self.assertEqual(mock_check_availability_zone.call_args,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_9bb42f37","line":10092,"range":{"start_line":10092,"start_character":57,"end_line":10092,"end_character":65},"in_reply_to":"5f201791_553b089b","updated":"2017-06-23 10:04:46.000000000","message":"There is [1]. I\u0027m a bit confused by all the compute API tests, since there\u0027s some here in test_compute.py, and some others in test_compute_api.py. I had to adjust this one to reflect the new reserve_block_device_name method signature, but the actual test is in test_compute_api.py.\n\n[1] https://review.openstack.org/#/c/391941/56/nova/tests/unit/compute/test_compute_api.py","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3defe44d1bca58345f315338f98913c2f1cb1d0d","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        with mock_volume_api as mock_v_api:"},{"line_number":383,"context_line":"            mock_v_api.get.return_value \u003d volume"},{"line_number":384,"context_line":"            self.compute_api.attach_volume("},{"line_number":385,"context_line":"                self.context, instance, volume[\u0027id\u0027], tag\u003d\u0027foo\u0027)"},{"line_number":386,"context_line":"            mock_reserve.assert_called_once_with(self.context, instance, None,"},{"line_number":387,"context_line":"                                                 volume[\u0027id\u0027],"},{"line_number":388,"context_line":"                                                 device_type\u003dNone,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_9c3b24ea","line":385,"range":{"start_line":385,"start_character":54,"end_line":385,"end_character":63},"updated":"2017-06-22 14:01:39.000000000","message":"Rather than modify an existing test for the non-tagged case, why not write a new test for the tagged case? Same with the cells test below.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        with mock_volume_api as mock_v_api:"},{"line_number":383,"context_line":"            mock_v_api.get.return_value \u003d volume"},{"line_number":384,"context_line":"            self.compute_api.attach_volume("},{"line_number":385,"context_line":"                self.context, instance, volume[\u0027id\u0027], tag\u003d\u0027foo\u0027)"},{"line_number":386,"context_line":"            mock_reserve.assert_called_once_with(self.context, instance, None,"},{"line_number":387,"context_line":"                                                 volume[\u0027id\u0027],"},{"line_number":388,"context_line":"                                                 device_type\u003dNone,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_1ac5d45b","line":385,"range":{"start_line":385,"start_character":54,"end_line":385,"end_character":63},"in_reply_to":"5f201791_9c3b24ea","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3defe44d1bca58345f315338f98913c2f1cb1d0d","unresolved":false,"context_lines":[{"line_number":5243,"context_line":"        with mock_volume_api as mock_v_api:"},{"line_number":5244,"context_line":"            mock_v_api.get.return_value \u003d volume"},{"line_number":5245,"context_line":"            self.compute_api.attach_volume("},{"line_number":5246,"context_line":"                self.context, instance, volume[\u0027id\u0027], tag\u003d\u0027foo\u0027)"},{"line_number":5247,"context_line":"            mock_v_api.check_availability_zone.assert_called_once_with("},{"line_number":5248,"context_line":"                self.context, volume, instance\u003dinstance)"},{"line_number":5249,"context_line":"            mock_attach.assert_called_once_with(self.context, instance,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_5c0eac3b","line":5246,"updated":"2017-06-22 14:01:39.000000000","message":"This is going to raise an exception when you pass the tag. Again, leave the old test intact, and write a new test that passes the tag and asserts the exception for cells v1 not supporting it.","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"345a91b8380865861daeade75cafe27292f265ca","unresolved":false,"context_lines":[{"line_number":5243,"context_line":"        with mock_volume_api as mock_v_api:"},{"line_number":5244,"context_line":"            mock_v_api.get.return_value \u003d volume"},{"line_number":5245,"context_line":"            self.compute_api.attach_volume("},{"line_number":5246,"context_line":"                self.context, instance, volume[\u0027id\u0027], tag\u003d\u0027foo\u0027)"},{"line_number":5247,"context_line":"            mock_v_api.check_availability_zone.assert_called_once_with("},{"line_number":5248,"context_line":"                self.context, volume, instance\u003dinstance)"},{"line_number":5249,"context_line":"            mock_attach.assert_called_once_with(self.context, instance,"}],"source_content_type":"text/x-python","patch_set":51,"id":"5f201791_ffd56ae6","line":5246,"in_reply_to":"5f201791_5c0eac3b","updated":"2017-06-22 14:54:52.000000000","message":"Done","commit_id":"5d5509f976b31ead49fd3cd5f8bb53492eace80b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"872f03c9364bda19ea70070089e8ea0928bf79ea","unresolved":false,"context_lines":[{"line_number":5276,"context_line":""},{"line_number":5277,"context_line":"    def test_tagged_volume_attach(self):"},{"line_number":5278,"context_line":"        instance \u003d self._create_instance_obj()"},{"line_number":5279,"context_line":"        volume \u003d fake_volume.fake_volume(1, \u0027test-vol\u0027, \u0027test-vol\u0027,"},{"line_number":5280,"context_line":"                                         None, None, None, None, None)"},{"line_number":5281,"context_line":"        self.assertRaises(exception.VolumeTaggedAttachNotSupported,"},{"line_number":5282,"context_line":"                          self.compute_api.attach_volume, self.context,"},{"line_number":5283,"context_line":"                          instance, volume[\u0027id\u0027], tag\u003d\u0027foo\u0027)"}],"source_content_type":"text/x-python","patch_set":55,"id":"5f201791_ca689c88","line":5280,"range":{"start_line":5279,"start_character":8,"end_line":5280,"end_character":70},"updated":"2017-06-22 21:56:31.000000000","message":"You could just pass in a sentinel volume id, but whatever.","commit_id":"2291d612b0c262848cd509f5cce611e715cdf0a0"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7a426d6a186bb37fed458917df31a92a55ce103c","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            self.compute._check_device_tagging(net_req_list, bdms)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    @mock.patch.object(compute_utils, \u0027add_instance_fault_from_exc\u0027)"},{"line_number":380,"context_line":"    def test_attach_volume_raises(self, _):"},{"line_number":381,"context_line":"        with mock.patch.dict(self.compute.driver.capabilities,"},{"line_number":382,"context_line":"                             supports_tagged_attach_volume\u003dFalse):"},{"line_number":383,"context_line":"            self.assertRaises(exception.VolumeTaggedAttachNotSupported,"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a30ddce_29dc2045","line":380,"range":{"start_line":380,"start_character":40,"end_line":380,"end_character":41},"updated":"2017-03-13 12:19:47.000000000","message":"Didn\u0027t know you could use this pattern in function definitions too. You learn something new everyday","commit_id":"2e3c4917e0fb2b5c97f68a4f0be51af9c2a6dca6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"aa05e56f2602ada31b31f3a64072fd006e33d3ea","unresolved":false,"context_lines":[{"line_number":380,"context_line":"            self.compute._check_device_tagging(net_req_list, bdms)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    @mock.patch.object(compute_utils, \u0027add_instance_fault_from_exc\u0027)"},{"line_number":383,"context_line":"    def test_reserve_block_device_name_raises(self, _):"},{"line_number":384,"context_line":"        with mock.patch.dict(self.compute.driver.capabilities,"},{"line_number":385,"context_line":"                             supports_tagged_attach_volume\u003dFalse):"},{"line_number":386,"context_line":"            self.assertRaises(exception.VolumeTaggedAttachNotSupported,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_35f40cf2","line":383,"updated":"2017-06-23 06:52:20.000000000","message":"one more unit test for the tag was added to BDM correctly?","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"54ff0f049cd13f652537f27d24448e9ca8d325b0","unresolved":false,"context_lines":[{"line_number":380,"context_line":"            self.compute._check_device_tagging(net_req_list, bdms)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    @mock.patch.object(compute_utils, \u0027add_instance_fault_from_exc\u0027)"},{"line_number":383,"context_line":"    def test_reserve_block_device_name_raises(self, _):"},{"line_number":384,"context_line":"        with mock.patch.dict(self.compute.driver.capabilities,"},{"line_number":385,"context_line":"                             supports_tagged_attach_volume\u003dFalse):"},{"line_number":386,"context_line":"            self.assertRaises(exception.VolumeTaggedAttachNotSupported,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f201791_5b1e9770","line":383,"in_reply_to":"5f201791_35f40cf2","updated":"2017-06-23 10:04:46.000000000","message":"Done","commit_id":"a93dec5680832ccd1f861d5052605a27d5ccbade"}],"nova/tests/unit/compute/test_rpcapi.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b655d0d81549b0ae766467414167d46420f07ace","unresolved":false,"context_lines":[{"line_number":477,"context_line":"        can_send_mock.assert_called_once_with(\u00274.14\u0027)"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def test_reserve_block_device_name_downgrades_version(self):"},{"line_number":480,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake_user\u0027, \u0027fake_project\u0027)"},{"line_number":481,"context_line":"        instance \u003d self.fake_instance_obj"},{"line_number":482,"context_line":"        rpcapi \u003d compute_rpcapi.ComputeAPI()"},{"line_number":483,"context_line":"        call_mock \u003d mock.Mock()"},{"line_number":484,"context_line":"        cctxt_mock \u003d mock.Mock(call\u003dcall_mock)"},{"line_number":485,"context_line":"        rpcapi.router.by_instance \u003d mock.Mock()"},{"line_number":486,"context_line":"        mock_client \u003d mock.Mock()"},{"line_number":487,"context_line":"        rpcapi.router.by_instance.return_value \u003d mock_client"},{"line_number":488,"context_line":"        with test.nested("},{"line_number":489,"context_line":"            mock.patch.object(mock_client, \u0027can_send_version\u0027,"},{"line_number":490,"context_line":"                              return_value\u003dFalse),"},{"line_number":491,"context_line":"            mock.patch.object(mock_client, \u0027prepare\u0027,"},{"line_number":492,"context_line":"                              return_value\u003dcctxt_mock)"},{"line_number":493,"context_line":"        ) as ("},{"line_number":494,"context_line":"            can_send_mock, prepare_mock"},{"line_number":495,"context_line":"        ):"},{"line_number":496,"context_line":"            rpcapi.reserve_block_device_name(ctxt, instance, \u0027fake_device\u0027,"},{"line_number":497,"context_line":"                                             \u0027fake_volume_id\u0027)"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ffe62b97_3ac96325","line":495,"range":{"start_line":480,"start_character":0,"end_line":495,"end_character":10},"updated":"2017-03-28 09:37:34.000000000","message":"nit: This is exactly the same as the above, right? Could do with being moved into a common decorator or something","commit_id":"c24c8006f669ffa6bde357b05b497752f0141c9b"}]}
