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 1698395 - satellite-installer fails with traceback when there is a log file with name /var/log/foreman-installer/satellite.log-$something-$date.log
Summary: satellite-installer fails with traceback when there is a log file with name /...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.9.0
Assignee: Eric Helms
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-10 10:03 UTC by Michal Dekan
Modified: 2021-04-21 13:12 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-kafo-6.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:11:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31269 0 Normal Closed Roll log file by date rather than by number 2020-12-14 08:29:34 UTC
Red Hat Knowledge Base (Solution) 4052301 0 Upgrade None satellite-installer is failing with traceback rolling_file.rb:368:in `block in roll_by_number': undefined method `[]' fo... 2019-04-10 11:48:26 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:12:12 UTC

Description Michal Dekan 2019-04-10 10:03:01 UTC
Description of problem:

satellite-installer fails with traceback when there is a log file with name /var/log/foreman-installer/satellite.log-$something-$date.log

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


How reproducible: 100 %


Steps to Reproduce:
1. touch /var/log/foreman-installer/satellite.log-rename-20171205.log
2. or touch /var/log/foreman-installer/satellite.log-rename-20171205-1.log


Actual results:

# satellite-installer
/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:368:in `block in roll_by_number': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:367:in `sort'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:367:in `roll_by_number'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:349:in `roll_files'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:110:in `initialize'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:6:in `new'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:6:in `rolling_file'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/logger.rb:57:in `setup'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/kafo_configure.rb:96:in `initialize'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/kafo_configure.rb:163:in `run'
	from /usr/sbin/satellite-installer:8:in `<main>'


# satellite-installer --help
/usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:368:in `block in roll_by_number': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:367:in `sort'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:367:in `roll_by_number'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:349:in `roll_files'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:110:in `initialize'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:6:in `new'
	from /usr/share/gems/gems/logging-2.2.2/lib/logging/appenders/rolling_file.rb:6:in `rolling_file'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/logger.rb:57:in `setup'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/kafo_configure.rb:96:in `initialize'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
	from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	from /usr/share/gems/gems/kafo-2.1.0/lib/kafo/kafo_configure.rb:163:in `run'
	from /usr/sbin/satellite-installer:8:in `<main>'


Expected results:

No traceback from satellite-installer with /var/log/foreman-installer/satellite.log-$something-$date.log or /var/log/foreman-installer/satellite.log-$something-$date-1.log

Comment 3 Brad Buckingham 2019-04-12 15:27:41 UTC
Is the renamed log file being created manually or by the tooling?

Comment 4 Brad Buckingham 2019-04-12 15:28:58 UTC
Note: if rename the file without the .log at the end, the installer should continue.

Comment 5 Michal Dekan 2019-04-16 13:38:55 UTC
(In reply to Brad Buckingham from comment #3)
> Is the renamed log file being created manually or by the tooling?

File /var/log/foreman-installer/satellite.log-rename-20171205-1.log has been created manually by customer.

Comment 6 Bryan Kearney 2020-11-05 20:02:25 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31269 has been resolved.

Comment 7 Devendra Singh 2020-12-16 07:01:49 UTC
Verified on 6.9 Snap 5

Verification steps:

1-  touch /var/log/foreman-installer/satellite.log-rename-20201214-082535.log

ls  /var/log/foreman-installer/
capsule.20201209-162331.log  satellite.log-rename-20171205-1.log  satellite.log-rename-20201214-082535.log
capsule.log 
.....
.....   
             
3-  run satellite-installer

[root@dhcp-2-100 ~]# satellite-installer
2020-12-16 01:38:53 [NOTICE] [pre_migrations] Executing hooks in group pre_migrations
2020-12-16 01:38:53 [NOTICE] [pre_migrations] All hooks in group pre_migrations finished
2020-12-16 01:38:53 [NOTICE] [boot] Executing hooks in group boot
2020-12-16 01:38:53 [NOTICE] [boot] All hooks in group boot finished
2020-12-16 01:38:53 [NOTICE] [init] Executing hooks in group init
2020-12-16 01:38:53 [NOTICE] [init] All hooks in group init finished
2020-12-16 01:38:53 [NOTICE] [root] Loading default values from puppet modules...
2020-12-16 01:38:58 [NOTICE] [root] ... finished
2020-12-16 01:38:58 [NOTICE] [pre_values] Executing hooks in group pre_values
2020-12-16 01:38:58 [NOTICE] [pre_values] All hooks in group pre_values finished
2020-12-16 01:39:00 [NOTICE] [pre_validations] Executing hooks in group pre_validations
2020-12-16 01:39:01 [NOTICE] [pre_validations] All hooks in group pre_validations finished
2020-12-16 01:39:01 [NOTICE] [root] Running validation checks
2020-12-16 01:39:01 [NOTICE] [pre_commit] Executing hooks in group pre_commit
Package versions are locked. Continuing with unlock.
2020-12-16 01:39:05 [NOTICE] [pre_commit] All hooks in group pre_commit finished
2020-12-16 01:39:05 [NOTICE] [pre] Executing hooks in group pre
2020-12-16 01:39:09 [NOTICE] [pre] All hooks in group pre finished
2020-12-16 01:39:09 [NOTICE] [configure] Starting system configuration.
  The total number of configuration tasks may increase during the run.
  Observe logs or specify --verbose-log-level to see individual configuration tasks.
2020-12-16 01:39:22 [NOTICE] [configure] 100 out of 2163 done.
2020-12-16 01:39:23 [NOTICE] [configure] 200 out of 2163 done.
2020-12-16 01:39:23 [NOTICE] [configure] 300 out of 2163 done.
2020-12-16 01:39:24 [NOTICE] [configure] 400 out of 2163 done.
2020-12-16 01:39:40 [NOTICE] [configure] 500 out of 2163 done.
2020-12-16 01:39:56 [NOTICE] [configure] 600 out of 2163 done.
2020-12-16 01:39:56 [NOTICE] [configure] 700 out of 2165 done.
2020-12-16 01:39:57 [NOTICE] [configure] 800 out of 2165 done.
2020-12-16 01:39:57 [NOTICE] [configure] 900 out of 2167 done.
2020-12-16 01:39:59 [NOTICE] [configure] 1000 out of 2168 done.
2020-12-16 01:39:59 [NOTICE] [configure] 1100 out of 2169 done.
2020-12-16 01:39:59 [NOTICE] [configure] 1200 out of 2170 done.
2020-12-16 01:39:59 [NOTICE] [configure] 1300 out of 2174 done.
2020-12-16 01:40:01 [NOTICE] [configure] 1400 out of 2174 done.
2020-12-16 01:40:18 [NOTICE] [configure] 1500 out of 2175 done.
2020-12-16 01:40:18 [NOTICE] [configure] 1600 out of 2176 done.
2020-12-16 01:41:17 [NOTICE] [configure] 1700 out of 2176 done.
2020-12-16 01:41:17 [NOTICE] [configure] 1800 out of 2176 done.
2020-12-16 01:41:17 [NOTICE] [configure] 1900 out of 2176 done.
2020-12-16 01:41:17 [NOTICE] [configure] 2000 out of 2176 done.
2020-12-16 01:41:17 [NOTICE] [configure] 2100 out of 2176 done.
2020-12-16 01:41:24 [NOTICE] [configure] System configuration has finished.
2020-12-16 01:41:24 [NOTICE] [post] Executing hooks in group post
Executing: foreman-rake upgrade:run
=============================================
Upgrade Step 1/3: katello:correct_repositories. This may take a long while.
=============================================
Upgrade Step 2/3: katello:correct_puppet_environments. This may take a long while.
=============================================
Upgrade Step 3/3: katello:clean_backend_objects. This may take a long while.
0 orphaned consumer id(s) found in candlepin.
Candlepin orphaned consumers: []
0 orphaned consumer id(s) found in pulp.
Pulp orphaned consumers: []
  Success!

Comment 10 errata-xmlrpc 2021-04-21 13:11:45 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 (Moderate: Satellite 6.9 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-2021:1313


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