Bug 1262200

Summary: foreman api throws 'unsupported in API v2 for POST and PUT requests' after upgrade from RHEL 6.6 to 6.7
Product: Red Hat OpenStack Reporter: Jaison Raju <jraju>
Component: rubygem-foreman_apiAssignee: Mike Burns <mburns>
Status: CLOSED WORKSFORME QA Contact: Omri Hochman <ohochman>
Severity: high Docs Contact:
Priority: unspecified    
Version: Foreman (RHEL 6)CC: johfulto, jraju, mburns, rhos-maint, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 17:18:21 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 Jaison Raju 2015-09-11 07:15:14 UTC
Description of problem:
After upgrade from RHEL 6.6 to 6.7 , curl api requests fail with error :
This used to work fine, but now we get an error such as:
{
  "error": {"message":"'Content-Type: application/x-www-form-urlencoded' is unsupported in API v2 for POST and PUT requests. Please use 'Content-Type: application/json'."}
}

Version-Release number of selected component (if applicable):
RHOS 5 RHEL6
foreman RHEL6

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
API requests fail .

Expected results:
API requests are successful .

Additional info:

Comment 3 Jaison Raju 2015-09-11 07:16:05 UTC
rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-8.el6ost.noarch
foreman-proxy-1.6.0.33-2.el6ost.noarch
rubygem-hammer_cli_foreman-doc-0.1.1-16.el6sat.noarch
foreman-1.6.0.44-6.el6ost.noarch
bac-RHEL6-ost5-foreman-1.0-1.noarch
openstack-foreman-installer-2.0.34-1.el6ost.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.2.el6ost.noarch
foreman-installer-1.6.0-0.2.RC1.el6ost.noarch
foreman-mysql2-1.6.0.44-6.el6ost.noarch
foreman-discovery-image-7.0-20140905.0.2.el7sat.noarch
foreman-selinux-1.6.0.14-1.el6sat.noarch

Red Hat Enterprise Linux Server release 6.7 (Santiago)

Comment 7 Jaison Raju 2015-09-11 07:31:43 UTC
Similar bug is raised for katello for sat6 & upstream katello too :
https://bugzilla.redhat.com/show_bug.cgi?id=1179448
http://projects.theforeman.org/issues/8846
https://bugzilla.redhat.com/show_bug.cgi?id=1129769

Comment 9 John Fulton 2015-11-10 17:18:21 UTC
The customer has worked around this issue by updating their code to use the newer API.