Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Error: Evaluation Error: Error while evaluating a Function Call, any2bool(): Unknown type of boolean given #18

Open
bobweston opened this issue Jul 20, 2016 · 1 comment

Comments

@bobweston
Copy link

bobweston commented Jul 20, 2016

Expected Behavior

To be able to provision monit

Actual Behavior

When trying to provision Monit, I'm getting the following error:

Error: Evaluation Error: Error while evaluating a Function Call, any2bool(): Unknown type of boolean given at (snip) monit/manifests/init.pp:357:18

Steps to Reproduce the Problem

  1. provision monit with puppet using mod 'example42-monit', '2.0.17', mod 'example42-puppi', '2.1.12'

Specifications

Please add this info:

  1. Output of facter -p on the failing node (at least the OS related facts)
  2. Version of Puppet and of the module: puppet 4.5.2 and version 2.0.17 of module
  3. The relevant Puppet code and eventually Hiera data

I get this error just trying to do a basic configuration in puppet. (nothing fancy.)

class { 'monit': }

@bobweston
Copy link
Author

bobweston commented Jul 21, 2016

Ok. this looks like it is a namespace clash between the puppet firewall module and this module (when configuring via hiera).

The monit module sees the firewall hash as defining the value of $firewall. (hence the error: unknown type of boolean. (It's not a boolean, it's a hash)).

We're configuring monit via hiera like this:

monit::template: "profile/monit/monitrc.erb"
monit::source_dir: false
monit_interact::options:
  daemon_interval: 120
  logfile: /var/log/monit.log
  idfile: /var/lib/monit/id
  statefile: /var/lib/monit/state
  mailserver: xxxxx
  mmonit_server: xxxxxxxx
  mmonit_port: xxxxxx
  mmonit_user: xxxxx
  mmonit_pass: xxxxxx

The hiera bits configuring the firewall look like this:

firewall:
  '501 open HTTP port':
    dport:
      - 80
    proto: tcp
    action: accept
  '501 open SSL port':
    dport:
      - 443
    proto: tcp
    action: accept

I've cloned the 2.18 tag and tested renaming $firewall to $fw in monit and that fixes the issue. I'll submit a pull request later today. The change passes the tests for changes I've made. But there are other tests unrelated that are (and were before this patch) failing. I have not fixed those.

alvagante added a commit that referenced this issue Jul 21, 2016
Fix namespace clash with Firewall module when using hiera. Addresses Issue #18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant