"ascii" fault during create instance

asked 2014-03-19 12:18:05 -0600

bo-zhang gravatar image

Hello everyone,

I have installed Openstack by Devstack-stable-havanna. I success to upload an image "cirros-0.3.0-i386-disk.img".

but when I use this command "nova boot --flavor m1.small --image (id of image) --availability-zone compute-node InstanceTest" to create an instance in another server, it give me an error:

| fault                                | {"message": "'ascii' codec can't encode character u'\\xe8' in position 28: ordinal not in range(128)", "code": 500, "details": "  File \"/opt/stack/nova/nova/compute/manager.py\", line 258, in decorated_function |
|                                      |     return function(self, context, *args, **kwargs)                                                                                                                                                                 |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1630, in run_instance                                                                                                                                      |
|                                      |     do_run_instance()                                                                                                                                                                                               |
|                                      |   File \"/opt/stack/nova/nova/openstack/common/lockutils.py\", line 246, in inner                                                                                                                                   |
|                                      |     return f(*args, **kwargs)                                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1629, in do_run_instance                                                                                                                                   |
|                                      |     legacy_bdm_in_spec)                                                                                                                                                                                             |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 968, in _run_instance                                                                                                                                      |
|                                      |     notify(\"error\", msg=unicode(e))  # notify that build failed                                                                                                                                                   |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 952, in _run_instance                                                                                                                                      |
|                                      |     instance, image_meta, legacy_bdm_in_spec)                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1043, in _build_instance                                                                                                                                   |
|                                      |     set_access_ip=set_access_ip)                                                                                                                                                                                    |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1426, in _spawn                                                                                                                                            |
|                                      |     LOG.exception(_('Instance failed to spawn'), instance=instance)                                                                                                                                                 |
|                                      |   File \"/opt/stack/nova/nova/compute/manager.py\", line 1423, in _spawn                                                                                                                                            |
|                                      |     block_device_info)                                                                                                                                                                                              |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 2084, in spawn                                                                                                                                         |
|                                      |     admin_pass=admin_password)                                                                                                                                                                                      |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/driver.py\", line 2389, in _create_image                                                                                                                                 |
|                                      |     project_id=instance['project_id'])                                                                                                                                                                              |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 174, in cache                                                                                                                                    |
|                                      |     *args, **kwargs)                                                                                                                                                                                                |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 337, in create_image                                                                                                                             |
|                                      |     copy_qcow2_image(base, self.path, size)                                                                                                                                                                         |
|                                      |   File \"/opt/stack/nova/nova/openstack/common/lockutils.py\", line 246, in inner                                                                                                                                   |
|                                      |     return f(*args, **kwargs)                                                                                                                                                                                       |
|                                      |   File \"/opt/stack/nova/nova/virt/libvirt/imagebackend.py\", line 303, in copy_qcow2_image                                                                                                                         |
|                                      |     disk.extend(target, size, use_cow=True)                                                                                                                                                                         |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/api.py\", line 141, in extend                                                                                                                                               |
|                                      |     if not is_image_partitionless(image, use_cow):                                                                                                                                                                  |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/api.py\", line 181, in is_image_partitionless                                                                                                                               |
|                                      |     fs.setup()                                                                                                                                                                                                      |
|                                      |   File \"/opt/stack/nova/nova/virt/disk/vfs/localfs.py\", line 83, in setup                                                                                                                                         |
|                                      |     LOG.debug(_(\"Failed to mount image %(ex)s)\"), {'ex': str(e)})                                                                                                                                                 |
|                                      | ", "created": "2014-03-19T16:39:32Z"}

I think it's a problem posted by utf-8, but how could I resolve it ?

Thanks in advance. :-)

edit retag flag offensive close merge delete

Comments

The root cause is an error in mounting the image file. Further, looks like the image file path has some non ascii chars.

unmesh-gurjar gravatar imageunmesh-gurjar ( 2014-03-20 04:19:14 -0600 )edit

I think it's not an error in mounting the image file, because the instance could be created in Master Node (the image file is in the same node). But when I want to create an instance in a Compute Node, I got the above error. But for the path of image, I think there is also no problem. Because, in fact, I have tried another image "ubuntu-13.10-server-amd64.iso". The two image are in the same directory. And "Ubuntu" works!!

It's meaning that the above error is not for all the image.

bo-zhang gravatar imagebo-zhang ( 2014-03-20 07:31:45 -0600 )edit