Bug 836018 - ovirt-engine-restapi: Bad error message when trying to remove built in group everyone [TEXT]
ovirt-engine-restapi: Bad error message when trying to remove built in group ...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Juan Hernández
Oded Ramraz
Depends On:
  Show dependency treegraph
Reported: 2012-06-27 16:57 EDT by Oded Ramraz
Modified: 2016-02-10 14:42 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-29 13:25:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Oded Ramraz 2012-06-27 16:57:28 EDT
Description of problem:

Bad error message when trying to remove builit in group everyone:
"Cannot remove the built-in group "Everyone"" 

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

How reproducible:

Steps to Reproduce:

2012-06-27 14:44:28,109 - MainThread - users - DEBUG - DELETE request content is --  url:http://localhost:8080/api/groups/eee00000-0000-0000-0000-123456789eee
2012-06-27 14:44:28,184 - MainThread - users - DEBUG - Response body for DELETE request is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><fault><reason>Operation Failed</reason><detail>[Cannot remove the built-in group &quot;Everyone&quot;.]</detail></fault> 
Actual results:

Expected results:

Additional info:
Comment 1 Oded Ramraz 2012-06-27 17:00:30 EDT
This is general problem , it will occur whenever Rest gets quotes in error messages:

    <reason>Operation Failed</reason>
    <detail>[Data Center name must be formed of alphanumeric characters, numbers or &quot;-_&quot;]</detail>

    <reason>Operation Failed</reason>
    <detail>[Storage Domain name must be formed of &quot;a-z0-9A-Z&quot; or &quot;-_&quot;]</detail>
Comment 2 Juan Hernández 2012-06-29 04:36:36 EDT
I don't see this as a bug, &quot; is a valid way to represent a double quote in a XML document. Try any program that handles XML and you will see that &quot; is correctly translated. For example, save the the fault XML to a fault.xml file and then run this:

xmllint fault.xml

Or in python:


import lxml.etree

doc = lxml.etree.parse("fault.xml")
msg = doc.xpath("/fault/detail")[0].text

Both will print this:

[Storage Domain name must be formed of "a-z0-9A-Z" or "-_"]

Note You need to log in before you can comment on or make changes to this bug.