Ask Your Question
2

Attempt to assign to a reserved variable name: 'trusted'

asked 2015-05-12 03:32:27 -0500

Thab gravatar image

Hi,

After upgrading to puppet 4 my master can no longer perform a puppet run for itself ( neither a puppet apply )

It gives the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Attempt to assign to a reserved variable name: 'trusted' on node xxxxxxxxxx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

I tried many things but i found that since puppet 4 the option "trustednodedata" is now on by default and cannot be turned off either.

the strange thing is that in my classes i do not use that $trusted variable anywhere. I do however see that puppet added a fact for this node called trusted in the fact yaml ( however.. when i run facter i cannot find this variable)

all other nodes using this master don't have this fact and also have no problem doing their puppet runs. they also share the same modules with the master ( small starter setup so not alot of modules yet..)

anyone has a clue what i'm doing wrong?

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
3

answered 2015-05-12 08:56:05 -0500

csharpsteen gravatar image

This could be the issue described in PDB-949. Since it sounds like the problem is not affecting every agent, the issue could be that the clocks on the affected agents are out of sync with the clock on the master:

The master is relying on a time value provided by the agent to set fact expiration for the cache. If the agent's clock is out of sync with the master, this could result in a cache miss and a request from puppetdb triggering this issue.

Of course, this assumes PuppetDB is in use.

edit flag offensive delete link more

Comments

turns out it also effects all agents as well and the fact that it still had some cache for these agents. as soon as i removed the cache from the master the runs gave the same error. i don't think it's the clock becuase also the master doing a puppet run connecting to itself fails with this error

Thab gravatar imageThab ( 2015-05-12 09:14:37 -0500 )edit

Are you using PuppetDB?

csharpsteen gravatar imagecsharpsteen ( 2015-05-12 09:17:10 -0500 )edit
1

yes i am. just encountered something new... okay so what i did.. in puppet.conf i set storeconfig to false and restarted puppet server after that puppet runs were successful.. later i again set it to on and restarted puppetserver.. i did a puppet run on the agents.. and now they are running :S

Thab gravatar imageThab ( 2015-05-12 10:16:38 -0500 )edit

Just seen exactly the same behaviour, hoping that the storedconfig change/restart puppetserver/restore storedconfigs works... and it didn't.

steph gravatar imagesteph ( 2015-07-22 12:56:57 -0500 )edit

Solved like this: Add file routes.yaml in the config path (probabli /etc/puppetlabs/puppet - check with #puppet master --configprint route_file) content: master: facts: terminus: puppetdb cache: yaml at puppet.conf you put in [main]: route_file = $confdir/routes.yaml

Eliane Vidal _ macezinha gravatar imageEliane Vidal _ macezinha ( 2015-08-05 07:30:35 -0500 )edit
0

answered 2015-08-05 07:06:48 -0500

Just seen exactly the same behaviour, hoping that the storedconfig change/restart puppetserver/restore storedconfigs works... and it didn't. [2] Steph, were you able to get it working already?

edit flag offensive delete link more
0

answered 2015-09-27 17:40:15 -0500

erikanderson753 gravatar image

Adding a routes.yaml file (in my case at /etc/puppetlabs/puppet/routes.yaml) worked:

https://docs.puppetlabs.com/puppet/la...fileroutes.html

edit flag offensive delete link more
0

answered 2016-01-21 07:50:00 -0500

tomasl gravatar image

Had exactly the same issue on two new nodes. Turned out the time was off by 1 hour on the nodes. Corrected the time and viola!

edit flag offensive delete link more
0

answered 2015-10-30 09:22:59 -0500

I'm replying to this thread because it's the first google search result. I've encountered this error when first adding a node if the time is too far out of sync with the master. I'm using Puppet open source version 4.2.2.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-12 03:32:27 -0500

Seen: 2,608 times

Last updated: Jan 21 '16