Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External nodes always returns an environment value based on the system's status #560

Closed
jude opened this issue Aug 6, 2013 · 4 comments
Closed
Assignees
Labels
Bug Report Reporting a bug documentation Improvements or additions to documentation Priority Issues that will be worked on with higher priority.

Comments

@jude
Copy link

jude commented Aug 6, 2013

I recently upgraded to 2.4.0 and ran into an issue with how cobbler is now passing down an environment value to puppet through /usr/bin/cobbler-ext-nodes

It looks like this was added with 925295f#L1R269

The problem is on the puppet side, I'm using environment=something in the [agent] section of the machine's /etc/puppet/puppet.conf file. However puppet is never reading this value because /usr/bin/cobbler-ext-nodes is always passing back the system's status as the environment.

It would be good if the status field had a 'None' option, and /usr/bin/cobbler-ext-nodes wouldn't include the environment in its output if the status was set to 'None'. This way puppet wouldn't get an environment value back from /usr/bin/cobbler-ext-nodes, and it fall back on getting the environment settings from puppet.conf.

It might also be useful to mention the new environment/system setting mapping on the http://www.cobblerd.org/manuals/2.4.0/1/2_-_Whats_New.html

Also the http://www.cobblerd.org/manuals/2.4.0/5/3_-_Configuration_Management.html section should also include the 'environment:' in the external node output example.

@jmaas jmaas self-assigned this Jul 26, 2014
@jmaas
Copy link
Member

jmaas commented Jul 26, 2014

Yes this is an annoying issue. Your suggestion seems valid. I will implement and document this as you suggested. This is another small step in better Puppet integration.

@jmaas
Copy link
Member

jmaas commented Jul 26, 2014

I think a global configuration file setting is also a nice addition.

@jmaas
Copy link
Member

jmaas commented Jul 29, 2014

Quick fix

[root@cobbler cobbler]# cobbler system edit --name=test3 --status=""
[root@cobbler cobbler]# cobbler-ext-nodes test3
classes:
  foo::bar::agent: {}
  foo::bar::server: {}
parameters:
  from_cobbler: 1
  tree: http://@@http_server@@/cblr/links/ubuntu-14.04-x86_64

[root@cobbler cobbler]# cobbler system edit --name=test3 --status=production
[root@cobbler cobbler]# cobbler-ext-nodes test3
classes:
  foo::bar::agent: {}
  foo::bar::server: {}
environment: production
parameters:
  from_cobbler: 1
  tree: http://@@http_server@@/cblr/links/ubuntu-14.04-x86_64

jmaas added a commit that referenced this issue Jul 29, 2014
Don't send the Puppet environment when system status is empty (#560).
jmaas added a commit that referenced this issue Jul 29, 2014
Don't send the Puppet environment when system status is empty (#560).
@jmaas
Copy link
Member

jmaas commented Jul 29, 2014

This is in master and release26, so it will be included in 2.6.4.

This shall not be cherry-picked into the release24 branch, please consider upgrading if you haven't done so already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Reporting a bug documentation Improvements or additions to documentation Priority Issues that will be worked on with higher priority.
Projects
None yet
Development

No branches or pull requests

2 participants