Unable to fetch my node definition, but the agent run will continue

Hey guys,

I wonder if any one else is observing this issue, or if it's just me. I've
got Foreman setup with the installer, which works through passenger, etc
etc. Every time I setup a new agent and run puppet for the very first time
I receive a Warning, seen below:

[root@puppet-agent opt]# puppet agent --test
Info: Caching certificate_revocation_list for ca
Warning: Unable to fetch my node definition, but the agent run will
continue:
Warning: Error 400 on SERVER: Failed to find puppet-agent via exec:
Execution of '/etc/puppet/node.rb puppet-agent.local' returned 1:

Info: Retrieving plugin
Info: Caching catalog for puppet-agent.local
Info: Applying configuration version '1362762376'
Notice: Finished catalog run in 0.33 seconds

Puppet runs perfectly fine though - and afterwards it will continue to run
without displaying this warning. This seems to be something new as of
Foreman 1.1 and/or Puppet 3.1.0.

Obviously not breaking anything - just a minor annoyance (and it scares
people setting up puppet for that first time)

Anyone else observe this, or is it just me?

Thanks,

Jason

I've noticed this as well, I think it's new behaviour in Puppet 3
causing it. The error is harmless.

The change is to support the ENC being authoritative on the environment,
whereas in Puppet 2, the agent's local environment setting would take
precedence.

Typically the order of execution is:

  1. Agent sends facts, requests catalog
  2. Master runs node.rb
  3. node.rb uploads facts, fetches ENC data
  4. Master compiles catalog for agent

The Puppet 3 agent adds a new step "0" in, which first requests
information about the node from the master to determine the environment.
This calls the ENC, which fails as the facts file isn't there yet
(facts can only be uploaded after pluginsync, which requires the
environment).

I was thinking just to leave this in place, as fixing it would be tricky
or would remove some of our error handling. What might be optimal is if
we can query Foreman for its default Puppet environment setting when the
host doesn't exist (and facts haven't been uploaded).

··· On 08/03/13 18:21, Jason Knudsen wrote: > Hey guys, > > I wonder if any one else is observing this issue, or if it's just me. > I've got Foreman setup with the installer, which works through > passenger, etc etc. Every time I setup a new agent and run puppet for > the very first time I receive a Warning, seen below: > > [root@puppet-agent opt]# puppet agent --test > Info: Caching certificate_revocation_list for ca > Warning: Unable to fetch my node definition, but the agent run will > continue: > Warning: Error 400 on SERVER: Failed to find puppet-agent via exec: > Execution of '/etc/puppet/node.rb puppet-agent.local' returned 1: > > Info: Retrieving plugin > Info: Caching catalog for puppet-agent.local > Info: Applying configuration version '1362762376' > Notice: Finished catalog run in 0.33 seconds > > Puppet runs perfectly fine though - and afterwards it will continue to > run without displaying this warning. This seems to be something new as > of Foreman 1.1 and/or Puppet 3.1.0. > > Obviously not breaking anything - just a minor annoyance (and it scares > people setting up puppet for that first time) > > Anyone else observe this, or is it just me?


Dominic Cleal
Red Hat Engineering

Sorry to resurrect an old thread, but I was seeing this error myself
(and wasn't causing any issues as you said).

On a totally unrelated side issue, I was using a mixin from a provider
which required me to set the RUBYOPT="rubgems" env var as part of my
finish template just before the initial puppet run.

After doing this, it solved my issue with the puppet provider not being
able to load the external mixin, but also I noticed that the
aforementioned error curiously disappeared …

Not sure if this is a red herring, or…?

Cheers,

··· On Mon, Mar 11, 2013 at 08:32:04AM +0000, Dominic Cleal wrote: > I've noticed this as well, I think it's new behaviour in Puppet 3 > causing it. The error is harmless. > > The change is to support the ENC being authoritative on the environment, > whereas in Puppet 2, the agent's local environment setting would take > precedence. > > Typically the order of execution is: > > 1. Agent sends facts, requests catalog > 2. Master runs node.rb > 3. node.rb uploads facts, fetches ENC data > 4. Master compiles catalog for agent > > The Puppet 3 agent adds a new step "0" in, which first requests > information about the node from the master to determine the environment. > This calls the ENC, which fails as the facts file isn't there yet > (facts can only be uploaded after pluginsync, which requires the > environment). > > I was thinking just to leave this in place, as fixing it would be tricky > or would remove some of our error handling. What might be optimal is if > we can query Foreman for its default Puppet environment setting when the > host doesn't exist (and facts haven't been uploaded). > > -- > Dominic Cleal > Red Hat Engineering


Richard Clark
richard@fohnet.co.uk