mirror_lxc/doc/api-extensions.md
tomponline d4a7da4632 network: Adds support host side veth device static routes
Adds the following new config keys:

	lxc.net.[i].veth.ipv4.route
	lxc.net.[i].veth.ipv6.route
E.g.

	lxc.net.0.veth.ipv4.route = 192.0.2.1/32
	lxc.net.0.veth.ipv4.route = 192.0.3.0/24
	lxc.net.0.veth.ipv6.route = 2001:db8::1/128
	lxc.net.0.veth.ipv6.route = 2001:db8:2::/64

Signed-off-by: tomponline <thomas.parrott@canonical.com>
2019-04-29 08:38:33 +01:00

1.4 KiB

API extensions

The changes below were introduced to the LXC API after the 3.0 API was finalized.

They are all backward compatible and can be detected by client tools by called the lxc_has_api_extension function.

lxc_log

This introduces a way to initialize a logging instance from the API for a given container.

lxc_config_item_is_supported

This introduces the lxc_config_item_is_supported function. It allows users to check whether their LXC instance supports a given configuration key.

console_log

This adds support to container's console log. The console log is implemented as an efficient ringbuffer.

reboot2

This adds reboot2() as a new API extension. This function properly waits until a reboot succeeded. It takes a timeout argument. When set to > 0 reboot2() will block until the timeout is reached, if timeout is set to zero reboot2() will not block, if set to -1 reboot2() will block indefinitely.

mount_injection

This adds support for injecting and removing mounts into/from a running containers. Two new API functions mount() and umount() are added. They mirror the current mount and umount API of the kernel.

network_veth_routes

This introduces the lxc.net.[i].veth.ipv4.route and lxc.net.[i].veth.ipv6.route properties on veth type network interfaces. This allows adding static routes on host to the container's network interface.