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 1825760

Summary: schedule inventory plugin sync failed due to 'organization_id' typecasting issue.
Product: Red Hat Satellite Reporter: Parag Kamble <pakamble>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Mirek Długosz <mzalewsk>
Severity: high Docs Contact:
Priority: high    
Version: 6.7.0CC: achadha, ahumbe, bkearney, cmarinea, egolov, peter.vreman, pmoravec, sghai, wpinheir
Target Milestone: 6.8.0Keywords: SubscriptionWatch, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-1.0.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1840428 (view as bug list) Environment:
Last Closed: 2020-10-27 13:01:20 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 Parag Kamble 2020-04-20 07:40:17 UTC
Description of problem:
schedule inventory plugin sync failed due to 'organization_id' typecasting.
observed since last few days upload has not happened and by looking at the logs found below error.

2020-04-17T10:01:22 [I|app|] Performed ForemanInventoryUpload::Async::GenerateAllReportsJob (Job ID: 160d2769-88b7-4a3f-96b6-f803d
42c675a) from Dynflow(default) in 6512.74ms
2020-04-17T10:01:22 [I|app|] Performing ForemanInventoryUpload::Async::GenerateReportJob (Job ID: d5b032b1-ccfd-44a2-8444-2c4a5f91
4518) from Dynflow(default) with arguments: "/var/lib/foreman/red_hat_inventory/generated_reports/", 1
2020-04-17T10:01:22 [E|app|] Error performing ForemanInventoryUpload::Async::GenerateReportJob (Job ID: d5b032b1-ccfd-44a2-8444-2c
4a5f914518) from Dynflow(default) in 0.62ms: TypeError (no implicit conversion of Integer into String):
/opt/rh/rh-ruby25/root/usr/share/ruby/open3.rb:199:in `spawn'
/opt/rh/rh-ruby25/root/usr/share/ruby/open3.rb:199:in `popen_run'
/opt/rh/rh-ruby25/root/usr/share/ruby/open3.rb:190:in `popen2e'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-1.0.4.1/lib/foreman_inventory_upload/async/shell_process.rb:10:in `perform'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-1.0.4.1/lib/foreman_inventory_upload/async/generate_report_job.rb:12:in `perform'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activejob-5.2.1/lib/active_job/execution.rb:39:in `block in perform_now'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. crate new organisation and location in satellite 
2. configure inventory upload plugin
3. add some inventory 
4. wait for schedule sync to be happen. 

Actual results:

Schedule sync has not invoked.

Expected results:
schedule sync should upload inventory  once in a 24 Hr.

Additional info:

Comment 7 Shimon Shtein 2020-05-17 10:33:11 UTC
*** Bug 1836357 has been marked as a duplicate of this bug. ***

Comment 8 Mirek Długosz 2020-06-19 10:39:05 UTC
Scheduled sync finishes without problem - there is no exception raised during run.

Tested on:
Satellite 6.8.0 snap 5
pulp-server-2.21.2-1.el7sat.noarch
satellite-6.8.0-0.4.beta.el7sat.noarch
foreman-2.1.0-0.20.rc2.el7sat.noarch
katello-3.16.0-0.3.rc1.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-2.0.7-1.el7sat.noarch

Comment 12 errata-xmlrpc 2020-10-27 13:01:20 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 (Important: Satellite 6.8 release), 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/RHSA-2020:4366