Project

General

Profile

Actions

Bug #37069

closed

After Foreman installation login page respond with "Invalid Timezone: Etc/Unknown"

Added by Oleh Fedorenko 10 months ago. Updated 4 months ago.

Status:
Closed
Priority:
High
Category:
Authentication
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2254976

Description of problem:

Upon attempting to login, an error is displayed referring to Invalid Timezone: Etc/Unknown

Actual results:

Login page reply with :

"Oops, we're sorry but something went wrong Invalid Timezone: Etc/Unknown"

Additional info:

Checking the /var/log/foreman/production.log

2023-12-18T12:00:04 [I|app|06ffc943] Started GET "/users/login" for 10.45.225.10 at 2023-12-18 12:00:04 +0100
2023-12-18T12:00:04 [I|app|06ffc943] Processing by UsersController#login as HTML
2023-12-18T12:00:04 [W|app|06ffc943] Invalid Timezone: Etc/Unknown
2023-12-18T12:00:04 [I|app|06ffc943] Backtrace for 'Invalid Timezone: Etc/Unknown' error (ArgumentError): Invalid Timezone: Etc/Unknown
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:100:in `rescue in find_zone!'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:82:in `find_zone!'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/time/zones.rb:42:in `zone='
06ffc943 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:9:in `set_timezone'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
06ffc943 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
06ffc943 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
06ffc943 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'

Checking on

/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:9:in set_timezone'

def set_timezone
default_timezone = Time.zone
client_timezone = User.current.try(:timezone) || cookies[:timezone]
Time.zone = client_timezone if client_timezone.present?

so the "Etc/Unknown" is either coming from User.current.timezone or cookies[:timezone]

I have tried to clean my coockies on Chrome but didn't works. Using Firefox I can login properly .

Actions #1

Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/10000 added
Actions #2

Updated by The Foreman Bot 8 months ago

  • Fixed in Releases 3.11.0 added
Actions #3

Updated by Oleh Fedorenko 8 months ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10103 added
Actions #5

Updated by The Foreman Bot 8 months ago

  • Fixed in Releases 3.10.0 added
Actions #6

Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Subject changed from After Foreman installation login page respond with "Invalid Timezone: Etc/Unknown" to After Foreman installation login page respond with "Invalid Timezone: Etc/Unknown"
  • Triaged changed from No to Yes
  • Fixed in Releases deleted (3.11.0)
Actions

Also available in: Atom PDF