Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1842903

Summary: Error performing ForemanInventoryUpload::Async::UploadReportJob : NoMethodError (undefined method `[]' for nil:NilClass)
Product: Red Hat Satellite Reporter: Mirek Długosz <mzalewsk>
Component: RH CloudAssignee: Shimon Shtein <sshtein>
Status: CLOSED CURRENTRELEASE QA Contact: Mirek Długosz <mzalewsk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: aruzicka, lhellebr, rlavi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.0.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-29 17:17:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mirek Długosz 2020-06-02 11:17:34 UTC
When testing rh_cloud plugin 1.0.6 on Satellite 6.7.1 snap 2, I noticed error from subject in /var/log/foreman/production.log . See attached file for full log.


This is very basic Satellite with manifest uploaded and one client registered to Satellite. Client is *not* subscribed (I disabled auto-attach in activation key) to any content.

As far as I can tell, report is generated successfully. UI says upload completed as well (I don't have access to debugging tools on cloud side, so I can't tell what happens there).

Reporting just in case this is something we should worry about.


Versions:
foreman-1.24.1.21-1.el7sat.noarch
satellite-6.7.1-1.el7sat.noarch
katello-3.14.0-6.el7sat.noarch
pulp-server-2.21.0.1-1.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-1.0.6-1.el7sat.noarch

Comment 2 Mirek Długosz 2020-06-03 15:13:00 UTC
I was investigating auto upload feature today and while using foreman-rake console, I stumbled upon this:

#v+
> Organization.find(3).owner_details['upstreamConsumer']['idCert']
Traceback (most recent call last):
        2: from lib/tasks/console.rake:5:in `block in <top (required)>'
        1: from (irb):5
NoMethodError (undefined method `[]' for nil:NilClass)
#v-

This seems to be exact error I was seeing in production.log. Organization with id 3 does not have manifest uploaded, so I guess it makes sense for it to not have upstreamConsumer set.

While I think it would be good if plugin could catch this situation silently instead of putting entire stacktrace into log, I'm fairly confident this is not error that we have to worry about.

I'm leaving this bugzilla open, as I'd appreciate confirmation that my understanding is correct.
We can also use this BZ as reference if we ever decide to silent this exception.

Comment 3 Lukáš Hellebrandt 2020-06-17 08:51:11 UTC
*** Bug 1847464 has been marked as a duplicate of this bug. ***

Comment 4 Mirek Długosz 2020-10-02 12:08:51 UTC
That was delivered in 6.8 snap 17, moving to ON_QA.

Comment 6 Mirek Długosz 2020-10-02 12:41:37 UTC
Organizations without manifest don't generate full stacktrace in production.log file. Instead, short explanation is included:

#v+
2020-10-02T08:21:46 [I|bac|] Skipping organization '<redacted>', no candlepin certificate defined.
#v-


Tested on:
Satellite 6.8 snap 17
satellite-6.8.0-1.el7sat.noarch
katello-3.16.0-1.el7sat.noarch
foreman-2.1.2.17-1.el7sat.noarch
pulp-server-2.21.3-1.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-2.0.12-1.el7sat.noarch

Comment 8 Brad Buckingham 2024-05-29 17:17:04 UTC
Closing as this was VERIFIED on Satellite 6.8.