1

I'm new to Puppet Enterprise, but trying to learn how to deploy custom class files to Windows servers. I am attempting to use the opentable/windowsfeature module, but I'm getting an error when my class attempts to run on a node. It looks like it's throwing this error in the windowsfeature module -

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: "true" is not a boolean. It looks to be a String at /etc/puppetlabs/puppet/environments/production/modules/windowsfeature/manifests/init.pp:64 on node test-server-02.testdomain.local Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Has anyone seen this error before or know how to resolve it? The module code tries to initialize the variable as false, but I'm confused why when it tries to do a validate_bool($restart), the error is saying it's set to a "true" string value.

Here are a list of my installed modules:
[root@testserver01 ~]# puppet module list
/etc/puppetlabs/puppet/environments/production/modules
├── linux_base_config (???)
├── nanliu-staging (v1.0.2)
├── opentable-windowsfeature (v1.0.0)
├── puppetlabs-concat (v1.1.2)
├── puppetlabs-powershell (v1.0.4)
├── puppetlabs-registry (v1.0.3)
├── puppetlabs-stdlib (v4.4.0)
├── puppetlabs-tomcat (v1.2.0)
└── windows_base_config (???)
/etc/puppetlabs/puppet/modules (no modules installed)
/opt/puppet/share/puppet/modules
├── puppetlabs-pe_accounts (v2.0.2-6-gd2f698c)
├── puppetlabs-pe_concat (v1.1.2-4-g2b7bba2)
├── puppetlabs-pe_console_prune (v0.1.1-4-g293f45b)
├── puppetlabs-pe_inifile (v1.1.4-16-gcb39966)
├── puppetlabs-pe_java_ks (v1.2.4-35-g44fbb26)
├── puppetlabs-pe_postgresql (v3.4.4-15-g32e56ed)
├── puppetlabs-pe_razor (v0.2.1-9-g8d78ec2)
├── puppetlabs-pe_repo (v0.7.7-51-g5ba0427)
├── puppetlabs-pe_staging (v0.3.3-2-g3ed56f8)
├── puppetlabs-puppet_enterprise (v3.7.1-5-ga436912)
└── puppetlabs-reboot (v0.1.8)

2
  • How exactly are you including windowsfeature into the catalog? Where did you try to set the $restart value, in hiera or somewhere else?
    – Zoredache
    Nov 17, 2014 at 23:09
  • +1 just for the nifty tree formatting. Nov 18, 2014 at 0:10

1 Answer 1

0

While it may look the the problem is coming from the init.pp file in the windowsfeature it almost certainly isn't. Take a look at the file. Line 64 is a validation function, that is checking the $restart variable that was almost certainly passed as a parameter using or looked up via hiera. Short answer is that your issue is somewhere else, most likely where you are sett the '$restart' value to 'true'.

52   define windowsfeature (
53        $ensure = 'present',
54        $feature_name = $title,
55        $installmanagementtools = false,
56        $installsubfeatures = false,
57        $restart = false,
58        $source = false
59    ) {
60
61      validate_re($ensure, '^(present|absent)$', 'valid values for ensure are \'present\' or \'absent\'')
62      validate_bool($installmanagementtools)
63      validate_bool($installsubfeatures)
64      validate_bool($restart)

the error is saying it's set to a "true" string value.

A variable with the value of true is different from a variable with the value of "true". One is a string and the other is a boolean.

6
  • That's what I thought, too. I looked at all of the classes for that variable thinking I inadvertently set it, and it's only referenced in that module.
    – Jeff
    Nov 17, 2014 at 23:11
  • What is calling the windowsfeature? Are you including it yourself, or is some other class including it? You need to find what is calling it. The problem is almost certainly there.
    – Zoredache
    Nov 17, 2014 at 23:12
  • My class - this is it: windowsfeature { 'RDS-RD-Server': ensure => present, restart => 'true', }
    – Jeff
    Nov 17, 2014 at 23:12
  • It's the quotes isn't it?
    – Jeff
    Nov 17, 2014 at 23:13
  • Yes, it is the quotes. Try { 'RDS-RD-Server': ensure => present, restart => true, }.
    – Zoredache
    Nov 17, 2014 at 23:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .