Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1337447 - upgrade[sat6.1.9 -> Sat6.2 snap12] error [E] undefined method `finished' for nil:NilClass (NoMethodError) while updating satellite packages
Summary: upgrade[sat6.1.9 -> Sat6.2 snap12] error [E] undefined method `finished' for ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-05-19 08:56 UTC by Sachin Ghai
Modified: 2019-09-26 17:33 UTC (History)
3 users (show)

Fixed In Version: rubygem-katello-3.0.0.38-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:00:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
foreman debug logs (983.63 KB, application/x-xz)
2016-05-19 09:27 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15212 0 Normal Closed undefined method `finished' for nil:NilClass (NoMethodError) while upgrading 2020-07-26 05:12:37 UTC

Description Sachin Ghai 2016-05-19 08:56:38 UTC
Description of problem:
I was trying to upgrade from [sat6.1.9 -> Sat6.2 snap12] and at step where we run yum update to update all satellite packages from sat6.1.9 -> 6.2, following error thrown in production.log:

==> /var/log/foreman/production.log <==
2016-05-19 04:30:22 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.31/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `run_before_termination_hooks'



Version-Release number of selected component (if applicable):
sat6.1.9 -> Sat6.2 snap12

How reproducible:
always

Steps to Reproduce:
1. yum update -y
2.
3.

Actual results:
2016-05-19 04:30:22 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.31/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'


Expected results:
no exception/error should be thrown during yum update

Additional info:

Comment 1 Sachin Ghai 2016-05-19 08:59:26 UTC
==> /var/log/foreman/production.log <==
2016-05-19 04:30:22 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.31/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `run_before_termination_hooks'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:209:in `block (2 levels) in terminate'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `evaluate_to'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:1113:in `block in on_completable'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `run_task'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:322:in `block (3 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `loop'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `block (2 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `catch'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `block in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-05-19 04:30:22 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.31/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `run_before_termination_hooks'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:209:in `block (2 levels) in terminate'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `evaluate_to'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:1113:in `block in on_completable'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `run_task'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:322:in `block (3 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `loop'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `block (2 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `catch'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `block in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

Comment 2 Sachin Ghai 2016-05-19 09:27:30 UTC
Created attachment 1159331 [details]
foreman debug logs

Comment 4 Sachin Ghai 2016-05-20 07:58:27 UTC
Re-producible with following upgrade steps:

1. Set sat6.2 repo on existing sat6.1 setup
2. yum install satellite -y


2016-05-20 03:20:14 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.32/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `call'


Please note that this exception is being raised when we run "yum install satellite -y"

Thanks.

Comment 5 Brad Buckingham 2016-05-24 14:47:59 UTC
I have not been able to reproduce this issue on my environment.  I am testing with changes that will be coming in snap 13; therefore, it could be related to those changes or environmental or procedural differences.  For now, I am going to triage this in, as we need to ensure the bug is resolved.

Comment 6 Sachin Ghai 2016-05-26 06:29:51 UTC
Reproducible with upgrade from sat6.1.9 -> sat6.2 snap13.1

steps to reproduce:
==================
1. Set sat6.2 repo on existing sat6.1 setup
2. yum update -y


==> /var/log/foreman/production.log <==
2016-05-26 00:36:17 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:22 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:23 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:23 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:24 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:24 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:25 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:26 [foreman-tasks/action] [E] katello has not been configured for qpid.url and qpid.subscriptions_queue_address
2016-05-26 00:36:37 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.35/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:384:in `run_before_termination_hooks'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/world.rb:209:in `block (2 levels) in terminate'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:926:in `evaluate_to'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/edge/future.rb:1113:in `block in on_completable'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in `run_task'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:322:in `block (3 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `loop'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in `block (2 levels) in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `catch'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in `block in create_worker'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-05-26 00:36:37 [foreman-tasks/dynflow] [E] undefined method `finished' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.35/app/lib/actions/candlepin/listen_on_candlepin_events.rb:149:in `block (2 levels) in initialize_service'

Comment 7 Ivan Necas 2016-05-27 12:34:36 UTC
Created redmine issue http://projects.theforeman.org/issues/15212 from this bug

Comment 8 Ivan Necas 2016-05-27 12:55:44 UTC
A proposed fix is here: https://github.com/Katello/katello/pull/6082

I lowered the severity as it has no much impact on the system other than the ugly exception.

Comment 9 Sachin Ghai 2016-06-02 09:41:16 UTC
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap14 on rhel7.

The reported issue is no longer reproducible with upgrade performed with above builds. I don't find any exception during "yum update -y step". thank you for the fix.

Comment 10 Bryan Kearney 2016-07-27 11:00:25 UTC
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/RHBA-2016:1501


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