[Kea-users] ISC-KEA with MariaDB on Debian Buster Startup Sequence

PeterP looms_pastels_0f_kea at icloud.com
Wed Sep 22 17:03:09 UTC 2021


Thank you Ricardo. I have reversed the change to /usr/lib/systemd/system/isc-kea-dhcp4-server.service, and reapplied using "systemctl edit isc-kea-dhcp4-server.service".Rebooted and things continue to look OK.On 22 Sep 2021, at 17:40, Ricardo J. Barberis <ricardo at palmtx.com.ar> wrote:Hi Peter!You shouldn't edit files in /usr/lib/systemd/system/ since you'll probably lose your changes in the next update.The correct way is to use "systemctl edit isc-kea-dhcp4-server.service" which will open a file in your default editor where you can append your settings, e.g.:[Unit]After=mysql.serviceAfter=mariadb.serviceAfter you save and exit, this will create a file in /etc/systemd/system/isc-kea-dhcp4-server.service.d/override.conf with your content, which will be preserverd after an update.Cheers!El miércoles, 22 de septiembre de 2021 12:21:15 -03 PeterP escribió:I suspect that you are generally correct, but I modelled my entries on whatwas already in the file, which had ...After=network-online.targetAfter=time-sync.targetalready defined over separate lines.I'll monitor it over the next week or so and if it starts failing to startagain.  If it does, I'll try putting the entries on a single line as youhave recommended.Thank you for your help.PeterP.On 22 Sep 2021, at 15:04, perl-list <perl-list at network1.net> wrote:I think you just want to have one After= line like so:After=network-online.target time-sync.target mysql.service mariadb.serviceat least thats how the radiusd.service file was on our server here. This ison Redhat Enterprise Linux 8.x but it should be similar systemdimplementations.----- Original Message -----From: "PeterP" <looms_pastels_0f_kea at icloud.com>To: "kea-users" <kea-users at lists.isc.org>Sent: Wednesday, September 22, 2021 9:44:02 AMSubject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster StartupSequenceMade the change and rebooted and it seems to have worked.File is "/usr/lib/systemd/system/isc-kea-dhcp4-server.service". Notabsolutely sure this is the right file but it does seem to work.Now looks like ...[Unit]Description=Kea IPv4 DHCP daemonDocumentation=man:kea-dhcp4(8)Wants=network-online.targetAfter=network-online.targetAfter=time-sync.targetAfter=mysql.serviceAfter=mariadb.service[Service]User=_keaAmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAWEnvironment="KEA_PIDFILE_DIR=/run/kea"Environment="KEA_LOCKFILE_DIR=/run/lock/kea"Environment="KEA_LOGGER_DESTINATION=/var/log/kea"ConfigurationDirectory=keaRuntimeDirectory=kea lock/keaRuntimeDirectoryPreserve=yesLogsDirectory=keaLogsDirectoryMode=0750StateDirectory=keaExecStart=/usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.confExecReload=/bin/kill -HUP $MAINPID[Install]WantedBy=multi-user.targetThank you,PeterP.On 22 Sep 2021, at 14:35, perl-list <perl-list at network1.net> wrote:find /etc/ | grep isc-kea-dhcp4-server.serviceits in there somewhere I assume :)----- Original Message -----From: "PeterP" <looms_pastels_0f_kea at icloud.com>To: "kea-users" <kea-users at lists.isc.org>Sent: Wednesday, September 22, 2021 9:32:58 AMSubject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster StartupSequenceHello,Thank you, that aligns with what I had previously read, but I was strugglingto work out how to express the relevant commands.I'll try your "After" clause in my isc-kea-dhcp4-server.service file (when Ifind it) with the mysql.service and mariadb.service service entries only.Regards,PeterPOn 22 Sep 2021, at 14:26, perl-list <perl-list at network1.net> wrote:I don't know for sure as I have so far managed to largely avoid "systemd"but do have some small experience with it.radiusd.service on one of my servers has this:After=syslog.target network-online.target ipa.service dirsrv.targetkrb5kdc.service mysql.service mariadb.service postgresql.servicemeaning all of those .target or .service files would need to finish beforeitstarts radiusd.serviceYou can probably tailor your After= line to be more relevant to yourconfiguration.Someone correct me if there is a better way.----- Original Message -----From: "PeterP" <looms_pastels_0f_kea at icloud.com>To: "kea-users" <kea-users at lists.isc.org>Sent: Wednesday, September 22, 2021 8:42:32 AMSubject: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup SequenceHello,I think this is somewhat of a Linux newbie question, so apologies.I have PowerDNS, KEA (DHCP4 only), and Stork running on Debian Buster allusing MariaDB as the back-end. Everything is up to date as regardsversions, at least as far as I am aware, as I run global updates every fewdays.I am having a problem with the isc-kea-dhcp4-server.service. Whenever thereis a system reboot, this service fails to start. When I manually restart itlater, it works fine. As far as I can trace, it's a startup sequence issuein relation to having MariaDB as a back-end for Kea. I looks like Kea isstarting first, looking for the MariaDB service and failing because MariaDBhas yet to start.How can I change the start order so that the isc-kea-dhcp4-server.servicedoesn't start until the MariaDB service is up and running?I expect I will have the same issue with the isc-kea-dhcp6-server.servicewhen I eventually start to use it.Thank you,PeterP.-- Ricardo J. BarberisSenior SysAdmin / IT ArchitectDonWeb.comLa Actitud Es Todo ____________________________________________________ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.Kea-users mailing listKea-users at lists.isc.orghttps://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20210922/ee2439ed/attachment.htm>


More information about the Kea-users mailing list