[Pacemaker] Using shadow configurations noninteractively

Florian Haas florian at hastexo.com
Mon Mar 19 15:22:20 EDT 2012

On Mon, Mar 19, 2012 at 8:00 PM, Phil Frost <phil at macprofessionals.com> wrote:
> I'm attempting to automate my cluster configuration with Puppet. I'm already using Puppet to manage the configuration of my Xen domains. I'd like to instruct puppet to apply the configuration (via cibadmin) to a shadow config, but I can't find any sure way to do this. The issue is that running "crm_shadow --create ..." starts a subshell, but there's no easy way I can tell puppet to run a command, then run another command in the subshell it creates.
> Normally I'd expect some command-line option, but I can't find any. It does look like it sets the environment variable "CIB_shadow". Is that all there is to it? Is it safe to rely on that behavior?

I've never tried this specific use case, so bear with me while I go
out on a limb, but the crm shell is fully scriptable. Thus you
*should* be able to generate a full-blown crm script, with "cib foo"
commands and whathaveyou, in a temporary file, and then just do "crm <
/path/to/temp/file". Does that work for you?


Need help with High Availability?

More information about the Pacemaker mailing list