xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
360 stars 171 forks source link

makedhcp does not create a valid dhcpd.conf file #7372

Open mrpg99 opened 1 year ago

mrpg99 commented 1 year ago

Dear All,

I have just installed sles 15sp4 (amd64) and xcat 2.16.5

when i run makedhcp -n

my /etc/dhcpd.conf looks like this

`#xCAT generated dhcp configuration

option conf-file code 209 = text; option space isan; option isan-encap-opts code 43 = encapsulate isan; option isan.iqn code 203 = string; option isan.root-path code 201 = string; option space gpxe; option gpxe-encap-opts code 175 = encapsulate gpxe; option gpxe.bus-id code 177 = string; option user-class-identifier code 77 = string; option gpxe.no-pxedhcp code 176 = unsigned integer 8; option tcode code 101 = text; option iscsi-initiator-iqn code 203 = string; ddns-update-style interim; ignore client-updates; option client-architecture code 93 = unsigned integer 16; option tcode "Europe/Stockholm"; option gpxe.no-pxedhcp 1; option www-server code 114 = string; option cumulus-provision-url code 239 = text;

omapi-port 7911; key xcat_key { algorithm hmac-md5; secret "UFdFS01VWXRydnNDMEd5MTkxZVB2WTFVYnVwZ01JZFg="; }; omapi-key xcat_key; class "pxe" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; ddns-updates off; max-lease-time 600; }

definition for host cs5-0001 aka host cs5-0001 can be found in the dhcpd.leases file (typically /var/lib/dhcpd/dhcpd.leases)

` and when i try to start the dhcpd service i get this

`systemctl start dhcpd Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xeu dhcpd.service" for details. × dhcpd.service - ISC DHCPv4 Server Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2023-04-04 19:06:47 CEST; 22s ago Process: 8398 ExecStart=/usr/lib/dhcp/dhcpd -4 start (code=exited, status=1/FAILURE)

apr 04 19:06:47 govn.govn.net dhcpd[8491]: bugs on either our web page at www.isc.org or in the README file apr 04 19:06:47 govn.govn.net dhcpd[8491]: before submitting a bug. These pages explain the proper apr 04 19:06:47 govn.govn.net dhcpd[8491]: process and the information we find helpful for debugging. apr 04 19:06:47 govn.govn.net dhcpd[8491]: apr 04 19:06:47 govn.govn.net dhcpd[8491]: exiting. apr 04 19:06:47 govn.govn.net dhcpd[8398]: Starting ISC DHCPv4 Server apr 04 19:06:47 govn.govn.net dhcpd[8398]: please see /var/log/rc.dhcpd.log for details ..failed apr 04 19:06:47 govn.govn.net systemd[1]: dhcpd.service: Control process exited, code=exited, status=1/FAILURE apr 04 19:06:47 govn.govn.net systemd[1]: dhcpd.service: Failed with result 'exit-code'. apr 04 19:06:47 govn.govn.net systemd[1]: Failed to start ISC DHCPv4 Server.`

If i manually create a dhcpd.conf file, i can start the service

gurevichmark commented 1 year ago

@mrpg99 Is there anything in /var/log/rc.dhcpd.log to indicate what error was detected ? How is your manually created dhcpd.conf file different from the one xCAT generated ?

mrpg99 commented 1 year ago

this is what my manually edited simple dhcpd.conf looks like when the service starts ok :

`# a simple /etc/dhcp/dhcpd.conf default-lease-time 600; max-lease-time 7200; INTERFACESv4="eth3"; authoritative;

subnet 110.128.0.0 netmask 255.255.255.0 { range 10.128.0.41 10.128.0.42; }`

this is what my /var/log/rc.dhcpd.log looks like

`Internet Systems Consortium DHCP Server 4.3.6-P1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Config file: /etc/dhcpd.conf Database file: /db/dhcpd.leases PID file: /var/run/dhcpd.pid Wrote 0 class decls to leases file. Wrote 0 leases to leases file.

No subnet declaration for eth3 (10.128.0.40). Ignoring requests on eth3. If this is not what you want, please write a subnet declaration in your dhcpd.conf file for the network segment to which interface eth3 is attached.

Not configured to listen on any interfaces!

If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug. These pages explain the proper process and the information we find helpful for debugging.

exiting. `