FAQ
I'm setting up a simple application management with corosync via the
puppetlabs module.

What SHOULD happen is:

1. Ip gets brought up
2. jboss gets brought up

I have defined the resources like this:

cs_primitive { 'applayer_ip':
primitive_class => 'ocf',
primitive_type => 'IPaddr2',
provided_by => 'heartbeat',
parameters => {
'ip' => "$servicelayer::jbossip",
'cidr_netmask' => "$servicelayer::jbossmask",
},
operations => { 'monitor' => { 'interval' => '10s' } },
ensure => 'present',
}

cs_primitive { 'applayer_jboss':
primitive_class => 'lsb',
primitive_type => 'jboss',
provided_by => 'heartbeat',
operations => {
'monitor' => { 'interval' => '1min', 'timeout' => '30s' },
'start' => { 'interval' => '30s', 'timeout' => '30s',
'on-fail' => 'restart' },
'stop' => { 'interval' => '30s', 'timeout' => '30s',
'on-fail' => 'restart' },
},
require => Cs_primitive['applayer_ip'],
metadata => {'target-role' => "Started"},
ensure => present,
}
cs_colocation { 'jboss_with_ip':
primitives => [ 'applayer_ip', 'applayer_jboss' ],
}

cs_order { 'jboss_ip_before_jboss':
first => 'applayer_ip',
second => 'applayer_jboss',
require => Cs_colocation['jboss_with_ip'],
}

The puppet run succeeds and appears to apply everything without any errors.

However, when I check the status of the cluster, jboss is up and running
while the IP is not:

============
Last updated: Fri Nov 30 21:46:51 2012
Last change: Fri Nov 30 21:28:41 2012 via cibadmin on test1.prod1
Stack: openais
Current DC: test1.prod1 - partition WITHOUT quorum
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558
1 Nodes configured, 2 expected votes
1 Resources configured.
============

Online: [ test1.prod1 ]

applayer_jboss (lsb:jboss): Started test1.prod1 (unmanaged) FAILED

Failed actions:
applayer_jboss_stop_0 (node=test1.prod1, call=4, rc=1,
status=complete): unknown error

Unfortunately I am not fantastically experienced with either puppet or
corosync, so it's entirely possible that I'm doing something silly - but if
I manually add the IP on the command line, corosync brings it up and
manages it normally (with the same arguments exactly). So it seems like the
module is doing something funny here.

Help?





--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Nec9BWaHmkwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Nick Cammorato at Dec 1, 2012 at 6:20 pm
    Which puppetlabs-corosync are you using? There are 19 forks of it last I
    checked(including one by me for my own needs surrounding DRBD which is now
    horribly out of date).

    I would change this:
    cs_order { 'jboss_ip_before_jboss':
    first => 'applayer_ip',
    second => 'applayer_jboss',
    require => Cs_colocation['jboss_with_ip'],
    }
    to
    cs_order { 'jboss_ip_before_jboss':
    first => 'applayer_ip',
    second => 'applayer_jboss',
    score => 'INFINITY',
    require => Cs_primitive['applayer_ip','applayer_jboss'],
    }
    and
    cs_colocation { 'jboss_with_ip':
    primitives => [ 'applayer_ip', 'applayer_jboss' ],
    require => Cs_primitive['applayer_ip','applayer_jboss'],
    }

    as autorequires were very, very dicey when I mucked with the module.
    Ignore this if they work now.

    Also - make sure you're not setting up the IP or the service anywhere else
    as corosync should be managing it.

    Outside of puppet, are you sure IPaddr2 is the right primitive_class? Can
    we get the output of a crm configure show, and if it's missing the
    primitive if it takes:
    crm configure primitive applayer_ip ocf:heartbeat:IPaddr2 params
    ip="whatever" cidr_netmask="whatever"

    because I suspect that's the problem.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/tzNfECQp_LcJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • SirDiesALot at Dec 3, 2012 at 9:23 pm
    Hi, Nick -

    Thanks for the response!

    Those changes do appear to have made the manifest apply and work correctly.
    Now I just have to figure out why corosync can't get jboss to stop once it
    has been started (I can't either, 'service jboss stop' seems to hang
    indefinitely).

    On to the next challenge...


    On Saturday, December 1, 2012 11:20:06 AM UTC-7, Nick Cammorato wrote:

    Which puppetlabs-corosync are you using? There are 19 forks of it last I
    checked(including one by me for my own needs surrounding DRBD which is now
    horribly out of date).

    I would change this:
    cs_order { 'jboss_ip_before_jboss':
    first => 'applayer_ip',
    second => 'applayer_jboss',
    require => Cs_colocation['jboss_with_ip'],
    }
    to
    cs_order { 'jboss_ip_before_jboss':
    first => 'applayer_ip',
    second => 'applayer_jboss',
    score => 'INFINITY',
    require => Cs_primitive['applayer_ip','applayer_jboss'],
    }
    and
    cs_colocation { 'jboss_with_ip':
    primitives => [ 'applayer_ip', 'applayer_jboss' ],
    require => Cs_primitive['applayer_ip','applayer_jboss'],
    }

    as autorequires were very, very dicey when I mucked with the module.
    Ignore this if they work now.

    Also - make sure you're not setting up the IP or the service anywhere else
    as corosync should be managing it.

    Outside of puppet, are you sure IPaddr2 is the right primitive_class? Can
    we get the output of a crm configure show, and if it's missing the
    primitive if it takes:
    crm configure primitive applayer_ip ocf:heartbeat:IPaddr2 params
    ip="whatever" cidr_netmask="whatever"

    because I suspect that's the problem.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/-caTbsSwxhMJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedNov 30, '12 at 9:50p
activeDec 3, '12 at 9:23p
posts3
users2
websitepuppetlabs.com

2 users in discussion

SirDiesALot: 2 posts Nick Cammorato: 1 post

People

Translate

site design / logo © 2022 Grokbase