Add -hostprefix in DHCP daemon to run the daemon as container
This diff adds -hostprefix option in dhcp daemon. This option could be used to run dhcp daemon as container because container cannot touch host's netns directly. The diff changes dhcp daemon to touch procfs mounted to another path, like '/hostfs/proc'.
This commit is contained in:
@@ -18,6 +18,7 @@ $ ./dhcp daemon
|
||||
|
||||
If given `-pidfile <path>` arguments after 'daemon', the dhcp plugin will write
|
||||
its PID to the given file.
|
||||
If given `-hostprefix <prefix>` arguments after 'daemon', the dhcp plugin will use this prefix for netns as `<prefix>/<original netns>`. It could be used in case of running dhcp daemon as container.
|
||||
|
||||
Alternatively, you can use systemd socket activation protocol.
|
||||
Be sure that the .socket file uses /run/cni/dhcp.sock as the socket path.
|
||||
|
||||
Reference in New Issue
Block a user