Project

General

Profile

Actions

Bug #20912

closed

Satellite-installer --foreman-proxy-dhcp-interface don't configure properly dhcpd interface on Rhel7

Added by Ivan Necas over 6 years ago. Updated over 6 years ago.

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

Description

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

Description of problem:

--foreman-proxy-dhcp-interface eth1 switch add interface name (eth1) to /etc/sysconfig/dhcpd. It work on Rhel6 but not on Rhel7 since this configuration file is ignored by systemctl

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

Red Hat Satellite 6.2.11 and Red Hat Enterprise 7.x

How reproducible:

Install a Rhel 7 server and Red Hat Satellite 6.2 with switch --foreman-proxy-dhcp-interface to a specific interface

Steps to Reproduce:
1. Install a Rhel 7
2. Install Red Hat Satellite 6.2 with switch --foreman-proxy-dhcp-interface
3. Checks arguments on dhcpd command line with ps
4. Checks dhcpd listening interface with netstat or lsof

Actual results:

dhcpd listen on all interfaces even with -foreman-proxy-dhcp-interface switch

Expected results:

dhcpd should listen on a specifique interface and not complain about unconfigured networks from any other interfaces

Additional info:

On RHEL 7.x (or systemd compliant os) /etc/sysconfig/dhcpd should not be configured and something like followinf commands should be done (example with eth1)

#> sed 's|^ExecStart=.*$|& eth1|' /usr/lib/systemd/system/dhcpd.service > /etc/systemd/system/dhcpd.service
#> systemctl --system daemon-reload

cf : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-dhcp-configuring-server.html

#> systemctl status dhcpd
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/etc/systemd/system/dhcpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2017-09-11 15:46:11 CEST; 9s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Main PID: 3236 (dhcpd)
Status: "Dispatching packets..."
CGroup: /system.slice/dhcpd.service
└─3236 /usr/sbin/dhcpd f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid eth1 <--- here eth1

journalctl u dhcpd
dhcpd3236: Internet Systems Consortium DHCP Server 4.2.5
dhcpd3236: Copyright 2004-2013 Internet Systems Consortium.
dhcpd3236: All rights reserved.
dhcpd3236: For info, please visit https://www.isc.org/software/dhcp/
dhcpd3236: Wrote 0 leases to leases file.
dhcpd3236: Listening on LPF/eth1/52:54:00:86:19:3a/10.100.100.0/24 <----
listen
dhcpd3236: Sending on LPF/eth1/52:54:00:86:19:3a/10.100.100.0/24 <----- answers
dhcpd3236: Sending on Socket/fallback/fallback-net
systemd1: Started DHCPv4 Server Daemon.

instead of

systemd1: Starting DHCPv4 Server Daemon...
dhcpd5656: Internet Systems Consortium DHCP Server 4.2.5
dhcpd5656: Copyright 2004-2013 Internet Systems Consortium.
dhcpd5656: All rights reserved.
dhcpd5656: For info, please visit https://www.isc.org/software/dhcp/
dhcpd5656: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
dhcpd5656: Internet Systems Consortium DHCP Server 4.2.5
dhcpd5656: Copyright 2004-2013 Internet Systems Consortium.
dhcpd5656: All rights reserved.
dhcpd5656: For info, please visit https://www.isc.org/software/dhcp/
dhcpd5656: Wrote 0 leases to leases file.
dhcpd5656: Listening on LPF/eth1/52:54:00:86:19:3a/10.100.100.0/24
dhcpd5656: Sending on LPF/eth1/52:54:00:86:19:3a/10.100.100.0/24
dhcpd5656:
dhcpd5656: No subnet declaration for eth0 (10.100.1.20). <------ listen on eth0 and eth1 and complain
dhcpd5656: * Ignoring requests on eth0. If this is not what about undefined network in dhcpd.conf
dhcpd5656: you want, please write a subnet declaration
dhcpd5656: in your dhcpd.conf file for the network segment
dhcpd5656: to which interface eth0 is attached. *

dhcpd5656:
dhcpd5656: Sending on Socket/fallback/fallback-net
systemd1: Started DHCPv4 Server Daemon.

Actions #1

Updated by Ivan Necas over 6 years ago

  • Subject changed from Satellite-installer --foreman-proxy-dhcp-interface don't configure properly dhcpd interface on Rhel7 to Satellite-installer --foreman-proxy-dhcp-interface don't configure properly dhcpd interface on Rhel7
  • Category set to Foreman modules
Actions #2

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ewoud Kohl van Wijngaarden
  • Pull request https://github.com/theforeman/puppet-dhcp/pull/110 added
Actions #3

Updated by Ewoud Kohl van Wijngaarden over 6 years ago

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

Also available in: Atom PDF