Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1238530 - Unable to add Infrastructure and cloud providers [NEEDINFO]
Unable to add Infrastructure and cloud providers
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity medium
: GA
: 5.5.0
Assigned To: lgalis
Aziza Karol
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-02 01:38 EDT by Aziza Karol
Modified: 2016-02-09 12:43 EST (History)
5 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:21:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
cfme-bot: needinfo?


Attachments (Terms of Use)
err (44.96 KB, image/png)
2015-07-02 01:38 EDT, Aziza Karol
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 12:58:09 EST

  None (edit)
Description Aziza Karol 2015-07-02 01:38:00 EDT
Created attachment 1045346 [details]
err

Description of problem:


Version-Release number of selected component (if applicable):
master.20150702013115_d3c567d 

How reproducible:
100%

Steps to Reproduce:
1.Add new cloud or infra provider
2.
3.

Actual results:
 The user is not authorized for this task or item. [ems_cloud/new] displayed in UI. see attached screenshot

Expected results:
Shoild be able to add providers

Additional info:
production.log
[----] I, [2015-07-02T01:20:19.701554 #4761:5f39e4]  INFO -- : Completed 200 OK in 159ms (Views: 88.5ms | ActiveRecord: 12.6ms)
[----] I, [2015-07-02T01:20:22.537465 #4761:5f39e4]  INFO -- : Started GET "/ems_cloud/new" for 127.0.0.1 at 2015-07-02 01:20:22 -0400
[----] I, [2015-07-02T01:20:22.538690 #4761:5f39e4]  INFO -- : Processing by EmsCloudController#new as HTML
[----] F, [2015-07-02T01:20:22.563923 #4761:5f39e4] FATAL -- : Error caught: [MiqException::RbacPrivilegeException] The user is not authorized for this task or item.
/var/www/miq/vmdb/app/controllers/application_controller.rb:2688:in `assert_privileges'
/var/www/miq/vmdb/app/controllers/ems_common.rb:219:in `new'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:198:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553:in `block (2 levels) in compile'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164:in `instrument'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:137:in `process'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionview-4.2.3/lib/action_view/rendering.rb:30:in `process'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:196:in `dispatch'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_controller/metal.rb:237:in `block in action'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:45:in `serve'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:821:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/query_cache.rb:36:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:84:in `run_callbacks'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:38:in `call_app'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/rack/logger.rb:22:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.3/lib/action_dispatch/middleware/static.rb:116:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:518:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:165:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in `run'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:286:in `start'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/server.rb:80:in `start'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:80:in `block in server'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
/var/www/miq/vmdb/bin/rails:4:in `require'
/var/www/miq/vmdb/bin/rails:4:in `<main>'
Comment 1 Aziza Karol 2015-07-02 01:38:51 EDT
Github link- https://github.com/ManageIQ/manageiq/issues/3305
Comment 5 CFME Bot 2015-07-10 17:06:29 EDT
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/e30031cadac3a7ca36f115f35c99701c1759e481

commit e30031cadac3a7ca36f115f35c99701c1759e481
Author:     Laura Galis <lgalis@redhat.com>
AuthorDate: Wed Jul 8 09:12:03 2015 -0400
Commit:     Laura Galis <lgalis@redhat.com>
CommitDate: Fri Jul 10 15:21:14 2015 -0400

    Unable to add Infrastructure and cloud providers
    
    Added a permission_prefix method to ems_common that returns the controller_name appropriately for ems_infra, ems_cloud & ems_container controllers. This method is used together with the action as the feature id in asserting privileges:  assert_privileges("#{permission_prefix}_edit"). The permission_prefix method was added to application_controller but can be overridden in each controller class as needed in the future.
    Adding Rspecs.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238530

 app/controllers/application_controller.rb         |  4 ++++
 app/controllers/ems_common.rb                     | 12 ++++++----
 spec/controllers/ems_cloud_controller_spec.rb     | 27 +++++++++++++++++++++++
 spec/controllers/ems_container_controller_spec.rb | 27 +++++++++++++++++++++++
 spec/controllers/ems_infra_controller_spec.rb     | 24 ++++++++++++++++++++
 5 files changed, 90 insertions(+), 4 deletions(-)
 create mode 100644 spec/controllers/ems_cloud_controller_spec.rb
 create mode 100644 spec/controllers/ems_container_controller_spec.rb
Comment 7 CFME Bot 2015-09-02 19:05:33 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 8 CFME Bot 2015-09-03 10:10:34 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 10 CFME Bot 2015-09-03 10:10:50 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 12 CFME Bot 2015-09-03 10:11:08 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 13 CFME Bot 2015-09-03 16:40:32 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 14 CFME Bot 2015-09-09 13:51:24 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 15 CFME Bot 2015-09-09 17:00:29 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/10b380c6f432eb0084d14cd8c431a863560e644c

commit 10b380c6f432eb0084d14cd8c431a863560e644c
Author:     Laura Galis <lgalis@redhat.com>
AuthorDate: Wed Jul 8 09:12:03 2015 -0400
Commit:     Aparna Karve <akarve@redhat.com>
CommitDate: Wed Sep 9 10:10:34 2015 -0700

    Unable to add Infrastructure and cloud providers
    
    Added a permission_prefix method to ems_common that returns the controller_name appropriately for ems_infra, ems_cloud & ems_container controllers. This method is used together with the action as the feature id in asserting privileges:  assert_privileges("#{permission_prefix}_edit"). The permission_prefix method was added to application_controller but can be overridden in each controller class as needed in the future.
    Adding Rspecs.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1238530
    
    Conflicts:
    	app/controllers/ems_common.rb

 app/controllers/ems_common.rb | 4 ++++
 1 file changed, 4 insertions(+)
Comment 17 CFME Bot 2015-09-09 17:06:32 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 19 CFME Bot 2015-09-09 17:07:47 EDT
Detected commit referencing this ticket while ticket status is MODIFIED.
Comment 20 Aziza Karol 2015-09-21 06:51:30 EDT
Verified in 5.5.0.1-alpha1.20150915151429_2230bd4
Comment 22 errata-xmlrpc 2015-12-08 08:21:27 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551
Comment 24 CFME Bot 2016-02-09 12:43:04 EST
Detected commit referencing this ticket while ticket status is CLOSED.

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