<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font size="-1"><font face="Arial">Another option with systemd would
        be to use its ability to monitor changes to files and start a
        custom systemd script when the config files being monitored are
        modified:
        <a class="moz-txt-link-freetext" href="https://www.freedesktop.org/software/systemd/man/systemd.path.html">https://www.freedesktop.org/software/systemd/man/systemd.path.html</a><br>
        <br>
        This is the method we use to keep our DHCP server configs in
        sync at work; we make an update to the config file on one
        system, and it pushes the change to the peer via a systemd
        oneshot service that copies it over via scp. You could also
        modify it to do a restart of the DHCP service at the same time,
        though that could be dangerous if you have to save the config
        file for any reason before finishing with all the changes; it
        would result in the DHCP server being restarted each time the
        file's saved, and if it's in an incomplete state then you'll
        have a disruption in your DHCP service.<br>
        <br>
        -Robert<br>
      </font></font><br>
    <div class="moz-cite-prefix">On 12/19/19 12:40 PM, Todor Fassl via
      Ale wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:c0066361-fbb1-0c24-ac43-ddb4fefb2684@gmail.com">It
      occurs to me that my question has a basic push/pull problem. I
      could make it so my co-workers don't know they are updating the
      peer.  That is the way it is now. They type "service dhcp start"
      just as they have always done. So that's nice when I am on
      vacation but what if I get hit by a bus? New guy comes in and has
      no idea how the peer is getting updated. Maybe its bad that I'm
      making this so easy.
      <br>
      <br>
      Well, if I stick with the make it easy approach, what about adding
      a execstart post script to the systemd config file?
      <br>
      <br>
<a class="moz-txt-link-freetext" href="https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStartPre=">https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStartPre=</a>
      <br>
      <br>
      <br>
      <br>
      <br>
      On 12/19/19 11:20 AM, Bryan L. Gay via Ale wrote:
      <br>
      <blockquote type="cite">Using a config manager would be perfect,
        but that's a long row to hoe
        <br>
        if not already using a config manager.
        <br>
        Personally, I'd use Chef above ansible or puppet, but that's
        just me.
        <br>
        There's a learning curve for the people who want to make config
        <br>
        changes using either of these tools.
        <br>
        <br>
        On Thu, Dec 19, 2019 at 12:17 PM Joey Kelly via Ale
        <a class="moz-txt-link-rfc2396E" href="mailto:ale@ale.org"><ale@ale.org></a> wrote:
        <br>
        <blockquote type="cite">
          <br>
          On Thursday, December 19, 2019 10:58:03 AM Todor Fassl via Ale
          wrote:
          <br>
          <blockquote type="cite">I have been running peered ISC dhcp
            servers for years. The problem is
            <br>
            that you need copies of the config files on both machines.
            Say you want
            <br>
            to assign an IP address to a new machine. You add a stanza
            to a config
            <br>
            file but then you then have to get a copy of the modified
            config file to
            <br>
            the peer. If you forget to do that, you are going to screw
            things up
            <br>
            pretty badly.
            <br>
          </blockquote>
          <br>
          So write a wrapper that fetches your stanzas or the complete
          config file, pushes
          <br>
          them to the servers, then restarts the servers. ansible/puppet
          can be your
          <br>
          friend here.
          <br>
          <br>
          --Joey
          <br>
          <br>
          <br>
          <blockquote type="cite">Other people in my department
            occasionally need to make these config
            <br>
            changes. So I need a way to guarantee that the config files
            get copied
            <br>
            over. Googling showed me lots of articles on configuring a
            peer in
            <br>
            isc-dhcp but only one on syncing the config files. That
            person was doing
            <br>
            it via rsync and a script in cron.hourly.
            <br>
            <br>
            What I have done, at least for now, is to replace the init
            script with
            <br>
            my own script. This script uses an ssh key to copy the files
            to the peer
            <br>
            and then restarts dhcp on the peer. If somebody types
            "service dhcp
            <br>
            restart", it runs my script. But now with systemd, it is
            going to be harder.
            <br>
            <br>
            Fortunately, for now, my co-workers are still typing
            "service bind9
            <br>
            restart" and the like. So "service dhcp restart" is not a
            problem --
            <br>
            yet. But if somebody types "systemctl restart
            isc-dhcp-server", it is
            <br>
            not going to work.
            <br>
            <br>
            <br>
            Its interesting that bind9 and slapd handle this under the
            covers.
            <br>
          </blockquote>
          <br>
          --
          <br>
          Joey Kelly
          <br>
          Minister of the Gospel and Linux Consultant
          <br>
          <a class="moz-txt-link-freetext" href="http://joeykelly.net">http://joeykelly.net</a>
          <br>
          504-239-6550
          <br>
          _______________________________________________
          <br>
          Ale mailing list
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:Ale@ale.org">Ale@ale.org</a>
          <br>
          <a class="moz-txt-link-freetext" href="https://mail.ale.org/mailman/listinfo/ale">https://mail.ale.org/mailman/listinfo/ale</a>
          <br>
          See JOBS, ANNOUNCE and SCHOOLS lists at
          <br>
          <a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
          <br>
        </blockquote>
        _______________________________________________
        <br>
        Ale mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:Ale@ale.org">Ale@ale.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="https://mail.ale.org/mailman/listinfo/ale">https://mail.ale.org/mailman/listinfo/ale</a>
        <br>
        See JOBS, ANNOUNCE and SCHOOLS lists at
        <br>
        <a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
        <br>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>