Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/38868
to review the following change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
API: getVMList: compatibity with internal clients
After the addition of the 'onlyUUID' parameter, the external API of VDSM is now backward compatible:
- in XMLRPC, we always set explicitely onlyUUID=False, so no room for breakage - in JSONRPC, we have Host_getVMList_Call (short status), on which * if onlyUUID is provided from the outside, we use it (works with Engine >= 3.5.1) * if onlyUUID is NOT given (Engine 3.5.0), we default as True, and doing so we preserve the backward compatibility - in JSONRPC, in Host_getVMFullList_Call (full status), we use onlyUUID=False explicitely, so no issue hee
The internal API, however, changed behaviour. Being the API internal, it doesn't usually need special care, but this time we need, because MOM is a supported client of this API.
With the current 'onlyUUID' defaults, clients of API.py will get a list of UUIDs instead of a list of Short Status.
To fix this, and given the findings outlined in the above bullet points, we just switch the default value of 'onlyUUID' to cover this use case.
Bug-Url: https://bugzilla.redhat.com/1196327 Related-To: https://bugzilla.redhat.com/1196735 Change-Id: I0560a262329f729716577b28aa78b177f0929121 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/38805 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/API.py 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/38868/1
diff --git a/vdsm/API.py b/vdsm/API.py index c38f231..36fafe2 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1363,7 +1363,7 @@ return dict(status=doneCode)
# VM-related functions - def getVMList(self, fullStatus=False, vmList=(), onlyUUID=True): + def getVMList(self, fullStatus=False, vmList=(), onlyUUID=False): """ return a list of known VMs with full (or partial) config each """
def reportedStatus(v, full):
automation@ovirt.org has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1:
* Update tracker::#1196327::OK * Check Bug-Url::OK * Check Public Bug::#1196327::OK, public bug * Check Product::#1196327::OK, Correct product oVirt * Check TR::#1196327::OK, correct target release 3.5.2 * Check merged to previous::OK, change not open on any previous branch
Francesco Romani has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1:
will be verified with 38867 and must be merged together.
Francesco Romani has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1:
Verification (1/3): vdsm 3.5 with Engine 3.5.0 (OK)
MOM OK: 2015-03-18 13:03:36,375 - mom.Monitor - INFO - GuestMonitor-FBD_1 running
2015-03-18 13:03:56,399 - mom.Monitor - INFO - GuestMonitor-FBD_1 running
2015-03-18 13:04:11,414 - mom.Monitor - INFO - GuestMonitor-FBD_1 running
JSONRPC OK: Thread-221::DEBUG::2015-03-18 13:01:06,163::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMList' in bridge with {} Thread-221::DEBUG::2015-03-18 13:01:06,164::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMList' in bridge with [u'd9be4550-7af1-4580-9430-4bfdaa7d50cf'] Thread-221::DEBUG::2015-03-18 13:01:06,164::stompReactor::163::yajsonrpc.StompServer::(send) Sending response JsonRpc (StompReactor)::DEBUG::2015-03-18 13:01:06,168::stompReactor::98::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command='SEND'> JsonRpcServer::DEBUG::2015-03-18 13:01:06,169::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-222::DEBUG::2015-03-18 13:01:06,169::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.getStats' in bridge with {u'vmID': u'd9be4550-7af1-4580-9430-4bfdaa7d50cf'} Thread-222::DEBUG::2015-03-18 13:01:06,170::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'VM.getStats' in bridge with [{'status': 'Powering up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'hash': '-4933515864005718306', 'acpiEnable': u'true', 'guestFQDN': '', 'pid': '7946', 'displayIp': '192.168.1.39', 'ioTune': [], 'displayPort': '-1', 'session': 'Unknown', 'displaySecurePort': u'5900', 'timeOffset': u'0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '4', 'kvmEnable': u'true', 'network': {}, 'vmId': u'd9be4550-7af1-4580-9430-4bfdaa7d50cf', 'vmType': u'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5502926848', 'writeLatency': '0', 'imageID': u'ba737308-0fca-4c6d-8f0f-42a6e762c555', 'flushLatency': '0', 'truesize': '5502926848'}, u'vdc': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': u'5180f2! 92-ea83-44ec-82f5-bc3aed59384c', 'flushLatency': '0', 'truesize': '1073741824'}, u'vdb': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': u'3b12ce02-d9da-46f8-a743-b3937bf5a6d2', 'flushLatency': '0', 'truesize': '1073741824'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLatency': '0'}}, 'monitorResponse': '0', 'statsAge': '1.85', 'username': 'Unknown', 'displayType': u'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]
Thread-233::DEBUG::2015-03-18 13:01:18,607::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMFullList' in bridge with {u'vmList': [u'd9be4550-7af1-4580-9430-4bfdaa7d50cf']} Thread-233::DEBUG::2015-03-18 13:01:18,609::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMFullList' in bridge with [{u'acpiEnable': u'true', [...]
Thread-241::DEBUG::2015-03-18 13:01:28,028::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getAllVmStats' in bridge with {} Thread-241::DEBUG::2015-03-18 13:01:28,030::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getAllVmStats' in bridge with [{'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'memUsage': '11', 'acpiEnable': u'true', 'guestFQDN': u'localhost.localdomain', 'pid': '7946', 'session': 'Unknown', 'netIfaces': [], 'timeOffset': u'0', 'balloonInfo': {'balloon_max': '4194304', 'balloon_min': '4194304', 'balloon_target': '4194304', 'balloon_cur': '4194304'}, 'pauseCode': 'NOERR', 'disksUsage': [{u'path': u'/sys/fs/pstore', u'total': '0', u'used': '0', u'fs': u'pstore'}, {u'path': u'/', u'total': '18369396736', u'used': '3931250688', u'fs': u'ext4'}, {u'path': u'/sys/kernel/config', u'total': '0', u'used': '0', u'fs': u'configfs'}, {u'path': u'/boot', u'total': '499355648', u'used': '93746176', u'fs': u'ext4'}], 'network': {u'vnet0': {'macAddr': u'00:1a:4a:d8:81:01', 'rxDropped': '0', 'rxErrors': '0', 'txDropped': '0', ! 'txRate': '0.0', 'rxRate': '0.0', 'txErrors': '0', 'state': 'unknown', 'speed': '1000', 'name': u'vnet0'}}, 'memoryStats': {u'swap_out': '0', u'majflt': '57', u'swap_usage': '0', u'mem_cached': '200608', u'mem_free': '3701748', u'mem_buffers': '25072', u'swap_in': '0', u'swap_total': '2097148', u'pageflt': '55898', u'mem_total': '4048324', u'mem_unused': '3476068'}, 'guestName': u'localhost.localdomain', 'elapsedTime': '26', 'vmJobs': {}, 'cpuSys': '12.83', 'appsList': [u'kernel-3.11.10-301.fc20', u'xorg-x11-drv-qxl-0.1.1-3.fc20', u'ovirt-guest-agent-common-1.0.10-1.fc20'], 'guestOs': u'3.11.10-301.fc20.x86_64', 'displayType': u'qxl', 'vcpuCount': '2', 'clientIp': '', 'hash': '-7613369818897856376', 'guestCPUCount': -1, 'vmType': u'kvm', 'vmId': u'd9be4550-7af1-4580-9430-4bfdaa7d50cf', 'displayIp': '192.168.1.39', 'vcpuPeriod': 100000L, 'displayPort': '-1', 'vcpuQuota': '-1', 'kvmEnable': u'true', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5502926848', 'writeLa! tency': '0', 'imageID': u'ba737308-0fca-4c6d-8f0f-42a6e762c555', 'flushLatency': '0', 'truesize': '5502926848'}, u'vdc': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': u'5180f292-ea83-44ec-82f5-bc3aed59384c', 'flushLatency': '0', 'truesize': '1073741824'}, u'vdb': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': u'3b12ce02-d9da-46f8-a743-b3937bf5a6d2', 'flushLatency': '0', 'truesize': '1073741824'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLatency': '0'}}, 'monitorResponse': '0', 'statsAge': '1.66', 'username': u'(unknown)', 'cpuUser': '48.79', 'status': 'Up', 'lastLogin': 1426680086.819068, 'ioTune': [], 'guestIPs': '', 'displaySecurePort': u'5900'}]
JSONRPC Engine LOGS OK
MOM: no related by transport, still OK as expected: 2015-03-18 13:06:06,497 - mom.Monitor - INFO - GuestMonitor-FBD_1 running 2015-03-18 13:06:06,498 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2015-03-18 13:06:09,038 - mom.RPCServer - INFO - getStatistics() 2015-03-18 13:06:11,503 - mom.Monitor - INFO - GuestMonitor-FBD_1 running
XMLRPC OK:
Thread-441::DEBUG::2015-03-18 13:06:05,619::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.183]::call getVMList with () {} flowID [9585461] Thread-441::DEBUG::2015-03-18 13:06:05,620::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'status': 'Up', 'vmId': 'd9be4550-7af1-4580-9430-4bfdaa7d50cf'}]}
Thread-441::DEBUG::2015-03-18 13:06:05,642::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.183]::call getVMList with ('true', ['d9be4550-7af1-4580-9430-4bfdaa7d50cf']) {} flowID [9585461] Thread-441::DEBUG::2015-03-18 13:06:05,642::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'acpiEnable': 'true', [...]
Thread-441::DEBUG::2015-03-18 13:06:09,078::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.183]::call getAllVmStats with () {} Thread-441::DEBUG::2015-03-18 13:06:09,079::BindingXMLRPC::1140::vds::(wrapper) return getAllVmStats with {'status': {'message': 'Done', 'code': 0}, 'statsList': [{'status': 'Powering up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'hash': '-4933515864005718306', 'acpiEnable': 'true', 'guestFQDN': '', 'pid': '9137', 'displayIp': '192.168.1.39', 'ioTune': [], 'displayPort': '-1', 'session': 'Unknown', 'displaySecurePort': u'5900', 'timeOffset': '0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '5', 'kvmEnable': 'true', 'network': {}, 'vmId': 'd9be4550-7af1-4580-9430-4bfdaa7d50cf', 'vmType': 'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5502926848', 'writeLatency': '0', 'imageID': 'ba737308-0fca-4c6d-8f0f-42a6e762c555', 'flushLatency': '0', 'truesize': '5502926848'}, u'vdc': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0! ', 'imageID': '5180f292-ea83-44ec-82f5-bc3aed59384c', 'flushLatency': '0', 'truesize': '1073741824'}, u'vdb': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': '3b12ce02-d9da-46f8-a743-b3937bf5a6d2', 'flushLatency': '0', 'truesize': '1073741824'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLatency': '0'}}, 'monitorResponse': '0', 'statsAge': '0.35', 'username': 'Unknown', 'displayType': 'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]}
XMLRPC Engine LOGS OK
Francesco Romani has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1:
Verification (2/3): vdsm 3.5 vs Engine 3.4.4 (OK)
Thread-13::DEBUG::2015-03-18 13:31:57,385::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.182]::call getVMList with () {} Thread-13::DEBUG::2015-03-18 13:31:57,386::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'status': 'Up', 'vmId': '69d1c9c6-bbb2-462e-800a-b4343e1f6de7'}]} Thread-13::DEBUG::2015-03-18 13:31:57,391::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.182]::call vmGetStats with ('69d1c9c6-bbb2-462e-800a-b4343e1f6de7',) {} Thread-13::DEBUG::2015-03-18 13:31:57,391::BindingXMLRPC::1140::vds::(wrapper) return vmGetStats with {'status': {'message': 'Done', 'code': 0}, 'statsList': [{'status': 'Powering up', 'displayInfo': [{'tlsPort': '-1', 'ipAddress': '0', 'type': 'spice', 'port': u'5900'}], 'hash': '5788221924276885634', 'acpiEnable': 'true', 'guestFQDN': '', 'pid': '10404', 'displayIp': '0', 'ioTune': [], 'displayPort': u'5900', 'session': 'Unknown', 'displaySecurePort': '-1', 'timeOffset': '0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '1', 'kvmEnable': 'true', 'network': {}, 'vmId': '69d1c9c6-bbb2-462e-800a-b4343e1f6de7', 'vmType': 'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': '268c7164-ccb9-4f5b-9fa5-341e2011594a', 'flushLatency': '0', 'truesize': '0'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLatency': '0'}}, '! monitorResponse': '0', 'statsAge': '0.91', 'username': 'Unknown', 'displayType': 'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]}
Thread-13::DEBUG::2015-03-18 13:31:57,422::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.182]::call getVMList with ('true', ['69d1c9c6-bbb2-462e-800a-b4343e1f6de7']) {} Thread-13::DEBUG::2015-03-18 13:31:57,422::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'acpiEnable': 'true', [...]
Thread-13::DEBUG::2015-03-18 13:32:03,777::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.182]::call getAllVmStats with () {} Thread-13::DEBUG::2015-03-18 13:32:03,778::BindingXMLRPC::1140::vds::(wrapper) return getAllVmStats with {'status': {'message': 'Done', 'code': 0}, 'statsList': [{'status': 'Powering up', 'displayInfo': [{'tlsPort': '-1', 'ipAddress': '0', 'type': 'spice', 'port': u'5900'}], 'hash': '5788221924276885634', 'acpiEnable': 'true', 'guestFQDN': '', 'pid': '10404', 'displayIp': '0', 'ioTune': [], 'displayPort': u'5900', 'session': 'Unknown', 'displaySecurePort': '-1', 'timeOffset': '0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '7', 'kvmEnable': 'true', 'network': {}, 'vmId': '69d1c9c6-bbb2-462e-800a-b4343e1f6de7', 'vmType': 'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': '268c7164-ccb9-4f5b-9fa5-341e2011594a', 'flushLatency': '0', 'truesize': '0'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLatency': '0'}}! , 'monitorResponse': '0', 'statsAge': '1.28', 'username': 'Unknown', 'displayType': 'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]}
ENGINE LOGS: OK
MOM: OK
2015-03-18 13:33:05,661 - mom.RPCServer - INFO - getStatistics() 2015-03-18 13:33:07,927 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:12,933 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:17,940 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:21,167 - mom.RPCServer - INFO - getStatistics() 2015-03-18 13:33:22,946 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:27,952 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:32,959 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:36,459 - mom.RPCServer - INFO - getStatistics() 2015-03-18 13:33:37,965 - mom.Monitor - INFO - GuestMonitor-NS running 2015-03-18 13:33:42,971 - mom.Monitor - INFO - GuestMonitor-NS ending
Francesco Romani has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1:
Verification (3/3) vdsm 3.5 vs Engine 3.5.2
MOM OK: 2015-03-18 15:24:38,247 - mom.Monitor - INFO - GuestMonitor-F20_2 starting 2015-03-18 15:24:38,247 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:24:38,248 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2015-03-18 15:24:41,015 - mom.RPCServer - INFO - getStatistics() 2015-03-18 15:24:43,253 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:24:48,259 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:24:53,265 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:24:56,527 - mom.RPCServer - INFO - getStatistics() 2015-03-18 15:24:58,272 - mom.Monitor - INFO - GuestMonitor-F20_2 running
JSONRPC OK: Thread-184::DEBUG::2015-03-18 15:24:34,679::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMList' in bridge with {u'onlyUUID': False} JsonRpcServer::DEBUG::2015-03-18 15:24:34,679::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-184::DEBUG::2015-03-18 15:24:34,680::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMList' in bridge with [{'status': 'Up', 'vmId': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7'}] Thread-184::DEBUG::2015-03-18 15:24:34,680::stompReactor::163::yajsonrpc.StompServer::(send) Sending response JsonRpc (StompReactor)::DEBUG::2015-03-18 15:24:34,689::stompReactor::98::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command='SEND'> JsonRpcServer::DEBUG::2015-03-18 15:24:34,690::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-185::DEBUG::2015-03-18 15:24:34,690::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'VM.getStats' in bridge with {u'vmID': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7'} Thread-185::DEBUG::2015-03-18 15:24:34,691::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'VM.getStats' in bridge with [{'status': 'Powering up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'hash': '2391709203636267884', 'acpiEnable': u'true', 'guestFQDN': '', 'pid': '19592', 'displayIp': '192.168.1.39', 'ioTune': [], 'displayPort': '-1', 'session': 'Unknown', 'displaySecurePort': u'5900', 'timeOffset': u'0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '1', 'kvmEnable': u'true', 'network': {}, 'vmId': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7', 'vmType': u'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5368709120', 'writeLatency': '0', 'imageID': u'5aee470a-03f2-4e16-a8c1-c8b61d2ffb6a', 'flushLatency': '0', 'truesize': '5368709120'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'writeLaten! cy': '0'}}, 'monitorResponse': '0', 'statsAge': '0.66', 'username': 'Unknown', 'displayType': u'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]
Thread-186::DEBUG::2015-03-18 15:24:34,724::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMFullList' in bridge with {u'vmList': [u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7']} JsonRpcServer::DEBUG::2015-03-18 15:24:34,724::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-186::DEBUG::2015-03-18 15:24:34,726::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMFullList' in bridge with [{u'acpiEnable': u'true', [...]
Thread-190::DEBUG::2015-03-18 15:24:41,057::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getAllVmStats' in bridge with {} JsonRpcServer::DEBUG::2015-03-18 15:24:41,057::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-190::DEBUG::2015-03-18 15:24:41,059::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getAllVmStats' in bridge with [{'status': 'Powering up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'hash': '2391709203636267884', 'acpiEnable': u'true', 'guestFQDN': '', 'pid': '19592', 'displayIp': '192.168.1.39', 'ioTune': [], 'displayPort': '-1', 'session': 'Unknown', 'displaySecurePort': u'5900', 'timeOffset': u'0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '7', 'kvmEnable': u'true', 'network': {}, 'vmId': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7', 'vmType': u'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5368709120', 'writeLatency': '0', 'imageID': u'5aee470a-03f2-4e16-a8c1-c8b61d2ffb6a', 'flushLatency': '0', 'truesize': '5368709120'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparentsize': '0', 'wri! teLatency': '0'}}, 'monitorResponse': '0', 'statsAge': '1.01', 'username': 'Unknown', 'displayType': u'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]
Thread-211::DEBUG::2015-03-18 15:25:06,038::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMList' in bridge with {u'onlyUUID': False} JsonRpcServer::DEBUG::2015-03-18 15:25:06,038::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-211::DEBUG::2015-03-18 15:25:06,039::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMList' in bridge with [{'status': 'Up', 'vmId': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7'}] Thread-211::DEBUG::2015-03-18 15:25:06,039::stompReactor::163::yajsonrpc.StompServer::(send) Sending response
JsonRpc (StompReactor)::DEBUG::2015-03-18 15:25:09,063::stompReactor::98::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command='SEND'> JsonRpcServer::DEBUG::2015-03-18 15:25:09,064::__init__::506::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request Thread-212::DEBUG::2015-03-18 15:25:09,064::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getVMList' in bridge with {u'onlyUUID': False} Thread-212::DEBUG::2015-03-18 15:25:09,065::__init__::500::jsonrpc.JsonRpcServer::(_serveRequest) Return 'Host.getVMList' in bridge with [{'status': 'Up', 'vmId': u'79ffbf77-c5be-428b-85d5-fd0dc6e42ad7'}]
JSONRPC Engine LOGS OK grep -i classcast *.log -> nothing
MOM: no related to transport, still OK as expected: 2015-03-18 15:30:08,594 - mom.Monitor - INFO - GuestMonitor-F20_2 starting 2015-03-18 15:30:08,594 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:30:08,595 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2015-03-18 15:30:11,148 - mom.RPCServer - INFO - getStatistics() 2015-03-18 15:30:13,600 - mom.Monitor - INFO - GuestMonitor-F20_2 running 2015-03-18 15:30:18,606 - mom.Monitor - INFO - GuestMonitor-F20_2 running
XMLRPC OK:
Thread-361::DEBUG::2015-03-18 15:30:07,853::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.184]::call getVMList with () {} Thread-361::DEBUG::2015-03-18 15:30:07,853::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'status': 'Up', 'vmId': '79ffbf77-c5be-428b-85d5-fd0dc6e42ad7'}]}
Thread-361::DEBUG::2015-03-18 15:30:07,909::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.184]::call getVMList with ('true', ['79ffbf77-c5be-428b-85d5-fd0dc6e42ad7']) {} Thread-361::DEBUG::2015-03-18 15:30:07,909::BindingXMLRPC::1140::vds::(wrapper) return getVMList with {'status': {'message': 'Done', 'code': 0}, 'vmList': [{'acpiEnable': 'true', [...]
Thread-361::DEBUG::2015-03-18 15:30:11,233::BindingXMLRPC::1133::vds::(wrapper) client [192.168.1.184]::call getAllVmStats with () {} Thread-361::DEBUG::2015-03-18 15:30:11,234::BindingXMLRPC::1140::vds::(wrapper) return getAllVmStats with {'status': {'message': 'Done', 'code': 0}, 'statsList': [{'status': 'Powering up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '192.168.1.39', 'type': 'spice', 'port': '-1'}], 'hash': '2391709203636267884', 'acpiEnable': 'true', 'guestFQDN': '', 'pid': '20862', 'displayIp': '192.168.1.39', 'ioTune': [], 'displayPort': '-1', 'session': 'Unknown', 'displaySecurePort': u'5900', 'timeOffset': '0', 'memUsage': '0', 'balloonInfo': {}, 'pauseCode': 'NOERR', 'clientIp': '', 'elapsedTime': '5', 'kvmEnable': 'true', 'network': {}, 'vmId': '79ffbf77-c5be-428b-85d5-fd0dc6e42ad7', 'vmType': 'kvm', 'cpuUser': '0.00', 'disks': {u'vda': {'readLatency': '0', 'apparentsize': '5368709120', 'writeLatency': '0', 'imageID': '5aee470a-03f2-4e16-a8c1-c8b61d2ffb6a', 'flushLatency': '0', 'truesize': '5368709120'}, u'hdc': {'flushLatency': '0', 'readLatency': '0', 'truesize': '0', 'apparents! ize': '0', 'writeLatency': '0'}}, 'monitorResponse': '0', 'statsAge': '1.29', 'username': 'Unknown', 'displayType': 'qxl', 'cpuSys': '0.00', 'guestCPUCount': -1, 'appsList': [], 'guestIPs': ''}]}
XMLRPC Engine LOGS OK
Francesco Romani has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1: Verified+1
verified together with 38867 on branch as per comments above
Martin Sivák has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 1: Code-Review+2
Yaniv Bronhaim has submitted this change and it was merged.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
API: getVMList: compatibity with internal clients
After the addition of the 'onlyUUID' parameter, the external API of VDSM is now backward compatible:
- in XMLRPC, we always set explicitely onlyUUID=False, so no room for breakage - in JSONRPC, we have Host_getVMList_Call (short status), on which * if onlyUUID is provided from the outside, we use it (works with Engine >= 3.5.1) * if onlyUUID is NOT given (Engine 3.5.0), we default as True, and doing so we preserve the backward compatibility - in JSONRPC, in Host_getVMFullList_Call (full status), we use onlyUUID=False explicitely, so no issue hee
The internal API, however, changed behaviour. Being the API internal, it doesn't usually need special care, but this time we need, because MOM is a supported client of this API.
With the current 'onlyUUID' defaults, clients of API.py will get a list of UUIDs instead of a list of Short Status.
To fix this, and given the findings outlined in the above bullet points, we just switch the default value of 'onlyUUID' to cover this use case.
Bug-Url: https://bugzilla.redhat.com/1196327 Related-To: https://bugzilla.redhat.com/1196735 Change-Id: I0560a262329f729716577b28aa78b177f0929121 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/38805 Reviewed-by: Dan Kenigsberg danken@redhat.com Reviewed-on: https://gerrit.ovirt.org/38868 Reviewed-by: Martin Sivák msivak@redhat.com --- M vdsm/API.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Martin Sivák: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
automation@ovirt.org has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 2:
* Update tracker::#1196327::OK * Check TR::#1196327::OK * Set MODIFIED::bug 1196327::::#1196327::::OK
oVirt Jenkins CI Server has posted comments on this change.
Change subject: API: getVMList: compatibity with internal clients ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el6-x86_64_merged/194/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc21-x86_64_merged/18/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-el7-x86_64_merged/194/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms-fc20-x86_64_merged/186/ : SUCCESS
vdsm-patches@lists.fedorahosted.org