Project

General

Profile

Actions

Bug #22704

closed

Smart proxy disables dhcp_isc if the lease file contains lease definitions

Added by Martin Dobrev about 6 years ago. Updated about 6 years ago.

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

Description

Hi,

one of my smart proxies stopped managing ISC DHCP after it tried to parse lease definitions:

lease 10.131.12.60 {
  starts 6 2018/01/06 11:51:30;
  ends 6 2018/01/06 23:51:30;
  tstp 6 2018/01/06 23:51:30;
  cltt 6 2018/01/06 11:51:30;
  binding state free;
  hardware ethernet 08:00:27:bc:8f:13;
}
lease 10.131.12.51 {
  starts 4 2018/02/22 12:24:37;
  ends 5 2018/02/23 00:24:37;
  tstp 5 2018/02/23 00:24:37;
  cltt 4 2018/02/22 12:24:37;
  binding state free;
  hardware ethernet 18:66:da:e7:83:55;
}

The error message is

D, [2018-02-27T09:33:04.696361 ] DEBUG -- : ["/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:44:in `<'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:44:in `block in update_subnet_service_with_dhcp_records'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:26:in `each'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:26:in `update_subnet_service_with_dhcp_records'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:18:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:156:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:130:in `block in do_start'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `block in group_changes'", "/usr/share/ruby/monitor.rb:211:in `mon_synchronize'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `group_changes'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:128:in `do_start'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:80:in `start'", "/usr/share/foreman-proxy/modules/dhcp_isc/inotify_leases_file_observer.rb:42:in `start'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:235:in `block in start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:233:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:233:in `start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:218:in `configure_plugin'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `block in configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `initialize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:153:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]
E, [2018-02-27T09:33:04.696518 ] ERROR -- : Disabling all modules in the group ['dhcp_isc', 'dhcp'] due to a failure in one of them: comparison of String with Time failed
D, [2018-02-27T09:33:04.696548 ] DEBUG -- : ["/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:44:in `<'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:44:in `block in update_subnet_service_with_dhcp_records'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:26:in `each'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:26:in `update_subnet_service_with_dhcp_records'", "/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:18:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:156:in `load_leases_file'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:130:in `block in do_start'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `block in group_changes'", "/usr/share/ruby/monitor.rb:211:in `mon_synchronize'", "/usr/share/foreman-proxy/modules/dhcp_common/subnet_service.rb:154:in `group_changes'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:128:in `do_start'", "/usr/share/foreman-proxy/modules/dhcp_isc/isc_state_changes_observer.rb:80:in `start'", "/usr/share/foreman-proxy/modules/dhcp_isc/inotify_leases_file_observer.rb:42:in `start'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:235:in `block in start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:233:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:233:in `start_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:218:in `configure_plugin'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `block in configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:89:in `configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:167:in `initialize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:153:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]

If I manually edit the file and remove these example entries it's all good. Problem is that the very same DHCP server is used for nodes that are not managed my Foreman so I can't avoid lease entries popping in it.

I'm using Foreman 1.16 on CentOS 7.4. Smart-proxy is managed by latest Puppet manifests.

Actions #1

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Anonymous
  • Pull request https://github.com/theforeman/smart-proxy/pull/569 added
Actions #2

Updated by Anonymous about 6 years ago

I don't think the leases in the ticket are causing the issue. It's probably an issue with leases which have one of their timers, typically the "end" one, set to "never". The PR linked to in this ticket should fix the problem.

Actions #3

Updated by Anonymous about 6 years ago

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

Also available in: Atom PDF