[Pacemaker] editing primitive via script

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Aug 29 06:48:24 EDT 2013


Hi,

On Wed, Aug 28, 2013 at 11:17:13PM +0200, Christian Parpart wrote:
> Hey,
> 
> make it one-line commands, such as
> 
> #! /bin/sh
> crm configure unmanage pgsql ...

I guess you wanted to say:

crm resource unmanage ...

> crm configure delete pgsql ...
> crm configure primitive pgsql ...
> 
> This should do it, even though, it feels like an abuse :)

This be a bit better:

echo primitive pgsql ... | crm configure load update -

There's also crm configure filter though that may be difficult to
get right.

Cheers,

Dejan

> Cheers,
> Christian Parpart.
> 
> 
> 
> On Wed, Aug 28, 2013 at 5:58 PM, Gregg Jaskiewicz <gryzman at gmail.com> wrote:
> 
> > Hi guys,
> >
> > So I have to change one of the 'primitives' configuration, in this case
> > pgsql - to add a new node or remove it.
> > I'd like to script it.
> >
> > Atm someone has to go in and manually run:
> > crm configuration edit pgsql
> > change the setting, and save it.
> >
> > How could one do this automatically in a script ?
> > crm configuration edit doesn't like to be fed things from outside using
> > stdin pipe.
> >
> > Thanks.
> >
> > --
> > GJ
> >
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> >
> >

> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org





More information about the Pacemaker mailing list