Bug 1111905 - "foreman-rake permissions:reset" fails with "undefined method `remote_id' for nil:NilClass"
Summary: "foreman-rake permissions:reset" fails with "undefined method `remote_id' for...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Infrastructure
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-21 21:50 UTC by Jan Hutař
Modified: 2019-09-25 21:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:22:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2014-06-21 21:50:19 UTC
Description of problem:
"foreman-rake permissions:reset" command mentioned in Installation Guide fails with "undefined method `remote_id' for nil:NilClass"


Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140620.0


How reproducible:
always


Steps to Reproduce:
1. # foreman-rake permissions:reset


Actual results:
# /var/lib/pulp/packagesrake aborted!
undefined method `remote_id' for nil:NilClass

Tasks: TOP => permissions:reset
(See full trace by running task with --trace)


Expected results:
Should work


Additional info:
# foreman-rake permissions:reset --trace
** Invoke permissions:reset (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute permissions:reset
rake aborted!
undefined method `remote_id' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:21:in `block in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:21:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:21:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:29:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/keep_locale.rb:20:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:393:in `block (2 levels) in execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `switch_flow'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:311:in `concurrence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:392:in `block in execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:391:in `execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:226:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/plan_step.rb:54:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/plan_step.rb:53:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:339:in `plan_action'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/katello/user/update.rb:21:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:394:in `block (3 levels) in execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:29:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/keep_locale.rb:20:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:393:in `block (2 levels) in execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `switch_flow'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:311:in `concurrence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:392:in `block in execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:361:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:391:in `execute_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/action.rb:226:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/plan_step.rb:54:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan/steps/plan_step.rb:53:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:154:in `block (3 levels) in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:222:in `switch_flow'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:212:in `with_planning_scope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:153:in `block (2 levels) in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:37:in `plan_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware.rb:37:in `plan_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:152:in `block in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/execution_plan.rb:151:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/world.rb:113:in `block in plan'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/world.rb:111:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.1/lib/dynflow/world.rb:111:in `plan'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.3/app/models/foreman_tasks/concerns/action_triggering.rb:76:in `plan_action'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.3/app/models/foreman_tasks/concerns/action_triggering.rb:62:in `plan_update_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:508:in `_run__2880191109993581397__update__1207255591620004957__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_update_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:272:in `update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:347:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `block in create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:481:in `block in _run__2880191109993581397__save__1207255591620004957__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_3092'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/glue.rb:37:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_3092'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:436:in `_run__2880191109993581397__save__1207255591620004957__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/lazy_accessor.rb:96:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.3/app/models/foreman_tasks/concerns/action_triggering.rb:26:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.3/app/models/foreman_tasks/concerns/action_triggering.rb:106:in `dynflow_task_wrap'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.3/app/models/foreman_tasks/concerns/action_triggering.rb:26:in `save'
/usr/share/foreman/lib/tasks/reset_permissions.rake:12:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => permissions:reset

Comment 1 RHEL Program Management 2014-06-21 22:04:28 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Jan Hutař 2014-07-21 11:25:40 UTC
VERIFIED with Satellite-6.0.4-RHEL-6-20140716.0:

# foreman-rake permissions:reset --trace
** Invoke permissions:reset (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute permissions:reset
Reset to user: admin, password: BBE9p7WhEiA5Hj6c

Now it generates and prints new random password.

Comment 6 Bryan Kearney 2014-09-11 12:22:22 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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