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.service After=mariadb.service After 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 what > was already in the file, which had ... > > After=network-online.target > After=time-sync.target > > > already defined over separate lines. > > I'll monitor it over the next week or so and if it starts failing to start > again. If it does, I'll try putting the entries on a single line as you > have recommended. > > Thank you for your help. > > PeterP. > > On 22 Sep 2021, at 15:04, perl-list <[email protected]> wrote: > > > I think you just want to have one After= line like so: > > After=network-online.target time-sync.target mysql.service mariadb.service > > at least thats how the radiusd.service file was on our server here. This is > on Redhat Enterprise Linux 8.x but it should be similar systemd > implementations. > > ----- Original Message ----- > From: "PeterP" <[email protected]> > To: "kea-users" <[email protected]> > Sent: Wednesday, September 22, 2021 9:44:02 AM > Subject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup > Sequence > > Made the change and rebooted and it seems to have worked. > > File is "/usr/lib/systemd/system/isc-kea-dhcp4-server.service". Not > absolutely sure this is the right file but it does seem to work. > > Now looks like ... > > [Unit] > Description=Kea IPv4 DHCP daemon > Documentation=man:kea-dhcp4(8) > Wants=network-online.target > After=network-online.target > After=time-sync.target > After=mysql.service > After=mariadb.service > > [Service] > User=_kea > AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW > Environment="KEA_PIDFILE_DIR=/run/kea" > Environment="KEA_LOCKFILE_DIR=/run/lock/kea" > Environment="KEA_LOGGER_DESTINATION=/var/log/kea" > ConfigurationDirectory=kea > RuntimeDirectory=kea lock/kea > RuntimeDirectoryPreserve=yes > LogsDirectory=kea > LogsDirectoryMode=0750 > StateDirectory=kea > ExecStart=/usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf > ExecReload=/bin/kill -HUP $MAINPID > > [Install] > WantedBy=multi-user.target > > Thank you, > > PeterP. > > On 22 Sep 2021, at 14:35, perl-list <[email protected]> wrote: > > find /etc/ | grep isc-kea-dhcp4-server.service > > its in there somewhere I assume :) > > ----- Original Message ----- > > From: "PeterP" <[email protected]> > To: "kea-users" <[email protected]> > Sent: Wednesday, September 22, 2021 9:32:58 AM > Subject: Re: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup > Sequence > > Hello, > > Thank you, that aligns with what I had previously read, but I was struggling > to work out how to express the relevant commands. > > I'll try your "After" clause in my isc-kea-dhcp4-server.service file (when I > find it) with the mysql.service and mariadb.service service entries only. > > Regards, > > PeterP > > On 22 Sep 2021, at 14:26, perl-list <[email protected]> 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.target > krb5kdc.service mysql.service mariadb.service postgresql.service > > meaning all of those .target or .service files would need to finish before > it > starts radiusd.service > > You can probably tailor your After= line to be more relevant to your > configuration. > > Someone correct me if there is a better way. > > ----- Original Message ----- > > From: "PeterP" <[email protected]> > To: "kea-users" <[email protected]> > Sent: Wednesday, September 22, 2021 8:42:32 AM > Subject: [Kea-users] ISC-KEA with MariaDB on Debian Buster Startup Sequence > > Hello, > > I think this is somewhat of a Linux newbie question, so apologies. > > I have PowerDNS, KEA (DHCP4 only), and Stork running on Debian Buster all > using MariaDB as the back-end. Everything is up to date as regards > versions, at least as far as I am aware, as I run global updates every few > days. > > I am having a problem with the isc-kea-dhcp4-server.service. Whenever there > is a system reboot, this service fails to start. When I manually restart it > later, it works fine. As far as I can trace, it's a startup sequence issue > in relation to having MariaDB as a back-end for Kea. I looks like Kea is > starting first, looking for the MariaDB service and failing because MariaDB > has yet to start. > > How can I change the start order so that the isc-kea-dhcp4-server.service > doesn't start until the MariaDB service is up and running? > > I expect I will have the same issue with the isc-kea-dhcp6-server.service > when I eventually start to use it. > > Thank you, > > PeterP. -- Ricardo J. Barberis Senior SysAdmin / IT Architect DonWeb.com La 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 list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
