)]}'
{"cinder/volume/driver.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b825cfcf4ba85088ff6adc873eb2fbd6bffd28ec","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        raise NotImplementedError()"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def is_attachable(self):"},{"line_number":344,"context_line":"        \"\"\"Can the volume be attached to the host."},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        This property indicates whether the volume can be attached locally to"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_0f1ed3bb","line":343,"updated":"2014-11-27 07:13:01.000000000","message":"I\u0027d argue that from Cinder point of view, all volumes are attachable.  Isn\u0027t it confusing to have both is_attachable() and attach_volume() in a driver?  I\u0027m not playing with words but I think the is_attachable() here is messing narrow-sensed definition of \u0027attach\u0027 with broad-sensed \u0027attach\u0027, which is Cinder\u0027s definition of attach.  How about keeping broad-sensed attach in VolumeManager \u0026 VolumeDriver, and do the magic in _attach_volume() and copy_volume() helper function, i.e. make them compatibile with different interfaces (block path, file IO handler, etc).","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"019ad9d902ff7cc9cfa22fbe344ca4b886e344c7","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        raise NotImplementedError()"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def is_attachable(self):"},{"line_number":344,"context_line":"        \"\"\"Can the volume be attached to the host."},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        This property indicates whether the volume can be attached locally to"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e260990f","line":343,"in_reply_to":"5a890539_0f1ed3bb","updated":"2015-01-12 20:59:49.000000000","message":"As a matter of principle I agree, this was the approach I originally took and abandoned for this version.  I ran into this issue:  when migrating a volume between two file handles, I need to instantiate a driver object for the remote volume.  I found it very messy to attempt this from within the context of the source volume driver instance.  It seemed a better fit to allow the manager to manipulate both source and destination volume instances at that layer, and thus this proposal.\n\nIs there a way to improve the driver interface while avoiding the driver-in-a-driver problem?","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b825cfcf4ba85088ff6adc873eb2fbd6bffd28ec","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        \"\"\""},{"line_number":359,"context_line":"        return True"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def open_volume(self, context, volume, remote, attachable, mode\u003d\u0027rb\u0027):"},{"line_number":362,"context_line":"        \"\"\"Opens the volume as a file and returns a file object."},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        The mode can be \u0027rb\u0027 or \u0027wb\u0027 for reading (default) or writing.  This"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2f1b8fcb","line":361,"updated":"2014-11-27 07:13:01.000000000","message":"In broad sense, I\u0027d consider open_volume() as a special form of \u0027attach_volume\u0027.  How about changing attach_volume() by adding an extra open\u003dFalse parameter?  For those iSCSI/FC driver, they can ignore this new \u0027open\u0027 parameter; the rest can consume this parameter and return a file handler.","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b825cfcf4ba85088ff6adc873eb2fbd6bffd28ec","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        return {\u0027handle\u0027: handle, \u0027private\u0027: attach_info}"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def close_volume(self, context, volume, volume_file, remote):"},{"line_number":426,"context_line":"        \"\"\"Close a volume file object obtained with open_volume()."},{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        A closed volume handle cannot be used for further I/O operations.  This"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_4f77fb08","line":425,"updated":"2014-11-27 07:13:01.000000000","message":"Same as open_volume, I\u0027d treat close_volume() as a special form of _detach_volume().","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"11d77535bc059142bf92d39c38751653e8e3642c","unresolved":false,"context_lines":[{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    def copy_image_to_volume(self, context, volume, image_service, image_id):"},{"line_number":465,"context_line":"        \"\"\"Fetch the image from image_service and write it to the volume.\"\"\""},{"line_number":466,"context_line":"        LOG.debug((\u0027copy_image_to_volume %s.\u0027) % volume[\u0027name\u0027])"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"        properties \u003d utils.brick_get_connector_properties()"},{"line_number":469,"context_line":"        attach_info \u003d self._attach_volume(context, volume, properties)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_78f5dceb","line":466,"updated":"2015-01-06 10:08:13.000000000","message":"Please replace \u0027%\u0027 with \u0027,\u0027","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                                              remote\u003dremote)"},{"line_number":416,"context_line":"        except Exception:"},{"line_number":417,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":418,"context_line":"                msg \u003d _(\"Failed to attach volume %(vol)s\")"},{"line_number":419,"context_line":"                LOG.error(msg % {\u0027vol\u0027: volume[\u0027id\u0027]})"},{"line_number":420,"context_line":"                self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":421,"context_line":"                                      {\u0027status\u0027: saved_status})"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_26f87ac2","line":418,"updated":"2015-01-26 17:56:54.000000000","message":"Use _LE() here.","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        except Exception:"},{"line_number":417,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":418,"context_line":"                msg \u003d _(\"Failed to attach volume %(vol)s\")"},{"line_number":419,"context_line":"                LOG.error(msg % {\u0027vol\u0027: volume[\u0027id\u0027]})"},{"line_number":420,"context_line":"                self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":421,"context_line":"                                      {\u0027status\u0027: saved_status})"},{"line_number":422,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_26e6ba15","line":419,"updated":"2015-01-26 17:56:54.000000000","message":"Preferred way would be to replace % with ,. Though realistically error level messaging will always be enabled, so string will be formatted regardless. Good to keep to this standard though.","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        # connection to the volume and a local driver object is obtained, the"},{"line_number":427,"context_line":"        # remote field is changed to True."},{"line_number":428,"context_line":"        if remote and not attachable:"},{"line_number":429,"context_line":"            raise Exception(\u0027This combination of paramaters is invalid\u0027)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        properties \u003d utils.brick_get_connector_properties()"},{"line_number":432,"context_line":"        saved_status \u003d volume[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_51751ac9","line":429,"updated":"2015-03-09 17:32:13.000000000","message":"Why using a generic exception here?  Maybe InvalidVolume would be better?  Should end with \u0027.\u0027","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                                              remote\u003dremote)"},{"line_number":439,"context_line":"        except Exception:"},{"line_number":440,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":441,"context_line":"                msg \u003d _LE(\"Failed to attach volume %(vol)s\")"},{"line_number":442,"context_line":"                LOG.error(msg, {\u0027vol\u0027: volume[\u0027id\u0027]})"},{"line_number":443,"context_line":"                self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":444,"context_line":"                                      {\u0027status\u0027: saved_status})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_91523233","line":441,"updated":"2015-03-09 17:32:13.000000000","message":"Suggest \u0027Failed to attach volume: %(vol)s\u0027  Also recommend making this all one line instead of defining the message and then logging it.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":450,"context_line":"                handle \u003d open(volume_path, mode)"},{"line_number":451,"context_line":"        except Exception:"},{"line_number":452,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":453,"context_line":"                msg \u003d _LE(\"Failed to open volume %(vol)s\")"},{"line_number":454,"context_line":"                LOG.error(msg, {\u0027vol\u0027: volume[\u0027id\u0027]})"},{"line_number":455,"context_line":"                self.db.volume_update(context, volume[\u0027id\u0027],"},{"line_number":456,"context_line":"                                      {\u0027status\u0027: saved_status})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d11e6a6f","line":453,"updated":"2015-03-09 17:32:13.000000000","message":"Same comments here as above.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        \"\"\"Provide a shim for the newer copy_volume_data() method in"},{"line_number":489,"context_line":"        volume/utils."},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        If no drivers in the tree relies on this method, it can be removed.  It"},{"line_number":492,"context_line":"        is provided at this moment to ease the immediate and near future"},{"line_number":493,"context_line":"        transition necessary to support a more generic implementation for"},{"line_number":494,"context_line":"        volume migration."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_5438a8d2","line":491,"updated":"2015-03-09 17:32:13.000000000","message":"relies -\u003e rely","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"}],"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        self.rados \u003d kwargs.get(\u0027rados\u0027, rados)"},{"line_number":263,"context_line":"        self.rbd \u003d kwargs.get(\u0027rbd\u0027, rbd)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        # allow overrides for migration"},{"line_number":266,"context_line":"        for key in [\u0027rbd_user\u0027, \u0027rbd_pool\u0027]:"},{"line_number":267,"context_line":"            value \u003d kwargs.get(key, None)"},{"line_number":268,"context_line":"            if value is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_2694fa41","line":265,"updated":"2015-01-26 17:56:54.000000000","message":"Start comments upper case.","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"}],"cinder/volume/manager.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b825cfcf4ba85088ff6adc873eb2fbd6bffd28ec","unresolved":false,"context_lines":[{"line_number":1086,"context_line":"                                       properties, force\u003dcopy_error,"},{"line_number":1087,"context_line":"                                       remote\u003dsrc[\u0027remote\u0027])"},{"line_number":1088,"context_line":""},{"line_number":1089,"context_line":"    def _transfer_data(self, src_volume, dst_volume, length, chunksize):"},{"line_number":1090,"context_line":"        \"\"\"Transfer data between files (Python IO objects).\"\"\""},{"line_number":1091,"context_line":""},{"line_number":1092,"context_line":"        # TODO(jbernard): This function is duplicated in the backup driver."}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_cf23eb04","line":1089,"updated":"2014-11-27 07:13:01.000000000","message":"This can be part of vol_utils.copy_volume().","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b825cfcf4ba85088ff6adc873eb2fbd6bffd28ec","unresolved":false,"context_lines":[{"line_number":1301,"context_line":"            self._set_migration_driver(ctxt, src)"},{"line_number":1302,"context_line":"            self._set_migration_driver(ctxt, dst)"},{"line_number":1303,"context_line":""},{"line_number":1304,"context_line":"            if (volume_is_safe_to_migrate(src[\u0027volume\u0027])):"},{"line_number":1305,"context_line":""},{"line_number":1306,"context_line":"                if src[\u0027attachable\u0027] and dst[\u0027attachable\u0027]:"},{"line_number":1307,"context_line":"                    self._copy_volume_using_paths(ctxt, src, dst)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_ef20a7fa","line":1304,"updated":"2014-11-27 07:13:01.000000000","message":"As mentioned in driver.py, if we change signature of _attach_volume() and _detach_volume(), we can simplify as below:\n\n    self._copy_volume(ctxt, src, dst)\n\nAnd in _copy_volume(), _attach_volume() will be called for all kinds volumes, given driver is able to return either path or file handler.","commit_id":"927e1e7d81e1bffdf26c6ec2c3cdc47b618639c2"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"        src_orig_status \u003d src[\u0027volume\u0027][\u0027status\u0027]"},{"line_number":1039,"context_line":"        dst_orig_status \u003d dst[\u0027volume\u0027][\u0027status\u0027]"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"        # attach destination volume"},{"line_number":1042,"context_line":"        try:"},{"line_number":1043,"context_line":"            dst_attach_info \u003d self.driver._attach_volume(ctxt,"},{"line_number":1044,"context_line":"                                                         dst[\u0027volume\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_067e1e19","line":1041,"updated":"2015-01-26 17:56:54.000000000","message":"Uppercase.","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"                                                         remote\u003ddst[\u0027remote\u0027])"},{"line_number":1047,"context_line":"        except Exception:"},{"line_number":1048,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1049,"context_line":"                msg \u003d _(\"Failed to attach volume %(vol)s\")"},{"line_number":1050,"context_line":"                LOG.error(msg % {\u0027vol\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1051,"context_line":"                self.db.volume_update(ctxt, dst[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":1052,"context_line":"                                      {\u0027status\u0027: dst_orig_status})"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_4674a635","line":1049,"updated":"2015-01-26 17:56:54.000000000","message":"_LE()","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"                                                         remote\u003dsrc[\u0027remote\u0027])"},{"line_number":1060,"context_line":"        except Exception:"},{"line_number":1061,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1062,"context_line":"                msg \u003d _(\"Failed to attach volume %(vol)s\")"},{"line_number":1063,"context_line":"                LOG.error(msg % {\u0027vol\u0027: src[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1064,"context_line":"                self.db.volume_update(ctxt, src[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":1065,"context_line":"                                      {\u0027status\u0027: src_orig_status})"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_46abc674","line":1062,"updated":"2015-01-26 17:56:54.000000000","message":"LE()","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        except Exception:"},{"line_number":1061,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1062,"context_line":"                msg \u003d _(\"Failed to attach volume %(vol)s\")"},{"line_number":1063,"context_line":"                LOG.error(msg % {\u0027vol\u0027: src[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1064,"context_line":"                self.db.volume_update(ctxt, src[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":1065,"context_line":"                                      {\u0027status\u0027: src_orig_status})"},{"line_number":1066,"context_line":"                self.driver._detach_volume(ctxt, dst_attach_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_66a8c277","line":1063,"updated":"2015-01-26 17:56:54.000000000","message":"% \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1070,"context_line":""},{"line_number":1071,"context_line":"        copy_error \u003d True"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"        # move data from source to destination"},{"line_number":1074,"context_line":"        try:"},{"line_number":1075,"context_line":"            size_in_mb \u003d int(src[\u0027volume\u0027][\u0027size\u0027]) * 1024"},{"line_number":1076,"context_line":"            vol_utils.copy_volume(src_attach_info[\u0027device\u0027][\u0027path\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_c6aed680","line":1073,"updated":"2015-01-26 17:56:54.000000000","message":"Uppercase.","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"        except Exception:"},{"line_number":1083,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1084,"context_line":"                msg \u003d _(\"Failed to copy volume %(src)s to %(dst)s.\")"},{"line_number":1085,"context_line":"                LOG.error(msg % {\u0027src\u0027: src[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":1086,"context_line":"                                 \u0027dst\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1087,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_06cc5e69","line":1084,"updated":"2015-01-26 17:56:54.000000000","message":"_LE()","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1085,"context_line":"                LOG.error(msg % {\u0027src\u0027: src[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":1086,"context_line":"                                 \u0027dst\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1087,"context_line":""},{"line_number":1088,"context_line":"        # detach source and destination volumes"},{"line_number":1089,"context_line":"        finally:"},{"line_number":1090,"context_line":"            self.driver._detach_volume(ctxt, dst_attach_info, dst[\u0027volume\u0027],"},{"line_number":1091,"context_line":"                                       properties, force\u003dcopy_error,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_c6e5f6dc","line":1088,"updated":"2015-01-26 17:56:54.000000000","message":"Uppercase","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1101,"context_line":"        # Needs a driver-specific solution for discard."},{"line_number":1102,"context_line":""},{"line_number":1103,"context_line":"        chunks \u003d int(length / chunksize)"},{"line_number":1104,"context_line":"        LOG.info(\"%(chunks)s chunks of %(bytes)s bytes to be transferred\" %"},{"line_number":1105,"context_line":"                 {\u0027chunks\u0027: chunks, \u0027bytes\u0027: chunksize})"},{"line_number":1106,"context_line":""},{"line_number":1107,"context_line":"        src_volume.seek(0)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_46d90621","line":1104,"updated":"2015-01-26 17:56:54.000000000","message":"_LI(), % \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"            delta \u003d (time.time() - start)"},{"line_number":1121,"context_line":"            rate \u003d (chunksize / delta) / 1024"},{"line_number":1122,"context_line":"            LOG.info(\"Transferred chunk %(chunk)s of %(chunks)s (%(rate)dK/s)\""},{"line_number":1123,"context_line":"                     % {\u0027chunk\u0027: chunk + 1, \u0027chunks\u0027: chunks, \u0027rate\u0027: rate})"},{"line_number":1124,"context_line":""},{"line_number":1125,"context_line":"            # yield to any other pending backups"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_c6fc1675","line":1122,"updated":"2015-01-26 17:56:54.000000000","message":"_LI(), % \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1122,"context_line":"            LOG.info(\"Transferred chunk %(chunk)s of %(chunks)s (%(rate)dK/s)\""},{"line_number":1123,"context_line":"                     % {\u0027chunk\u0027: chunk + 1, \u0027chunks\u0027: chunks, \u0027rate\u0027: rate})"},{"line_number":1124,"context_line":""},{"line_number":1125,"context_line":"            # yield to any other pending backups"},{"line_number":1126,"context_line":"            eventlet.sleep(0)"},{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":"        rem \u003d int(length % chunksize)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_e601126b","line":1125,"updated":"2015-01-26 17:56:54.000000000","message":"Uppercase","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":"        rem \u003d int(length % chunksize)"},{"line_number":1129,"context_line":"        if rem:"},{"line_number":1130,"context_line":"            LOG.info(\"Transferring remaining %s bytes\" % rem)"},{"line_number":1131,"context_line":"            data \u003d src_volume.read(rem)"},{"line_number":1132,"context_line":"            if data !\u003d \u0027\u0027:"},{"line_number":1133,"context_line":"                dst_volume.write(data)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_66ed22b7","line":1130,"updated":"2015-01-26 17:56:54.000000000","message":"_LI(), % \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        conn \u003d rpcapi.initialize_connection(ctxt, volume[\u0027volume\u0027], properties)"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"        # at the moment, only RBD is supported"},{"line_number":1160,"context_line":"        if conn[\u0027driver_volume_type\u0027] !\u003d \u0027rbd\u0027:"},{"line_number":1161,"context_line":"            msg \u003d (_(\"Migration to volume type \\\"%s\\\" not yet implemented\") %"},{"line_number":1162,"context_line":"                   conn[\u0027driver_volume_type\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_c6333660","line":1159,"updated":"2015-01-26 17:56:54.000000000","message":"Uppercase","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"        and cannot provide a block device path in the filesystem."},{"line_number":1184,"context_line":"        \"\"\""},{"line_number":1185,"context_line":""},{"line_number":1186,"context_line":"        # open destination volume for writing"},{"line_number":1187,"context_line":"        try:"},{"line_number":1188,"context_line":"            dst[\u0027file\u0027] \u003d dst[\u0027driver\u0027].open_volume(ctxt,"},{"line_number":1189,"context_line":"                                                    dst[\u0027volume\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_8614cea0","line":1186,"updated":"2015-01-26 17:56:54.000000000","message":"Upper","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1192,"context_line":"        except Exception:"},{"line_number":1193,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1194,"context_line":"                msg \u003d _(\"Failed to open destination volume %(vol)s\")"},{"line_number":1195,"context_line":"                LOG.error(msg % {\u0027vol\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"        # open source volume for reading"},{"line_number":1198,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_e60f5286","line":1195,"updated":"2015-01-26 17:56:54.000000000","message":"% \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1194,"context_line":"                msg \u003d _(\"Failed to open destination volume %(vol)s\")"},{"line_number":1195,"context_line":"                LOG.error(msg % {\u0027vol\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1196,"context_line":""},{"line_number":1197,"context_line":"        # open source volume for reading"},{"line_number":1198,"context_line":"        try:"},{"line_number":1199,"context_line":"            src[\u0027file\u0027] \u003d src[\u0027driver\u0027].open_volume(ctxt,"},{"line_number":1200,"context_line":"                                                    src[\u0027volume\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_461e66bc","line":1197,"updated":"2015-01-26 17:56:54.000000000","message":"Upper","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"                                                    src[\u0027attachable\u0027])"},{"line_number":1203,"context_line":"        except Exception:"},{"line_number":1204,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1205,"context_line":"                msg \u003d _(\"Failed to open source volume %(vol)s\")"},{"line_number":1206,"context_line":"                LOG.error(msg % {\u0027vol\u0027: src[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1207,"context_line":"                dst[\u0027driver\u0027].close_volume(ctxt, dst[\u0027volume\u0027], dst[\u0027file\u0027],"},{"line_number":1208,"context_line":"                                           dst[\u0027remote\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_066ffe2b","line":1205,"updated":"2015-01-26 17:56:54.000000000","message":"_LE(), % \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"                dst[\u0027driver\u0027].close_volume(ctxt, dst[\u0027volume\u0027], dst[\u0027file\u0027],"},{"line_number":1208,"context_line":"                                           dst[\u0027remote\u0027])"},{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"        LOG.debug(\"Transferring data between \u0027%(src)s\u0027 and \u0027%(dst)s\u0027\" %"},{"line_number":1211,"context_line":"                  {\u0027src\u0027: src[\u0027volume\u0027][\u0027name\u0027],"},{"line_number":1212,"context_line":"                   \u0027dst\u0027: dst[\u0027volume\u0027][\u0027name\u0027]})"},{"line_number":1213,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_a680eac0","line":1210,"updated":"2015-01-26 17:56:54.000000000","message":"% \u003d\u003e ,","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"                  {\u0027src\u0027: src[\u0027volume\u0027][\u0027name\u0027],"},{"line_number":1212,"context_line":"                   \u0027dst\u0027: dst[\u0027volume\u0027][\u0027name\u0027]})"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"        # move data from source to destination"},{"line_number":1215,"context_line":"        self._transfer_data(src[\u0027file\u0027][\u0027handle\u0027],"},{"line_number":1216,"context_line":"                            dst[\u0027file\u0027][\u0027handle\u0027],"},{"line_number":1217,"context_line":"                            int(src[\u0027volume\u0027][\u0027size\u0027]) * units.Gi,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_467586f8","line":1214,"updated":"2015-01-26 17:56:54.000000000","message":"Upper","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"                            int(src[\u0027volume\u0027][\u0027size\u0027]) * units.Gi,"},{"line_number":1218,"context_line":"                            units.Mi * 4)"},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"        # close destination volume"},{"line_number":1221,"context_line":"        dst[\u0027driver\u0027].close_volume(ctxt,"},{"line_number":1222,"context_line":"                                   dst[\u0027volume\u0027],"},{"line_number":1223,"context_line":"                                   dst[\u0027file\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_a6670a4c","line":1220,"updated":"2015-01-26 17:56:54.000000000","message":"Upper","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be6a900fbecd27d0c444ce99dde31d6f23e5e23c","unresolved":false,"context_lines":[{"line_number":1223,"context_line":"                                   dst[\u0027file\u0027],"},{"line_number":1224,"context_line":"                                   dst[\u0027remote\u0027])"},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"        # close source volume"},{"line_number":1227,"context_line":"        src[\u0027driver\u0027].close_volume(ctxt,"},{"line_number":1228,"context_line":"                                   src[\u0027volume\u0027],"},{"line_number":1229,"context_line":"                                   src[\u0027file\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_06561e5c","line":1226,"updated":"2015-01-26 17:56:54.000000000","message":"Upper","commit_id":"b93bb579c4cdc8ba9e8e42eaa5ca36e0fb665b72"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        # Needs a driver-specific solution for discard."},{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"        chunks \u003d int(length / chunksize)"},{"line_number":1029,"context_line":"        LOG.info(_LI(\"%(chunks)s chunks of %(bytes)s bytes to be transferred\"),"},{"line_number":1030,"context_line":"                 {\u0027chunks\u0027: chunks, \u0027bytes\u0027: chunksize})"},{"line_number":1031,"context_line":""},{"line_number":1032,"context_line":"        src_volume.seek(0)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_b40804db","line":1029,"updated":"2015-03-09 17:32:13.000000000","message":"Please add \u0027.\u0027","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1045,"context_line":"            delta \u003d (time.time() - start)"},{"line_number":1046,"context_line":"            rate \u003d (chunksize / delta) / 1024"},{"line_number":1047,"context_line":"            LOG.info(_LI(\"Transferred chunk %(chunk)s of %(chunks)s \""},{"line_number":1048,"context_line":"                         \"(%(rate)dK/s)\"), {\u0027chunk\u0027: chunk + 1,"},{"line_number":1049,"context_line":"                                            \u0027chunks\u0027: chunks,"},{"line_number":1050,"context_line":"                                            \u0027rate\u0027: rate})"},{"line_number":1051,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_94fdc0b3","line":1048,"updated":"2015-03-09 17:32:13.000000000","message":"\u0027.\u0027","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"        rem \u003d int(length % chunksize)"},{"line_number":1056,"context_line":"        if rem:"},{"line_number":1057,"context_line":"            LOG.info(_LI(\"Transferring remaining %s bytes\"), rem)"},{"line_number":1058,"context_line":"            data \u003d src_volume.read(rem)"},{"line_number":1059,"context_line":"            if data !\u003d \u0027\u0027:"},{"line_number":1060,"context_line":"                dst_volume.write(data)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d432d8a5","line":1057,"updated":"2015-03-09 17:32:13.000000000","message":"\u0027.\u0027","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"        This method determines what driver is suitable to use during volume"},{"line_number":1068,"context_line":"        migration for this particular volume.  In most cases this will be"},{"line_number":1069,"context_line":"        self.driver as most drivers support attachement."},{"line_number":1070,"context_line":""},{"line_number":1071,"context_line":"        For volumes that are not attachable (like RBD) we must have an instance"},{"line_number":1072,"context_line":"        of the appropriate driver so that volume_open() and volume_close() can"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_54cc2889","line":1069,"updated":"2015-03-09 17:32:13.000000000","message":"attachement -\u003e attachment.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a884f76eef69c1982b5e92d19898b4077bdf2cea","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        conn \u003d rpcapi.initialize_connection(ctxt, volume[\u0027volume\u0027], properties)"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # At the moment, only RBD is supported"},{"line_number":1087,"context_line":"        if conn[\u0027driver_volume_type\u0027] !\u003d \u0027rbd\u0027:"},{"line_number":1088,"context_line":"            msg \u003d (_LE(\"Migration to volume type \\\"%s\\\" not yet implemented\"),"},{"line_number":1089,"context_line":"                   conn[\u0027driver_volume_type\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_a32411b0","line":1086,"updated":"2015-02-27 00:21:13.000000000","message":"It seems to kind of be against the general pattern in cinder of keeping backend specifics in the driver layer and the manager code agnostic. I\u0027m not sure if we should let this kind of layering start to blur together like this... It would be a sad day when there are 30 if\u0027s here checking for all the backends and doing special things for them in the manager. Is there any way to abstract this out?","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"52ae640c3560613749bafe40f75e0d0b5ae8f054","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        conn \u003d rpcapi.initialize_connection(ctxt, volume[\u0027volume\u0027], properties)"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # At the moment, only RBD is supported"},{"line_number":1087,"context_line":"        if conn[\u0027driver_volume_type\u0027] !\u003d \u0027rbd\u0027:"},{"line_number":1088,"context_line":"            msg \u003d (_LE(\"Migration to volume type \\\"%s\\\" not yet implemented\"),"},{"line_number":1089,"context_line":"                   conn[\u0027driver_volume_type\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_bdc0822b","line":1086,"in_reply_to":"ba7be1f8_752b8b94","updated":"2015-02-27 19:22:56.000000000","message":"Yea I think the approach of moving the migrate logic out of drivers makes sense for instances like this where you need some platform specific management for each backend involved.\n\nIt kind of looks to me like this might introduce a new class of driver to cinder that are just for doing migrations which (kind of like the backup drivers). Just another pluggable part of cinder that can do a platform specific operation that you mix and match to suite the installation environment.\n\nIt might make sense for a volume driver to know which migrate driver to use, but I don\u0027t think that relationship should be coded into the platform agnostic parts of cinder like the volume manager. If anything that type of thing belongs in the conf file.\n\nThen again maybe I\u0027m not understanding this well enough (I\u0027m still figuring out all the parts of Cinder myself) so before doing too much and refactoring this change we should probably get some core\u0027s to weigh in ; )","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"680e0001c5fe93f6df43e57fa7bbe7035a61ed77","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        conn \u003d rpcapi.initialize_connection(ctxt, volume[\u0027volume\u0027], properties)"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # At the moment, only RBD is supported"},{"line_number":1087,"context_line":"        if conn[\u0027driver_volume_type\u0027] !\u003d \u0027rbd\u0027:"},{"line_number":1088,"context_line":"            msg \u003d (_LE(\"Migration to volume type \\\"%s\\\" not yet implemented\"),"},{"line_number":1089,"context_line":"                   conn[\u0027driver_volume_type\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_752b8b94","line":1086,"in_reply_to":"ba7be1f8_a32411b0","updated":"2015-02-27 16:08:38.000000000","message":"Yes, that\u0027s a very reasonable concern.  Let me see what I can come up with.  Otherwise, do you agree with the approach?","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"cd64804d2bb9ba7e531042fae42ea942ea24075b","unresolved":false,"context_lines":[{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        conn \u003d rpcapi.initialize_connection(ctxt, volume[\u0027volume\u0027], properties)"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # At the moment, only RBD is supported"},{"line_number":1087,"context_line":"        if conn[\u0027driver_volume_type\u0027] !\u003d \u0027rbd\u0027:"},{"line_number":1088,"context_line":"            msg \u003d (_LE(\"Migration to volume type \\\"%s\\\" not yet implemented\"),"},{"line_number":1089,"context_line":"                   conn[\u0027driver_volume_type\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_8f9b40c8","line":1086,"in_reply_to":"ba7be1f8_bdc0822b","updated":"2015-03-02 18:38:53.000000000","message":"Thanks Patrick, very much appreciated.  I think your understanding is at least as good as mine.  WRT a new class of driver, that is also the direction I\u0027m thinking as well.  My hope is that this very initial step will offer something that works and allows us to better reason about a more proper solution.  I definitely agree, this patch moves us closer but the final solution I think could look quite different, and offer more pluggability and be cleaner overall.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"                                                    dst[\u0027attachable\u0027], \u0027wb\u0027)"},{"line_number":1140,"context_line":"        except Exception:"},{"line_number":1141,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1142,"context_line":"                msg \u003d _LE(\"Failed to open destination volume %(vol)s\")"},{"line_number":1143,"context_line":"                LOG.error(msg, {\u0027vol\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        # Open source volume for reading"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_54c8a854","line":1142,"updated":"2015-03-09 17:32:13.000000000","message":"Suggest Failed to open destination volume: %(vol)s","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1150,"context_line":"                                                    src[\u0027attachable\u0027])"},{"line_number":1151,"context_line":"        except Exception:"},{"line_number":1152,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1153,"context_line":"                msg \u003d _LE(\"Failed to open source volume %(vol)s\")"},{"line_number":1154,"context_line":"                LOG.error(msg, {\u0027vol\u0027: src[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":1155,"context_line":"                dst[\u0027driver\u0027].close_volume(ctxt, dst[\u0027volume\u0027], dst[\u0027file\u0027],"},{"line_number":1156,"context_line":"                                           dst[\u0027remote\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_b4e004ce","line":1153,"updated":"2015-03-09 17:32:13.000000000","message":"Same here.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"                dst[\u0027driver\u0027].close_volume(ctxt, dst[\u0027volume\u0027], dst[\u0027file\u0027],"},{"line_number":1156,"context_line":"                                           dst[\u0027remote\u0027])"},{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"        LOG.debug(\"Transferring data between \u0027%(src)s\u0027 and \u0027%(dst)s\u0027\" %"},{"line_number":1159,"context_line":"                  {\u0027src\u0027: src[\u0027volume\u0027][\u0027name\u0027],"},{"line_number":1160,"context_line":"                   \u0027dst\u0027: dst[\u0027volume\u0027][\u0027name\u0027]})"},{"line_number":1161,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_f4e6fce6","line":1158,"updated":"2015-03-09 17:32:13.000000000","message":"\u0027.\u0027","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"ad1f29ce1c8a913978228f7e3a21e5b58827ae0b","unresolved":false,"context_lines":[{"line_number":1388,"context_line":"        if not force_host_copy and new_type_id is None:"},{"line_number":1389,"context_line":"            try:"},{"line_number":1390,"context_line":"                LOG.debug(\"volume %s: calling driver migrate_volume\","},{"line_number":1391,"context_line":"                          volume_ref[\u0027id\u0027])"},{"line_number":1392,"context_line":"                moved, model_update \u003d self.driver.migrate_volume(ctxt,"},{"line_number":1393,"context_line":"                                                                 volume_ref,"},{"line_number":1394,"context_line":"                                                                 host)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa041b7_7f17cfa3","line":1391,"updated":"2015-04-02 08:06:05.000000000","message":"I have great concerns about this patch. Please check Line 1392 here. The original migrate_volume code has already offered the chance for different drivers to implement their own ways to do the migration. For RBD, I think it is enough to just implement the migration in the driver. There is no need to change so much code to get this implemented.\n\nself.driver.migrate_volume returns a bool moved. If this is implemented, e.g. in rbd, this method will call the migration code in the driver, then return true. After that, there won\u0027t be any attach, data copy, detach, etc. If this method is not implemented for the driver, moved will be false. Then, the traditional path will go, during which we do attach, copy and detach.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"}],"cinder/volume/rpcapi.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"088aafaff4e61572f022c98f7165b2ca2b137dda","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               create_cgsnapshot, and delete_cgsnapshot. Also adds"},{"line_number":59,"context_line":"               the consistencygroup_id parameter in create_volume."},{"line_number":60,"context_line":"        1.19 - Adds update_migrated_volume"},{"line_number":61,"context_line":"        1.20 - Adds is_attachable."},{"line_number":62,"context_line":"    \u0027\u0027\u0027"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_44ceae5b","line":61,"updated":"2015-06-04 18:58:20.000000000","message":"Versioning is now out of date, needs to be bumped.","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"}],"cinder/volume/utils.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                                                remote\u003ddst[\u0027remote\u0027])"},{"line_number":416,"context_line":"    except Exception:"},{"line_number":417,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":418,"context_line":"            msg \u003d _LE(\"Failed to attach volume %(vol)s\")"},{"line_number":419,"context_line":"            LOG.error(msg, {\u0027vol\u0027: dst[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":420,"context_line":"            db.volume_update(ctxt, dst[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":421,"context_line":"                             {\u0027status\u0027: dst_orig_status})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_7ac3d337","line":418,"updated":"2015-03-09 17:32:13.000000000","message":"Failed to attach volume: %(vol)s","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a3ceecfe72839d142be9a5fb937d62e38de40e23","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                                                remote\u003dsrc[\u0027remote\u0027])"},{"line_number":429,"context_line":"    except Exception:"},{"line_number":430,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":431,"context_line":"            msg \u003d _LE(\"Failed to attach volume %(vol)s\")"},{"line_number":432,"context_line":"            LOG.error(msg, {\u0027vol\u0027: src[\u0027volume\u0027][\u0027id\u0027]})"},{"line_number":433,"context_line":"            db.volume_update(ctxt, src[\u0027volume\u0027][\u0027id\u0027],"},{"line_number":434,"context_line":"                             {\u0027status\u0027: src_orig_status})"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_1aead7ab","line":431,"updated":"2015-03-09 17:32:13.000000000","message":"Failed to attach volume: %(vol)s","commit_id":"4e6e0ae1dac50dd08c9a7306c49b82b983a64fa3"}]}
