Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[debian] cobbler check expects systemd unit named "dhcpd.service" but debian uses "isc-dhcp-server.service" #3689

Open
klin938 opened this issue May 4, 2024 · 0 comments
Labels
Bug Report Reporting a bug

Comments

@klin938
Copy link

klin938 commented May 4, 2024

Describe the bug

When managed dhcp enabled, cobbler check tries to detect the dhcpd.service, it seems that it expects the systemd unit is named "dhcpd", however, on debian, it is "isc-dhcp-server.service"

Steps to reproduce

  1. installed cobbler
  2. enable managed_dhcp and manage_dhcp_v4 in /etc/cobbler/settings.yaml
  3. run cobbler check

Expected behavior

check should detect the running dhcpd.service but it gave:

# cobbler check
The following are potential configuration items that you may want to fix:

1: For PXE to be functional, the 'next_server_v6' field in /etc/cobbler/settings.yaml must be set to something other than ::1, and should match the IP of the boot server on the PXE network.
2: service "dhcpd" is not running

Cobbler version

Cobbler 3.4.0
  source: d944986a, Wed Apr 17 07:29:43 2024 +0200
  build time: Wed Sep 21 07:30:00 2022

Operating system

debian 12.5.0 bookworm

Cobbler log

May 04 16:05:44 sre00 cobblerd[45664]: INFO | Cobbler startup completed
May 04 16:05:49 sre00 cobblerd[45664]: INFO | check
May 04 16:05:49 sre00 cobblerd[45664]: INFO | copying: /var/lib/cobbler/misc/anamon -> /var/www/cobbler/misc
May 04 16:05:49 sre00 cobblerd[45664]: INFO | copying: /var/lib/cobbler/misc/anamon.init -> /var/www/cobbler/misc
May 04 16:05:49 sre00 cobblerd[45664]: INFO | running: ['systemctl', 'status', 'dhcpd']
May 04 16:05:49 sre00 cobblerd[45664]: INFO | received on stdout:
May 04 16:05:49 sre00 cobblerd[45664]: INFO | copying: /var/lib/cobbler/misc/anamon -> /var/www/cobbler/misc
May 04 16:05:49 sre00 cobblerd[45664]: INFO | copying: /var/lib/cobbler/misc/anamon.init -> /var/www/cobbler/misc
May 04 16:05:49 sre00 cobblerd[45664]: INFO | running: ['systemctl', 'status', 'cobblerd']

Additional information

as a workaround, I simply renamed /etc/init.d/isc-dhcp-server to /etc/init.d/dhcpd, cobbler check seems to be happy and no longer report the same error.

root@sre00:/mnt/sre/cobblet# systemctl status isc-dhcp-server.service
● isc-dhcp-server.service - LSB: DHCP server
     Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
     Active: active (running) since Sat 2024-05-04 15:31:44 AEST; 43min ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 1 (limit: 4678)
     Memory: 9.0M
        CPU: 212ms
     CGroup: /system.slice/isc-dhcp-server.service
             └─41713 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens192

# mv /etc/init.d/isc-dhcp-server /etc/init.d/dhcpd
# systemctl daemon-reload

# systemctl status dhcpd.service
● dhcpd.service - LSB: DHCP server
     Loaded: loaded (/etc/init.d/dhcpd; generated)
     Active: active (running) since Sat 2024-05-04 15:31:44 AEST; 46min ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 1 (limit: 4678)
     Memory: 9.0M
        CPU: 212ms
     CGroup: /system.slice/isc-dhcp-server.service
             └─41713 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens192
@klin938 klin938 added the Bug Report Reporting a bug label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Reporting a bug
Projects
Status: Todo
Development

No branches or pull requests

1 participant