Matthew Kennedy
2014-Apr-22 21:28 UTC
[Puppet Users] Issue setting class parameter based on another class parameter (same class)
I have a class parameterized class that looks similar to... class blahapp::app ( $sor_host_ip = hiera('blahapp::app::sor_host_ip'), $rep_host_ip = hiera('blahapp::app::rep_host_ip', $sor_host_ip) ) { if !($rep_host_ip) { fail("Unable to set rep_host_ip. sor_host_ip is set to ${sor_host_ip}. Contact SystemOperations.") } } The intention is to have $rep_host_ip set to whatever $sor_host_ip is unless we need to set it to something else. Most of the time this works and everything is happy... randomly, and I haven't been able to reliably replicated the issue, $rep_host_ip ends up being blank, $sor_host_ip is always set correctly. The only 'fix' is to kill everything using ruby, restart apache (passenger) AND hope that no puppet runs happen before the puppet master completes its puppet run. This can often mean several apache restarts until it starts working again. The fail() ensures that if we run into this issue we know and can do the restart dance...but this is highly annoying as it breaks randomly. Has anyone seen something like this/have suggestions to help TS? Puppet Open: 2.7.25 Hiera and PuppetDB1.6.3 Running under passenger -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/42fd94ad-d318-456e-95ba-197587034bf6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.