puppet 2.7.14 → 2.7.16
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CHANGELOG +85 -0
- data/conf/redhat/puppet.spec +31 -4
- data/lib/puppet.rb +1 -1
- data/lib/puppet/defaults.rb +2 -3
- data/lib/puppet/face/module/install.rb +3 -3
- data/lib/puppet/face/module/search.rb +3 -3
- data/lib/puppet/indirector/face.rb +1 -1
- data/lib/puppet/network/http_pool.rb +17 -8
- data/lib/puppet/node/environment.rb +1 -3
- data/lib/puppet/parser/ast.rb +1 -1
- data/lib/puppet/parser/compiler.rb +2 -10
- data/lib/puppet/parser/functions/template.rb +2 -1
- data/lib/puppet/parser/lexer.rb +2 -2
- data/lib/puppet/parser/scope.rb +3 -2
- data/lib/puppet/provider/package/gem.rb +3 -1
- data/lib/puppet/provider/package/pkg.rb +18 -2
- data/lib/puppet/provider/service/gentoo.rb +5 -0
- data/lib/puppet/provider/service/init.rb +12 -14
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/upstart.rb +257 -7
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +6 -9
- data/lib/puppet/reports/http.rb +1 -1
- data/lib/puppet/reports/tagmail.rb +1 -1
- data/lib/puppet/type/cron.rb +5 -0
- data/lib/puppet/type/filebucket.rb +12 -0
- data/lib/puppet/util.rb +15 -9
- data/lib/puppet/util/colors.rb +94 -64
- data/lib/puppet/util/platform.rb +15 -0
- data/man/man5/puppet.conf.5 +73 -27
- data/man/man8/filebucket.8 +1 -1
- data/man/man8/pi.8 +1 -1
- data/man/man8/puppet-agent.8 +17 -17
- data/man/man8/puppet-apply.8 +8 -3
- data/man/man8/puppet-ca.8 +183 -0
- data/man/man8/puppet-catalog.8 +17 -10
- data/man/man8/puppet-cert.8 +1 -1
- data/man/man8/puppet-certificate.8 +27 -11
- data/man/man8/puppet-certificate_request.8 +12 -11
- data/man/man8/puppet-certificate_revocation_list.8 +11 -10
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +2 -2
- data/man/man8/puppet-doc.8 +15 -3
- data/man/man8/puppet-facts.8 +18 -8
- data/man/man8/puppet-file.8 +13 -22
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-inspect.8 +10 -2
- data/man/man8/puppet-instrumentation_data.8 +145 -0
- data/man/man8/puppet-instrumentation_listener.8 +222 -0
- data/man/man8/puppet-instrumentation_probe.8 +207 -0
- data/man/man8/puppet-key.8 +11 -7
- data/man/man8/puppet-kick.8 +35 -3
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-master.8 +1 -1
- data/man/man8/puppet-module.8 +451 -0
- data/man/man8/puppet-node.8 +64 -22
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-queue.8 +1 -1
- data/man/man8/puppet-report.8 +12 -8
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-resource_type.8 +11 -7
- data/man/man8/puppet-secret_agent.8 +1 -1
- data/man/man8/puppet-status.8 +11 -7
- data/man/man8/puppet.8 +1 -1
- data/man/man8/puppetca.8 +1 -1
- data/man/man8/puppetd.8 +17 -17
- data/man/man8/puppetdoc.8 +15 -3
- data/man/man8/puppetmasterd.8 +1 -1
- data/man/man8/puppetqd.8 +1 -1
- data/man/man8/puppetrun.8 +35 -3
- data/man/man8/ralsh.8 +1 -1
- data/spec/fixtures/unit/provider/package/gem/line-with-1.8.5-warning +14 -0
- data/spec/fixtures/unit/provider/package/pkg/{dummy → dummy_solaris10} +0 -0
- data/spec/fixtures/unit/provider/package/pkg/dummy_solaris11 +1 -0
- data/spec/fixtures/unit/provider/package/pkg/solaris11 +12 -0
- data/spec/fixtures/unit/provider/package/pkg/unknown_status +12 -0
- data/spec/fixtures/unit/provider/service/gentoo/rc_update_show +30 -0
- data/spec/integration/defaults_spec.rb +2 -7
- data/spec/integration/network/server/mongrel_spec.rb +16 -10
- data/spec/integration/network/server/webrick_spec.rb +16 -9
- data/spec/integration/provider/service/init_spec.rb +20 -4
- data/spec/integration/provider/ssh_authorized_key_spec.rb +119 -107
- data/spec/unit/face/module/install_spec.rb +16 -4
- data/spec/unit/network/http/api/v1_spec.rb +8 -0
- data/spec/unit/network/http_pool_spec.rb +80 -74
- data/spec/unit/node/environment_spec.rb +9 -4
- data/spec/unit/parser/ast/leaf_spec.rb +2 -2
- data/spec/unit/parser/ast_spec.rb +3 -3
- data/spec/unit/parser/compiler_spec.rb +0 -17
- data/spec/unit/parser/lexer_spec.rb +45 -2
- data/spec/unit/parser/scope_spec.rb +181 -14
- data/spec/unit/provider/package/gem_spec.rb +17 -1
- data/spec/unit/provider/package/pkg_spec.rb +70 -22
- data/spec/unit/provider/service/gentoo_spec.rb +237 -0
- data/spec/unit/provider/service/init_spec.rb +2 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/service/upstart_spec.rb +414 -5
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +24 -0
- data/spec/unit/reports/tagmail_spec.rb +50 -0
- data/spec/unit/type/cron_spec.rb +21 -1
- data/spec/unit/type/filebucket_spec.rb +39 -9
- data/spec/unit/util/colors_spec.rb +69 -0
- data/spec/unit/util/log/destinations_spec.rb +17 -9
- data/spec/unit/util/log_spec.rb +2 -1
- data/spec/unit/util_spec.rb +11 -0
- data/tasks/rake/gem.rake +1 -1
- data/tasks/rake/manpages.rake +11 -3
- data/test/network/handler/fileserver.rb +7 -1
- metadata +22 -10
data/man/man8/puppetd.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-AGENT" "8" "June
|
4
|
+
.TH "PUPPET\-AGENT" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-agent\fR \- The puppet agent daemon
|
@@ -13,7 +13,7 @@ Retrieves the client configuration from the puppet master and applies it to the
|
|
13
13
|
This service may be run as a daemon, run periodically using cron (or something similar), or run interactively for testing purposes\.
|
14
14
|
.
|
15
15
|
.SH "USAGE"
|
16
|
-
puppet agent [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-\-detailed\-exitcodes] [\-\-disable] [\-\-enable] [\-h|\-\-help] [
|
16
|
+
puppet agent [\-\-certname \fIname\fR] [\-D|\-\-daemonize|\-\-no\-daemonize] [\-d|\-\-debug] [\-\-detailed\-exitcodes] [\-\-digest \fIdigest\fR] [\-\-disable] [\-\-enable] [\-\-fingerprint] [\-h|\-\-help] [\-l|\-\-logdest syslog|\fIfile\fR|console] [\-\-no\-client] [\-\-noop] [\-o|\-\-onetime] [\-\-serve \fIhandler\fR] [\-t|\-\-test] [\-v|\-\-verbose] [\-V|\-\-version] [\-w|\-\-waitforcert \fIseconds\fR]
|
17
17
|
.
|
18
18
|
.SH "DESCRIPTION"
|
19
19
|
This is the main puppet client\. Its job is to retrieve the local machine\'s configuration from a remote server and apply it\. In order to successfully communicate with the remote server, the client must have a certificate signed by a certificate authority that the server trusts; the recommended method for this, at the moment, is to run a certificate authority as part of the puppet server (which is the default)\. The client will connect and request a signed certificate, and will continue connecting until it receives one\.
|
@@ -40,6 +40,10 @@ Note that any configuration parameter that\'s valid in the configuration file is
|
|
40
40
|
See the configuration file documentation at http://docs\.puppetlabs\.com/references/stable/configuration\.html for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet agent with \'\-\-genconfig\'\.
|
41
41
|
.
|
42
42
|
.TP
|
43
|
+
\-\-certname
|
44
|
+
Set the certname (unique ID) of the client\. The master reads this unique identifying string, which is usually set to the node\'s fully\-qualified domain name, to determine which configurations the node will receive\. Use this option to debug setup problems or implement unusual node identification schemes\.
|
45
|
+
.
|
46
|
+
.TP
|
43
47
|
\-\-daemonize
|
44
48
|
Send the process into the background\. This is the default\.
|
45
49
|
.
|
@@ -52,12 +56,12 @@ Do not send the process into the background\.
|
|
52
56
|
Enable full debugging\.
|
53
57
|
.
|
54
58
|
.TP
|
55
|
-
\-\-
|
56
|
-
|
59
|
+
\-\-detailed\-exitcodes
|
60
|
+
Provide transaction information via exit codes\. If this is enabled, an exit code of \'2\' means there were changes, an exit code of \'4\' means there were failures during the transaction, and an exit code of \'6\' means there were both changes and failures\.
|
57
61
|
.
|
58
62
|
.TP
|
59
|
-
\-\-
|
60
|
-
|
63
|
+
\-\-digest
|
64
|
+
Change the certificate fingerprinting digest algorithm\. The default is MD5\. Valid values depends on the version of OpenSSL installed, but should always at least contain MD5, MD2, SHA1 and SHA256\.
|
61
65
|
.
|
62
66
|
.TP
|
63
67
|
\-\-disable
|
@@ -77,8 +81,8 @@ Enable working on the local system\. This removes any lock file, causing \'puppe
|
|
77
81
|
\'puppet agent\' exits after executing this\.
|
78
82
|
.
|
79
83
|
.TP
|
80
|
-
\-\-
|
81
|
-
|
84
|
+
\-\-fingerprint
|
85
|
+
Display the current certificate or certificate signing request fingerprint and then exit\. Use the \'\-\-digest\' option to change the digest algorithm used\.
|
82
86
|
.
|
83
87
|
.TP
|
84
88
|
\-\-help
|
@@ -90,15 +94,15 @@ Where to send messages\. Choose between syslog, the console, and a log file\. De
|
|
90
94
|
.
|
91
95
|
.TP
|
92
96
|
\-\-no\-client
|
93
|
-
Do not create a config client\. This will cause the daemon to run without ever checking for its configuration automatically, and only makes sense
|
97
|
+
Do not create a config client\. This will cause the daemon to run without ever checking for its configuration automatically, and only makes sense when puppet agent is being run with listen = true in puppet\.conf or was started with the \fB\-\-listen\fR option\.
|
94
98
|
.
|
95
99
|
.TP
|
96
|
-
\-\-
|
97
|
-
|
100
|
+
\-\-noop
|
101
|
+
Use \'noop\' mode where the daemon runs in a no\-op or dry\-run mode\. This is useful for seeing what changes Puppet will make without actually executing the changes\.
|
98
102
|
.
|
99
103
|
.TP
|
100
|
-
\-\-
|
101
|
-
|
104
|
+
\-\-onetime
|
105
|
+
Run the configuration once\. Runs a single (normally daemonized) Puppet run\. Useful for interactively running puppet agent when used in conjunction with the \-\-no\-daemonize option\.
|
102
106
|
.
|
103
107
|
.TP
|
104
108
|
\-\-serve
|
@@ -109,10 +113,6 @@ Start another type of server\. By default, \'puppet agent\' will start a service
|
|
109
113
|
Enable the most common options used for testing\. These are \'onetime\', \'verbose\', \'ignorecache\', \'no\-daemonize\', \'no\-usecacheonfailure\', \'detailed\-exit\-codes\', \'no\-splay\', and \'show_diff\'\.
|
110
114
|
.
|
111
115
|
.TP
|
112
|
-
\-\-noop
|
113
|
-
Use \'noop\' mode where the daemon runs in a no\-op or dry\-run mode\. This is useful for seeing what changes Puppet will make without actually executing the changes\.
|
114
|
-
.
|
115
|
-
.TP
|
116
116
|
\-\-verbose
|
117
117
|
Turn on verbose reporting\.
|
118
118
|
.
|
data/man/man8/puppetdoc.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-DOC" "8" "June
|
4
|
+
.TH "PUPPET\-DOC" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-doc\fR \- Generate Puppet documentation and references
|
@@ -25,7 +25,7 @@ If the command is run with the name of a manifest file as an argument, puppet do
|
|
25
25
|
.
|
26
26
|
.TP
|
27
27
|
\-\-all
|
28
|
-
Output the docs for all of the reference types\. In \'rdoc\'
|
28
|
+
Output the docs for all of the reference types\. In \'rdoc\' mode, this also outputs documentation for all resources\.
|
29
29
|
.
|
30
30
|
.TP
|
31
31
|
\-\-help
|
@@ -33,7 +33,7 @@ Print this help message
|
|
33
33
|
.
|
34
34
|
.TP
|
35
35
|
\-\-outputdir
|
36
|
-
|
36
|
+
Used only in \'rdoc\' mode\. The directory to which the rdoc output should be written\.
|
37
37
|
.
|
38
38
|
.TP
|
39
39
|
\-\-mode
|
@@ -47,6 +47,18 @@ Build a particular reference\. Get a list of references by running \'puppet doc
|
|
47
47
|
\-\-charset
|
48
48
|
Used only in \'rdoc\' mode\. It sets the charset used in the html files produced\.
|
49
49
|
.
|
50
|
+
.TP
|
51
|
+
\-\-manifestdir
|
52
|
+
Used only in \'rdoc\' mode\. The directory to scan for stand\-alone manifests\. If not supplied, puppet doc will use the manifestdir from puppet\.conf\.
|
53
|
+
.
|
54
|
+
.TP
|
55
|
+
\-\-modulepath
|
56
|
+
Used only in \'rdoc\' mode\. The directory or directories to scan for modules\. If not supplied, puppet doc will use the modulepath from puppet\.conf\.
|
57
|
+
.
|
58
|
+
.TP
|
59
|
+
\-\-environment
|
60
|
+
Used only in \'rdoc\' mode\. The configuration environment from which to read the modulepath and manifestdir settings, when reading said settings from puppet\.conf\. Due to a known bug, this option is not currently effective\.
|
61
|
+
.
|
50
62
|
.SH "EXAMPLE"
|
51
63
|
.
|
52
64
|
.nf
|
data/man/man8/puppetmasterd.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-MASTER" "8" "June
|
4
|
+
.TH "PUPPET\-MASTER" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-master\fR \- The puppet master daemon
|
data/man/man8/puppetqd.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-QUEUE" "8" "June
|
4
|
+
.TH "PUPPET\-QUEUE" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-queue\fR \- Queuing daemon for asynchronous storeconfigs
|
data/man/man8/puppetrun.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-KICK" "8" "June
|
4
|
+
.TH "PUPPET\-KICK" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-kick\fR \- Remotely control puppet agent
|
@@ -25,10 +25,42 @@ You will most likely have to run \'puppet kick\' as root to get access to the SS
|
|
25
25
|
\'puppet kick\' reads \'puppet master\'\'s configuration file, so that it can copy things like LDAP settings\.
|
26
26
|
.
|
27
27
|
.SH "USAGE NOTES"
|
28
|
-
Puppet kick
|
28
|
+
Puppet kick needs the puppet agent on the target machine to be running as a daemon, be configured to listen for incoming network connections, and have an appropriate security configuration\.
|
29
29
|
.
|
30
30
|
.P
|
31
|
-
|
31
|
+
The specific changes required are:
|
32
|
+
.
|
33
|
+
.IP "\(bu" 4
|
34
|
+
Set \fBlisten = true\fR in the agent\'s \fBpuppet\.conf\fR file (or \fB\-\-listen\fR on the command line)
|
35
|
+
.
|
36
|
+
.IP "\(bu" 4
|
37
|
+
Configure the node\'s firewall to allow incoming connections on port 8139
|
38
|
+
.
|
39
|
+
.IP "\(bu" 4
|
40
|
+
Insert the following stanza at the top of the node\'s \fBauth\.conf\fR file:
|
41
|
+
.
|
42
|
+
.IP "" 4
|
43
|
+
.
|
44
|
+
.nf
|
45
|
+
|
46
|
+
# Allow puppet kick access
|
47
|
+
path /run
|
48
|
+
method save
|
49
|
+
auth any
|
50
|
+
allow workstation\.example\.com
|
51
|
+
.
|
52
|
+
.fi
|
53
|
+
.
|
54
|
+
.IP "" 0
|
55
|
+
|
56
|
+
.
|
57
|
+
.IP "" 0
|
58
|
+
.
|
59
|
+
.P
|
60
|
+
This example would allow the machine \fBworkstation\.example\.com\fR to trigger a Puppet run; adjust the "allow" directive to suit your site\. You may also use \fBallow *\fR to allow anyone to trigger a Puppet run, but that makes it possible to interfere with your site by triggering excessive Puppet runs\.
|
61
|
+
.
|
62
|
+
.P
|
63
|
+
See \fBhttp://docs\.puppetlabs\.com/guides/rest_auth_conf\.html\fR for more details about security settings\.
|
32
64
|
.
|
33
65
|
.SH "OPTIONS"
|
34
66
|
Note that any configuration parameter that\'s valid in the configuration file is also a valid long argument\. For example, \'ssldir\' is a valid configuration parameter, so you can specify \'\-\-ssldir \fIdirectory\fR\' as an argument\.
|
data/man/man8/ralsh.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-RESOURCE" "8" "June
|
4
|
+
.TH "PUPPET\-RESOURCE" "8" "June 2012" "Puppet Labs, LLC" "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-resource\fR \- The resource abstraction layer shell
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/home/jenkins/.rvm/gems/ruby-1.8.5-p231@global/gems/rubygems-bundler-0.9.0/lib/rubygems-bundler/regenerate_binstubs_command.rb:34: warning: parenthesize argument(s) for future version
|
2
|
+
|
3
|
+
*** LOCAL GEMS ***
|
4
|
+
|
5
|
+
columnize (0.3.2)
|
6
|
+
diff-lcs (1.1.3)
|
7
|
+
metaclass (0.0.1)
|
8
|
+
mocha (0.10.5)
|
9
|
+
rake (0.8.7)
|
10
|
+
rspec-core (2.9.0)
|
11
|
+
rspec-expectations (2.9.1)
|
12
|
+
rspec-mocks (2.9.0)
|
13
|
+
rubygems-bundler (0.9.0)
|
14
|
+
rvm (1.11.3.3)
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
dummy 1.0.6-0.175.0.0.0.2.537 i--
|
@@ -0,0 +1,12 @@
|
|
1
|
+
compress/zip 3.0-0.175.0.0.0.2.537 i--
|
2
|
+
archiver/gnu-tar 1.26-0.175.0.0.0.2.537 i--
|
3
|
+
compress/bzip2 1.0.6-0.175.0.0.0.2.537 i--
|
4
|
+
compress/gzip 1.3.5-0.175.0.0.0.2.537 i--
|
5
|
+
compress/p7zip 9.20.1-0.175.0.0.0.2.537 i--
|
6
|
+
compress/unzip 6.0-0.175.0.0.0.2.537 i--
|
7
|
+
compress/zip 3.0-0.175.0.0.0.2.537 i--
|
8
|
+
x11/library/toolkit/libxaw7 1.0.9-0.175.0.0.0.0.1215 i--
|
9
|
+
x11/library/toolkit/libxt 1.0.9-0.175.0.0.0.0.1215 i--
|
10
|
+
shell/bash 4.1.9-0.175.0.0.0.2.537 i--
|
11
|
+
shell/zsh 4.3.12-0.175.0.0.0.2.537 i--
|
12
|
+
security/sudo 1.8.1.2-0.175.0.0.0.2.537 i--
|
@@ -0,0 +1,12 @@
|
|
1
|
+
compress/zip 3.0-0.175.0.0.0.2.537 i--
|
2
|
+
archiver/gnu-tar 1.26-0.175.0.0.0.2.537 i--
|
3
|
+
compress/bzip2 1.0.6-0.175.0.0.0.2.537 i--
|
4
|
+
compress/gzip 1.3.5-0.175.0.0.0.2.537 i--
|
5
|
+
compress/p7zip 9.20.1-0.175.0.0.0.2.537 i--
|
6
|
+
compress/unzip 6.0-0.175.0.0.0.2.537 x--
|
7
|
+
compress/zip 3.0-0.175.0.0.0.2.537 i--
|
8
|
+
x11/library/toolkit/libxaw7 1.0.9-0.175.0.0.0.0.1215 i--
|
9
|
+
x11/library/toolkit/libxt 1.0.9-0.175.0.0.0.0.1215 i--
|
10
|
+
shell/bash 4.1.9-0.175.0.0.0.2.537 i--
|
11
|
+
shell/zsh 4.3.12-0.175.0.0.0.2.537 i--
|
12
|
+
security/sudo 1.8.1.2-0.175.0.0.0.2.537 i--
|
@@ -0,0 +1,30 @@
|
|
1
|
+
alsasound | default
|
2
|
+
bootmisc | boot
|
3
|
+
devfs | sysinit
|
4
|
+
dmcrypt | boot
|
5
|
+
dmesg | sysinit
|
6
|
+
fsck | boot
|
7
|
+
hostname | boot
|
8
|
+
hwclock | boot
|
9
|
+
keymaps | boot
|
10
|
+
killprocs | shutdown
|
11
|
+
local | default
|
12
|
+
localmount | boot
|
13
|
+
lvm | boot
|
14
|
+
modules | boot
|
15
|
+
mount-ro | shutdown
|
16
|
+
mtab | boot
|
17
|
+
net.lo | boot
|
18
|
+
netmount | default
|
19
|
+
procfs | boot
|
20
|
+
root | boot
|
21
|
+
rsyslog | boot
|
22
|
+
savecache | shutdown
|
23
|
+
swap | boot
|
24
|
+
swapfiles | boot
|
25
|
+
sysctl | boot
|
26
|
+
termencoding | boot
|
27
|
+
udev | sysinit
|
28
|
+
udev-postmount | default
|
29
|
+
urandom | boot
|
30
|
+
xdm | default
|
@@ -285,13 +285,8 @@ describe "Puppet defaults" do
|
|
285
285
|
end
|
286
286
|
|
287
287
|
describe "when configuring color" do
|
288
|
-
|
289
|
-
|
290
|
-
end
|
291
|
-
|
292
|
-
it "should default to false", :if => Puppet.features.microsoft_windows? do
|
293
|
-
Puppet.settings[:color].should == 'false'
|
294
|
-
end
|
288
|
+
subject { Puppet.settings[:color] }
|
289
|
+
it { should == "ansi" }
|
295
290
|
end
|
296
291
|
|
297
292
|
describe "daemonize" do
|
@@ -1,30 +1,39 @@
|
|
1
1
|
#!/usr/bin/env rspec
|
2
2
|
require 'spec_helper'
|
3
3
|
require 'puppet/network/server'
|
4
|
-
require '
|
4
|
+
require 'net/http'
|
5
5
|
|
6
6
|
describe Puppet::Network::Server, :'fails_on_ruby_1.9.2' => true do
|
7
7
|
describe "when using mongrel", :if => Puppet.features.mongrel? do
|
8
8
|
|
9
|
+
# This reduces the odds of conflicting port numbers between concurrent runs
|
10
|
+
# of the suite on the same machine dramatically.
|
11
|
+
def port
|
12
|
+
20001 + ($$ % 40000)
|
13
|
+
end
|
14
|
+
|
9
15
|
before :each do
|
10
16
|
Puppet[:servertype] = 'mongrel'
|
11
17
|
Puppet[:server] = '127.0.0.1'
|
12
|
-
@params = { :port =>
|
18
|
+
@params = { :port => port, :handlers => [ :node ] }
|
13
19
|
@server = Puppet::Network::Server.new(@params)
|
14
20
|
end
|
15
21
|
|
16
|
-
after
|
22
|
+
after :each do
|
23
|
+
@server.unlisten if @server.listening?
|
24
|
+
end
|
17
25
|
|
18
26
|
describe "before listening" do
|
19
27
|
it "should not be reachable at the specified address and port" do
|
20
|
-
lambda {
|
28
|
+
lambda { Net::HTTP.get('127.0.0.1', '/', port) }.
|
29
|
+
should raise_error(Errno::ECONNREFUSED)
|
21
30
|
end
|
22
31
|
end
|
23
32
|
|
24
33
|
describe "when listening" do
|
25
34
|
it "should be reachable on the specified address and port" do
|
26
35
|
@server.listen
|
27
|
-
|
36
|
+
expect { Net::HTTP.get('127.0.0.1', '/', port) }.should_not raise_error
|
28
37
|
end
|
29
38
|
|
30
39
|
it "should default to '127.0.0.1' as its bind address" do
|
@@ -53,12 +62,9 @@ describe Puppet::Network::Server, :'fails_on_ruby_1.9.2' => true do
|
|
53
62
|
it "should not be reachable on the port and address assigned" do
|
54
63
|
@server.listen
|
55
64
|
@server.unlisten
|
56
|
-
|
65
|
+
expect { Net::HTTP.get('127.0.0.1', '/', port) }.
|
66
|
+
should raise_error Errno::ECONNREFUSED
|
57
67
|
end
|
58
68
|
end
|
59
|
-
|
60
|
-
after :each do
|
61
|
-
@server.unlisten if @server.listening?
|
62
|
-
end
|
63
69
|
end
|
64
70
|
end
|
@@ -7,17 +7,24 @@ require 'socket'
|
|
7
7
|
describe Puppet::Network::Server, :unless => Puppet.features.microsoft_windows? do
|
8
8
|
include PuppetSpec::Files
|
9
9
|
|
10
|
+
# This reduces the odds of conflicting port numbers between concurrent runs
|
11
|
+
# of the suite on the same machine dramatically.
|
12
|
+
def port
|
13
|
+
20000 + ($$ % 40000)
|
14
|
+
end
|
15
|
+
|
10
16
|
describe "when using webrick" do
|
11
17
|
before :each do
|
12
18
|
Puppet[:servertype] = 'webrick'
|
13
19
|
Puppet[:server] = '127.0.0.1'
|
14
|
-
@params = { :port =>
|
20
|
+
@params = { :port => port, :handlers => [ :node ] }
|
15
21
|
|
16
22
|
# Get a safe temporary file
|
17
23
|
dir = tmpdir("webrick_integration_testing")
|
18
24
|
|
19
25
|
Puppet.settings[:confdir] = dir
|
20
26
|
Puppet.settings[:vardir] = dir
|
27
|
+
Puppet.settings[:logdir] = dir
|
21
28
|
Puppet.settings[:group] = Process.gid
|
22
29
|
|
23
30
|
Puppet::SSL::Host.ca_location = :local
|
@@ -34,15 +41,15 @@ describe Puppet::Network::Server, :unless => Puppet.features.microsoft_windows?
|
|
34
41
|
|
35
42
|
describe "before listening" do
|
36
43
|
it "should not be reachable at the specified address and port" do
|
37
|
-
lambda { TCPSocket.new('127.0.0.1',
|
44
|
+
lambda { TCPSocket.new('127.0.0.1', port) }.should raise_error
|
38
45
|
end
|
39
46
|
end
|
40
47
|
|
41
48
|
describe "when listening" do
|
42
49
|
it "should be reachable on the specified address and port" do
|
43
|
-
@server = Puppet::Network::Server.new(@params.merge(:port =>
|
50
|
+
@server = Puppet::Network::Server.new(@params.merge(:port => port))
|
44
51
|
@server.listen
|
45
|
-
lambda { TCPSocket.new('127.0.0.1',
|
52
|
+
lambda { TCPSocket.new('127.0.0.1', port) }.should_not raise_error
|
46
53
|
end
|
47
54
|
|
48
55
|
it "should default to '0.0.0.0' as its bind address" do
|
@@ -53,16 +60,16 @@ describe Puppet::Network::Server, :unless => Puppet.features.microsoft_windows?
|
|
53
60
|
|
54
61
|
it "should use any specified bind address" do
|
55
62
|
Puppet[:bindaddress] = "127.0.0.1"
|
56
|
-
@server = Puppet::Network::Server.new(@params.merge(:port =>
|
63
|
+
@server = Puppet::Network::Server.new(@params.merge(:port => port))
|
57
64
|
@server.stubs(:unlisten) # we're breaking listening internally, so we have to keep it from unlistening
|
58
65
|
@server.send(:http_server).expects(:listen).with { |args| args[:address] == "127.0.0.1" }
|
59
66
|
@server.listen
|
60
67
|
end
|
61
68
|
|
62
69
|
it "should not allow multiple servers to listen on the same address and port" do
|
63
|
-
@server = Puppet::Network::Server.new(@params.merge(:port =>
|
70
|
+
@server = Puppet::Network::Server.new(@params.merge(:port => port))
|
64
71
|
@server.listen
|
65
|
-
@server2 = Puppet::Network::Server.new(@params.merge(:port =>
|
72
|
+
@server2 = Puppet::Network::Server.new(@params.merge(:port => port))
|
66
73
|
lambda { @server2.listen }.should raise_error
|
67
74
|
end
|
68
75
|
|
@@ -73,10 +80,10 @@ describe Puppet::Network::Server, :unless => Puppet.features.microsoft_windows?
|
|
73
80
|
|
74
81
|
describe "after unlistening" do
|
75
82
|
it "should not be reachable on the port and address assigned" do
|
76
|
-
@server = Puppet::Network::Server.new(@params.merge(:port =>
|
83
|
+
@server = Puppet::Network::Server.new(@params.merge(:port => port))
|
77
84
|
@server.listen
|
78
85
|
@server.unlisten
|
79
|
-
lambda { TCPSocket.new('127.0.0.1',
|
86
|
+
lambda { TCPSocket.new('127.0.0.1', port) }.should raise_error(Errno::ECONNREFUSED)
|
80
87
|
end
|
81
88
|
end
|
82
89
|
end
|