[Kea-users] Raspberry PI 3B+ as DHCPv4 & DHCPv6 HA pair - auto start issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Raspberry PI 3B+ as DHCPv4 & DHCPv6 HA pair - auto start issue

russell aspinwall
Hi,

I have configured a pair of Raspberry PI 3B+ using Ubuntu 18.10 and Kea
1.4.0-P1-3 which is available for Ubuntu 18.10.

In order to keep the DHCPv4 and DHCPv6 separate I have created two
kea-ctrl-agent config files /etc/kea/kea-ctrl-agent.conf and
/etc/kea/kea-ctrl-agent6.conf. I copied /usr/sbin/kea-ctrl-agent to
/usr/sbin/kea-ctrl-agent6.

In the /etc/kea/kea-ctrl-agent.conf I have used the Raspberry PI IPv4
address and port 8080 and socket /tmp/kea-dhcp4-ctrl.sock

In the /etc/kea/kea-ctrl-agent6.conf I have used the Raspberry PI IPv6
Unique Local Unicast address and port 8081 with socket
tmp/kea-dhcp6-ctrl.sock.

The kea-dhcp4.conf and kea-dhcp6.conf files are adjusted to use the
correct socket and <a href="http://address:port">http://address:port.

I have been using systemd :( to start the kea-ctrl-agent,
kea-ctrl-agent6, kea-dhcp4-server and kea-dhcp6-server. When I reboot
the PI the kea-ctrl-agent is not running when I log in but the
kea-ctrl-agent6 is running.

If I manually start

/usr/sbin/kea-crtl-agent -c /etc/kea/kea-ctrl-agent.conf &

  I get a warning but the DHCPv4 HA starts working
"Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile"

I would like to get all the services starting during a reboot, any
pointers to get the processes running would be appreciated.

TIA
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Raspberry PI 3B+ as DHCPv4 & DHCPv6 HA pair - auto start issue

Bob Harold

On Thu, Jan 24, 2019 at 3:51 PM russell aspinwall <[hidden email]> wrote:
Hi,

I have configured a pair of Raspberry PI 3B+ using Ubuntu 18.10 and Kea
1.4.0-P1-3 which is available for Ubuntu 18.10.

In order to keep the DHCPv4 and DHCPv6 separate I have created two
kea-ctrl-agent config files /etc/kea/kea-ctrl-agent.conf and
/etc/kea/kea-ctrl-agent6.conf. I copied /usr/sbin/kea-ctrl-agent to
/usr/sbin/kea-ctrl-agent6.

In the /etc/kea/kea-ctrl-agent.conf I have used the Raspberry PI IPv4
address and port 8080 and socket /tmp/kea-dhcp4-ctrl.sock

In the /etc/kea/kea-ctrl-agent6.conf I have used the Raspberry PI IPv6
Unique Local Unicast address and port 8081 with socket
tmp/kea-dhcp6-ctrl.sock.

The kea-dhcp4.conf and kea-dhcp6.conf files are adjusted to use the
correct socket and http://address:port.

I have been using systemd :( to start the kea-ctrl-agent,
kea-ctrl-agent6, kea-dhcp4-server and kea-dhcp6-server. When I reboot
the PI the kea-ctrl-agent is not running when I log in but the
kea-ctrl-agent6 is running.

If I manually start

/usr/sbin/kea-crtl-agent -c /etc/kea/kea-ctrl-agent.conf &

  I get a warning but the DHCPv4 HA starts working
"Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile"

I would like to get all the services starting during a reboot, any
pointers to get the processes running would be appreciated.


Based on the error message, both processes might be trying to use the same lock file,
/var/run/kea/isc_kea_logger_lockfile
or maybe that directory does not exist, or has wrong permissions.
You need to somehow configure them to use different lock files.
I don't use Kea, so I have no idea how to configure that.

-- 
Bob Harold


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Raspberry PI 3B+ as DHCPv4 & DHCPv6 HA pair - auto start issue

russell aspinwall
Hi,

It appears if the /var/run/kea does not exist it creates the following files in /var/run/

-rw-r--r--  1 root root    5 Jan 24 20:45 kea-ctrl-agent.kea-ctrl-agent.pid
-rw-r--r--  1 root root    5 Jan 24 20:43 kea-ctrl-agent6.kea-ctrl-agent.pid
-rw-r--r--  1 root root    5 Jan 24 20:43 kea-dhcp4.kea-dhcp4.pid
-rw-r--r--  1 root root    5 Jan 24 20:43 kea-dhcp6.kea-dhcp6.pid

It would be nice to configure two kea-ctrl-agents with in a single file with processes spawned to handle the different ip/socket combinations

"Control-agent": {
    "http-host": "192.168.26.248",
    "http-port": 8080,

    "control-sockets": {
        "dhcp4": {
            "socket-type": "unix",
            "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
        }
    }
 },
"Control-agent": {
    "http-host": "fd22:318a:1212:1:8456:1466:9675:5991",
    "http-port": 8081,

    "control-sockets": {
        "dhcp6": {
            "socket-type": "unix",
            "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
        }
    }
    
},

Regards

Russell

On 25/01/2019 14:17, Bob Harold wrote:
On Thu, Jan 24, 2019 at 3:51 PM russell aspinwall <
[hidden email]> wrote:

Hi,

I have configured a pair of Raspberry PI 3B+ using Ubuntu 18.10 and Kea
1.4.0-P1-3 which is available for Ubuntu 18.10.

In order to keep the DHCPv4 and DHCPv6 separate I have created two
kea-ctrl-agent config files /etc/kea/kea-ctrl-agent.conf and
/etc/kea/kea-ctrl-agent6.conf. I copied /usr/sbin/kea-ctrl-agent to
/usr/sbin/kea-ctrl-agent6.

In the /etc/kea/kea-ctrl-agent.conf I have used the Raspberry PI IPv4
address and port 8080 and socket /tmp/kea-dhcp4-ctrl.sock

In the /etc/kea/kea-ctrl-agent6.conf I have used the Raspberry PI IPv6
Unique Local Unicast address and port 8081 with socket
tmp/kea-dhcp6-ctrl.sock.

The kea-dhcp4.conf and kea-dhcp6.conf files are adjusted to use the
correct socket and http://address:port.

I have been using systemd :( to start the kea-ctrl-agent,
kea-ctrl-agent6, kea-dhcp4-server and kea-dhcp6-server. When I reboot
the PI the kea-ctrl-agent is not running when I log in but the
kea-ctrl-agent6 is running.

If I manually start

/usr/sbin/kea-crtl-agent -c /etc/kea/kea-ctrl-agent.conf &

  I get a warning but the DHCPv4 HA starts working
"Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile
Unable to use interprocess sync lockfile (No such file or directory):
/var/run/kea/isc_kea_logger_lockfile"

I would like to get all the services starting during a reboot, any
pointers to get the processes running would be appreciated.


Based on the error message, both processes might be trying to use the same
lock file,
/var/run/kea/isc_kea_logger_lockfile
or maybe that directory does not exist, or has wrong permissions.
You need to somehow configure them to use different lock files.
I don't use Kea, so I have no idea how to configure that.



_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Raspberry PI 3B+ as DHCPv4 & DHCPv6 HA pair - auto start issue

Tomek Mrugalski
Hi Russell,

One CA is able to interface with dhcp4 and dhcp6. Why do you want to run
two of them? Is this about listening on v4 and v6 sockets? We could talk
about some extension to control agent, so it would maintain two sockets.
Would such a thing address your problem?

Also, for the specific issue, the location of pid file can be controlled
with KEA_PIDFILE_DIR environment variable. Since you're using packaged
version, the alternative does not appeal to you, but if you compile Kea
yourself, you can also alter localstatedir in configure script.

On 25.01.2019 18:25, russell aspinwall wrote:

> It would be nice to configure two kea-ctrl-agents with in a single
> file with processes spawned to handle the different ip/socket combinations
>
> "Control-agent": {
>     "http-host": "192.168.26.248",
>     "http-port": 8080,
>
>     "control-sockets": {
>         "dhcp4": {
>             "socket-type": "unix",
>             "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
>         }
>     }
>  },
> "Control-agent": {
>     "http-host": "fd22:318a:1212:1:8456:1466:9675:5991",
>     "http-port": 8081,
>
>     "control-sockets": {
>         "dhcp6": {
>             "socket-type": "unix",
>             "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
>         }
>     }
>     
> },

That's not a valid JSON. So no, that's not possible.

Tomek

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users