Project

General

Profile

Actions

Feature #35

closed

Allow hostgroup nesting for puppet classes and parameters

Added by Matt Moran over 14 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

It'll be nice to be able to create a highlevel group that can be assigned to a node that contains multiple groups. Or be able to assign multiple groups to a node. Clash of parameter values should be handled by the latest group being the authoritative.


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #1009: hostgroup should show its parent classes tooClosedOhad Levy06/24/2011Actions
Is duplicate of Foreman - Bug #148: Hosts should allow more than one host-groupClosed01/05/2010Actions
Has duplicate Foreman - Feature #543: Ability to nest hostgroups and assign multiple hostgroups to hostDuplicate12/16/2010Actions
Actions #1

Updated by Ohad Levy over 14 years ago

isn't this something best done in a manifest?

I've been trying to think if adding multiple roles to a server is a good idea, i mean, according to "my" best practice, I tend to think that a server has a main primary role (which is a collection of classes), anything else should go to so called sub functions where you can just add classes to the host.

Actions #2

Updated by Ohad Levy over 14 years ago

  • Assignee deleted (Ohad Levy)
Actions #3

Updated by Matt Moran over 14 years ago

I've sort of covered this under #35. But I see the foreman as usable for many environments and not just for production - so a server could be many roles in a test/dev environment.

Actions #4

Updated by Carl Caum over 14 years ago

I don't think you would want to have multiple groups to a node. It would be to easy to have scoping issues. I would however see use in having a group inherit from another group.

Actions #5

Updated by Ohad Levy over 14 years ago

  • Status changed from New to Need more information

Any feedback about this request? is it really required?

Actions #6

Updated by Ohad Levy over 14 years ago

  • Status changed from Need more information to New
  • Assignee set to Ohad Levy
  • Target version set to 0.1-4

a host should be able to belong to many groups

Actions #7

Updated by Matt Moran over 14 years ago

(13:31:41) Matt: I have a group my-webserver, and my-db - they both have separate variables but also share some. A node is only usually my-webserver or my-db, but sometimes I want a node to be both. To do that currently i'll have to create a new group and type in all the variables, and add the classes. Or just assign one group and do it at the node level
(13:32:08) Matt: I think the variable clashes should just be handled by priority of what group was added last.
(13:32:19) Ohad Levy: ok, so a host should be able to have many groups

Actions #8

Updated by Ohad Levy over 14 years ago

  • Status changed from New to Closed
Actions #9

Updated by Ohad Levy over 14 years ago

  • Status changed from Closed to Assigned
Actions #10

Updated by Marcello de Sousa about 14 years ago

This would be a really nice feature. Don't know how you are going to implement this but, if I may suggest something, it would be nice to treat groups (inside the foreman interface) in a similar way as you treat a puppetclass. Just listed together in the class list (with a remark that it's a group). Puppetclasses/groups list example:
------------------
module1::class-foo
module2::class-bar
Group-MyGroup1
Group-MyGroup2 etc...
------------------

This way you can drag & drop classes and/or groups to both "hosts" and to "groups" within the same interface. In this way you might as well just remove the "hostgroup" field in the "HOSTS" edit interface (as your group(s) would just be listed in the greenbox).
I believe that would give us great flexibility.

Actions #11

Updated by Ohad Levy about 14 years ago

  • Target version changed from 0.1-4 to 0.1-5
Actions #12

Updated by Ohad Levy almost 14 years ago

  • Status changed from Assigned to Feedback
  • Target version deleted (0.1-5)

I'm still in mixed feelings about this one :-(

Actions #13

Updated by Matt Moran almost 14 years ago

I'd like to see the feature. But I don't think the clash of variables should be handled with one group taking authority. I think if a node is assigned multiple groups that contain the same variable names but with different values, then that should throw an error.

So this would throw an error due to yumrepo variable
mywebserver: yumrepo = "xxx", masterip = "aaa", webserverconf = "bbb"
mydb: yumrepo = "aaa", masterip = "aaa", dbconf = "aaa"

This would be ok
mywebserver: yumrepo = "xxx", masterip = "aaa", webserverconf = "bbb"
mydb: yumrepo = "xxx", masterip = "aaa", dbconf = "aaa"

Actions #14

Updated by Marcello de Sousa almost 14 years ago

Ohad Levy wrote:

I'm still in mixed feelings about this one :-(

Hi Ohad,
Could you explain us a little bit more your thoughts on this ?

It's a pity to see this feature out of the next release :-((((

Actions #15

Updated by Ohad Levy almost 14 years ago

Marcello de Sousa wrote:

Ohad Levy wrote:

I'm still in mixed feelings about this one :-(

Hi Ohad,
Could you explain us a little bit more your thoughts on this ?

It's a pity to see this feature out of the next release :-((((

maybe we can find the time to talk on #theforeman irc channel

my concern breaks into two main parts:
1. technical - e.g. how to handle parameters etc
2. logical, does it really make sense to have hostgroup inherit other groups? (in terms of best practice etc).

Actions #16

Updated by Atha Kouroussis about 13 years ago

Hi Ohad,
I would like to be implemented too. We are currently trying yo migrate from Puppet Dashboard to Foreman and this functionality is much desired. Although not a show-stopper, it is forcing us to restructure all parameter placement hierarchies we had before.

Actions #17

Updated by Ohad Levy about 13 years ago

I'll see what I can do after releasing 0.2 :)

Actions #18

Updated by Matthew Saddington almost 13 years ago

Hi Ohad,

Would like this to be implemented. Im trying to do something similar to Atha and it would be great if we had this functionality

Actions #19

Updated by Ohad Levy almost 13 years ago

  • Status changed from Feedback to Assigned
  • Target version set to 0.4

OK, my suggestion is the following.

A hostgroup can inherit from another group.
this would include its parameters and classes.

so a web server can inherit from common.
and my rails app can inherit from the web server host group.

if there are no objections, I'll implement this asap.

Actions #20

Updated by Matt Moran almost 13 years ago

Sounds perfect to me!

Actions #21

Updated by Ohad Levy almost 13 years ago

  • Subject changed from Multiple groups with in a group to Allow hostgroup nesting for puppet classes and parameters
Actions #22

Updated by Ohad Levy almost 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
Actions #23

Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman-puppet/pull/36 added
Actions

Also available in: Atom PDF