Since UCS5 dhcp- server does not start automatically

Hi,

since my upgrade to UCS5 myy dhcp- server service does not properly start.

I can start the service manually by
systemctl start isc-dhcp-server
once the system is up. But it will not start automatically on system boot.

Trying to configure it properly ends in error messages:

root@praxis:/var/log# systemctl enable isc-dhcp-server
isc-dhcp-server.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable isc-dhcp-server
insserv: warning: script 'K01univention-system-setup-boot' missing LSB tags
insserv: warning: current start runlevel(s) (empty) of script `isc-dhcp-server' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (1) of script `isc-dhcp-server' overrides LSB defaults (0 1 6).
insserv: warning: script 'univention-system-setup-boot' missing LSB tags
insserv: warning: script 'univention-system-setup-boot-prepare' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `univention-system-setup-boot-prepare'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `univention-system-setup-boot-prepare'
update-rc.d: error: no runlevel symlinks to modify, aborting!

Are there any remaining files from previous installs I should delete? Or what is going on?

Thanks for all your ideas!

/KNEBB

1 Like

Hi @knebb

I just gave a quick heart yesterday because I have the same - not critical, but annoying - issue. I can’t find something in the bugtracker (maybe https://forge.univention.org/bugzilla/show_bug.cgi?id=43691 is somehow related?)
Will you file a bug-report there?

Best,
Bernd

Hi,

I do not know if this is a bug. And I do not have an account to create a bug.

Anyways, I did some further troubleshooting here.
First, I noticed the mentioned univention-system-setup-boot was marked as “remove candidate”. So has already been removed but some configuration files where remaining. I checked further and found hundrets (!) of packages marked as “rc”:
dpkg -l | grep -E "^rc.*"

I decided to remove all dhcp stuff on the system:

for i in univention-dhcp isc-dhcp-common isc-dhcp-client; do
apt remove $i
apt purge $i
done

Then I decided to remove all these obviously unneeded remainings by:
for i in $(dpkg -l|grep -E "^rc.*"| awk '{print $2}'); do apt -y purge $i; done

Now the system appeared to be “clean”. I tried again to install dhcp server:
apt install univention-dhcp (note: better to use univention-install instead of apt directly)

After this I did not get these errors but had some others :hot_face:
Okt [...] systemd[1]: Condition check resulted in ISC DHCP Server for IPv4 being skipped.
And still no dhcp-process was running! :frowning:

As I had no clue what this meant but I got a hint it might be related to univention install scripts.

So I did:
univention-run-join-scripts --force --run-scripts 25univention-dhcp.inst

And once this was executed I could use systemd to stop/start/enable/disable the service without any issues.

I do not know what really caused the issue but for me it’s gone.

/KNEBB

1 Like

Thank you for following this up - it seams to be some sort of update-bug at least?

Just one question: did your dhcp-configuration survive this procedure?

Bernd

Yes, they did survice because in Univention/ UCS the configuration is stored in LDAP and not in local configuration files. So apt/ dpkg do not harm with these LDAP-based configurations.

And after reinstallation the dhcp-server picked dup it’s configuration from LDAP.

/KNEBB

1 Like

I have just tried to follow your approach but I still have to start the service after a reboot. The error messages are different though:

root@ucs-02:~# systemctl enable isc-dhcp-server
isc-dhcp-server.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable isc-dhcp-server
insserv: warning: current start runlevel(s) (empty) of script `isc-dhcp-server' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (1) of script `isc-dhcp-server' overrides LSB defaults (0 1 6).
update-rc.d: error: no runlevel symlinks to modify, aborting!

And right after a reboot:

root@ucs-02:~# systemctl status isc-dhcp-server
● isc-dhcp-server.service - ISC DHCP Server for IPv4
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
  Drop-In: /lib/systemd/system/isc-dhcp-server.service.d
           └─univention-dhcp.conf
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)
           man:dhcpd(8)

Okt 26 18:50:12 ucs-02 systemd[1]: /lib/systemd/system/isc-dhcp-server.service.d/univention-dhcp.conf:16: PIDFile= references path below legacy directory /var/run/, updating /var/run/dhcpd.pid → /run/dhcpd.pid; please 

Bernd

I checked my history.

I did a
update-rc.d isc-dhcp-server defaults, too.

What tells grep -i dhcp /var/log/daemon.log?

/KNEBB

root@ucs-02:~# update-rc.d isc-dhcp-server defaults
insserv: warning: current start runlevel(s) (empty) of script `isc-dhcp-server' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (1) of script `isc-dhcp-server' overrides LSB defaults (0 1 6).

And when I grep the logfile I see only the DHCPREQUEST/DHCPACK - when it is running.

I’ve altered the sequence you’ve suggested a little bit - I will rerun it later and begin with the dhcp uninstall part too? You think, it is worth even trying?
Where would you insert the update-rc.d isc-dhcp-server defaults part? Before/after the reinstallation?

Bernd

Hi,
as I do not know what really caused the issues I would try everything :wink:

But I assume you can not alter the value when the package is not installed.
So possibly: apt remove; apt purge; univention-install; update-rc.d; univention-run-join-scripts; systemd enable
(obvisously with the proper parameters).

Or try in some other order.

If the dhcp does not start, get the related lines from /var/log/syslog and/or /var/log/daemon.log.

Good luck!

/KNEBB

Hi @knebb

running the commands again - in the order you proposed - worked for me (I ran also: for i in $(dpkg -l|grep -E "^rc.*"| awk '{print $2}'); do apt -y purge $i; done again).

The dhcp-server is starting after reboot.

Thank you!

Bernd

1 Like