Product SiteDocumentation Site

10.3.6. Bundle Primitive

A bundle may optionally contain one primitive resource. The primitive may have operations, instance attributes, and meta-attributes defined, as usual.
If a bundle contains a primitive resource, the container image must include the Pacemaker Remote daemon, and at least one of ip-range-start or control-port must be configured in the bundle. Pacemaker will create an implicit ocf:pacemaker:remote resource for the connection, launch Pacemaker Remote within the container, and monitor and manage the primitive resource via Pacemaker Remote.
If the bundle has more than one container instance (replica), the primitive resource will function as an implicit clone — a promotable clone if the bundle has masters greater than zero.

Note

If you want to pass environment variables to a bundle’s Pacemaker Remote connection or primitive, you have two options:
  • Environment variables whose value is the same regardless of the underlying host may be set using the container element’s options attribute.
  • If you want variables to have host-specific values, you can use the storage-mapping element to map a file on the host as /etc/pacemaker/pcmk-init.env in the container. Pacemaker Remote will parse this file as a shell-like format, with variables set as NAME=VALUE, ignoring blank lines and comments starting with "#".

Important

When a bundle has a primitive, Pacemaker on all cluster nodes must be able to contact Pacemaker Remote inside the bundle’s containers.
  • The containers must have an accessible network (for example, network should not be set to "none" with a primitive).
  • The default, using a distinct network space inside the container, works in combination with ip-range-start. Any firewall must allow access from all cluster nodes to the control-port on the container IPs.
  • If the container shares the host’s network space (for example, by setting network to "host"), a unique control-port should be specified for each bundle. Any firewall must allow access from all cluster nodes to the control-port on all cluster and remote node IPs.