Project

General

Profile

Actions

Bug #11122

closed

Already initialized constant exception after service startup

Added by Anthony Lapenna over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When trying to startup the foreman server 1.9 RC on Ubuntu 14.04 via:

$ sudo service foreman start

I'm getting the following exception:

 /usr/share/foreman/app/models/concerns/encryptable.rb:5: warning: already initialized constant ENCRYPTION_PREFIX
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/commands/server.rb:46:in `app'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/commands/server.rb:70:in `start'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:55:in `block in <top (required)>'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:50:in `tap'
  | /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/commands.rb:50:in `<top (required)>'
  | script/rails:6:in `require'
  | script/rails:6:in `<main>'

It doesn't seem to affect anything though.


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #10263: Encrypt LDAP password in databaseClosedDaniel Lobato Garcia04/24/2015Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Rails
Actions #2

Updated by Dominic Cleal over 9 years ago

Actions #3

Updated by Dominic Cleal over 9 years ago

  • Translation missing: en.field_release set to 35

A 1.9 regression due to #10263 using the Encryptable concern, which is leading to the constant being redefined.

Can also reproduce in a dev console by accessing the AuthSourceLdap constant:

2.0.0-p353 :001 > AuthSourceLdap
/home/dcleal/code/foreman/foreman/app/models/concerns/encryptable.rb:5: warning: already initialized constant Encryptable::ENCRYPTION_PREFIX
/home/dcleal/code/foreman/foreman/app/models/concerns/encryptable.rb:5: warning: previous definition of ENCRYPTION_PREFIX was here
 => AuthSourceLdap(id: integer, type: string, name: string, host: string, port: integer, account: string, account_password: string, base_dn: string, attr_login: string, attr_firstname: string, attr_lastname: string, attr_mail: string, onthefly_register: boolean, tls: boolean, created_at: datetime, updated_at: datetime, ldap_filter: string, attr_photo: string, server_type: string, anon_queries: boolean, groups_base: string, usergroup_sync: boolean) 
Actions #4

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2576 added
  • Pull request deleted ()
Actions #5

Updated by Shlomi Zadok over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF