Team Please find attached a OCF agent for LXC (Linux Containers) and an example CIB for a two node cluster using LXC containers managed by OpenAIS/Corosync/Pacemaker.
It was developed on a SLES11 SP1 system, so may need to be checked to ensure that I have not made some invalid assumptions related to file structures etc for other distributions. (On my system it needed to be copied to '/usr/lib/ocf/resource.d/heartbeat' to be accessible). The main assumptions that it is based on are: 1. There is a defined "configuration file root" (e.g. a directory that holds the configuration files for the LXC containers). - The default I have used is '/etc/lxc' 2. There is a defined "root file-system directory" (e.g. a directory that holds all of the "chroot" file-systems for the LXC containers). - The default I have used is '/srv/lxc' 3. That each container has a matching (self named) folder in both the "configuration file root" and "root file-system directory" that is unique for each container - so for a "container" called "test1" it's configuration would be in '/etc/lxc/test1' and it's root (chroot) file-system would be '/srv/lxc/test1' 4. That each container has a single configuration file 'config' and a 'fstab' file stored in it's matching (self named) folder in the "configuration file root" 5. That it is using the "native" LXC tools and not "LIBVIRT" integration. 6. (Last but not least) That LXC is installed and the system supports "cgroups" Assuming these are reasonable assumptions, this OCF file will allow you to run LXC containers in a OpenAIS/Corosync/Pacemaker cluster. Please review the attached CIB to get an idea how this would all work in a running configuration. (this is an extract from an actual running cluster). I'm not even sure if this is the correct forum for submitting this file for possible including into "OpenAIS/Corosync/Pacemaker"; if it's not could some please forward it to the correct people/forum for consideration. Regards Darren darrent <at> akurit . com (dot) au <= deliberately obfuscated 'cos I hate SPAM
LXC_two_node_cluster-example.xml
Description: XML document
lxc
Description: application/shellscript
_______________________________________________ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais