Hi Georg,

I had issues when I was first using this module with the primitives.

I ended up adding some debug code to the provider to try and work out what
was going on.  I'm sure there are better ways of doing it, but I used
File.write to shove log messages into a file on the client in strategic
places.
Try adding something in the instances, create and flush methods to see what
it's doing.  instances should have any known properties from crm in the
instances array.  In the flush method, see if property_hash has any values.

I saw in one of the videos from puppetconf that you can also use pry (
http://pryrepl.org/).

require 'pry'
binding.pry

That should give you an interactive ruby shell at whatever point you drop
the above code.  Try sticking that in the instances, creates and flush
methods.  That way, you can check variable states, etc.

It might sound obvious, but make sure you have the latest version of the
corosync module.  I think it was completely rewritten fairly recently.

J

On 13 October 2014 14:32, ge...@riseup.net <ge...@riseup.net> wrote:

> Hi,
>
> On 14-10-13 05:58:06, james.eckers...@fasthosts.com wrote:
> > Since you aren't getting any errors, it would suggest to me that puppet
> > thinks those values are already set correctly and therefore require no
> > further action.
> > The module essentially parses the output from "crm configure show xml",
> so
> > I'd check what is being returned in that output for those properties.
>
> Sorry, forgot this. Actually I've checked this last week after using the
> module for the first time and getting the errors. The output doesn't
> display anything regarding those properties. It seems, that those aren't
> being set, as I wrote in my first mail, hence crm_verify -LV showing
> errors.
>
> (I've wrapped the output to make it better readable.)
>
> <?xml version="1.0" ?>
> <cib admin_epoch="0" cib-last-written="Mon Oct 13 13:44:33 2014" crm_
> feature_set="3.0.6"
> dc-uuid="gw8.prod.example.com" epoch="9" have-quorum="1" num_updates="4"
> update-client="crmd" update-origin="gw8.prod.example.com" validate-with=
> "pacemaker-1.2">
>   <configuration>
>     <crm_config>
>       <cluster_property_set id="cib-bootstrap-options">
>         <nvpair id="cib-bootstrap-options-dc-version" name="dc-version"
>         value="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff"/>
>         <nvpair id="cib-bootstrap-options-cluster-infrastructure"
>         name="cluster-infrastructure" value="openais"/>
>         <nvpair id="cib-bootstrap-options-expected-quorum-votes"
>         name="expected-quorum-votes" value="1"/>
>       </cluster_property_set>
>     </crm_config>
>     <nodes>
>       <node id="gw8.prod.example.com" type="normal"
>       uname="gw8.prod.example.com"/>
>     </nodes>
>     <resources/>
>     <constraints/>
>   </configuration>
> </cib>
>
> > You might have to start digging into the provider code to see exactly
> what
> > it's doing.  The code doing the work for properties is in the file
> > lib/puppet/provider/cs_property/crm.rb.  Time to grab a Ruby hat :)
>
> I've had a look at this as well last week.
>
> Using this
> crm('configure', 'property', '$id="cib-bootstrap-options"',
> "#{@property_hash[:name]}=#{@property_hash[:value]}")
> while substituting name and value with the relevant content, from the
> cli does work, and the properties are being set.
>
> > As somewhat of an endorsement for the module, I'm using it on a 2 node
> > cluster, running Ubuntu 14 and it works fine for properties and
> primitives,
> > etc.
>
> Might there be a difference between Ubuntu and Debian? (Actually I don't
> think so, even the doc mentions that the module was tested on Debian
> Squeeze; just being quite clueless...)
>
> Thanks,
> Georg
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/20141013133258.GU4803%40debian
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAOJYTO_a%2Bz0r1MqVaS1Lj9Y_wApqsgUCCctphHUxyYCUWpm3rA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to