Subscribe
Accepted Solution

I try CopyOffload

I can set CopyOffload.

However, I do not know how to check if they could be set correctly.

What should I check or test?

Regards,

Takeshi.K

Re: I try CopyOffload

If the copy offload operation succeeds, you should see an info-level log message in Cinder logs stating "Copied image %(img)s to volume %(vol)s using copy offload workflow"

If the copy offload operation fails, you should see a debug level message in Cinder logs stating "Copy offload either not configured or unsupported." or an exception "Copy offload workflow unsuccessful".

Re: I try CopyOffload

I cloud not find these messages in any the cinder log.

By the way, Please tell me some example operation to see the copy offload operation.

Regards,

Takeshi.K

Re: I try CopyOffload

If you use the cinder command line tool to issue the following command (replacing 01234567890 with the id of an image in your glance repository)

cinder create --image-id 01234567890 20

This will trigger the creation of a new Cinder volume whose source content comes from Glance.

Be sure that Glance is configured to use an NFS export from a different FlexVol volume on the same cluster where the Cinder backend is defined.

Re: I try CopyOffload

Thank you.

I tried a command.

[root@tkstack glance(keystone_admin)]# cinder create --image-id 17a544b2-1bf8-4b1c-954a-c3a405b51fbd 20

ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-02de21a7-02ab-48f6-a670-4097910ea322)

There may be  some problems..

Re: I try CopyOffload

Without logs from Cinder, I can't help much more.

Please provide relevant logs from Cinder, and the output from these two commands:

glance image-list

cinder service-list

Re: I try CopyOffload

Thank you.

Exactly,

When I will retry , I would like to provide some logs and outputs from commands.

Re: I try CopyOffload

When I run this command , volume.log and schedule.log were not output anything. api.log was output.

cinder create --image-id 17a544b2-1bf8-4b1c-954a-c3a405b51fbd 20

2014-08-02 20:51:20.492 7776 INFO eventlet.wsgi.server [-] (7776) accepted ('10.130.205.95', 57096)

2014-08-02 20:51:20.496 7776 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.130.205.95

2014-08-02 20:51:20.551 7776 INFO cinder.api.openstack.wsgi [req-60e69d94-25b0-40dc-b0c2-0547084a790f 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] POST http://10.130.205.95:8776/v1/51907191e78543afa754de6b69624205/volumes

2014-08-02 20:51:20.552 7776 AUDIT cinder.api.v1.volumes [req-60e69d94-25b0-40dc-b0c2-0547084a790f 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] Create volume of 20 GB

2014-08-02 20:51:20.720 7776 ERROR cinder.api.middleware.fault [req-60e69d94-25b0-40dc-b0c2-0547084a790f 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] Caught error: deleted

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault Traceback (most recent call last):

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/api/middleware/fault.py", line 75, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return req.get_response(self.application)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/request.py", line 1296, in send

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     application, catch_exc_info=False)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/request.py", line 1260, in call_application

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     app_iter = application(self.environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return resp(environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/keystoneclient/middleware/auth_token.py", line 679, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return self.app(env, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return resp(environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return resp(environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     response = self.app(environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return resp(environ, start_response)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     resp = self.call_func(req, *args, **self.kwargs)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return self.func(req, *args, **kwargs)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 895, in __call__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     content_type, body, accept)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 943, in _process_stack

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     action_result = self.dispatch(meth, request, action_args)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 1019, in dispatch

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return method(req=request, **action_args)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/api/v1/volumes.py", line 432, in create

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     **kwargs)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/volume/api.py", line 189, in create

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     flow_engine.run()

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/utils/lock_utils.py", line 51, in wrapper

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     return f(*args, **kwargs)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 118, in run

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     self._run()

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 128, in _run

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     self._revert(misc.Failure())

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 81, in _revert

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     misc.Failure.reraise_if_any(failures.values())

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/utils/misc.py", line 487, in reraise_if_any

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     failures[0].reraise()

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/utils/misc.py", line 494, in reraise

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     six.reraise(*self._exc_info)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 36, in _execute_task

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     result = task.execute(**arguments)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 341, in execute

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     self._check_image_metadata(context, image_id, size)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/api/create_volume.py", line 180, in _check_image_metadata

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     image_meta = self.image_service.show(context, image_id)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 228, in show

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     base_image_meta = self._translate_from_glance(image)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 336, in _translate_from_glance

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     image_meta = _extract_attributes(image)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/cinder/image/glance.py", line 434, in _extract_attributes

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     output[attr] = getattr(image, attr)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/site-packages/warlock/model.py", line 69, in __getattr__

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault     raise AttributeError(key)

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault AttributeError: deleted

2014-08-02 20:51:20.720 7776 TRACE cinder.api.middleware.fault

2014-08-02 20:51:20.723 7776 INFO cinder.api.middleware.fault [req-60e69d94-25b0-40dc-b0c2-0547084a790f 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] http://10.130.205.95:8776/v1/51907191e78543afa754de6b69624205/volumes returned with HTTP 500

2014-08-02 20:51:20.726 7776 INFO eventlet.wsgi.server [req-60e69d94-25b0-40dc-b0c2-0547084a790f 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] 10.130.205.95 - - [02/Aug/2014 20:51:20] "POST /v1/51907191e78543afa754de6b69624205/volumes HTTP/1.1" 500 401 0.233147

Two command

[root@tkstack ~(keystone_admin)]# glance image-list

+--------------------------------------+-------------------+-------------+------------------+-----------+--------+

| ID                                   | Name              | Disk Format | Container Format | Size      | Status |

+--------------------------------------+-------------------+-------------+------------------+-----------+--------+

| 309e930a-7eba-483c-9bc8-d8880b392d45 | CentOS-6.5_x86_64 | qcow2       | bare             | 344457216 | active |

| 17a544b2-1bf8-4b1c-954a-c3a405b51fbd | cirros            | qcow2       | bare             | 13147648  | active |

| 156e8961-aedc-4879-8b42-903236f2e8d8 | Fedora 20 x86_64  | qcow2       | bare             | 210829312 | active |

+--------------------------------------+-------------------+-------------+------------------+-----------+--------+

[root@tkstack ~(keystone_admin)]# cinder service-list

+------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+

|      Binary      |              Host             | Zone |  Status | State |         Updated_at         | Disabled Reason |

+------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+

|  cinder-backup   |       tkstack.sample.net      | nova | enabled |   up  | 2014-08-02T11:50:04.000000 |       None      |

| cinder-scheduler |       tkstack.sample.net      | nova | enabled |   up  | 2014-08-02T11:50:07.000000 |       None      |

|  cinder-volume   |       tkstack.sample.net      | nova | enabled |  down | 2014-07-28T07:00:45.000000 |       None      |

|  cinder-volume   | tkstack.sample.net@cdot-iscsi | nova | enabled |   up  | 2014-08-02T11:50:08.000000 |       None      |

|  cinder-volume   |  tkstack.sample.net@cdot-nfs  | nova | enabled |   up  | 2014-08-02T11:50:08.000000 |       None      |

|  cinder-volume   |  tkstack.sample.net@lvmdriver | nova | enabled |  down | 2014-07-31T15:19:05.000000 |       None      |

+------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+

[root@tkstack ~(keystone_admin)]#

Re: I try CopyOffload

Additional Information.

When I edited from "glance_api_version=2" to "glance_api_version=1" (or comment out this parameter)  in cinder.conf,

this command succeeded.

[root@tkstack cinder(keystone_admin)]# cinder create --image-id 17a544b2-1bf8-4b1c-954a-c3a405b51fbd 20

+---------------------+--------------------------------------+

|       Property      |                Value                 |

+---------------------+--------------------------------------+

|     attachments     |                  []                  |

|  availability_zone  |                 nova                 |

|       bootable      |                false                 |

|      created_at     |      2014-08-02T12:02:29.168455      |

| display_description |                 None                 |

|     display_name    |                 None                 |

|      encrypted      |                False                 |

|          id         | 0d8e77c5-75ed-4725-9aed-3e5609a0fe87 |

|       image_id      | 17a544b2-1bf8-4b1c-954a-c3a405b51fbd |

|       metadata      |                  {}                  |

|         size        |                  20                  |

|     snapshot_id     |                 None                 |

|     source_volid    |                 None                 |

|        status       |               creating               |

|     volume_type     |                 None                 |

+---------------------+--------------------------------------+

[root@tkstack cinder(keystone_admin)]#

Also , I could find "Copy Offload" by netapp driver in volume.log.

2014-08-02 21:02:31.382 15478 INFO cinder.volume.drivers.netapp.nfs [req-c1cdec7c-fb37-4bb8-9845-ed8781fefde2 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] Copied image to volume volume-0d8e77c5-75ed-4725-9aed-3e5609a0fe87 using regular download.

2014-08-02 21:02:31.382 15478 INFO cinder.volume.drivers.netapp.nfs [req-c1cdec7c-fb37-4bb8-9845-ed8781fefde2 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] Registering image in cache img-cache-17a544b2-1bf8-4b1c-954a-c3a405b51fbd

2014-08-02 21:02:31.384 15478 INFO cinder.volume.drivers.netapp.nfs [req-c1cdec7c-fb37-4bb8-9845-ed8781fefde2 13d3305af9e94e888b451e3775dd09ac 51907191e78543afa754de6b69624205 - - -] Cloning from cache to destination img-cache-17a544b2-1bf8-4b1c-954a-c3a405b51fbd

Is this correct?

If this configuration is correct , Should I use "1" for an api version of glance in cinder.conf ?

Thanks,

Re: I try CopyOffload

Yes, 2 is the correct value for api version of Glance.

Please see the upstream documentation for all the settings/configuration that is required for copy offload:

http://docs.openstack.org/icehouse/config-reference/content/ontap-cluster-nfs.html#d6e2969