Convert hiera_hash code to hiera_array?

43 views
Skip to first unread message

potlipin

unread,
Jun 28, 2016, 12:34:56 PM6/28/16
to Puppet Users
Hi all,

I'm trying to install a cron module in our Puppet 2.6 infrastructure, to be used with Hiera.

Thing is pushing the new code to the nodes is failing cause of them not being able to process the hiera_hash function, which is missing.

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Unknown function hiera_hash at XXXXXX/dev/modules/cron/manifests/init.pp:42 on node XXXX

Can hiera_hash code be easily rewritten into hiera_array?

Thanks.

Henrik Lindberg

unread,
Jun 28, 2016, 7:18:33 PM6/28/16
to puppet...@googlegroups.com
On 28/06/16 18:34, potlipin wrote:
> Hi all,
>
> I'm trying to install a cron module in our Puppet 2.6 infrastructure, to
> be used with Hiera.
>
Puppet 2.6 is really old. It is not even the latest of the 2.x series
which was end of life quite some time ago (October 1, 2013). Now, soon
3.x is end of life and we have recently released puppet 4.5.
BTW - "End of life" means there will be no more security updates (nor
any other updates).

> Thing is pushing the new code to the nodes is failing cause of them not
> being able to process the hiera_hash function, which is missing.
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Unknown function hiera_hash at
> XXXXXX/dev/modules/cron/manifests/init.pp:42 on node XXXX
>
> Can hiera_hash code be easily rewritten into hiera_array?
>

The code you are trying to use is not designed for puppet 2.6 Once past
that problem however (if you should succeed), you are likely to run into
other problems.

You are far better off migrating to puppet 3.8 IMO than trying to
retrofit new features into the very old puppet 2.6 (2.7 was introduced
in 2011, and it went all the way to 2.7.26).

And no, hiera_array is quite different from hiera_hash. You would
probably need a much newer hiera, and it will not be compatible with
puppet 2.6.

You probably want to update to at least 3.8 for the security fixes
alone. Consider that you are now exposed to more than 2 years worth of
known security problems.

- henrik

--

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

Carlos Parada

unread,
Jun 29, 2016, 9:25:24 AM6/29/16
to puppet...@googlegroups.com
Hi Henrik,

Yeah, updating to a newer version sounds like the sensible thing to do, lots of politics involved on this though :/

Will try to test updating to Puppet 4.5

Thanks for your help, much appreciated.



--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/CDBf_DGpOkU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a869b439-6c85-aa28-706d-8b361f9c9bd2%40puppet.com.

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

R.I.Pienaar

unread,
Jun 29, 2016, 9:44:19 AM6/29/16
to puppet-users


----- Original Message -----
> From: "Carlos Parada" <cpar...@gmail.com>
> To: "puppet-users" <puppet...@googlegroups.com>
> Sent: Wednesday, 29 June, 2016 15:25:14
> Subject: Re: [Puppet Users] Convert hiera_hash code to hiera_array?

> Hi Henrik,
>
> Yeah, updating to a newer version sounds like the sensible thing to do,
> lots of politics involved on this though :/
>
> Will try to test updating to Puppet 4.5

word of caution, LOTS have changed from 2.x to 4.5. And lots of those will
be warned about in 3.latest.

Definitely recommend you use 3.latest to work out your issues and then going
to 4 which should be much easier. As 4 will not warn you about things it will
raise errors.

Carlos Parada

unread,
Jun 29, 2016, 10:21:53 AM6/29/16
to puppet...@googlegroups.com
Hi Pienaar,

Yup, I'll use that approach. Will begin testing with 3.latest shortly.

Many thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/CDBf_DGpOkU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages