voxpupuli / puppet-mcollective

MCollective Server and Client Puppet Module
https://forge.puppet.com/puppet/mcollective
Apache License 2.0
120 stars 178 forks source link

Puppet 4 directory layout #227

Open gotyaoi opened 9 years ago

gotyaoi commented 9 years ago

since puppet 4 relocated things beneath /etc/puppetlabs, there's a few things that this module might be able to do automatically. Off the top of my head:

libdir = /opt/puppetlabs/mcollective/plugins

# consult the "classic" libdirs too
libdir = /usr/share/mcollective/plugins
libdir = /usr/libexec/mcollective
logfile = /var/log/puppetlabs/mcollective.log

Not sure if there might be more, but those are the ones that jumped out at me.

igalic commented 9 years ago

@gotyaoi would you mind providing a patch for this?

gotyaoi commented 9 years ago

Ah, yes, I could probably get a PR together. It should probably switch behavior on the puppet version, or do you think there's a better criteria?

nibalizer commented 9 years ago

Well so. http://pkgs.fedoraproject.org/cgit/puppet.git/tree/0001-Fix-puppet-paths.patch

So at least on fedora/epel native packages we'll have puppet4 using /etc/puppet.

gotyaoi commented 9 years ago

Hmm. That is... quite awkward. But perhaps it's a thing to say that this module's defaults should follow upstream to a certain extent?

nibalizer commented 9 years ago

Two sets of packagers sit between the software and the consumer... this is the kind of problem puppet is meant to solve, not to create.

rendhalver commented 9 years ago

This is how I did it in my puppet management module. https://github.com/abstractitptyltd/abstractit-puppet/blob/production/manifests/defaults.pp I basically set confdir and codedir and use those throughout my code. I was going to use the settings:: variables but setting::codedir only exists in puppet 4.

As a sideline I had to cheat and set those in my spec tests as well. https://github.com/abstractitptyltd/abstractit-puppet/blob/production/spec/classes/puppet_master_server_spec.rb

gotyaoi commented 9 years ago

@nibalizer Puppetlabs packages the software one way, epel another. Debian could be different again, as could ubuntu, as could gentoo. The fact that these packaging differences are occurring with puppet itself is certainly ironic. Still, we need some defaults, and defaulting to how puppetlabs packages things is the most agreeable path in my mind.

Herr-Herner commented 8 years ago

Can someone confirm that we have a problem with plugin installation in this module and the new Puppet 4 directory structure? The plugins get copied into /opt/puppetlabs/mcollective/mcollective, but in Puppet 4 I think it must be /opt/puppetlabs/mcollective/plugins, right?

jyaworski commented 8 years ago

Hello:

Is this still needed?

pythianali commented 7 years ago

I had an issue with Puppet 4.10 and CentOS7 while trying to get the puppetrun button to work in foreman. The mco puppet command that is executed for the puppetrun failed when running manually. I hadn't played with mcollective in a while and realized that the puppet and other plugins are not installed by default like I was used to. Installing those using the module placed them in /usr/libexec/mcollective/mcollective (libdir = /opt/puppetlabs/mcollective ). However, mco did not show them listed afterwards.

I ended up symlinking that dir to the /opt/puppetlabs/mcollective/mcollective one and restarted the mcollective service. The mco command now shows those plugins installed now and I can execute 'mco puppet'. I am not sure what the correct default location and correct behavior should be and am only reporting my experience.

UPDATE: The symlinks get overwritten when puppet runs. Ended up using the core_libdir parameter and now my servercfg looks like this (and works):

libdir = /opt/puppetlabs/mcollective:/usr/libexec/mcollective

igalic commented 7 years ago

do we have a patch yet?