<div dir="ltr">Thanks for all of the help!</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 21, 2016 at 4:16 PM, Jan Pokorný <span dir="ltr"><<a href="mailto:jpokorny@redhat.com" target="_blank">jpokorny@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 21/07/16 16:02 -0400, Stephano-Shachter, Dylan wrote:<br>
> So I should be using "pcs cluster cib > file" to get the config and then<br>
> "pcs cluster cib-push --config file" to push it?<br>
<br>
</span>If you are going to change the file using "pcs -f <file>" in the<br>
interim, definitely.<br>
<br>
It's perhaps more intuitive to use "pcs cluster cib <file>" form,<br>
but whatever you like.<br>
<span class=""><br>
> Also I shouldn't have to add --config to the pcs -f commands right?<br>
<br>
</span>True, --config only applies to those cib/cib-push commands<br>
(and should be avoided/used, respectively as explained).<br>
<div class="HOEnZb"><div class="h5"><br>
> On Thu, Jul 21, 2016 at 3:51 PM, Jan Pokorný <<a href="mailto:jpokorny@redhat.com">jpokorny@redhat.com</a>> wrote:<br>
><br>
>> On 21/07/16 13:52 -0500, Ken Gaillot wrote:<br>
>>> On 07/21/2016 01:35 PM, Stephano-Shachter, Dylan wrote:<br>
>>>> I want to put the pacemaker config for my two node cluster in puppet<br>
>>>> but, since it is just one cluster, it seems overkill to use the corosync<br>
>>>> module. If I just have puppet push cib.xml to each machine, will that<br>
>>>> work? To make changes, I would just use pcs to update things and then<br>
>>>> copy cib.xml back to puppet. I am not sure what happens when you change<br>
>>>> cib.xml while the cluster is running. Is it safe?<br>
>>><br>
>>> No, pacemaker checksums the CIB and won't accept a file that isn't<br>
>>> properly signed. Also, the cluster automatically synchronizes changes<br>
>>> made to the CIB across all nodes, so there is no need to push changes<br>
>>> more than once.<br>
>>><br>
>>> Since you're using pcs, the update process could go like this:<br>
>>><br>
>>> # Get the current configuration:<br>
>>> pcs cluster cib --config > cib-new.xml<br>
>><br>
>> As I feel guilty for contributing to this misconception with clufter<br>
>> "pcs commands" output at one point (also see<br>
>> <a href="https://bugzilla.redhat.com/1328078" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/1328078</a>; still part of the blame<br>
>> is in pcs I believe: <a href="https://bugzilla.redhat.com/1328066" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/1328066</a>),<br>
>> something has just started screaming in me:<br>
>><br>
>> DO NOT USE pcs cluster cib WITH --config LIKE SUGGESTED, BUT RATHER:<br>
>><br>
>> pcs cluster cib > cib-new.xml<br>
>><br>
>>> # Make changes:<br>
>>> pcs -f cib-new.xml <whatever-command-you-want><br>
>>> <etc.><br>
>><br>
>> ...as otherwise the modifications like this ^ would fail.<br>
>><br>
>>> # Upload the configuration changes to the cluster:<br>
>>> pcs cluster cib-push --config cib-new.xml<br>
>><br>
>> Note that with cib-push, --config is OK, moreover it's vital as you<br>
>> really don't want to propagate stale status section and what not<br>
>> when changing modifying configuration.<br>
>><br>
>> Yes, it's counterintuitive to have this asymmetry and it could be<br>
>> made to work with some added effort at the side of pcs with<br>
>> the original, disapproved, sequence as-is, but that's perhaps<br>
>> sound of the future per the referenced pcs bug.<br>
>> So take this idiom as a rule of thumb not to be questioned<br>
>> any time soon.<br>
>><br>
>>> Using "--config" is important so you only work with the configuration<br>
>>> section of the CIB, and not the dynamically determined cluster<br>
>>> properties and status.<br>
>><br>
>> (This, apparently, justifies just the cib-push use.)<br>
>><br>
>>><br>
>>> The first and last commands can be done on any one node, with the<br>
>>> cluster running. The "pcs -f" commands can be done anywhere/anytime.<br>
<br>
--<br>
Jan (Poki)<br>
</div></div><br>_______________________________________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br></div>