Bug 1092380
| Summary: | NullPointerException raised while perform REST API request api/vms/***/applications for VM w/o installed applications | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Yuri Obshansky <yobshans> |
| Component: | ovirt-engine-restapi | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tareq Alayan <talayan> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.3.0 | CC: | aberezin, acathrow, bazulay, gklein, iheim, knesenko, oramraz, pstehlik, Rhev-m-bugs, yeylon, yobshans |
| Target Milestone: | --- | ||
| Target Release: | 3.4.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | infra | ||
| Fixed In Version: | org.ovirt.engine-root-3.4.0-17 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-12 14:05:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Yuri Obshansky
2014-04-29 08:04:10 UTC
Yuri, what permissions had the user? (In reply to Juan Hernández from comment #1) > Yuri, what permissions had the user? User has permission - UserVmManager I think that the problem here is that the list of applications is empty, instead of null, and the RESTAPI isn't well prepared for that case. Can you please check what is the content of the "app_list" field of the "vm_dynamic" table for that particular VM? Run the following query:
select app_list, app_list is null as is_null from vm_dynamic where vm_guid = '30991cf8-d28a-48c9-8a92-d60d8db3a4c1/applications';
The result will probably be the following:
app_list | is_null
----------+---------
| f
(1 row)
That means that the app_list is empty, instead of null.
How was the list of applications populated? Manually? Using the guest agent?
engine=# select app_list, app_list is null as is_null from vm_dynamic
where vm_guid = '74471355-d46d-41c4-8a8b-9a4ff42f30e8';
app_list | is_null
----------+---------
| f
(1 row)
I think, guest agent
I'm requesting the blocker flag because I think that this is a serious issue for the tests that Yuri plans to run on 3.4, but not sure if it is really needed in 3.4.0. The fix is ready, and minor, so I think there is no risk. Yuri, what do you think, should this block release 3.4.0? I don't think it is a blocker issue for performance tests. Because, I could create VMs from template with previously installed guest_agent or apply manually workaround: #update vm_dynamic set app_list = null where app_list = ''; (as Juan early suggested). This change has been merged to the upstream 3.4 branch, so it will be available downstream with the next rebase. verified on rhevm-3.4.0-0.21.el6ev.noarch, vdsm-4.14.7-3.el6ev.x86_64 https://10.35.161.144/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/applications <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vms> <vm href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66" id="6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66"> <actions> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/ticket" rel="ticket"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/move" rel="move"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/migrate" rel="migrate"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/reboot" rel="reboot"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/detach" rel="detach"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/export" rel="export"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/commit_snapshot" rel="commit_snapshot"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/preview_snapshot" rel="preview_snapshot"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/cancelmigration" rel="cancelmigration"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/maintenance" rel="maintenance"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/undo_snapshot" rel="undo_snapshot"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/shutdown" rel="shutdown"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/start" rel="start"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/stop" rel="stop"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/suspend" rel="suspend"/> </actions> <name>bz1092380</name> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/applications" rel="applications"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/disks" rel="disks"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/nics" rel="nics"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/cdroms" rel="cdroms"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/snapshots" rel="snapshots"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/tags" rel="tags"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/permissions" rel="permissions"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/statistics" rel="statistics"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/reporteddevices" rel="reporteddevices"/> <link href="/ovirt-engine/api/vms/6b5c25b4-23fa-4d5c-9a06-6b65ab1c6d66/watchdogs" rel="watchdogs"/> <type>server</type> <status> <state>up</state> </status> <memory>1073741824</memory> <cpu> <topology sockets="1" cores="1"/> <architecture>X86_64</architecture> </cpu> <cpu_shares>0</cpu_shares> <os type="other"> <boot dev="hd"/> </os> <high_availability> <enabled>false</enabled> <priority>1</priority> </high_availability> <display> <type>spice</type> <address>monique-vds05.tlv.redhat.com</address> <port>5900</port> <secure_port>5901</secure_port> <monitors>1</monitors> <single_qxl_pci>false</single_qxl_pci> <allow_override>true</allow_override> <smartcard_enabled>false</smartcard_enabled> </display> <host href="/ovirt-engine/api/hosts/5221a5f7-f54c-4e2c-a507-5b2cf044f967" id="5221a5f7-f54c-4e2c-a507-5b2cf044f967"/> <cluster href="/ovirt-engine/api/clusters/5e926f1c-9940-4785-81d6-4e29da02935d" id="5e926f1c-9940-4785-81d6-4e29da02935d"/> <template href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/> <start_time>2014-06-05T13:39:32.802+03:00</start_time> <stop_time>2014-06-05T13:39:16.303+03:00</stop_time> <creation_time>2014-06-05T13:39:16.213+03:00</creation_time> <origin>ovirt</origin> <stateless>false</stateless> <delete_protected>false</delete_protected> <sso> <methods> <method id="GUEST_AGENT"/> </methods> </sso> <placement_policy> <host href="/ovirt-engine/api/hosts/5221a5f7-f54c-4e2c-a507-5b2cf044f967" id="5221a5f7-f54c-4e2c-a507-5b2cf044f967"/> <affinity>pinned</affinity> </placement_policy> <memory_policy> <guaranteed>1073741824</guaranteed> </memory_policy> <usb> <enabled>false</enabled> </usb> <migration_downtime>-1</migration_downtime> </vm> </vms> Closing as part of 3.4.0 |