Actions
Bug #26410
closedundefined method `backend_service' for nil:NilClass when publishing a CV with Puppet content
Description
since
commit 9f90895561db916890dca0252b9803ec2489c938 Author: Justin Sherrill <jsherril@redhat.com> Date: Mon Mar 4 13:55:55 2019 -0500 Fixes #26166 - properly check for cv puppet env
I see the following error when running the forklift pipeline on nightly
✓ add puppet module to content view ✗ publish content view (in test file fb-content-katello.bats, line 224) `hammer content-view publish --organization="${ORGANIZATION}" \' failed with status 70 Task a38db501-aae9-4d0c-9176-f8647236aeda planned: 0.0/1, 0%, elapsed: 00:00:00 Task a38db501-aae9-4d0c-9176-f8647236aeda running: 0.11363636363636363/1, 11%, 0.1/s, elapsed: 00:00:02, ETA: 00:00:16 Task a38db501-aae9-4d0c-9176-f8647236aeda running: 0.22727272727272727/1, 22%, 0.1/s, elapsed: 00:00:04, ETA: 00:00:14 Task a38db501-aae9-4d0c-9176-f8647236aeda running: 0.5/1, 50%, 0.1/s, elapsed: 00:00:06, ETA: 00:00:06 Task a38db501-aae9-4d0c-9176-f8647236aeda error: 0.7045454545454546/1, 70%, 0.1/s, elapsed: 00:00:08, ETA: 00:00:03 Task a38db501-aae9-4d0c-9176-f8647236aeda error: 0.7045454545454546/1, 70%, 0.1/s, elapsed: 00:00:08, ETA: 00:00:03 Error: undefined method `backend_service' for nil:NilClass
Updated by Evgeni Golov almost 6 years ago
2019-03-19T14:46:48 [E|bac|9cb63acf] undefined method `backend_service' for nil:NilClass (NoMethodError) /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/pulp/repository/distributor_publish.rb:24:in `invoke_external_task' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action/polling.rb:83:in `initiate_external_action' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action/polling.rb:18:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action/cancellable.rb:13:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/pulp/abstract_async_task.rb:45:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action.rb:538:in `block (3 levels) in execute_run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/skip_if_matching_content.rb:5:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:31:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/remote_action.rb:16:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/models/katello/concerns/user_extensions.rb:21:in `cp_config' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/remote_action.rb:16:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/execution_wrapper.rb:87:in `wrap' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action/progress.rb:30:in `with_progress_calculation' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/action/progress.rb:16:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/keep_locale.rb:11:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/keep_locale.rb:22:in `with_locale' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.12.0.pre.master/app/lib/actions/middleware/keep_locale.rb:11:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_request_id.rb:49:in `restore_current_request_id' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_user.rb:43:in `restore_curent_user' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_user.rb:15:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_taxonomies.rb:44:in `restore_current_taxonomies' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.15.0/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:26:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:18:in `pass' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware.rb:31:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/stack.rb:22:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.2/lib/dynflow/middleware/world.rb:30:in `execute' …
Updated by Evgeni Golov almost 6 years ago
So for some reason, https://github.com/Katello/katello/blob/master/app/lib/actions/pulp/repository/distributor_publish.rb#L9 is nerver true:
if repository.is_a?(Katello::ContentViewPuppetEnvironment) options[:content_view_puppet_environment_id] = repository.id else options[:repository_id] = repository.id end
the else part is always executed, even if repository.class is Katello::ContentViewPuppetEnvironment
:confused:
Updated by The Foreman Bot almost 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Evgeni Golov
- Pull request https://github.com/Katello/katello/pull/8033 added
Updated by Justin Sherrill almost 6 years ago
- Related to Refactor #26166: refactor metadata generation to pulp service classes added
Updated by Justin Sherrill almost 6 years ago
- Target version set to Katello 3.12.0
Updated by Evgeni Golov almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|97c0da150c9ab08951e06d13bc585f09a1df708c.
Actions