Subject: bug#848: Pd: Problems starting kea-dhcp4-server

From: Jerzy Sobczyk <[email-masked]>
Date: Wed, 24 Apr 2024 20:31:16 +0200

Package: kea-dhcp4-server
Version: 2.2.0-6
1.After clean installation using:
    apt update
    apt install kea-dhcp4-server
necessary directories: /var/log/kea, /var/lib/kea, /var/run/kea were missing (they were left to be created by systemd ???).
So I had to create them manually.

2. There was also a problem with apparmor - I had to change the file /etc/apparmor.d/usr.sbin.kea-dhcp4 adding:
  /var/log/kea/** rwk,
  /run/kea/logger_lockfile wrk,
  /run/kea/kea4-ctrl-socket wrk,
  /run/kea/kea4-ctrl-socket.lock wrk,
and commenting out:
   owner /run/lock/kea/logger_lockfile rwk,
   owner /var/run/kea/logger_lockfile rwk,
Maybe You will be able to achieve the goal in a better way, but it works for me!

3. There was also a problem with start/stop script: /etc/init.d/kea-dhcp4-server
originally it could start the daemon but was unable to stop it.
After replacing: 
           --name $NAME
with:
          --exec $DAEMON
in two locations, it stops it (although sometimes with long delay).

After all this changes the daemon seems to be working - dhclient from other machine is able to get IP assignment.
I hope this information will help managing the package.

With Best Regards,
    Jerzy Sobczyk

---

From: Mark Hindley <[email-masked]>
Date: Wed, 24 Apr 2024 19:50:18 +0100

Control: tags -1 debian

Jerzy,

Thanks for this.

>    Package: kea-dhcp4-server

However, src:isc-kea is not a forked package and Devuan uses Debian's packages
directly without recompilation. Please report these issues directly to Debian's
BTS to be resolved.

Thanks

Mark

---

From: Jerzy Sobczyk <[email-masked]>
Date: Fri, 26 Apr 2024 22:53:07 +0200

> directly without recompilation. Please report these issues directly to Debian's

I will try. But all this problems result from the fact that kea depends on systemd. So Debian maintainers can "solve" the problem by explicitly stating this dependency. ...if you want kea you must use systemd.

> Mark

With Best Regards,
  Jerzy

---

From: Mark Hindley <[email-masked]>
Date: Sat, 27 Apr 2024 07:28:13 +0100

On Fri, Apr 26, 2024 at 10:53:07PM +0200, Jerzy Sobczyk wrote:
> I will try. But all this problems result from the fact that kea depends on
> systemd. So Debian maintainers can "solve" the problem by explicitly stating
> this dependency. ...if you want kea you must use systemd.

Then why does the package contain an initscript?

I would have thought the initscript needs fixing. If you can write a patch and
include that in your Debian bug report, you are much more likely to have
success.

If kea really requires systemd, that dependency needs to be stated, and the
package will disappear from Devuan.

HTH.

Mark

---

From: Lorenzo <[email-masked]>
Date: Sat, 27 Apr 2024 09:46:21 +0200

Hi,

On Sat, 27 Apr 2024 07:28:13 +0100
Mark Hindley <[email-masked]> wrote:

> > I will try. But all this problems result from the fact that kea
> > depends on systemd. So Debian maintainers can "solve" the problem
> > by explicitly stating this dependency. ...if you want kea you must
> > use systemd.

It doesn't strictly require systemd but the systemd service uses a few
directives to create /var/log/kea, /var/lib/kea, /var/run/kea

ConfigurationDirectory=kea         ---> /etc/kea 
RuntimeDirectory=kea lock/kea      ---> /run/kea   /run/lock/kea
RuntimeDirectoryPreserve=yes
LogsDirectory=kea                  ---> /var/log/kea (mode=0750)
LogsDirectoryMode=0750
StateDirectory=kea                 ---> /var/lib/kea

see
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html

they need to be created inside the initscript with install or
mkdir+chown, and they need to be removed in postrm script at purge.

Not sure about the apparmor profile.

Lorenzo

> I would have thought the initscript needs fixing. If you can write a
> patch and include that in your Debian bug report, you are much more
> likely to have success.
> 
> If kea really requires systemd, that dependency needs to be stated,
> and the package will disappear from Devuan.
> 
> HTH.
> 
> Mark
> _______________________________________________
> devuan-dev internal mailing list
> [email-masked]
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/devuan-dev

---

From: Mark Hindley <[email-masked]>
Date: Sat, 27 Apr 2024 09:36:24 +0100

> mkdir+chown, and they need to be removed in postrm script at purge.

Quite.

> Not sure about the apparmor profile.

There seems to be a Debian bug about that already:
https://bugs.debian.org/1032495

Mark

---

From: Mark Hindley <[email-masked]>
Date: Sat, 27 Apr 2024 09:40:07 +0100

Control: forwarded -1 https://bugs.debian.org/1055438

> > mkdir+chown, and they need to be removed in postrm script at purge.

And now I look, the initscript has been reported and fixed in Debian[1].

Mark

[1]  https://bugs.debian.org/1055438

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Sat, 27 Apr 2024 15:08:02 +0000

This is an automatic notification regarding your bug report
which was filed against the kea-dhcp4-server package:

#848: Pd: Problems starting kea-dhcp4-server

It has been closed by Mark Hindley <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mark Hindley <[email-masked]> by
replying to this email.

-- 
848: https://bugs.devuan.org/cgi/bugreport.cgi?bug=848
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: Fixed in Debian #1055438
From: Mark Hindley <[email-masked]>
To: [email-masked]
Date: Sat, 27 Apr 2024 16:06:23 +0100

Version: 2.4.1-3

Subject: Pd: Problems starting kea-dhcp4-server
From: Jerzy Sobczyk <[email-masked]>
To: <[email-masked]>
Date: Wed, 24 Apr 2024 20:31:16 +0200

With Best Regards,
    Jerzy Sobczyk