Description of problem: while the action was on wrongly typed attibute "snapshots", the error message added an extra s "snapshots" # add snapshots --description 'is27_engine' --vm-identifier myvm unknown error: 'VM' object has no attribute 'snapshotss' Version-Release number of selected component (if applicable): backend version: 3.3 (is27) sdk version : 3.3.0.17.*final-.1 cli version : 3.3.0.8.*final-.1 python version : 2.6.6.final.0 How reproducible: 100 % Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Allon, can you explain why did you assign it to yourself? Do you already know what is the root cause? How do you plan to fix it?
(In reply to Juan Hernández from comment #2) > Allon, can you explain why did you assign it to yourself? Do you already > know what is the root cause? How do you plan to fix it? When I discussed this with Michael, his approach was that this is a bug in a specific storage api implementation, not the underlying infrastructure, which I tend to agree with. Under this assumption, I took the BZ off his hands. If you disagree, by all means, feel free to take it back. As for the solution - I haven't started looking into this yet, so I don't really have a direction. If I indeed end up implementing this, I won't hesitate to ask for help. `-)
Actually this is a CLI only problem. When we add a new object with "add snapshot" we calculate the name of the collection appending a "s" to the name, and then we use introspection to try to find an attribute with the name in the corresponding object, in this case in the VM object. But we do that without checking that it exists, and this raises a Python internal exception, which results in this message. What we need to do is to check if the attribute exists before trying to get it, and generate an appropriate message, like we do for top level collections. The message will be the following: error: cannot create "snapshots" because snapshotss collection is not available or given arguments not valid.
Thanks for the explanation (not to mention the solution :-))
Juan, I see the patch referenced in the external trackers has been merged. Does ovirt-engine-cli have a stable branch for 3.4, or should this BZ just be moved to MODIFIED?
The patch has been merged to the upstream master branch, it now has to go to the sdk_3.4 branch, and then has to go downstream. I will move it to modified when it has been merged to the corresponding downstream branch.
tested on ovirt-engine-cli-3.4.0.3-1.el6.noarch [oVirt shell (connected)]# add snapshots --description 'is27_engine' --vm-identifier lesik ================================================================================================================== ERROR ================================================================================================================ cannot create "snapshots" because snapshotss collection is not available or given arguments not valid. Double "s" still present.
The message displayed now is an accurate description of the reason for the error: it is telling the user that the "snapshotss" collection doesn't exist. The same happens with any object that doesn't have a corresponding collection, for example: # add apple --description 'myapple' ... === ERROR === cannot create "apple" because apples collection ... Note that the error message includes now the name of the object as typed by the user, and also the name of the collection. In the name of the collection the extra "s" needs to be present, to indicate the user what is the name name of the collection that doesn't exist. I'm open to improve the wording of the message. Any suggestion?
Leonid, can we move this to VERIFIED?
*** Bug 950059 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0662.html