voxpupuli/puppet-corosync

Provider crm for cs_location type does not set feature resource_discovery

Closed this issue · 5 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.1
  • Ruby: ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
  • Distribution: Ubuntu 16.04
  • Module version: 6.0.1

How to reproduce (e.g Puppet code you use)

  cs_location { 'webserver_location':
    primitive => 'webserver',
    node_name => 'node_c,
    score => '-INFINITY',
    resource_discovery => 'never',
  }

What are you seeing

# in "crm configure show"
location webserver_location webserver -inf: node_c

What behaviour did you expect instead

# in "crm configure show"
location webserver_location webserver resource-discovery=never -inf: node_c

Output log

n/a

Any additional information you'd like to impart

As described in the title, the "crm" provider for type "cs_location" does not set that feature. According to docs it would have to do so by saying "has_feature :discovery", but it doesn't. In contrary the "pcs" provider does set that. But i would avoid just setting that line, because that feature first came in a specific version - according to clusterlabs in version 1.1.13, so a version check of pacemaker should be implemented and depending on the pacemaker version, the feature should be set.

Hi @timdeluxe - Can you provide some debug output from the puppet command?

@actatux

Sure, however i doubt that will help you:

       Debug: Prefetching crm resources for cs_location
       Debug: Executing: '/usr/sbin/crm configure show xml'
       Debug: Cs_location[webserver_location](provider=crm): {}
       Notice: /Stage[main]/Profile::webserver/Cs_location[webserver_location]/ensure: created
       Debug: Cs_location[webserver_location](provider=crm): Loading update: location webserver_location webserver -INFINITY: node_c
       Debug: PuppetX::Voxpupuli::Corosync::Provider::Crmsh: Executing ["crm", "configure", "load", "update", "/tmp/puppet_crm_update20180918-17167-1exr03"] in the CIB
       Debug: Executing: 'crm configure load update /tmp/puppet_crm_update20180918-17167-1exr03'

Also in my initial text i already described, where the issue is coming from and how it could be resolved. Did you read that?

I read it but was not sure to clearly understand. If you know how to resolve it, could you please submit a PR?

@actatux I would love to provide a PR, but unfortunately my ruby knowledge is not yet beyond "hello world" :(
I only know the "logical" way to resolve it, which i described above...

@actatux I tried my best to provide a pull request...