Error 400 on SERVER: Scope variable name is a Symbol

Get this error when running a manifest with an undefined has value:


Error 400 on SERVER: Scope variable name is a Symbol

Update to the latest version of puppet (3.2.3 at the time of the writing) and a more helpful error is sent:


Error: Could not retrieve catalog from remote server: Error 400 on SERVER: $hash[$env] is :undef, not a hash or array at /etc/puppet/environments/production/modules/hybris/manifests/config.pp:28 on node foo.local

Solution
I had initialized my hash as empty in the parameterized class:


class hybris::config( $hybris_home="/opt/hybris", $hash = {} ) {

Later in the code, I check for a value in the hash, but since I did not define the hash in hiera, it comes back as undefined and throw the 400 error. The workaround was to check if the hash is defined before checking the hash values:


# Only push out local.properties if manage = "yes"
if $hash[$env] != undef {
$managed = $hash[$env][$context]['managed']
notify{"Local properties managed: $managed": }
}




Error 400 on SERVER: undefined method `empty?' for nil:NilClass

After updating a hiera yaml file, I got this error:


Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?' for nil:NilClass at /etc/puppet/environments/production/manifests/site.pp:1 on node dc1-prd-git01.medic
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Solution:
There is a broken hash somewhere in the yaml file. In other words, I’ve got a syntax error.  A more specific error message would have been helpful.

For example
143 allow 80 on eth0 for aws-sta-back-app11:
port: 80
proto: tcp
iniface: eth0
source: 54.194.203.135
destination: 0.0.0.0/0
action: accept

I was missing the first colon (in red)




Network Manager doesn't work after update

After a recent dist-upgrade on my laptop, Linux mint debian edition, I could no longer connect to any of my VPN connections. After searching on the internet for a while and trying various remedies, the one that worked was running the following from a terminal:


nm-applet

It turns out that nm-applet is no longer loaded by default and is needed by network-manager-gnome. I imagine I could stick that in my .bashrc to get it to load on login.