-
-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to use OpenBSD specific service_flags and package_flavors.
Give example for passenger in README.md and add OpenBSD to the supported OSs in metadata.json.
- Loading branch information
Showing
5 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks on redhat system because the flaggable feature is not supported for service. How do you plan to manage that?
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, flaggable feature is only supported on OpenBSD, however, I've tested it with Puppet 3.7.3 at least on a SLES 11, SP3 machine:
srv82:/tmp # puppet apply -e "service { 'xend': ensure => running, flags => undef, }"
Notice: Compiled catalog for srv82.srv.intern in environment production in 0.14 seconds
Notice: Finished catalog run in 0.30 seconds
srv82:/tmp # puppet apply -e "service { 'xend': ensure => running, flags => 'some flag', }"
Notice: Compiled catalog for srv82.srv.intern in environment production in 0.15 seconds
Notice: Finished catalog run in 0.28 seconds
So, it just ignores the parameter that it doesn't know of.
I wonder what happens for you on RedHat then?
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what happen with puppet 3.4.3:
[vagrant@nginx-vagrant ~]$ puppet --version
3.4.3 (Puppet Enterprise 3.2.0)
[vagrant@nginx-vagrant ~]$ puppet apply -e "service { 'xend': ensure => running, flags => undef, }"
Error: Invalid parameter flags at line 1 on node nginx-vagrant
I got Invalid parameter each time i try to call the flags parameter on service.
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are obviously running an old version of Puppet (Enterprise), afaik, PE 3.7.0 just got releasesd, maybe just upgrade ;)
OK, might not be an option for you, and I don't know if PE supports that at all ;)
@jfryman, what "oldest" puppet version do you intend to support?
In the worst case, I could just add something similar as:
if ::osfamily == 'OpenBSD' ... with flags parameter, else without flags parameter.
I'm curious, does the flavor parameter for the package work for you? I.e.
puppet apply -e "package {'nginx': flavor => undef,}"
So, I'm wondering if I would need to do similar things here for the package too.
Sebastian
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh, I've just seen, in the package.pp, its already evaluating ::osfamily, so I could just do the same for the service.
But anyways, I'm still interested if the
puppet apply -e "package {'nginx': flavor => undef,}"
works for you, or ends up with same error.
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one works:
[vagrant@nginx-vagrant ~]$ sudo puppet apply -e "package {'nginx': flavor => undef,}"
Notice: Compiled catalog for vagrant.test.com in environment production in 0.88 seconds
It's an "old" (less than one year) version but this one is used in an enterprise environnement (where upgrading puppet infra may took some time indeed). Would really appreciate a test on ::osfamily on that one :)
Also crash on CentOS 6.5:
[vagrant@centos65-64 ~]$ puppet apply -e "service { 'nginx': ensure => running, flags => undef, }"
Error: Invalid parameter flags at line 1 on node centos65-64.example42.com
Error: Invalid parameter flags at line 1 on node centos65-64.example42.com
[vagrant@centos65-64 ~]$ puppet --version
3.4.2
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the PR if you don't mind:
#569
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for taking care, I wouldn't have got around to it before the evening.
Just added a little comment.
cheers
2960c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops my bad... fixed.