Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

docker volume inspect command cause vmdkops service crash when the volume name is unicode character #575

Closed
lipingxue opened this issue Aug 12, 2016 · 3 comments
Assignees
Milestone

Comments

@lipingxue
Copy link
Contributor

In docker, run "docker volume inspect" command with a volume name which is an unicode character:

root@photon-machine [ ~ ]# docker volume inspect 你
[]
Error: No such volume: 你

See the following vmdk_ops.log:

tail -f /var/log/vmware/vmdk_ops.log
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 560, in executeRequest
    vmdk_path = vmdk_utils.get_vmdk_path(path, vol_name)
  File "/usr/lib/vmware/vmdkops/Python/vmdk_utils.py", line 92, in get_vmdk_path
    delta_disks = glob.glob("{0}/{1}{2}".format(path, vol_name, SNAP_SUFFIX_GLOB))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
08/05/16 17:14:45 53134 [MainThread] [INFO   ] === Starting vmdkops service ====
08/05/16 17:14:45 53134 [MainThread] [INFO   ] Loading VMCI server lib.
08/05/16 17:15:37 53134 [photon] [INFO   ] executeRequest 'get' completed with ret={u'Error': 'Volume NewV not found (file: /vmfs/volumes/datastore1/dockvols/NewV.vmdk)'}
08/05/16 17:15:37 53134 [photon] [INFO   ] *** createVMDK: /vmfs/volumes/datastore1/dockvols/NewV.vmdk opts = {u'size': u'10gb'}
08/05/16 17:15:37 53134 [photon] [INFO   ] executeRequest 'create' completed with ret=None
08/05/16 17:29:20 53134 [photon] [ERROR  ] 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1001, in main
    handleVmciRequests(port)
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 958, in handleVmciRequests
    opts=opts)
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 560, in executeRequest
    vmdk_path = vmdk_utils.get_vmdk_path(path, vol_name)
  File "/usr/lib/vmware/vmdkops/Python/vmdk_utils.py", line 92, in get_vmdk_path
    delta_disks = glob.glob("{0}/{1}{2}".format(path, vol_name, SNAP_SUFFIX_GLOB))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
08/05/16 17:29:20 53754 [MainThread] [INFO   ] === Starting vmdkops service ====
08/05/16 17:29:20 53754 [MainThread] [INFO   ] Loading VMCI server lib.

After crash, the vmdkops service restart automatically.

@govint
Copy link
Contributor

govint commented Aug 13, 2016

Its good to fix this in the plugin server, but IOW how docker passed
invalid input. Please raise an issue on docker also if the issue is failing
on docker local volumes.

On Sat, Aug 13, 2016 at 5:28 AM, Liping Xue notifications@github.com
wrote:

In docker, run "docker volume inspect" command with a volume name which is
an unicode character:

root@photon-machine [ ~ ]# docker volume inspect 你
[]
Error: No such volume: 你

See the following vmdk_ops.log:

tail -f /var/log/vmware/vmdk_ops.log
File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 560, in executeRequest
vmdk_path = vmdk_utils.get_vmdk_path(path, vol_name)
File "/usr/lib/vmware/vmdkops/Python/vmdk_utils.py", line 92, in get_vmdk_path
delta_disks = glob.glob("{0}/{1}{2}".format(path, vol_name, SNAP_SUFFIX_GLOB))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
08/05/16 17:14:45 53134 [MainThread] [INFO ] === Starting vmdkops service ====
08/05/16 17:14:45 53134 [MainThread] [INFO ] Loading VMCI server lib.
08/05/16 17:15:37 53134 [photon] [INFO ] executeRequest 'get' completed with ret={u'Error': 'Volume NewV not found (file: /vmfs/volumes/datastore1/dockvols/NewV.vmdk)'}
08/05/16 17:15:37 53134 [photon] [INFO ] *** createVMDK: /vmfs/volumes/datastore1/dockvols/NewV.vmdk opts = {u'size': u'10gb'}
08/05/16 17:15:37 53134 [photon] [INFO ] executeRequest 'create' completed with ret=None
08/05/16 17:29:20 53134 [photon] [ERROR ] 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1001, in main
handleVmciRequests(port)
File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 958, in handleVmciRequests
opts=opts)
File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 560, in executeRequest
vmdk_path = vmdk_utils.get_vmdk_path(path, vol_name)
File "/usr/lib/vmware/vmdkops/Python/vmdk_utils.py", line 92, in get_vmdk_path
delta_disks = glob.glob("{0}/{1}{2}".format(path, vol_name, SNAP_SUFFIX_GLOB))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u4f60' in position 0: ordinal not in range(128)
08/05/16 17:29:20 53754 [MainThread] [INFO ] === Starting vmdkops service ====
08/05/16 17:29:20 53754 [MainThread] [INFO ] Loading VMCI server lib.

After crash, the vmdkops service restart automatically.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#575, or mute the
thread
https://github.com/notifications/unsubscribe-auth/APHseBmNSMlP6e1cphVNTyk0AVdp9LS8ks5qfQipgaJpZM4JjjOq
.

@shaominchen
Copy link
Contributor

Hi Shahzeb, can you take a look at this issue?

@pshahzeb
Copy link
Contributor

pshahzeb commented Feb 7, 2017

Sure. I will get started on this.

@pdhamdhere pdhamdhere modified the milestones: 0.13, v1 GA Mar 9, 2017
@tusharnt tusharnt modified the milestone: 0.13 Mar 9, 2017
pshahzeb pushed a commit that referenced this issue Mar 13, 2017
Currently, the vmdk_ops service is invoked through watchdog.sh on esx host.
It unsets the environment variables to avoid file mapping. See /sbin/watchdog.sh Line:45
Setting it to ensure proper encoding especially in cases where string contents include unicode characters

Fixes #575
msterin pushed a commit that referenced this issue Mar 14, 2017
Currently, the vmdk_ops service is invoked through watchdog.sh on esx host.
It unsets the environment variables to avoid file mapping. See /sbin/watchdog.sh Line:45
Setting it to ensure proper encoding especially in cases where string contents include unicode characters

Fixes #575
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

6 participants