Bug 1390147

Summary: Issue with fog-openstack 'update_quota.rb'
Product: Red Hat CloudForms Management Engine Reporter: Sachin <sacpatil>
Component: ProvidersAssignee: Scott Seago <sseago>
Status: CLOSED CURRENTRELEASE QA Contact: Ola Pavlenko <opavlenk>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: cpelland, dajohnso, jfrey, jhajyahy, jhardy, obarenbo, sacpatil, simaishi, sseago
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1412682 1412684 (view as bug list) Environment:
Last Closed: 2017-06-12 17:44:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1412682, 1412684    

Description Sachin 2016-10-31 10:15:09 UTC
Description of problem:

Receive the below error message when updating the quota on an OpenStack 8 project from CloudForms.

Files: 

- fog-openstack/lib/fog/compute/openstack/requests/update_quote.rb
- fog-openstack/lib/fog/compute/openstack/requests/update_quote.rb

~~~
excon.error.response
  :body          => "{\"badRequest\": {\"message\": \"Invalid input for field/attribute quota_set. Value: {u'cores': u'20', u'ram': 32768, u'tenant_id': u'aafe8
e117a00488d9bc866993bc67f7e'}. Additional properties are not allowed (u'tenant_id' was unexpected)\", \"code\": 400}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"               => "248"
    "Content-Type"                 => "application/json; charset=UTF-8"
    "Date"                         => "Mon, 24 Oct 2016 19:38:10 GMT"
    "Vary"                         => "X-OpenStack-Nova-API-Version"
    "X-Compute-Request-Id"         => "req-5f28f24f-81ab-4aed-b3c2-a2625ae3923b"
    "X-Openstack-Nova-Api-Version" => "2.1"
  }
  :host          => "xxxxxxxxxxxxx"
  :local_address => "xxxxxxxxxxxxxx"
  :local_port    => 51330
  :path          => "/v2.1/3e188ee29c944bbaa43937dacab477ac//os-quota-sets/aafe8e117a00488d9bc866993bc67f7e"
  :port          => 13774
  :reason_phrase => ""
  :remote_ip     => "xxxxxxxxxxxxxxx"
  :status        => 400
  :status_line   => "HTTP/1.1 400 \r\n"
]
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/middlewares/expects.rb:7:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/connection.rb:388:in `response'
/opt/rh/cfme-gemset/gems/excon-0.54.0/lib/excon/connection.rb:252:in `request'
/opt/rh/cfme-gemset/gems/fog-core-1.43.0/lib/fog/core/connection.rb:81:in `request'
/opt/rh/cfme-gemset/gems/fog-openstack-0.1.11/lib/fog/openstack/core.rb:81:in `request'
/opt/rh/cfme-gemset/gems/fog-openstack-0.1.11/lib/fog/compute/openstack/requests/update_quota.rb:7:in `update_quota'
<code: nova.update_quota(project.id, { 'cores' => quota_vcpu,>:228:in `<main>'
~~~

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

5.6.2.2.20161017185613_7cee0a0


How reproducible:



Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

This occurs for Red Hat OpenStack 8. The customer simply comments out the line

~~~
options['tenant_id'] = tenant_id
~~~

to get around the issue.

Comment 2 Scott Seago 2016-12-12 21:52:38 UTC
What are the steps to reproduce this error? I just tried updating quota on a tenant in my dev environment and it succeeded.

Comment 3 Scott Seago 2016-12-13 15:46:17 UTC
Digging into this on the cloudforms side, it looks like the UI quota update that didn't give me an error above because the edit quota in the UI only modifies "Tenant Quota", which does not connect to OpenStack. The CloudForms resource  that links to OpenStack quota is CloudResourceQuota, but I'm not seeing any UI that manipulates this.

Comment 4 Scott Seago 2016-12-15 03:31:53 UTC
fog-openstack fix is here: https://github.com/fog/fog-openstack/pull/249

Comment 5 Scott Seago 2017-01-09 14:57:04 UTC
fog-openstack fix is merged and built into fog-openstack 0.1.19. This PR pulls the fix into manageiq-gems-pending: https://github.com/ManageIQ/manageiq-gems-pending/pull/35

Comment 6 Scott Seago 2017-01-10 02:54:53 UTC
Fix for euwe: https://github.com/ManageIQ/manageiq/pull/13417

Comment 7 CFME Bot 2017-01-10 18:52:06 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/c40d6e358f27e1168ea3f4287091ca91cefd1fdb

commit c40d6e358f27e1168ea3f4287091ca91cefd1fdb
Author:     Scott Seago <sseago>
AuthorDate: Mon Jan 9 09:53:23 2017 -0500
Commit:     Scott Seago <sseago>
CommitDate: Mon Jan 9 09:54:52 2017 -0500

    Upgrade fog-openstack to 0.1.19
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1390147
    
    This is needed for bz 1390147.

 manageiq-gems-pending.gemspec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 9 Scott Seago 2017-01-12 14:40:27 UTC
The euwe backport PR still needs merging, but the fix on master (in the gems-pending repo) is merged.

Comment 12 CFME Bot 2017-01-12 14:45:49 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/e32bc9a2c9099feaa48aa012c1485a6ce65a03aa

commit e32bc9a2c9099feaa48aa012c1485a6ce65a03aa
Author:     Scott Seago <sseago>
AuthorDate: Mon Jan 9 21:49:51 2017 -0500
Commit:     Scott Seago <sseago>
CommitDate: Mon Jan 9 21:49:51 2017 -0500

    Upgrade fog-openstack to 0.1.19
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1390147
    
    This is needed for bz 1390147. (this commit is for euwe only)

 gems/pending/Gemfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 Ronnie Rasouli 2017-03-15 08:27:30 UTC
verified by theses steps:
https://gist.github.com/andyvesel/6b01a3193d852aa1bb513447a62247ff