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 1342490 - [upgrade]content-view publish on a upgraded setup fails with error: undefined method `[]' for nil:NilClass (NoMethodError)
Summary: [upgrade]content-view publish on a upgraded setup fails with error: undefined...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On: 1342528
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-06-03 11:40 UTC by Sachin Ghai
Modified: 2020-12-11 12:13 UTC (History)
2 users (show)

Fixed In Version: katello-installer-base-3.0.0.43-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:12:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
exception raised while cv publish (12.58 KB, text/plain)
2016-06-03 11:43 UTC, Sachin Ghai
no flags Details
cv publish fails on upgraded sat6.2 (40.15 KB, image/png)
2016-06-03 11:44 UTC, Sachin Ghai
no flags Details
foreman-debug logs (40.15 KB, image/png)
2016-06-03 11:45 UTC, Sachin Ghai
no flags Details
content-view was successfully publsihed/promoted on upgraded setup (59.64 KB, image/png)
2016-06-10 08:55 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15297 0 None None None 2016-06-06 00:14:16 UTC

Description Sachin Ghai 2016-06-03 11:40:44 UTC
Description of problem:I've upgrade sat6.1.9 -> sat6.2 GA snap14.1. Upgrade was successfully completed. Later, I tried to create a new repo on upgraded setup and added the newly created repo in existing CV. when I publish the CV it failed with error:


==> /var/log/foreman/production.log <==
2016-06-03 07:28:35 [foreman-tasks/action] [E] undefined method `[]' for nil:NilClass (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/pulp/repository/distributor_publish.rb:24:in `distributor_id'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/pulp/repository/distributor_publish.rb:16:in `invoke_external_task'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/polling.rb:83:in `initiate_external_action'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/polling.rb:18:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action/cancellable.rb:9:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/pulp/abstract_async_task.rb:45:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:506:in `block (3 levels) in execute_run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:30:in `run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/middleware/remote_action.rb:16:in `block in run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/models/katello/concerns/user_extensions.rb:20:in `cp_config'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/middleware/remote_action.rb:16:in `run'



Version-Release number of selected component (if applicable):
upgrade sat6.1.9 -> sat6.2 GA snap14.1 on rhel7

How reproducible:


Steps to Reproduce:
1. add a new repo on upgraded 6.2 satellite
2. add that repo to an existing CV
3. publish the CV

Actual results:
error: undefined method `[]' for nil:NilClass (NoMethodError)

Expected results:
cv publish should work

Additional info:

Comment 1 Sachin Ghai 2016-06-03 11:43:05 UTC
Created attachment 1164443 [details]
exception raised while cv publish

Comment 2 Sachin Ghai 2016-06-03 11:44:25 UTC
Created attachment 1164444 [details]
cv publish fails on upgraded sat6.2

Comment 3 Sachin Ghai 2016-06-03 11:45:14 UTC
Created attachment 1164445 [details]
foreman-debug logs

Comment 5 Brad Buckingham 2016-06-06 00:14:14 UTC
Created redmine issue http://projects.theforeman.org/issues/15297 from this bug

Comment 6 Brad Buckingham 2016-06-06 00:53:59 UTC
The proposed fixes for this issue are in the following upstream PRs:
- https://github.com/Katello/katello/pull/6105
- https://github.com/Katello/katello-installer/pull/355

In addition, to fully test this, the fix for bug 1342528 will also be needed.

Comment 7 Sachin Ghai 2016-06-10 08:53:48 UTC
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap15.1 on rhel7

After upgrade, I can successfully publish/promote the content-view. Please see the screenshot for verification.

Comment 8 Sachin Ghai 2016-06-10 08:55:02 UTC
Created attachment 1166592 [details]
content-view was successfully publsihed/promoted on upgraded setup

Comment 9 Bryan Kearney 2016-07-27 11:12:04 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.