Bug 1444016
Summary: | Bad check of return code | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine-sdk-python | Reporter: | Fabrice Bacchella <fabrice.bacchella> |
Component: | General | Assignee: | Ondra Machacek <omachace> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Matyáš <pmatyas> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.1.3 | CC: | bugs, juan.hernandez, lsvaty, mperina, stirabos |
Target Milestone: | ovirt-4.1.3 | Flags: | rule-engine:
ovirt-4.1+
lsvaty: testing_ack+ |
Target Release: | 4.1.4 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python-ovirt-engine-sdk4-4.1.4 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-07-06 14:04:54 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
Fabrice Bacchella
2017-04-20 12:39:50 UTC
The meaningless error message is a side effect of the combination of bug 1383342 and bug 1440292. In that situation the server returns an HTML error message and we don't check the returned content type, hence we try to parse the HTML as XML, and that is the error that generates. In a normal situation the SDK returns a more reasonable error message, for example, if you do this: vm_service = vms_service.vm_service('doesnotexist') vm_service.get() You get this exception: Traceback (most recent call last): File "...py", line 41, in <module> vm_service.get() File ".../ovirtsdk4/services.py", line 29565, in get self._check_fault(response) File ".../ovirtsdk4/service.py", line 98, in _check_fault Service._raise_error(response, fault) File ".../ovirtsdk4/service.py", line 71, in _raise_error raise Error(msg) ovirtsdk4.Error: HTTP response code is 404. Consider closing this as a duplicate of bug 1440292. Note also that the fix for that bug, isn't complete yet, see the details. I am moving it back to ASSIGNED. It's version 4.1.3, so there shouldn't be any content-type checking yet, but the issue is that we miss the checking of response code in action methods. Anyway, I will send a fix for both. Verified on 4.1.3-2 |