Project

General

Profile

Actions

Bug #1981

closed

Parameterized Classes: cannot set parameters from Host page

Added by David Schmitt over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

http://theforeman.org/projects/foreman/wiki/Parameterized_class_support claims that there is UI for setting parameters for classes from the host edit page:

Editing Param from within a Host

It's also possible to update a host-specific override from the host itself. So you don't have to grant access to the Puppet Classes page to everyone. From a Host, click Edit, got to the Parameters tab, and you'll see the variable, the class-scope, and the current value. You can then override the value for that host:

In my foreman (foreman-1.0.1-7.el6.noarch), I see entries for smart vars attached to classes (e.g. icinga::monitored -> my_icinga_sensor) but not for parameters of parameterized classes (e.g. I've added the "foreman" class from https://github.com/theforeman/puppet-foreman to this host, but nothing changes here).


Files

classparasm.png View classparasm.png 50.4 KB David Schmitt, 11/27/2012 07:54 AM
Actions #1

Updated by Ohad Levy over 11 years ago

Did you select override for those params you are interested in overriding ?

Actions #2

Updated by David Schmitt over 11 years ago

Ah! Iff I override the parameter on the class (add a fqdn=X matcher at https://.../puppetclasses/foreman/edit) then I can edit the value on the host page (https://.../hosts/X/edit). From the documentation on the wiki ("It's also possible to update a host-specific override from the host itself.") I was under the impression that I can add a fqdn=X matcher without going to the Class page.

Actions #3

Updated by Ohad Levy over 11 years ago

  • Status changed from New to Feedback

you dont need to add it upfront, all you need is:

  1. override enabled
  2. fqdn in the order
Actions #4

Updated by David Schmitt over 11 years ago

I've now tested this with a different parameter: fqdn is in the order and I've checked the override checkbox on the Smart Class Parameter screen, but it does not appear on the host's Parameter page.

Actions #5

Updated by Ohad Levy over 11 years ago

are you in the same environment?

Actions #6

Updated by Greg Sutcliffe over 11 years ago

Param class support isn't in 1.0.1, it's coming in 1.1. I'm not sure if smart vars should or should not be overridable, I'll have to check.

Actions #7

Updated by Ohad Levy over 11 years ago

@Greg Sutcliffe, I think the nightly rpm is 1.0.1xxx

Actions #8

Updated by David Schmitt over 11 years ago

Indeed, in the environment of this host the class had no parameters at all. I've deleted and re-imported the class and now it has parameters in all environments. Setting parameters to override now causes the parameter to be listed in the expected place on the host page and overriding in on the host level properly creates a Matcher on the Smart Class Parameter.

Thank you for your help.

Actions #9

Updated by Ohad Levy over 11 years ago

  • Status changed from Feedback to Resolved
Actions #10

Updated by Ohad Levy over 11 years ago

@David Davis, if you can't find a bug, I'm happy ;)

Actions #11

Updated by Greg Sutcliffe over 11 years ago

Ohad Levy wrote:

@Greg Sutcliffe, I think the nightly rpm is 1.0.1xxx

Bleah, confusing. Will take it up with Sam

Actions

Also available in: Atom PDF