Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1509910

Summary: Don't send `Expect: 100-Continue` for PUT requests
Product: [oVirt] ovirt-engine-sdk-ruby Reporter: Juan Hernández <juan.hernandez>
Component: CoreAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.10CC: bugs, lveyde
Target Milestone: ovirt-4.1.8Flags: rule-engine: ovirt-4.1+
Target Release: 4.1.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.1.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-11 16:28:56 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:
Bug Depends On:    
Bug Blocks: 1510459    

Description Juan Hernández 2017-11-06 10:23:06 UTC
Currently the SDK sends the `Expect: 100-continue` for PUT requests, and then waits up to 1 second to receive the response from the server. But the oVirt server doesn't support this mechanism. The net result is that every PUT request is artificially delayed one second. The SDK should not use this mechanism.

Comment 1 Juan Hernández 2017-11-28 17:11:00 UTC
To verify create a script that performs an update and measure how long it takes:

---8<---
require 'logger'
require 'ovirtsdk4'

# Create the connection to the server:
connection = OvirtSDK4::Connection.new(
  url: 'https://engine42.local/ovirt-engine/api',
  username: 'admin@internal',
  password: 'redhat123',
  insecure: true,
  debug: true,
  log: Logger.new('test.log')
)

# Find the data service:
dcs_service = connection.system_service.data_centers_service
dc = dcs_service.list(search: 'name=mydc').first
dc_service = dcs_service.data_center_service(dc.id)

# Measure how long it takes to update the data center:
before = Time.now
dc = dc_service.update(description: 'Updated description')
after = Time.now
elapsed = after - before
puts("#{elapsed}s")

# Close the connection to the server:
connection.close
--->8---

Execute that script, it should print the time it took to do the update, and it should be less than one second.

In addition the generated `test.log` file should *not* contain this line:

  D, [2017-11-28T18:09:57.011331 #11968] DEBUG -- : Expect: 100-continue

Comment 2 Radim Hrazdil 2017-11-28 21:54:20 UTC
Verified that script suggested by Juan finishes in less than one second. Created log does not contain "DEBUG -- : Expect: 100-continue". 
SDK version 4.2.0.beta2, RHVM 4.1.8.1.