Product SiteDocumentation Site

10.4.3. Bundle Network Properties

A bundle may optionally contain one <network> element.

Table 10.14. Properties of a Bundle’s Network Element

Field Default Description
ip-range-start
If specified, Pacemaker will create an implicit ocf:heartbeat:IPaddr2 resource for each container instance, starting with this IP address, using up to replicas sequential addresses. These addresses can be used from the host’s network to reach the service inside the container, though it is not visible within the container itself. Only IPv4 addresses are currently supported.
host-netmask
32
If ip-range-start is specified, the IP addresses are created with this CIDR netmask (as a number of bits).
host-interface
If ip-range-start is specified, the IP addresses are created on this host interface (by default, it will be determined from the IP address).
control-port
If the bundle contains a primitive, the cluster will use this integer TCP port for communication with Pacemaker Remote inside the container. This takes precedence over the value of any PCMK_remote_port environment variable set in the container image. This can allow a primitive to be specified without using ip-range-start (in which case replicas-per-host must be 1), or allow a bundle to run on a Pacemaker Remote node that is already listening on the default port.

Note

If ip-range-start is used, Pacemaker will automatically ensure that /etc/hosts inside the containers has entries for each replica and its assigned IP. Replicas are named by the bundle id plus a dash and an integer counter starting with zero. For example, if a bundle named httpd-bundle has replicas=2, its containers will be named httpd-bundle-0 and httpd-bundle-1.
Additionally, a <network> element may optionally contain one or more <port-mapping> elements.

Table 10.15. Properties of a Bundle’s Port-Mapping Element

Field Default Description
id
A unique name for the port mapping (required)
port
If this is specified, connections to this TCP port number on the host network (on the container’s assigned IP address, if ip-range-start is specified) will be forwarded to the container network. Exactly one of port or range must be specified in a port-mapping.
internal-port
value of port
If port and this are specified, connections to port on the host’s network will be forwarded to this port on the container network.
range
If this is specified, connections to these TCP port numbers (expressed as first_port-last_port) on the host network (on the container’s assigned IP address, if ip-range-start is specified) will be forwarded to the same ports in the container network. Exactly one of port or range must be specified in a port-mapping.

Note

If the bundle contains a primitive, Pacemaker will automatically map the control-port, so it is not necessary to specify that port in a port-mapping.