Bug 1062434
Summary: | RHEV 3.3 rhevm-shell 'show vm' not returning all guest attributes | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Dave Sullivan <dsulliva> |
Component: | ovirt-engine-cli | Assignee: | Ravi Nori <rnori> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Belka <jbelka> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.3.0 | CC: | aberezin, acathrow, bazulay, emesika, iheim, jbelka, juan.hernandez, mishka8520, oramraz, pstehlik, Rhev-m-bugs, sbonazzo, yeylon |
Target Milestone: | --- | ||
Target Release: | 3.4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | infra | ||
Fixed In Version: | av2 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-12 14:03:50 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: | |||
Bug Depends On: | 866448 | ||
Bug Blocks: |
Description
Dave Sullivan
2014-02-06 22:51:49 UTC
The reason for this is that when a resource is returned by the GET operation of the RESTAPI by default it only contains a basic set of information. To get the additional information the "All-Content: True" header has to be added to the request. Other operations, like PUT, automatically return all the information. So to get the requested information in this case it should be enough with using the --all-content option in the command line. Unfortunately this won't work because the availability of the header isn't correctly advertised in the RSDL document. This is the bug. To fix this we need to document the "All-Content" header in all the resources that support it. Something like this, but for all the relevant resources: diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml b/backen index cca493e..450e21a 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml @@ -24,6 +24,7 @@ actions: urlparams: {} headers: Filter: {value: true|false, required: false} + All-Content: {value: true|false, required: false} - name: /vms/{vm:id}|rel=delete description: deletes the virtual machine in the system for the given virtual machine id request: Then we need to build the engine, regenerate the SDK, and modify the CLI so that it will support the --all-content option. Ravi, to solve this bug you need two things: 1. add all_content meatdata in REST-API (RSDL) 2. fix Bug 866448 no extra coding in cli should be required for this as it will be addressed automatically by the cli infra or to simplify: (In reply to Michael Pasternak from comment #2) > Ravi, > > to solve this bug you need two things: > > 1. add all_content meatdata in REST-API (RSDL) this will expose all_content for LIST command > 2. fix Bug 866448 2.1 add all_content arg in all codegen *get* templates 2.2 make auto-completion exposing sdk x.get() args as it does for other commands (this will expose --all-content and pass it to sdk x.get() when you trigger it) > > no extra coding in cli should be required for this as > it will be addressed automatically by the cli infra First part of the fix, documenting the All-Content header in the RSDL, has been merged. all patches merged (In reply to Sandro Bonazzola from comment #5) > all patches merged this is not all patches, but same path (first part) that have been merged to two different branches, please revert this change, also it was not decided yet in which version this bug should be fixed nor it was ack'ed, i'd suggest letting maintainers moving bugs to MODIFY as usually they have better view on what should be fixed and where and if patch/es attached to BZ does/do the job. This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA (In reply to Sandro Bonazzola from comment #7) > This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA Sandro, Did you saw Comment 6? (btw please move this BZ to ovirt-engine-cli) (In reply to Michael Pasternak from comment #8) > (In reply to Sandro Bonazzola from comment #7) > > This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA > > Sandro, > > Did you saw Comment 6? No, I didn't see it, changing BZs in batch. BTW, Bug-Url should be used in commits when fixing the BZ, Related-To should be used when the patch is not fixing the BZ. So there can't be mistake in thinking that a BZ is fixed. Moving back to POST as per comment #6. > > (btw please move this BZ to ovirt-engine-cli) done Eli, Please read last few comments above. The merged changes are part of the solution, but the bug isn't completely solved yet. Please don't change the status. The way to display all the VM content is the following: # show vm myvm --all_content true (In reply to Juan Hernández from comment #12) > The way to display all the VM content is the following: > > # show vm myvm --all_content true Juan, How this is possible?, signatures for vms.list()/.get() are [1], if you added this option manually to the command - it will be silently ignored (if cli does not expose it in auto-completion, - it not available) [1] def get(self, name=None, id=None): ''' [@param id : string (the id of the entity)] [@param name: string (the name of the entity)] def list(self, query=None, case_sensitive=True, max=None, **kwargs): ''' [@param **kwargs: dict (property based filtering)] [@param query: string (oVirt engine search dialect query)] [@param case_sensitive: boolean (true|false)] [@param max: int (max results)] Michael, you are probably looking at the master branch, but the required change is in the 3.4 branch only, as the master branch wasn't recently regenerated: http://gerrit.ovirt.org/gitweb?p=ovirt-engine-sdk.git;a=blob;f=src/ovirtsdk/infrastructure/brokers.py;h=876eb9fe0daba4a6ba0b8ec3fa16d76660206965;hb=refs/heads/sdk_3.4#l18913 (In reply to Juan Hernández from comment #14) > Michael, you are probably looking at the master branch, but the required > change is in the 3.4 branch only, as the master branch wasn't recently > regenerated: > > http://gerrit.ovirt.org/gitweb?p=ovirt-engine-sdk.git;a=blob;f=src/ovirtsdk/ > infrastructure/brokers.py;h=876eb9fe0daba4a6ba0b8ec3fa16d76660206965;hb=refs/ > heads/sdk_3.4#l18913 Juan, You should regenerate master branch first and only then backport the relevant changes to other branches, otherwise you can end up with regressions (also you not getting any benefit from community when outdated master been used) ok, av3. [RHEVM shell (connected)]# show vm fff | egrep "console-enabled|virtio_scsi-enabled|memory_policy-ballooning" =================================================================================== ERROR ================================================================================ ========================================================================================================================================================================== [RHEVM shell (connected)]# show vm fff --all_content true | egrep "console-enabled|virtio_scsi-enabled|memory_policy-ballooning" console-enabled : False memory_policy-ballooning : True virtio_scsi-enabled : True there's little side effect, broken output for 'initialization_configuration_data' value, BZ1077806 Closing as part of 3.4.0 |