I also favor option B. I'm not necessarily opposed to A, but I think C would be very confusing because existing users that expect Foreman to be relatively strict about restraining classes inside environments for deployment and promotion purposes would be frustrated by the sudden change in validation behavior.
···
----- Original Message -----
From: "Brian Gupta"
To: foreman-users@googlegroups.com
Sent: Thursday, January 24, 2013 4:09:41 AM
Subject: Re: [foreman-users] What to do when there is a hostgroup / host environment mismatch
On Thu, Jan 24, 2013 at 2:30 AM, Ohad Levy < ohadlevy@gmail.com > wrote:
On Thu, Jan 24, 2013 at 3:49 AM, Charlie Derwent < shelltoesuperstar@gmail.com > wrote:
Hi Ohad,
It’s a difficult one, as you know I support the “dont include missing hostgroup classes” stance in order to aid a logical development workflow in moving new classes from a Local Dev Env to a Shared Dev/Continous Integration Env to QA to Production. (i.e. manually add a class to a host for work on one sever, then when rolling out to multiple servers add the class to the appropriate hostgroup and update the next environment, test, update the next environment, test and so on…) as described by the CERN guys.
However, I can see where you/abenari are coming from in if someone didn’t know the class wasn’t in that env the error you plan to remove would have pointed it out to them.
1 - I can’t think of any use case the change would break other than the one above.
2 - I would prefer ‘b’, we already have the behaviour described in ‘a’ and ‘c’ would potentially lead to more confusion if foreman wasn’t consistant in defining the classes that belonged to a hostgroup.
I think the pull request is fine as you have it, but if you still want to warn people is there anywhere you can create a non-fatal warning maybe? foreman gui or in the puppet run? Or if you still wanted the puppet run to error could make the behaviour in your pull request an option you need to enable in somewhere like settings.yaml :ignore_missing_classes: false/true ?
I tend to agree, maybe extracting it as a settings is best…
This doesn’t impact us, but I agree that a setting is probably best, with the default set to legacy behavior.
What do you guys think?
Ohad
Regards,
Charlie
On Wed, Jan 23, 2013 at 9:08 AM, Ohad Levy < ohadlevy@gmail.com > wrote:
Hi,
One of the last remaining issues for 1.1 release is how to handle puppet class assignment mismatch between environments, best by example:
Hostgroup
name: Web Servers
Env: Production-V1
Classes: apache, apache-monitor
Host:
Name: A web server
Env: QA
Classes: apache, apache-monitor (inherited from hostgroup).
What should foreman do if the QA env has no apache-monitor class?
so far, we always added it, and puppet silently ignored it (with the traditional non parameterized format), however, starting with the new enc format, puppet now fails on non existing classes.
we already have a ticket [1] and a fix [2], however I’m not sure that’s the right way to solve the problem.
while I understand this can cause upset users, i do believe that if a certain setup was not tested, it does makes sense to raise an error.
however, from past discussions (mostly from CERN guys), I got the understanding that this is not ideal, so my question breaks into two:
- are there other usage cases that this model breaks that I didn’t consider here?
- what do you guys want to see happening:
a. puppet raise an error (e.g. missing class)
b. foreman removes all classes which are not in the env transparently
c. each hostgroup can assign classes to different environments
d. something else?
Thanks,
Ohad
[1] Bug #2124: dont include missing hostgroup classes when host is not in the same environment - Foreman
[2] https://github.com/theforeman/foreman/pull/382
–
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com .
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en .
–
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com .
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en .
–
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com .
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com .
Visit this group at http://groups.google.com/group/foreman-users?hl=en .
For more options, visit https://groups.google.com/groups/opt_out .
–
–
You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en .
For more options, visit https://groups.google.com/groups/opt_out .