Bug 1367020

Summary: Non descriptive error message while deactivating deactivated host
Product: [oVirt] ovirt-engine-sdk-python Reporter: Aleksei Slaikovskii <aslaikov>
Component: CoreAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0aCC: bugs, juan.hernandez, mgoldboi, mperina
Target Milestone: ovirt-4.0.4Flags: rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
omachace: devel_ack+
ykaul: testing_ack+
Target Release: 4.0.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:38:49 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 Aleksei Slaikovskii 2016-08-15 09:29:20 UTC
Description of problem:
When trying to deactivate host which is already in maintenance mode using Python SDK you will get:
ovirtsdk4.Error: HTTP response code is 409.


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Connect to engine using ovirtsdk4
2. Deactivate host
3. Deactivate it again

Actual results:
You've got info that there HTTP res 409, it's not so informative.

Expected results:
Something about actual problem such as "You can't deactivate host which is already in maintenance mode"

Comment 2 Aleksei Slaikovskii 2016-09-08 10:48:42 UTC
Now the error looks nice:
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot switch Host to Maintenance mode. Host is already in Maintenance mode.]". HTTP response code is 409.