Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Debian installation on mco > 2.8 removes plugins path from libdir #326

@luksi1

Description

@luksi1

Mcollective 1.11.1
Puppet 3.8
OS: Ubuntu 16.04

According to the docs, the way I understand them, the plugins directory needs to be retained. The core lib needs can be taken away after 2.8. The problem with the following code is that you remove the plugins directory and only retain the core lib directory.

libdir = /usr/local/share/mcollective

when it should be

libdir = /usr/share/mcollective/plugins

  if versioncmp($::puppetversion, '4') < 0 {
    $confdir = '/etc/mcollective'
    $_core_libdir = $::osfamily ? {
      'Debian'  => '/usr/share/mcollective/plugins',
      'OpenBSD' => '/usr/local/libexec/mcollective',
      default   => '/usr/libexec/mcollective',
    }
    # Where this module will sync file-managed plugins to.
    # These paths may need revisiting by someone who understands FHS and
    # distribution standards for site-specific application-specific
    # library paths.
    $site_libdir = $::osfamily ? {
      'Debian'  => '/usr/local/share/mcollective',
      'OpenBSD' => regsubst($::rubyversion, '^(\d+)\.(\d+)\.(\d+)$', '/usr/local/lib/ruby/vendor_ruby/\1.\2/mcollective'),
      default   => '/usr/local/libexec/mcollective',
    }
  } else {
    $confdir     = '/etc/puppetlabs/mcollective'
    $_core_libdir = '/opt/puppetlabs/mcollective/plugins'
    $site_libdir = '/opt/puppetlabs/mcollective'
  }

  # Since mcollective version 2.8, there is no core libdir
  # https://docs.puppetlabs.com/mcollective/releasenotes.html#libdirloadpath-changes-and-core-plugins
  $mco_assumed_version = '2.8.5'

  $_mco_version = pick_default($::mco_version, $mco_assumed_version)
  if versioncmp($_mco_version, '2.8') >= 0 {
    $core_libdir = undef
  } else {
    $core_libdir = $_core_libdir
  }

I think the code should be something like this.

  $_mco_version = pick_default($::mco_version, $mco_assumed_version)
  if versioncmp($_mco_version, '2.8') >= 0 {
    $site_libdir = undef
  } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions