validate_bool() throwing in error syaing the value not a boolean

112 views
Skip to first unread message

Sans

unread,
Mar 3, 2016, 10:23:39 AM3/3/16
to Puppet Users

Hi guys,

Suddenly started getting this error, which I cannot understand why I'm getting this:


Error: Evaluation Error: Error while evaluating a Function Call, "" is not a boolean.  It looks to be a String at /usr/local/K101/puppet/modules/apps/manifests/app.pp:32:5 on node......

the line 32 is: validate_bool($wp_multisite), which is coming from hiera and set to true
Running PM in foreground or running the agent with --trace doesn't provide any additional information. I'm running out of ideas. Can anyone please help? Thanks in advance!!

-S

Trevor Vaughan

unread,
Mar 3, 2016, 1:28:51 PM3/3/16
to puppet...@googlegroups.com
Hi Sam,

Are you 100% sure that $wp_multisite is getting the value from Hiera?

In this case, it looks like the value is empty.

Thanks,

Trevor

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b6cc0809-a742-4f29-828b-27da5eda904e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699

-- This account not approved for unencrypted proprietary information --

Sans

unread,
Mar 3, 2016, 2:02:59 PM3/3/16
to Puppet Users

Looks like to me it's not getting value from the Hiera at all. How can I make sure of that?

-S

Trevor Vaughan

unread,
Mar 3, 2016, 4:47:00 PM3/3/16
to puppet...@googlegroups.com
You can try using the hiera command line tool on your hiera.yaml file.

hiera -c '/path/to/hiera.yaml' your::variable.

You may also need to check your server logs to see if there is an error.

If you're using the Java Pupperserver, you may want to restart it due to the change in environment caching.

Finally, you can add a notify to the code in question and see what comes out the other side.

Trevor

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Henrik Lindberg

unread,
Mar 3, 2016, 6:10:33 PM3/3/16
to puppet...@googlegroups.com
On 03/03/16 17:46, Trevor Vaughan wrote:
> You can try using the hiera command line tool on your hiera.yaml file.
>
> hiera -c '/path/to/hiera.yaml' your::variable.
>

If you are on a newer puppet version where the lookup command is
available you can use 'puppet lookup --explain your::variable'
as it will tell you how it searched for the value.

- henrik


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Sans

unread,
Mar 4, 2016, 3:41:46 PM3/4/16
to Puppet Users

I'm on v3.8.4
Can it be run from agent? If it does, then it gonna solve my another issue as well.

-San

Henrik Lindberg

unread,
Mar 4, 2016, 4:52:05 PM3/4/16
to puppet...@googlegroups.com
On 04/03/16 16:41, Sans wrote:
>
> I'm on v3.8.4
> Can it be run from agent? If it does, then it gonna solve my another
> issue as well.
>

Recent would be >= 4.2 wrt. lookup functionality.
Sorry.
- henrik


> -San
>
>
> On Thursday, March 3, 2016 at 6:10:33 PM UTC, Henrik Lindberg wrote:
>
>
> If you are on a newer puppet version where the lookup command is
> available you can use 'puppet lookup --explain your::variable'
> as it will tell you how it searched for the value.
>
> - henrik
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
> <http://puppet-on-the-edge.blogspot.se/>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/8f38c396-c514-40f0-ac8c-b36d4406d4a2%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/8f38c396-c514-40f0-ac8c-b36d4406d4a2%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


Sans

unread,
Mar 5, 2016, 8:42:56 AM3/5/16
to Puppet Users
Can this look-up done from agent as well?

-S

Henrik Lindberg

unread,
Mar 5, 2016, 2:21:09 PM3/5/16
to puppet...@googlegroups.com
On 05/03/16 09:42, Sans wrote:
> Can this look-up done from agent as well?
>
> -S
>

The first release of lookup runs on the master side, but it uses the
last facts posted by the node; so result is node specific. No way
currently to run it from an agent against the master though.

If you are set up so that puppet apply works on the agent, then lookup
will also work there.

- henrik

>
> On Friday, March 4, 2016 at 4:52:05 PM UTC, Henrik Lindberg wrote:
>
>
> Recent would be >= 4.2 wrt. lookup functionality.
> Sorry.
> - henrik
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/2a78f835-cef9-4e84-8871-0f9ba6fe347b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/2a78f835-cef9-4e84-8871-0f9ba6fe347b%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages