Jira (PUP-6801) agent_specified_environment fact doesn't populate with the environment setting in the [agent] section

16 views
Skip to first unread message

Erik Hansen (JIRA)

unread,
Oct 6, 2016, 7:34:04 PM10/6/16
to puppe...@googlegroups.com
Erik Hansen created an issue
 
Puppet / Bug PUP-6801
agent_specified_environment fact doesn't populate with the environment setting in the [agent] section
Issue Type: Bug Bug
Affects Versions: PUP 4.4.0
Assignee: Unassigned
Created: 2016/10/06 4:33 PM
Priority: Normal Normal
Reporter: Erik Hansen

Currently, if I want to use the agent_specified_environment fact, I need to set the environment setting in puppet.conf in the [main] section.

If I happen to be hitting this bug: PUP-6048, this isn't possible.

Putting the environment setting in the [agent] section works around PUP-6048, but doesn't allow me to use agent_specified_environment, the fact ends up empty.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Michael Smith (JIRA)

unread,
Oct 12, 2016, 6:29:05 PM10/12/16
to puppe...@googlegroups.com
Michael Smith commented on Bug PUP-6801
 
Re: agent_specified_environment fact doesn't populate with the environment setting in the [agent] section

This is governed by https://github.com/puppetlabs/puppet/blob/master/lib/puppet/settings.rb#L833-L842, which should pick up the preferred run mode. Are you using puppet apply or puppet agent? For puppet apply, the run mode is user.

Erik Hansen (JIRA)

unread,
Oct 21, 2016, 9:18:05 PM10/21/16
to puppe...@googlegroups.com
Erik Hansen commented on Bug PUP-6801

Michael Smith I only noticed it using 'facter -p agent_specified_environment' and in /etc/puppetlabs/mcollective/facts.yaml. With environment set in the [main] section this works. If the environment is in the [agent] section, no dice.

puppet.conf:

server = pe-201620-master.example.com
#environment = nothing
[agent]
certname = pe-201620-agent2
environment = nothing

Run: /opt/puppetlabs/puppet/bin/refresh-mcollective-metadata

[root@pe-201620-agent2 ~]# cat /etc/puppetlabs/mcollective/facts.yaml | grep agent_spec
[root@pe-201620-agent2 ~]#

[root@pe-201620-agent2 ~]# facter -p agent_specified_environment
(no output)

Edit puppet.conf:

[main]
server = pe-201620-master.example.com
environment = nothing
[agent]
certname = pe-201620-agent2
#environment = nothing

Run: /opt/puppetlabs/puppet/bin/refresh-mcollective-metadata

[root@pe-201620-agent2 ~]# cat /etc/puppetlabs/mcollective/facts.yaml | grep agent_spec
agent_specified_environment: nothing
[root@pe-201620-agent2 ~]#

[root@pe-201620-agent2 ~]# facter -p agent_specified_environment
nothing

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 5:29:04 PM5/16/17
to puppe...@googlegroups.com

Maggie Dreyer (JIRA)

unread,
May 16, 2017, 5:30:02 PM5/16/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Mar 16, 2018, 4:31:04 PM3/16/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 5, 2020, 5:51:02 PM6/5/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP- 7563 10539
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Jun 16, 2021, 5:03:03 AM6/16/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Story Points: 2
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Gabriel Nagy (Jira)

unread,
Jun 16, 2021, 11:10:03 AM6/16/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 29, 2021, 2:35:02 PM6/29/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 29, 2021, 2:36:02 PM6/29/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Jun 30, 2021, 5:07:02 AM6/30/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jul 2, 2021, 12:29:01 PM7/2/21
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Jul 13, 2021, 8:13:02 AM7/13/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages