Bug 688625

Summary: VDSM: getVmsList throws an error "KeyError: 'vmlist'"
Product: Red Hat Enterprise Linux 6 Reporter: Avi Tal <atal>
Component: vdsmAssignee: Eduardo Warszawski <ewarszaw>
Status: CLOSED WONTFIX QA Contact: yeylon <yeylon>
Severity: low Docs Contact:
Priority: medium    
Version: 6.1CC: abaron, bazulay, danken, iheim, srevivo, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-30 16:29:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Avi Tal 2011-03-17 14:37:59 UTC
Description of problem:

[root@navy-vds1 ~]# vdsClient -s 0 getVmsList 9adda0e6-62d7-4bff-8cb6-624da65fdbf2
Traceback (most recent call last):
  File "/usr/share/vdsm/vdsClient.py", line 2006, in <module>
    code, message = commands[command][0](commandArgs)
  File "/usr/share/vdsm/vdsClient.py", line 1295, in do_getVmsList
    print list['vmlist'].keys()




I've added debug print:
print list.keys() and it shows thw following keys:
['status', 'args']

Comment 1 Yaniv Kaul 2011-03-17 14:46:15 UTC
1. Aren't you missing the sdUUID param?
2. But also if you add it, you get the exception... (tested on vdsm22-4.5-62.30.el5_5rhev2_2):
 vdsClient -s 0 getVmsList 4663cd2e-8ec3-4f8b-a185-6377ec334ebf 08820370-09ad-4859-b234-26abfabd03a5
Traceback (most recent call last):
  File "/usr/share/vdsm/vdsClient.py", line 1956, in ?
    code, message = commands[command][0](commandArgs)
  File "/usr/share/vdsm/vdsClient.py", line 1256, in do_getVmsList
    for entry in list['vmlist']:
KeyError: 'vmlist'

Comment 2 Dan Kenigsberg 2011-03-20 09:57:34 UTC
getVmsList is an SPM-only command. I suspect you tried it on an HSM. Anyway, vdsClient should check the return code and print the error message.

Comment 3 Eduardo Warszawski 2011-03-30 16:29:20 UTC
vdsClient is not supported.
getVmsList is an SPM method and will be deprecated in a future version anyway,
Deferring.