<html><body><div><div>Thank you Ricardo.<br></div><div> <br></div><div>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".<br></div><div><br></div><div>Rebooted and things continue to look OK.</div><div><br></div><div><br></div><div><br></div><blockquote type="cite"><div>On 22 Sep 2021, at 17:40, Ricardo J. Barberis <ricardo@palmtx.com.ar> wrote:<br></div><div><br></div><div><br></div><div><div><div>Hi Peter!<br></div><div><br></div><div>You shouldn't edit files in /usr/lib/systemd/system/ since you'll probably <br></div><div>lose your changes in the next update.<br></div><div><br></div><div>The correct way is to use "systemctl edit isc-kea-dhcp4-server.service" which <br></div><div>will open a file in your default editor where you can append your settings, <br></div><div>e.g.:<br></div><div><br></div><div>[Unit]<br></div><div>After=mysql.service<br></div><div>After=mariadb.service<br></div><div><br></div><div>After you save and exit, this will create a file in /etc/systemd/system/isc-<br></div><div>kea-dhcp4-server.service.d/override.conf with your content, which will be <br></div><div>preserverd after an update.<br></div><div><br></div><div>Cheers!<br></div><div><br></div><div>El miércoles, 22 de septiembre de 2021 12:21:15 -03 PeterP escribió:<br></div><blockquote type="cite"><div>I suspect that you are generally correct, but I modelled my entries on what<br></div><div>was already in the file, which had ...<br></div><div><br></div><div>After=network-online.target<br></div><div>After=time-sync.target<br></div><div><br></div><div><br></div><div>already defined over separate lines.<br></div><div><br></div><div>I'll monitor it over the next week or so and if it starts failing to start<br></div><div>again.  If it does, I'll try putting the entries on a single line as you<br></div><div>have recommended.<br></div><div><br></div><div>Thank you for your help.<br></div><div><br></div><div>PeterP.<br></div><div><br></div><div>On 22 Sep 2021, at 15:04, perl-list <perl-list@network1.net> wrote:<br></div><div><br></div><div><br></div><div>I think you just want to have one After= line like so:<br></div><div><br></div><div>After=network-online.target time-sync.target mysql.service mariadb.service<br></div><div><br></div><div>at least thats how the radiusd.service file was on our server here. This is<br></div><div>on Redhat Enterprise Linux 8.x but it should be similar systemd<br></div><div>implementations.<br></div><div><br></div><div>----- Original Message -----<br></div><div>From: "PeterP" <looms_pastels_0f_kea@icloud.com><br></div><div>To: "kea-users" <kea-users@lists.isc.org><br></div><div>Sent: Wednesday, September 22, 2021 9:44:02 AM<br></div><div>Subject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup<br></div><div>Sequence<br></div><div><br></div><div>Made the change and rebooted and it seems to have worked.<br></div><div><br></div><div>File is "/usr/lib/systemd/system/isc-kea-dhcp4-server.service". Not<br></div><div>absolutely sure this is the right file but it does seem to work.<br></div><div><br></div><div>Now looks like ...<br></div><div><br></div><div>[Unit]<br></div><div>Description=Kea IPv4 DHCP daemon<br></div><div>Documentation=man:kea-dhcp4(8)<br></div><div>Wants=network-online.target<br></div><div>After=network-online.target<br></div><div>After=time-sync.target<br></div><div>After=mysql.service<br></div><div>After=mariadb.service<br></div><div><br></div><div>[Service]<br></div><div>User=_kea<br></div><div>AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW<br></div><div>Environment="KEA_PIDFILE_DIR=/run/kea"<br></div><div>Environment="KEA_LOCKFILE_DIR=/run/lock/kea"<br></div><div>Environment="KEA_LOGGER_DESTINATION=/var/log/kea"<br></div><div>ConfigurationDirectory=kea<br></div><div>RuntimeDirectory=kea lock/kea<br></div><div>RuntimeDirectoryPreserve=yes<br></div><div>LogsDirectory=kea<br></div><div>LogsDirectoryMode=0750<br></div><div>StateDirectory=kea<br></div><div>ExecStart=/usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf<br></div><div>ExecReload=/bin/kill -HUP $MAINPID<br></div><div><br></div><div>[Install]<br></div><div>WantedBy=multi-user.target<br></div><div><br></div><div>Thank you,<br></div><div><br></div><div>PeterP.<br></div><div><br></div><div>On 22 Sep 2021, at 14:35, perl-list <perl-list@network1.net> wrote:<br></div><div><br></div><div>find /etc/ | grep isc-kea-dhcp4-server.service<br></div><div><br></div><div>its in there somewhere I assume :)<br></div><div><br></div><div>----- Original Message -----<br></div><div><br></div><div>From: "PeterP" <looms_pastels_0f_kea@icloud.com><br></div><div>To: "kea-users" <kea-users@lists.isc.org><br></div><div>Sent: Wednesday, September 22, 2021 9:32:58 AM<br></div><div>Subject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup<br></div><div>Sequence<br></div><div><br></div><div>Hello,<br></div><div><br></div><div>Thank you, that aligns with what I had previously read, but I was struggling<br></div><div>to work out how to express the relevant commands.<br></div><div><br></div><div>I'll try your "After" clause in my isc-kea-dhcp4-server.service file (when I<br></div><div>find it) with the mysql.service and mariadb.service service entries only.<br></div><div><br></div><div>Regards,<br></div><div><br></div><div>PeterP<br></div><div><br></div><div>On 22 Sep 2021, at 14:26, perl-list <perl-list@network1.net> wrote:<br></div><div><br></div><div>I don't know for sure as I have so far managed to largely avoid "systemd"<br></div><div>but do have some small experience with it.<br></div><div><br></div><div>radiusd.service on one of my servers has this:<br></div><div><br></div><div>After=syslog.target network-online.target ipa.service dirsrv.target<br></div><div>krb5kdc.service mysql.service mariadb.service postgresql.service<br></div><div><br></div><div>meaning all of those .target or .service files would need to finish before<br></div><div>it<br></div><div>starts radiusd.service<br></div><div><br></div><div>You can probably tailor your After= line to be more relevant to your<br></div><div>configuration.<br></div><div><br></div><div>Someone correct me if there is a better way.<br></div><div><br></div><div>----- Original Message -----<br></div><div><br></div><div>From: "PeterP" <looms_pastels_0f_kea@icloud.com><br></div><div>To: "kea-users" <kea-users@lists.isc.org><br></div><div>Sent: Wednesday, September 22, 2021 8:42:32 AM<br></div><div>Subject: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup Sequence<br></div><div><br></div><div>Hello,<br></div><div><br></div><div>I think this is somewhat of a Linux newbie question, so apologies.<br></div><div><br></div><div>I have PowerDNS, KEA (DHCP4 only), and Stork running on Debian Buster all<br></div><div>using MariaDB as the back-end. Everything is up to date as regards<br></div><div>versions, at least as far as I am aware, as I run global updates every few<br></div><div>days.<br></div><div><br></div><div>I am having a problem with the isc-kea-dhcp4-server.service. Whenever there<br></div><div>is a system reboot, this service fails to start. When I manually restart it<br></div><div>later, it works fine. As far as I can trace, it's a startup sequence issue<br></div><div>in relation to having MariaDB as a back-end for Kea. I looks like Kea is<br></div><div>starting first, looking for the MariaDB service and failing because MariaDB<br></div><div>has yet to start.<br></div><div><br></div><div>How can I change the start order so that the isc-kea-dhcp4-server.service<br></div><div>doesn't start until the MariaDB service is up and running?<br></div><div><br></div><div>I expect I will have the same issue with the isc-kea-dhcp6-server.service<br></div><div>when I eventually start to use it.<br></div><div><br></div><div>Thank you,<br></div><div><br></div><div>PeterP.<br></div></blockquote><div>-- <br></div><div>Ricardo J. Barberis<br></div><div>Senior SysAdmin / IT Architect<br></div><div>DonWeb.com<br></div><div>La Actitud Es Todo<br></div><div> _____<br></div><div><br></div><div><br></div><div><br></div><div>_______________________________________________<br></div><div>ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.<br></div><div><br></div><div>To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.<br></div><div><br></div><div>Kea-users mailing list<br></div><div>Kea-users@lists.isc.org<br></div><div>https://lists.isc.org/mailman/listinfo/kea-users<br></div></div></div></blockquote></div><div><br></div></body></html>