Bug 979737

Summary: REST-API: non 100-continue expectations are blocked by jboss
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilia Meerovich <iliam>
Component: ovirt-engine-restapiAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Meerovich <iliam>
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: acathrow, bazulay, dyasny, eedri, iheim, iliam, oramraz, pstehlik, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---Keywords: Reopened, TestBlocker
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:20:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ilia Meerovich 2013-06-30 05:37:59 UTC
[root@jenkins-vm-25 ~]# rpm -qa | grep rhevm-cli
rhevm-cli-3.3.0.3-1.el6ev.noarch
[root@jenkins-vm-25 ~]# /usr/bin/rhevm-shell -c --url=https://jenkins-vm-25.scl.lab.tlv.redhat.com:443/api/ -u admin@internal -I
Password: 


 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# add datacenter --storage_type 'nfs' --version-major 3 --version-minor 2 --name 'DefaultRest' --expect '201-created'

error: 
status: 417
reason: Expectation Failed
detail: 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>417 Expectation Failed</title>
</head><body>
<h1>Expectation Failed</h1>
<p>The expectation given in the Expect request-header
field could not be met by this server.
The client sent<pre>
    Expect: 201-created
</pre>
</p><p>Only the 100-continue expectation is supported.</p>
<hr>
<address>Apache/2.2.22 (Red Hat Enterprise Web Server) Server at jenkins-vm-25.scl.lab.tlv.redhat.com Port 443</address>
</body></html>


[RHEVM shell (connected)]# help add datacenter

USAGE
  
  add <type> [parent identifiers] [command options]
  
DESCRIPTION
  
  Creates a new object or adds existent with type datacenter. See 'help add' for generic
  help on creating objects.
  
ATTRIBUTE OPTIONS
  
  The following options are available for objects with type datacenter:
  
    * --name: string
    * --storage_type: string
    * --version-major: int
    * --version-minor: int
    * [--description: string]
    * [--storage_format: string]
    * [--expect: 201-created]
    * [--correlation_id: anystring]
  
COLLECTION BASED OPTION FORMAT
  
    * [--x-y: collection]
      {
        [y.a: string]
        [y.b: string]
        [y.c: string]
      }
  
    e.g:
  
    --x-y "y.a=a1,y.b=b1,y.c=c1"
    --x-y "y.a=a2,y.b=b2,y.c=c2"
    ...
  
    where a, b, c are option properties and aN, bN, cN is actual user's data
  
RETURN VALUES
  
    * 002 (COMMAND_ERROR)
    * 005 (COMMUNICATION_ERROR)
    * 003 (INTERRUPTED)
    * 011 (NOT_FOUND)
    * 000 (OK)
    * 010 (REMOTE_ERROR)
    * 001 (SYNTAX_ERROR)
    * 004 (UNKNOWN_ERROR)
  
[RHEVM shell (connected)]# exit
[root@jenkins-vm-25 ~]#

Comment 3 Michael Pasternak 2013-06-30 08:01:07 UTC
ilia,

on the mentioned machine 'Service Temporarily Unavailable', what is the version 
of the engine you're using? how did you installed the jboss? 

somehow i can't reproduce this on my environment:

[RHEVM shell (connected)]# add datacenter --storage_type 'nfs' --version-major 3 --version-minor 2 --name 'DefaultRest' --expect '201-created'

id                              : 55ea9f2d-1936-4454-97bc-7fca11e27f97
name                            : DefaultRest
status-state                    : uninitialized
storage_type                    : nfs
supported_versions-version-major: 3
supported_versions-version-minor: 2
supported_versions-version-major: 3
supported_versions-version-minor: 3
version-major                   : 3
version-minor                   : 2

Comment 4 Ilia Meerovich 2013-06-30 08:11:08 UTC
mentioned machine is jenkins machine, please do not use it directly.
I will repro it on my setup when i will be able to update it (when bob will be up)

Comment 5 Michael Pasternak 2013-07-01 14:00:11 UTC

*** This bug has been marked as a duplicate of bug 849442 ***

Comment 6 Michael Pasternak 2013-07-01 14:02:09 UTC
regression of bug 849442, fix in [1].

[1] http://gerrit.ovirt.org/#/c/7399/

Comment 7 Michael Pasternak 2013-07-01 14:03:43 UTC
looks like regression was caused by the [1].

[1] http://gerrit.ovirt.org/#/c/13318/

Comment 10 Alex Lourie 2013-07-15 10:31:04 UTC
Please reproduce the problem on a machine where additional investigation can take place.

Thanks.

Comment 12 Ilia Meerovich 2013-07-29 08:17:09 UTC
[imeerovi@imeerovi ART]$ rpm -q rhevm-cli
rhevm-cli-3.3.0.5-1.el6ev.noarch
[imeerovi@imeerovi ART]$ rhevm-shell 


 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# add datacenter --storage_type 'nfs' --version-major 3 --version-minor 2 --name 'DefaultRest' --expect '201-created'

id                              : b327fc6e-aabf-42d3-9c4e-4396c0c83d79                                                                                                                                                                       
name                            : DefaultRest                                                                                                                                                                                                
status-state                    : uninitialized                                                                                                                                                                                              
storage_type                    : nfs                                                                                                                                                                                                        
supported_versions-version-major: 3                                                                                                                                                                                                          
supported_versions-version-minor: 2                                                                                                                                                                                                          
supported_versions-version-major: 3                                                                                                                                                                                                          
supported_versions-version-minor: 3                                                                                                                                                                                                          
version-major                   : 3                                                                                                                                                                                                          
version-minor                   : 2                                                                                                                                                                                                          

[RHEVM shell (connected)]#

Comment 14 Itamar Heim 2014-01-21 22:20:13 UTC
Closing - RHEV 3.3 Released

Comment 15 Itamar Heim 2014-01-21 22:25:57 UTC
Closing - RHEV 3.3 Released