[Pacemaker] failed actions after resource creation
Dejan Muhamedagic
dejanmm at fastmail.fm
Thu Jun 6 15:22:36 UTC 2013
Hi,
On Thu, Jun 06, 2013 at 02:28:45PM +0200, andreas graeper wrote:
> hi,
> in examples using crmsh to create a resource with constraints is an
> interactive mode is used
>
> crm configure edit
> > primitive B
> > order B_after_A
> > colocation B_on_A
> > commit
> > end
> quit
>
> when resource B depends on another resource A that is running once on Node0
> (or as master/slave on both nodes, as master on Node0, slave on Node1)
> and i call
> `crm configure primitive B ...`
>
> will in first attempt (not necessarily) the new resource A started on Node1
> till i define the constraints
> `crm configure colocation c_B_on_A inf: B A`
> ?
Yes.
> and is this the reason for a 'failed action' on Node1
> that can get cleaned up with `crm_resource -P` for instance ?
>
> how can i achieve such a session-like creation of a resource with
> constraints
> from out of a script ? ( i have prepared for each resource a s_xxx.sh and
> k_xxx.sh (start/kill)
> to add and remove .. )
Use the here-document:
crm configure <<EOF
primitive B
order B_after_A
colocation B_on_A
EOF
Note that you don't need commit or quit.
Thanks,
Dejan
> thanks in advance
> andreas
> _______________________________________________
> 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