Warning Unable to Fetch My Node Definition but the Agent Run Will Continue

Reid Vandewiele (JIRA)

unread,

Jan 4, 2020, 5:12:03 AM 1/4/20

to puppe...@googlegroups.com

Reid Vandewiele created an issue
Puppet / Bug PUP-10216
Failure to fetch node definition may result in bad pluginsync and cascading failure
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/01/03 2:11 PM
Priority: Normal Normal
Reporter: Reid Vandewiele

Puppet Version: all

Early on in the agent run process, Puppet calls an indirector to choose an environment to pluginsync against. If anything goes wrong with that call, pretty much anything at all, Puppet will pluginsync against the agent-configured environment (usually "production") and spit out a warning.

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

Desired Behavior:

Puppet should pluginsync against the last-used environment, or alternatively, fail fast. At customer sites where "production" is not used, pluginsyncing against what is probably an empty environment has been observed to add ten minutes+ of time to a Puppet agent run, as it first deletes all of its plugins, and then has to re-sync them fresh from the correct environment after it switches over. This can negatively affect the delivery of changes that need to be performed within a change control window.

Actual Behavior:

Puppet pluginsyncs againstproduction, or the environment value set with --environment or in puppet.conf.

Reproduction:

  • Create an environment "r1" and "production"
  • Pin a test agent to "r1"
  • Edit /etc/puppetlabs/puppetserver/conf.d/auth.conf to disallow the test agent from requesting the /puppet/v3/node path
  • Run puppet agent -t on the test agent

The agent will produce the expected error, pluginsync against production, retrieve a catalog, switch to r1, pluginsync against r1, retrieve a catalog, and apply it.

The kind of problem this can cause may be made clearly evident if you supply a fact in environment r1 that is needed to compile an r1 catalog. See below.

                                            [root                                            @pe                                            -xl-compiler-                                            2                                                                                          ~]# puppet agent -t                                          
                                            Warning: Unable to fetch my node definition, but the agent run will                                                                                        continue                                            :                                          
                                            Warning: Error                                                                                        403                                                                                          on SERVER: Forbidden request: /puppet/v3/node/pe-xl-compiler-                                            2                                            .dev36.puppet.vm (method :get). Please see the server logs                                                                                        for                                                                                          details.                                          
                                            Info: Retrieving pluginfacts                                          
                                            Notice: /File[/opt/puppetlabs/puppet/cache/facts.d/r1.txt]/ensure: removed                                          
                                            Info: Retrieving plugin                                          
                                            Info: Retrieving locales                                          
                                            Info: Loading facts                                          
                                            Error: Could not retrieve catalog from remote server: Error                                                                                        500                                                                                          on SERVER: Server Error: Evaluation Error: Error                                                                                        while                                                                                          evaluating a Function Call, Fact r1_fact does not exist! (file: /etc/puppetlabs/code/environments/r1/manifests/site.pp, line:                                                                                        29                                            , column:                                                                                        5                                            ) on node pe-xl-compiler-                                            2                                            .dev36.puppet.vm                                          
                                            Warning: Not using cache on failed catalog                                          
                                            Error: Could not retrieve catalog; skipping run                                                                                      

Specifying r1 with the environment flag mitigates the issue, and demonstrates what a better behavior might look like when this problem occurs.

                                            [root                                            @pe                                            -xl-compiler-                                            2                                                                                          ~]# puppet agent -t --environment=r1                                          
                                            Warning: Unable to fetch my node definition, but the agent run will                                                                                        continue                                            :                                          
                                            Warning: Error                                                                                        403                                                                                          on SERVER: Forbidden request: /puppet/v3/node/pe-xl-compiler-                                            2                                            .dev36.puppet.vm (method :get). Please see the server logs                                                                                        for                                                                                          details.                                          
                                            Info: Retrieving pluginfacts                                          
                                            Notice: /File[/opt/puppetlabs/puppet/cache/facts.d/r1.txt]/ensure: defined content as                                                                                        '{md5}13b8114b76258d0104dd0568b031361d'                                          
                                            Info: Retrieving plugin                                          
                                            Info: Retrieving locales                                          
                                            Info: Loading facts                                          
                                            Info: Caching catalog                                                                                        for                                                                                          pe-xl-compiler-                                            2                                            .dev36.puppet.vm                                          
                                            Info: Applying configuration version                                                                                        'pe-xl-core-0-r1-bb4c21dbce5'                                          
                                            Notice: Applied catalog in                                                                                        14.23                                                                                          seconds                                                                                      
Add Comment Add Comment
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)

Atlassian logo

Reid Vandewiele (JIRA)

unread,

Jan 4, 2020, 5:13:03 AM 1/4/20

to puppe...@googlegroups.com

Change By: Reid Vandewiele
Method Found: Needs Assessment Customer Feedback

Austin Boyd (JIRA)

unread,

Jan 4, 2020, 5:49:04 AM 1/4/20

to puppe...@googlegroups.com

Change By: Austin Boyd
Zendesk Ticket IDs: 37556
Zendesk Ticket Count: 1

Austin Boyd (JIRA)

unread,

Jan 4, 2020, 5:49:05 AM 1/4/20

to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,

Jan 7, 2020, 1:09:03 AM 1/7/20

to puppe...@googlegroups.com

Using last-run info seems like the preferred route for this

Jorie Tappa (JIRA)

unread,

Jan 7, 2020, 1:09:04 AM 1/7/20

to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,

Jan 10, 2020, 12:06:03 AM 1/10/20

to puppe...@googlegroups.com

It would be possible to read the environment from the Puppet[:lastrunreport] , but it would probably be better performance-wise to add the environment to the Puppet[:lastrunfile summary, and read that in instead.

Josh Cooper (Jira)

unread,

Jun 6, 2020, 6:39:03 AM 6/6/20

to puppe...@googlegroups.com

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)

Atlassian logo

Ciprian Badescu (Jira)

unread,

Jun 16, 2021, 4:18:01 PM 6/16/21

to puppe...@googlegroups.com

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)

Atlassian logo

Gabriel Nagy (Jira)

unread,

Jun 23, 2021, 7:47:01 PM 6/23/21

to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,

Jun 30, 2021, 4:07:02 PM 6/30/21

to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,

Jul 2, 2021, 11:32:13 PM 7/2/21

to puppe...@googlegroups.com

Change By: Josh Cooper
Fix Version/s: PUP 7.9.0
Fix Version/s: PUP 6.24.0

Josh Cooper (Jira)

unread,

Jul 3, 2021, 5:14:03 AM 7/3/21

to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,

Jul 6, 2021, 5:27:03 PM 7/6/21

to puppe...@googlegroups.com

Fix Version/s: PUP 7.9.0
Fix Version/s: PUP 6.24.0

Gabriel Nagy (Jira)

unread,

Jul 6, 2021, 5:29:03 PM 7/6/21

to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,

Jul 8, 2021, 6:27:03 AM 7/8/21

to puppe...@googlegroups.com

Change By: Josh Cooper
Fix Version/s: PUP 7.10
Fix Version/s: PUP 7.10.0

Josh Cooper (Jira)

unread,

Jul 8, 2021, 6:27:03 AM 7/8/21

to puppe...@googlegroups.com

Change By: Josh Cooper
Fix Version/s: PUP 6.25.0
Fix Version/s: PUP 7.10

Ciprian Badescu (Jira)

unread,

Jul 14, 2021, 3:49:04 PM 7/14/21

to puppe...@googlegroups.com

Change By: Ciprian Badescu
Sprint: NW-2021-06-30, NW-2021-07-14 , NW-2021-07-28

Gabriel Nagy (Jira)

unread,

Jul 27, 2021, 9:38:03 PM 7/27/21

to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,

Jul 28, 2021, 4:23:02 PM 7/28/21

to puppe...@googlegroups.com

Change By: Ciprian Badescu
Sprint: NW-2021-06-30, NW-2021-07-14, NW-2021-07-28 , NW-2021-08-11

Josh Cooper (Jira)

unread,

Jul 31, 2021, 1:21:04 AM 7/31/21

to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,

Aug 4, 2021, 11:59:03 AM 8/4/21

to puppe...@googlegroups.com

Change By: Gabriel Nagy
Release Notes: Enhancement
Release Notes Summary: Previously, Puppet agents would make a node definition request to the server in order to find out the correct environment to run in. This request has now been removed, and the agent now saves its last used environment in the `last_run_summary.yaml` file. If the environment is not specifically set via CLI or config, agents will attempt to use the environment in `last_run_summary.yaml`.

Claire Cadman (Jira)

unread,

Aug 11, 2021, 8:13:02 PM 8/11/21

to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,

Jan 18, 2022, 8:43:02 AM Jan 18

to puppe...@googlegroups.com

Change By: Austin Boyd
Zendesk Ticket Count: 1 2
Zendesk Ticket IDs: 37556 ,47030
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)

Atlassian logo

olearyansinver.blogspot.com

Source: https://groups.google.com/g/puppet-bugs/c/KefXUS2XvO4

0 Response to "Warning Unable to Fetch My Node Definition but the Agent Run Will Continue"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel