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

AdminCLI "vmdkops_admin.py ls" failed when datastore name includes white space #892

Closed
lipingxue opened this issue Feb 3, 2017 · 4 comments

Comments

@lipingxue
Copy link
Contributor

Steps to reproduce:

  1. create several volumes in datastore (for example "tmp-(datastore1)"), then run vmdkops_admin.ls
[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Volume  Datastore         Created By VM  Created                   Attached To VM  Policy  Capacity  Used     Disk Format  Filesystem Type  Access      Attach As               
------  ----------------  -------------  ------------------------  --------------  ------  --------  -------  -----------  ---------------  ----------  ----------------------  
vol1    tmp-(datastore1)  photon5        Mon Sep  5 01:47:03 2016  detached        N/A     100.00MB  13.00MB  thin         ext4             read-write  independent_persistent  
vol2    tmp-(datastore1)  photon5        Mon Sep  5 01:48:43 2016  detached        N/A     100.00MB  13.00MB  thin         ext4             read-write  independent_persistent  
vol3    tmp-(datastore1)  photon5        Mon Sep  5 04:08:01 2016  detached        N/A     100.00MB  13.00MB  thin         ext4             read-write  independent_persistent  

  1. rename the datastore name by adding extra whitespace in the datastore name ("tmp(datastore1)" -> "tmp (datastore1)")
    run the same command again, get the following error
[root@localhost:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Invalid destination specification:
vmkfstools: (datastore1)/dockvols/077d0f05-f262-4720-91b2-9d55a23870ff/vol1.vmdk: No name specification expected.
Failed to stat /vmfs/volumes/tmp- (datastore1)/dockvols/077d0f05-f262-4720-91b2-9d55a23870ff/vol1.vmdk. VMDK corrupted. Please remove and then retry

@shuklanirdesh82
Copy link
Contributor

resolving duplicate of #816 (#816 should care of the reported issue)

@shuklanirdesh82
Copy link
Contributor

reopening this one as per offline discussion with @lipingxue

@govint
Copy link
Contributor

govint commented Feb 13, 2017

May be fixed by changes posted for #816

@govint
Copy link
Contributor

govint commented Feb 16, 2017

Closing, as #911 is changing the same function thats causing the behavior to use KV API vs. command line vmkfstools util.

Currently its not possible to create a volume on a datastore with spaces in it. I'm raising a separate PR to handle that although why such names must be supported or even created is unclear. At least for Photon its not needed and mostly for the occasional cases in ESX perhaps.

@govint govint closed this as completed Feb 16, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants