Bug 881209 - Org create fail: undefined method `permission_failed?' for #<environment:0x7f508e2b0760>
Org create fail: undefined method `permission_failed?' for #<environment:0x7f...
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Nightly
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Martin Bacovsky
Katello QA List
: Regression, TestBlocker, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-28 12:50 EST by Jeff Weiss
Modified: 2014-11-09 17:52 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-18 13:37:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
logs (222.14 KB, application/x-gzip)
2012-11-28 12:50 EST, Jeff Weiss
no flags Details

  None (edit)
Description Jeff Weiss 2012-11-28 12:50:19 EST
Created attachment 653631 [details]
logs

Description of problem:


Version-Release number of selected component (if applicable):
Katello Version: 1.2.1-1.git.525.dd0cd53.el6_3

How reproducible:


Steps to Reproduce:
1. create an org
2.
3.
  
Actual results:
fails with message in summary

Expected results:


Additional info:
Comment 3 Miroslav Suchý 2012-11-28 14:19:54 EST
How you tried to create org? in WebUI or using katello-cli?

Also it would be nice to add tail of log directly into comment so I do not need to open whole katello-debug.tar.gz because of few lines.
Comment 4 Miroslav Suchý 2012-11-28 14:22:39 EST
Here is the extracted traceback:

500 Internal Server Error: {"error":{"message":"undefined method `permission_failed?' for #<Environment:0x7f3a1aacdab8>"}} 
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'\n/usr/lib/ruby/1.8/net/http.rb:543:in `start'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'\n/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:63:in `post'\n/usr/lib/ruby/gems/1.8/gems/apipie-rails-0.0.12/lib/apipie/client/base.rb:32:in `send'\n/usr/lib/ruby/gems/1.8/gems/apipie-rails-0.0.12/lib/apipie/client/base.rb:32:in `call'\n/usr/lib/ruby/gems/1.8/gems/foreman_api-0.0.8/lib/foreman_api/resources/environment.rb:35:in `create'\n/usr/share/katello/lib/resources/abstract_model.rb:191:
in `create'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:414:in `_run_create_callbacks'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `send'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `run_callbacks'\n/usr/share/katello/lib/resources/abstract_model.rb:190:in `create'\n/usr/share/katello/lib/resources/abstract_model.rb:178:in `save'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:414:in `_run_save_callbacks'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `send'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `run_callbacks'\n/usr/share/katello/lib/resources/abstract_model.rb:174:in `save'\n/usr/share/katello/lib/resources/abstract_model.rb:207:in `save!'\n/usr/share/katello/app/models/glue/foreman/environment.rb:53:in `create_foreman_environment'\n/usr/share/katello/app/
models/glue.rb:153:in `send'\n/usr/share/katello/app/models/glue.rb:153:in `execute'\n/usr/share/katello/app/models/glue.rb:104:in `process'\n/usr/share/katello/app/models/glue.rb:100:in `each'\n/usr/share/katello/app/models/glue.rb:100:in `process'\n/usr/share/katello/app/models/glue.rb:32:in `on_save'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_2267'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:429:in `_run_save_callbacks'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:273:in `create_or_update'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/persistence.rb:40:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:43:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:21:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.
rb:240:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_transaction_returning_status'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:240:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:239:in `save'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/association_proxy.rb:222:in `send'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/
association_proxy.rb:222:in `method_missing'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/autosave_association.rb:339:in `save_has_one_association'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/autosave_association.rb:169:in `autosave_associated_records_for_library'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:441:in `_run_save_callbacks'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:273:in `create_or_update'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/persistence.rb:60:in `save!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:49:in `save!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:30:in `save!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_
transaction_returning_status'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!'\n/usr/share/katello/app/models/lazy_accessor.rb:108:in `save!'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:34:in `create!'\n/usr/share/katello/app/controllers/api/organizations_controller.rb:65:in `create'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/
abstract_controller/base.rb:150:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rendering.rb:11:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:18:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:462:in `_run__1476406177__process_action__1877208586__callbacks'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_3505'\n/usr/share/katello/lib/util/threadsession.rb:79:in `thread_locals'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_3505'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:451:in `_run__1476406177__process_action__1877208586__callbacks'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `send'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.
0.10/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `send'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `run_callbacks'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:17:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rescue.rb:17:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `instrument'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `instrument'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/
instrumentation.rb:29:in `process_action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:119:in `process'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/rendering.rb:41:in `process'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal.rb:138:in `dispatch'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal.rb:178:in `action'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:27:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/route_set.rb:150:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:93:in 
`recognize'\n/usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:222:in `optimized_each'\n/usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:92:in `recognize'\n/usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/route_set.rb:141:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:493:in `call'\n/usr/lib/ruby/gems/1.8/gems/apipie-rails-0.0.12/lib/apipie/static_dispatcher.rb:57:in `call'\n/usr/lib/ruby/gems/1.8/gems/warden-1.0.3/lib/warden/manager.rb:35:in `call'\n/usr/lib/ruby/gems/1.8/gems/warden-1.0.3/lib/warden/manager.rb:34:in `catch'\n/usr/lib/ruby/gems/1.8/gems/warden-1.0.3/lib/warden/manager.rb:34:in `call'\n/usr/lib/ruby/gems/1.8/gems/sass-3.1.4/lib/sass/../sass/plugin/rack.rb:54:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/head.rb:14:in 
`call'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/methodoverride.rb:24:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/params_parser.rb:21:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/flash.rb:182:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/cookies.rb:302:in `call'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:32:in `call'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:12:in `cache'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:31:in `call'\n/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/
connection_pool.rb:354:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:46:in `call'\n/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:44:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/sendfile.rb:102:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'\n/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'\n/usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/rack/logger.rb:13:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/runtime.rb:17:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/lock.rb:34:in `call'\n/usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:168:in `call'\n/usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:
in `send'\n/usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:52:in `call'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:46:in `each'\n/usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:46:in `call'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:84:in `pre_process'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:82:in `catch'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:82:in `pre_process'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:57:in `process'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/connection.rb:42:in `receive_data'\n/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'\n/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/backends/base.rb:61:in `start'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/
thin/server.rb:159:in `start'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/controllers/controller.rb:86:in `start'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/runner.rb:185:in `send'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/runner.rb:185:in `run_command'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/lib/thin/runner.rb:151:in `run!'\n/usr/lib/ruby/gems/1.8/gems/thin-1.2.8/bin/thin:6\n/usr/share/katello/script/thin:24:in `load'\n/usr/share/katello/script/thin:24
Comment 5 Jeff Weiss 2012-11-28 14:53:58 EST
Can't please everyone, when we used to paste the stack as a comment, we were told not to do that, to attach logs instead.
Comment 6 Jeff Weiss 2012-11-28 15:55:43 EST
The repro scenario happens in the UI, but you get the same error no matter what (cli/api also).
Comment 7 Martin Bacovsky 2012-11-29 04:12:01 EST
Seems to be problem in Foreman. Taking.
Comment 8 Martin Bacovsky 2012-11-29 05:53:11 EST
I found out, that there is not clear relation between organization and environment. That results in duplicite envs being created. Reverting the Envs orchestration till the relation is defined.
Comment 9 Jeff Weiss 2012-12-12 11:48:46 EST
Is there something left to be done here?  This error no longer appears in the UI.  If not I can close this bug.
Comment 10 Martin Bacovsky 2012-12-13 05:03:13 EST
I would leave it open till we re-merge the environments orchestration and prove it is working.
Comment 12 Mike McCune 2014-03-18 13:37:24 EDT
This bug was closed because of a lack of activity.  If you feel this bug should be reconsidered for attention please feel free to re-open the bug with a comment stating why it should be reconsidered.

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