Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency problem when enabling secauth and disabling service management #452

Closed
timdeluxe opened this issue Oct 19, 2018 · 1 comment · Fixed by #505
Closed

Dependency problem when enabling secauth and disabling service management #452

timdeluxe opened this issue Oct 19, 2018 · 1 comment · Fixed by #505
Labels
bug Something isn't working

Comments

@timdeluxe
Copy link
Contributor

timdeluxe commented Oct 19, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.6
  • Ruby: 2.4.4p296
  • Distribution: Ubuntu bionic
  • Module version: 6.0.1

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

class { 'corosync':
    authkey                  => '/etc/foobar_corosync_authkey',
    bind_address             => $bind_address,
    unicast_addresses        => $unicast_addresses,
    cluster_name             => $cluster_name,
    enable_secauth           => true,
    set_votequorum           => true,
    quorum_members           => $quorum_members,
    token                    => 60000,
    enable_corosync_service  => false,
    enable_pacemaker_service => false,
    manage_corosync_service  => false,
    manage_pacemaker_service => false,
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find resource 'Service[corosync]' in parameter 'notify' (file: /etc/puppetlabs/code/environments/production/modules/corosync/manifests/init.pp, line: 423) on node XXXXXXX

What behaviour did you expect instead

A clean run (no error)

Output log

see above

Any additional information you'd like to impart

The error origins in dependencies. Problem is that the service as well as secauth (where the notify comes from) are optional, so it wouldn't help to subscribe from the service instead of notifying from the file. I think the only solution is a "if" statement and having the file resources twice, one with the notify, the other without.

timdeluxe added a commit to timdeluxe/puppet-corosync that referenced this issue Oct 19, 2018
@timdeluxe
Copy link
Contributor Author

timdeluxe commented Oct 19, 2018

This section in init.pp is also problematic in that sense:

        augeas { 'enable corosync':
          lens    => 'Shellvars.lns',
          incl    => '/etc/default/corosync',
          context => '/files/etc/default/corosync',
          changes => [
            'set START "yes"',
          ],
          require => $corosync_package_require,
          before  => Service['corosync'],
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants