Puppet Agent reports "Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows"

asked 2018-10-09 07:51:28 -0500

George Gabra gravatar image

updated 2018-10-11 10:17:05 -0500

DarylW gravatar image

Hi All,

I'm working on re-configuring Puppet on already configured environment but Puppet agents on windows machines are failing with error "Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows"

Running Puppet agent on demand ...

info: Retrieving plugin
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/active_install_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/artifact_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/concat_basedir.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/config_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facter_dot_d.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/fogbugz_generation_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/keepalived_version.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/osreleasemaj.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pe_version.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/puppet_vardir.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pygpgme.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/root_home.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/service_facts.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows at /etc/puppet/modules/python/manifests/init.pp:44 on node <NodeName>.<Domain>
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
Press any key to continue . . .

On Puppet Master there is "Module compatibility check" on "/etc/puppet/modules/python/manifests/init.pp" file which check OS family

grep -v "^#" /etc/puppet/modules/python/manifests/init.pp
class python (
  $version    = 'system',
  $pip        = true,
  $dev        = true,
  $virtualenv = true
) {

  # Module compatibility check
  $compatible = [ 'Debian', 'Ubuntu', 'CentOS', 'RedHat' ]
  if ! ($::operatingsystem in $compatible) {
    fail("Module is not compatible with ${::operatingsystem}")
  }

  Class['python::install'] -> Class['python::config']

  include python::install
  include python::config

}

Is there a way to make nodes running Windows OS skip checking that module?

Thanks, George Gabra

edit retag flag offensive close merge delete

Comments

I believe if you don't call the python module when on windows hosts, it won't fail there - How is this module added to your manifests? Are you using the Roles and Profiles pattern? If so, just wrap the instantiation of the 'python' modules if an if condition that makes sure it's not windows.

DarylW gravatar imageDarylW ( 2018-10-11 10:18:52 -0500 )edit

You probably have more things that would be 'linux only' and not work on windows - you'll probably need a seperate role/profile for the windows specific sets of modules you wish to use.

DarylW gravatar imageDarylW ( 2018-10-11 10:24:59 -0500 )edit