passenger 5.0.10 → 5.0.11
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/CHANGELOG +18 -0
- data/CONTRIBUTING.md +3 -3
- data/bin/passenger-status +12 -4
- data/build/agents.rb +45 -45
- data/build/apache2.rb +1 -1
- data/build/basics.rb +1 -1
- data/build/cxx_tests.rb +12 -12
- data/doc/CloudLicensingConfiguration.html +10 -10
- data/doc/CloudLicensingConfiguration.txt.md +10 -10
- data/doc/DebuggingAndStressTesting.md +3 -3
- data/doc/Design and Architecture.html +30 -30
- data/doc/Design and Architecture.txt +28 -28
- data/doc/ServerOptimizationGuide.html +3 -3
- data/doc/ServerOptimizationGuide.txt.md +3 -3
- data/doc/Users guide Apache.html +24 -12
- data/doc/Users guide Apache.txt +2 -2
- data/doc/Users guide Nginx.html +24 -12
- data/doc/Users guide Nginx.txt +2 -2
- data/doc/Users guide Standalone.html +18 -6
- data/doc/images/passenger_architecture.png +0 -0
- data/doc/images/passenger_architecture.svg +10 -9
- data/doc/images/{helper_agent_core_architecture.png → passenger_core_architecture.png} +0 -0
- data/doc/users_guide_snippets/environment_variables.txt +1 -1
- data/doc/users_guide_snippets/installation/verify_running_epilogue.txt +1 -1
- data/doc/users_guide_snippets/support_information.txt +1 -1
- data/doc/users_guide_snippets/tips.txt +2 -2
- data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +1 -1
- data/ext/apache2/Bucket.h +5 -5
- data/ext/apache2/Configuration.cpp +1 -1
- data/ext/apache2/Configuration.hpp +2 -3
- data/ext/apache2/ConfigurationFields.hpp +3 -0
- data/ext/apache2/ConfigurationFields.hpp.erb +3 -0
- data/ext/apache2/Hooks.cpp +42 -34
- data/ext/common/Account.h +3 -3
- data/ext/common/AgentsStarter.cpp +7 -7
- data/ext/common/AgentsStarter.h +20 -20
- data/ext/common/ApplicationPool2/Options.h +12 -12
- data/ext/common/Constants.h +10 -8
- data/ext/common/Logging.cpp +22 -1
- data/ext/common/Logging.h +19 -2
- data/ext/common/ServerKit/AcceptLoadBalancer.h +3 -3
- data/ext/common/ServerKit/Server.h +24 -0
- data/ext/common/UnionStation/Connection.h +1 -1
- data/ext/common/UnionStation/Core.h +21 -21
- data/ext/common/UnionStation/Transaction.h +3 -3
- data/ext/common/Utils.cpp +2 -2
- data/ext/common/Utils/IOUtils.cpp +5 -1
- data/ext/common/{agents → agent}/ApiServerUtils.h +3 -3
- data/ext/common/{agents → agent}/Base.cpp +2 -2
- data/ext/common/{agents → agent}/Base.h +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/ApiServer.h +33 -9
- data/ext/common/{agents/HelperAgent → agent/Core}/Main.cpp +60 -59
- data/ext/common/{agents/HelperAgent → agent/Core}/OptionParser.h +32 -25
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler.h +17 -17
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/AppResponse.h +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/BufferBody.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/CheckoutSession.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Client.h +2 -2
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/ForwardResponse.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Hooks.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/InitRequest.cpp +4 -3
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Request.h +1 -1
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/SendRequest.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/TurboCaching.h +1 -1
- data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Utils.cpp +0 -0
- data/ext/common/{agents/HelperAgent → agent/Core}/ResponseCache.h +0 -0
- data/ext/common/{agents → agent}/Main.cpp +9 -9
- data/ext/common/{agents → agent}/SpawnPreparer/Main.cpp +0 -0
- data/ext/common/{agents/HelperAgent/SystemMetricsTool.cpp → agent/SystemMetrics/Main.cpp} +0 -0
- data/ext/common/{agents → agent}/TempDirToucher/Main.cpp +0 -0
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/ApiServer.h +7 -7
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/DataStoreId.h +0 -0
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/FilterSupport.cpp +0 -0
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/FilterSupport.h +0 -0
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/LoggingServer.h +4 -4
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/Main.cpp +45 -45
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/OptionParser.h +20 -20
- data/ext/common/{agents/LoggingAgent → agent/UstRouter}/RemoteSender.h +0 -0
- data/ext/common/{agents → agent}/Watchdog/AgentWatcher.cpp +0 -0
- data/ext/common/{agents → agent}/Watchdog/ApiServer.h +1 -1
- data/ext/common/{agents/Watchdog/HelperAgentWatcher.cpp → agent/Watchdog/CoreWatcher.cpp} +14 -10
- data/ext/common/{agents → agent}/Watchdog/InstanceDirToucher.cpp +0 -0
- data/ext/common/{agents → agent}/Watchdog/Main.cpp +131 -75
- data/ext/common/{agents/Watchdog/LoggingAgentWatcher.cpp → agent/Watchdog/UstRouterWatcher.cpp} +13 -9
- data/ext/nginx/CacheLocationConfig.c +11 -6
- data/ext/nginx/CacheLocationConfig.c.erb +11 -6
- data/ext/nginx/Configuration.c +22 -7
- data/ext/nginx/Configuration.h +1 -19
- data/ext/nginx/ConfigurationFields.h +19 -0
- data/ext/nginx/ConfigurationFields.h.erb +19 -0
- data/ext/nginx/ContentHandler.c +33 -33
- data/ext/nginx/CreateLocationConfig.c +3 -1
- data/ext/nginx/CreateLocationConfig.c.erb +3 -1
- data/ext/nginx/MergeLocationConfig.c +8 -4
- data/ext/nginx/MergeLocationConfig.c.erb +7 -3
- data/ext/nginx/ngx_http_passenger_module.c +33 -42
- data/helper-scripts/backtrace-sanitizer.rb +2 -2
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/admin_tools/instance.rb +2 -2
- data/lib/phusion_passenger/admin_tools/instance_registry.rb +7 -3
- data/lib/phusion_passenger/common_library.rb +8 -8
- data/lib/phusion_passenger/config/about_command.rb +1 -1
- data/lib/phusion_passenger/config/api_call_command.rb +3 -3
- data/lib/phusion_passenger/config/installation_utils.rb +34 -21
- data/lib/phusion_passenger/config/reopen_logs_command.rb +2 -2
- data/lib/phusion_passenger/config/restart_app_command.rb +18 -4
- data/lib/phusion_passenger/constants.rb +7 -5
- data/lib/phusion_passenger/loader_shared_helpers.rb +2 -6
- data/lib/phusion_passenger/message_client.rb +8 -8
- data/lib/phusion_passenger/platform_info/ruby.rb +1 -2
- data/lib/phusion_passenger/preloader_shared_helpers.rb +1 -1
- data/lib/phusion_passenger/request_handler.rb +3 -2
- data/lib/phusion_passenger/request_handler/thread_handler.rb +4 -4
- data/lib/phusion_passenger/standalone/start_command.rb +13 -3
- data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -1
- data/lib/phusion_passenger/union_station/core.rb +18 -18
- data/lib/phusion_passenger/union_station/transaction.rb +5 -5
- data/resources/oss-binaries.phusionpassenger.com.crt +0 -84
- data/resources/templates/standalone/config.erb +1 -0
- metadata +40 -40
- metadata.gz.asc +7 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjFiNWQ0MmNkOTQ1MWMzNzNiNmY1NTE0ZDQ2YTM3YzJhNTA0ZDU2OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGRhYmI2NzNiOThlYWM2YWMwOWEyMWU1MDUyNTJkYWM0NmIzMzBjMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGJmZjE1YTQzYTg1NTU5YmE2NTE2YjFhZGFhNmZjMzc0NzQ1MmFhOTZjOGVh
|
10
|
+
ZjQzMDIyNjcxNmIyZjdkNjQxZmMwNDgwNWI2MmQ3MDlkZGYzZmU2OTk3YzM0
|
11
|
+
ZmYyMjAzMTc4NDdlYzQxYzdhODBlY2NjMjYxNzQ1OWE2MDg1OTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDcwOTRlZDkwYmExOTQyZWEwNDlhODhhNDQ4MzczYTQwYTA5MjYzNzA2ZjE1
|
14
|
+
NTYwZWQ5OWIyMWYyZjUxMjUxY2YwMTk4YzAyMDMzNDM1YTE5ZmIzOTIyZmRh
|
15
|
+
YzFlZDljMzE1MGFmMmI2MmU2MTE1NWZkZDQwMzMzNWIxNGI0MDc=
|
checksums.yaml.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJViQ+SAAoJECrHRaUKISqM604H/RrRMSPP09EbJhX94f6wNDDt
|
6
|
+
jfNeVx773mN/GryyVv2i4cpos24uqLTwPi8JVWkNSRqD2+bmDUL7M5yXnS+J89zB
|
7
|
+
/3F/TXRUAtB+2eH9NpzT6WPQx5A6vNXK1ovQSk/BmkVXIm3TXl9xtVgTWaT91tOP
|
8
|
+
DvW7ZFVhwG41FGiR1+jU6lA6f8rc2ion32lqNAI6ZvFN0ro5+vjT7AqaR6JmDmn6
|
9
|
+
vhan8iNa0J1B91FjN1n0eIQo/2yOJvoLBLuUe117uNtuoPCw4CMZXUL+Yo1OhdoC
|
10
|
+
8JOQidQIJ11obEhvk06UjSnLssB0vFrDlNO1zdkRLrNp8mTmjhFsUZQDByMSyLk=
|
11
|
+
=0i9C
|
12
12
|
-----END PGP SIGNATURE-----
|
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
/
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJViQ+SAAoJECrHRaUKISqMrPsIAIotbspFEsXcIDrDK5Fzzdk8
|
6
|
+
/LpiPwn3tsH9ieSasBJnwNmjFWrMp5slr8ta67EqSW+pnP7wmw2EsK7/J9kLDP8c
|
7
|
+
UtLFCBm7eAju4CmprZhu2UtqrpwiOZgSLk0Ze8HuIPE4dnYxa9N69HSeOtSyW4lO
|
8
|
+
J2TzUC1/QZJSmLG4WXPyBah6e6sFhZdoHGge78xCsoQR8fspAj1p7t6TBmESVAmA
|
9
|
+
MW7A0ZPXlXRdw0N3OaTK9vnG+Y1UtMmN45PD4NjZHpntOB3wcWv+Sm8nYRWzFdAx
|
10
|
+
hjKsZFLqQHkNXfcsVdCeStyzEcbmdE8fbUSBDPtjDVPlicD2AvHjG4rMOdgOZ1s=
|
11
|
+
=UBLz
|
12
12
|
-----END PGP SIGNATURE-----
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
Release 5.0.11
|
2
|
+
--------------
|
3
|
+
|
4
|
+
* In 5.0.10, admin tools such as `passenger-status` and `passenger-config restart-app` display an authorization error if they are run without sudo, while at the same time Passenger isn't serving any applications. Since this is confusing, they have now been modified to display a more appropriate error message.
|
5
|
+
* Fixes a bug in the RPMs that prevent admin tools such as `passenger-status` and `passenger-config restart-app` from working when they are invoked without root privileges.
|
6
|
+
* Fixes a bug on OS X that prevent admin tools such as `passenger-status` and `passenger-config restart-app` from detecting Passenger instance directories when they are invoked without root privileges. Closes GH-1535.
|
7
|
+
* Fixes a bug that causes Passenger not to work if the HOME environment variable is not set.
|
8
|
+
* Fixes compatibility with non-Rails Ruby apps that require the actionview gem. Closes GH-1547.
|
9
|
+
* Fixes some non-fatal "permission denied" error that may occasionally occur if user switching is turned off. Closes GH-1541.
|
10
|
+
* Relative values for the `pid_file` and `log_file` options in Passengerfile.json are now supported.
|
11
|
+
* If Passengerfile.json contains a syntax error, Passenger Standalone now correctly prints an error message instead of crashing.
|
12
|
+
* Sending a SIGABRT signal to a Ruby process now properly makes it terminate.
|
13
|
+
* The `passenger-config restart-app` command now accepts `.` as parameter, which it will interpreter as "restart the app in the current working directory". Closes GH-1386.
|
14
|
+
* [Apache] Setting `PassengerLogLevel` no longer redirects Apache's own stderr to that log file. Closes GH-1373.
|
15
|
+
* [Standalone] Passenger Standalone's Nginx engine now includes the RealIP module. Closes GH-1389.
|
16
|
+
* [Standalone] The `--max-preloader-idle-time` option has been added.
|
17
|
+
|
18
|
+
|
1
19
|
Release 5.0.10
|
2
20
|
--------------
|
3
21
|
|
data/CONTRIBUTING.md
CHANGED
@@ -178,9 +178,9 @@ The most important directories are:
|
|
178
178
|
Source code shared by the Apache and Nginx modules.
|
179
179
|
* `ext/common/agents` <br>
|
180
180
|
Source code of the PassengerAgent executable. The agent can be started in multiple modes.
|
181
|
-
* The watchdog is
|
182
|
-
* The
|
183
|
-
* The
|
181
|
+
* The watchdog is the main Phusion Passenger process. It starts the Passenger core and the UstRouter, and restarts them when they crash. It also cleans everything up upon shut down.
|
182
|
+
* The core performs most of the heavy lifting. It parses requests, spawns application processes, forwards requests to the correct process and forwards application responses back to the web server.
|
183
|
+
* The UstRouter processes Union Station data and sends them to the Union Station server.
|
184
184
|
* `bin` <br>
|
185
185
|
User executables.
|
186
186
|
* `helper-scripts` <br>
|
data/bin/passenger-status
CHANGED
@@ -118,8 +118,12 @@ def show_status(instance, options)
|
|
118
118
|
if response.code.to_i / 100 == 2
|
119
119
|
puts response.body
|
120
120
|
elsif response.code.to_i == 401
|
121
|
-
|
122
|
-
|
121
|
+
if response["pool-empty"] == "true"
|
122
|
+
puts "#{PROGRAM_NAME} is currently not serving any applications."
|
123
|
+
else
|
124
|
+
print_permission_error_message
|
125
|
+
exit 2
|
126
|
+
end
|
123
127
|
else
|
124
128
|
STDERR.puts "*** An error occured."
|
125
129
|
STDERR.puts "#{response.code}: #{response.body}"
|
@@ -174,8 +178,12 @@ def show_status(instance, options)
|
|
174
178
|
STDERR.puts "*** Tip: if you install the 'xmllint' command then the XML output will be indented."
|
175
179
|
end
|
176
180
|
elsif response.code.to_i == 401
|
177
|
-
|
178
|
-
|
181
|
+
if response["pool-empty"] == "true"
|
182
|
+
puts "#{PROGRAM_NAME} is currently not serving any applications."
|
183
|
+
else
|
184
|
+
print_permission_error_message
|
185
|
+
exit 2
|
186
|
+
end
|
179
187
|
else
|
180
188
|
STDERR.puts "*** An error occured."
|
181
189
|
STDERR.puts "#{response.code}: #{response.body}"
|
data/build/agents.rb
CHANGED
@@ -23,16 +23,16 @@
|
|
23
23
|
|
24
24
|
AGENT_OBJECTS = {
|
25
25
|
'WatchdogMain.o' => [
|
26
|
-
'ext/common/
|
27
|
-
'ext/common/
|
28
|
-
'ext/common/
|
29
|
-
'ext/common/
|
30
|
-
'ext/common/
|
31
|
-
'ext/common/
|
32
|
-
'ext/common/
|
33
|
-
'ext/common/
|
34
|
-
'ext/common/
|
35
|
-
'ext/common/
|
26
|
+
'ext/common/agent/Watchdog/Main.cpp',
|
27
|
+
'ext/common/agent/Watchdog/Main.cpp',
|
28
|
+
'ext/common/agent/Watchdog/AgentWatcher.cpp',
|
29
|
+
'ext/common/agent/Watchdog/CoreWatcher.cpp',
|
30
|
+
'ext/common/agent/Watchdog/UstRouterWatcher.cpp',
|
31
|
+
'ext/common/agent/Watchdog/InstanceDirToucher.cpp',
|
32
|
+
'ext/common/agent/Watchdog/ApiServer.h',
|
33
|
+
'ext/common/agent/ApiServerUtils.h',
|
34
|
+
'ext/common/agent/Core/OptionParser.h',
|
35
|
+
'ext/common/agent/UstRouter/OptionParser.h',
|
36
36
|
'ext/common/ServerKit/Server.h',
|
37
37
|
'ext/common/ServerKit/HttpServer.h',
|
38
38
|
'ext/common/ServerKit/HttpHeaderParser.h',
|
@@ -42,23 +42,23 @@ AGENT_OBJECTS = {
|
|
42
42
|
'ext/common/ResourceLocator.h',
|
43
43
|
'ext/common/Utils/VariantMap.h'
|
44
44
|
],
|
45
|
-
'
|
46
|
-
'ext/common/
|
47
|
-
'ext/common/
|
48
|
-
'ext/common/
|
49
|
-
'ext/common/
|
50
|
-
'ext/common/
|
51
|
-
'ext/common/
|
52
|
-
'ext/common/
|
53
|
-
'ext/common/
|
54
|
-
'ext/common/
|
55
|
-
'ext/common/
|
56
|
-
'ext/common/
|
57
|
-
'ext/common/
|
58
|
-
'ext/common/
|
59
|
-
'ext/common/
|
60
|
-
'ext/common/
|
61
|
-
'ext/common/
|
45
|
+
'CoreMain.o' => [
|
46
|
+
'ext/common/agent/Core/Main.cpp',
|
47
|
+
'ext/common/agent/Core/OptionParser.h',
|
48
|
+
'ext/common/agent/Core/ApiServer.h',
|
49
|
+
'ext/common/agent/Core/ResponseCache.h',
|
50
|
+
'ext/common/agent/Core/RequestHandler.h',
|
51
|
+
'ext/common/agent/Core/RequestHandler/Client.h',
|
52
|
+
'ext/common/agent/Core/RequestHandler/AppResponse.h',
|
53
|
+
'ext/common/agent/Core/RequestHandler/TurboCaching.h',
|
54
|
+
'ext/common/agent/Core/RequestHandler/Utils.cpp',
|
55
|
+
'ext/common/agent/Core/RequestHandler/Hooks.cpp',
|
56
|
+
'ext/common/agent/Core/RequestHandler/InitRequest.cpp',
|
57
|
+
'ext/common/agent/Core/RequestHandler/BufferBody.cpp',
|
58
|
+
'ext/common/agent/Core/RequestHandler/CheckoutSession.cpp',
|
59
|
+
'ext/common/agent/Core/RequestHandler/SendRequest.cpp',
|
60
|
+
'ext/common/agent/Core/RequestHandler/ForwardResponse.cpp',
|
61
|
+
'ext/common/agent/ApiServerUtils.h',
|
62
62
|
'ext/common/ServerKit/Server.h',
|
63
63
|
'ext/common/ServerKit/HttpServer.h',
|
64
64
|
'ext/common/ServerKit/HttpHeaderParser.h',
|
@@ -84,15 +84,15 @@ AGENT_OBJECTS = {
|
|
84
84
|
'ext/common/Utils/SystemMetricsCollector.h',
|
85
85
|
'ext/common/Utils/VariantMap.h'
|
86
86
|
],
|
87
|
-
'
|
88
|
-
'ext/common/
|
89
|
-
'ext/common/
|
90
|
-
'ext/common/
|
91
|
-
'ext/common/
|
92
|
-
'ext/common/
|
93
|
-
'ext/common/
|
94
|
-
'ext/common/
|
95
|
-
'ext/common/
|
87
|
+
'UstRouterMain.o' => [
|
88
|
+
'ext/common/agent/UstRouter/Main.cpp',
|
89
|
+
'ext/common/agent/UstRouter/OptionParser.h',
|
90
|
+
'ext/common/agent/UstRouter/ApiServer.h',
|
91
|
+
'ext/common/agent/UstRouter/LoggingServer.h',
|
92
|
+
'ext/common/agent/UstRouter/RemoteSender.h',
|
93
|
+
'ext/common/agent/UstRouter/DataStoreId.h',
|
94
|
+
'ext/common/agent/UstRouter/FilterSupport.h',
|
95
|
+
'ext/common/agent/ApiServerUtils.h',
|
96
96
|
'ext/common/ServerKit/Server.h',
|
97
97
|
'ext/common/ServerKit/HttpServer.h',
|
98
98
|
'ext/common/ServerKit/HttpHeaderParser.h',
|
@@ -104,15 +104,15 @@ AGENT_OBJECTS = {
|
|
104
104
|
'ext/common/Utils/VariantMap.h',
|
105
105
|
'ext/common/Utils/BlockingQueue.h'
|
106
106
|
],
|
107
|
-
'
|
108
|
-
'ext/common/
|
107
|
+
'SystemMetricsMain.o' => [
|
108
|
+
'ext/common/agent/SystemMetrics/Main.cpp',
|
109
109
|
'ext/common/Utils/SystemMetricsCollector.h'
|
110
110
|
],
|
111
|
-
'
|
112
|
-
'ext/common/
|
111
|
+
'TempDirToucherMain.o' => [
|
112
|
+
'ext/common/agent/TempDirToucher/Main.cpp'
|
113
113
|
],
|
114
|
-
'
|
115
|
-
'ext/common/
|
114
|
+
'SpawnPreparerMain.o' => [
|
115
|
+
'ext/common/agent/SpawnPreparer/Main.cpp'
|
116
116
|
]
|
117
117
|
}
|
118
118
|
|
@@ -133,12 +133,12 @@ AGENT_OBJECTS.each_pair do |agent_object, agent_dependencies|
|
|
133
133
|
end
|
134
134
|
|
135
135
|
agent_libs = COMMON_LIBRARY.
|
136
|
-
only(:base, :
|
136
|
+
only(:base, :ust_router, :other).
|
137
137
|
exclude('AgentsStarter.o')
|
138
138
|
agent_objects = AGENT_OBJECTS.keys.map { |x| "#{AGENT_OUTPUT_DIR}#{x}" }
|
139
139
|
dependencies = agent_objects + [
|
140
140
|
'ext/common/Constants.h',
|
141
|
-
'ext/common/
|
141
|
+
'ext/common/agent/Main.cpp',
|
142
142
|
LIBBOOST_OXT,
|
143
143
|
agent_libs.link_objects,
|
144
144
|
LIBEV_TARGET,
|
@@ -147,7 +147,7 @@ dependencies = agent_objects + [
|
|
147
147
|
file AGENT_OUTPUT_DIR + AGENT_EXE => dependencies do
|
148
148
|
agent_objects_as_string = agent_objects.join(" ")
|
149
149
|
sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR)
|
150
|
-
compile_cxx("ext/common/
|
150
|
+
compile_cxx("ext/common/agent/Main.cpp",
|
151
151
|
"-o #{AGENT_OUTPUT_DIR}#{AGENT_EXE}.o " <<
|
152
152
|
"#{EXTRA_PRE_CXXFLAGS} " <<
|
153
153
|
"-Iext -Iext/common " <<
|
data/build/apache2.rb
CHANGED
@@ -35,7 +35,7 @@ APACHE2_MODULE_INPUT_FILES = {
|
|
35
35
|
ext/apache2/Configuration.cpp
|
36
36
|
ext/apache2/Configuration.h
|
37
37
|
ext/apache2/Configuration.hpp
|
38
|
-
ext/common/
|
38
|
+
ext/common/agent/UstRouter/FilterSupport.h),
|
39
39
|
APACHE2_OUTPUT_DIR + 'Bucket.o' => %w(
|
40
40
|
ext/apache2/Bucket.cpp
|
41
41
|
ext/apache2/Bucket.h),
|
data/build/basics.rb
CHANGED
@@ -165,7 +165,7 @@ AGENT_LDFLAGS << " #{PlatformInfo.dmalloc_ldflags}" if USE_DMALLOC
|
|
165
165
|
AGENT_LDFLAGS << " #{PlatformInfo.electric_fence_ldflags}" if USE_EFENCE
|
166
166
|
AGENT_LDFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN
|
167
167
|
AGENT_LDFLAGS << " -lselinux" if USE_SELINUX
|
168
|
-
# Extra linker flags for backtrace_symbols() to generate useful output (see
|
168
|
+
# Extra linker flags for backtrace_symbols() to generate useful output (see agent/Base.cpp).
|
169
169
|
AGENT_LDFLAGS << " #{PlatformInfo.export_dynamic_flags}"
|
170
170
|
# Enable dead symbol elimination on OS X.
|
171
171
|
AGENT_LDFLAGS << " -Wl,-dead_strip" if PlatformInfo.os_name == "macosx"
|
data/build/cxx_tests.rb
CHANGED
@@ -160,16 +160,16 @@ TEST_CXX_OBJECTS = {
|
|
160
160
|
ext/common/Utils/Dechunker.h),
|
161
161
|
'test/cxx/ResponseCacheTest.o' => %w(
|
162
162
|
test/cxx/ResponseCacheTest.cpp
|
163
|
-
ext/common/
|
164
|
-
ext/common/
|
165
|
-
ext/common/
|
163
|
+
ext/common/agent/Core/ResponseCache.h
|
164
|
+
ext/common/agent/Core/RequestHandler/Request.h
|
165
|
+
ext/common/agent/Core/RequestHandler/AppResponse.h
|
166
166
|
ext/common/ServerKit/HttpRequest.h),
|
167
167
|
'test/cxx/UnionStationTest.o' => %w(
|
168
168
|
test/cxx/UnionStationTest.cpp
|
169
|
-
ext/common/
|
170
|
-
ext/common/
|
171
|
-
ext/common/
|
172
|
-
ext/common/
|
169
|
+
ext/common/agent/UstRouter/LoggingServer.h
|
170
|
+
ext/common/agent/UstRouter/RemoteSender.h
|
171
|
+
ext/common/agent/UstRouter/DataStoreId.h
|
172
|
+
ext/common/agent/UstRouter/FilterSupport.h
|
173
173
|
ext/common/UnionStation/Connection.h
|
174
174
|
ext/common/UnionStation/Core.h
|
175
175
|
ext/common/UnionStation/Transaction.h
|
@@ -190,10 +190,10 @@ TEST_CXX_OBJECTS = {
|
|
190
190
|
ext/common/MessageServer.h),
|
191
191
|
# 'test/cxx/RequestHandlerTest.o' => %w(
|
192
192
|
# test/cxx/RequestHandlerTest.cpp
|
193
|
-
# ext/common/
|
194
|
-
# ext/common/
|
195
|
-
# ext/common/
|
196
|
-
# ext/common/
|
193
|
+
# ext/common/agent/Core/RequestHandler.h
|
194
|
+
# ext/common/agent/Core/FileBackedPipe.h
|
195
|
+
# ext/common/agent/Core/ScgiRequestParser.h
|
196
|
+
# ext/common/agent/Core/AgentOptions.h
|
197
197
|
# ext/common/UnionStation/Connection.h
|
198
198
|
# ext/common/UnionStation/Core.h
|
199
199
|
# ext/common/UnionStation/Transaction.h
|
@@ -221,7 +221,7 @@ TEST_CXX_OBJECTS = {
|
|
221
221
|
ext/common/Utils/SystemTime.cpp),
|
222
222
|
'test/cxx/FilterSupportTest.o' => %w(
|
223
223
|
test/cxx/FilterSupportTest.cpp
|
224
|
-
ext/common/
|
224
|
+
ext/common/agent/UstRouter/FilterSupport.h),
|
225
225
|
'test/cxx/CachedFileStatTest.o' => %w(
|
226
226
|
test/cxx/CachedFileStatTest.cpp
|
227
227
|
ext/common/Utils/CachedFileStat.hpp
|
@@ -178,16 +178,16 @@ passenger_ctl licensing_data_points_auto_send false;
|
|
178
178
|
</code></pre>
|
179
179
|
|
180
180
|
<p>Then restart Apache/Nginx. This configuration tells Phusion Passenger Enterprise not to automatically send usage data to the Phusion licensing server.</p></li>
|
181
|
-
<li><p>Find out what user the
|
181
|
+
<li><p>Find out what user the Passenger core process is running as.</p>
|
182
182
|
|
183
|
-
<p>First, look for the PID of the
|
183
|
+
<p>First, look for the PID of the Passenger core process.</p>
|
184
184
|
|
185
185
|
<pre><code>bash# passenger-memory-stats
|
186
186
|
...
|
187
187
|
------ Passenger processes ------
|
188
188
|
PID VMSize Resident Name
|
189
189
|
---------------------------------
|
190
|
-
11243 2405.8 MB 2.7 MB
|
190
|
+
11243 2405.8 MB 2.7 MB Passenger: core
|
191
191
|
...
|
192
192
|
</code></pre>
|
193
193
|
|
@@ -202,7 +202,7 @@ PID VMSize Resident Name
|
|
202
202
|
<pre><code>bash# mkdir /var/lib/passenger-enterprise-usage
|
203
203
|
</code></pre>
|
204
204
|
|
205
|
-
<p>Ensure that it's owned by the user that
|
205
|
+
<p>Ensure that it's owned by the user that the core runs as, and make it owner-accessible only:</p>
|
206
206
|
|
207
207
|
<pre><code>bash# chown root: /var/lib/passenger-enterprise-usage
|
208
208
|
bash# chmod 700 /var/lib/passenger-enterprise-usage
|
@@ -231,7 +231,7 @@ rm -f /var/lib/passenger-enterprise-usage/*.tar.gz
|
|
231
231
|
|
232
232
|
<p>Here, <code>foo@reporter-machine-host-name</code> specifies which reporter machine you want to copy the package to, and which username you want to use to login to the reporter machine. Replace this with an appropriate value.</p>
|
233
233
|
|
234
|
-
<p><strong>Notes about SSH keys</strong>: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that
|
234
|
+
<p><strong>Notes about SSH keys</strong>: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that the Passenger core is running as.</p>
|
235
235
|
|
236
236
|
<p><strong>Notes about PATH</strong>: the above script assumes that the <code>passenger-config</code> command is in PATH. This is always the case if you installed Passenger Enterprise using Debian or RPM packages, but may not be the case if you installed it using RubyGems or tarball. If it's not in PATH, or when in doubt, you should specify the full path to passenger-config. You can find out where passenger-config is using <code>which</code>. For example:</p>
|
237
237
|
|
@@ -243,7 +243,7 @@ rm -f /var/lib/passenger-enterprise-usage/*.tar.gz
|
|
243
243
|
|
244
244
|
<pre><code>/opt/passenger-enterprise-x.x.x/bin/passenger-config package-cloud-usage ...
|
245
245
|
</code></pre></li>
|
246
|
-
<li><p>Open the crontab of the user that
|
246
|
+
<li><p>Open the crontab of the user that the Passenger core is running as. For example, if the core is running as root:</p>
|
247
247
|
|
248
248
|
<pre><code>bash# sudo -u root -H crontab -e
|
249
249
|
</code></pre></li>
|
@@ -251,7 +251,7 @@ rm -f /var/lib/passenger-enterprise-usage/*.tar.gz
|
|
251
251
|
|
252
252
|
<pre><code>0 0 1 * * /var/lib/passenger-enterprise-usage/script
|
253
253
|
</code></pre></li>
|
254
|
-
<li><p>Ensure that <code>/var/lib/passenger-enterprise-usage/script</code> is run during system shutdown, as the user that
|
254
|
+
<li><p>Ensure that <code>/var/lib/passenger-enterprise-usage/script</code> is run during system shutdown, as the user that the Passenger core is running as. On most Linux systems, this can be achieved by as follows:</p>
|
255
255
|
|
256
256
|
<pre><code>bash# touch /etc/init.d/passenger-enterprise-cloud-license
|
257
257
|
bash# chmod +x /etc/init.d/passenger-enterprise-cloud-license
|
@@ -260,14 +260,14 @@ bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc6.d/K00passeng
|
|
260
260
|
bash# editor /etc/init.d/passenger-enterprise-cloud-license
|
261
261
|
</code></pre>
|
262
262
|
|
263
|
-
<p>If
|
263
|
+
<p>If the Passenger core is running as root, then <code>/etc/init.d/passenger-enterprise-cloud-license</code> should contain:</p>
|
264
264
|
|
265
265
|
<pre><code>#!/bin/bash
|
266
266
|
set -e
|
267
267
|
exec /var/lib/passenger-enterprise-usage/script
|
268
268
|
</code></pre>
|
269
269
|
|
270
|
-
<p>If
|
270
|
+
<p>If the Passenger core is not running as root, then it should contain:</p>
|
271
271
|
|
272
272
|
<pre><code>#!/bin/bash
|
273
273
|
set -e
|
@@ -322,7 +322,7 @@ bash$ tar xzvf master.tar.gz && rm master.tar.gz
|
|
322
322
|
<p>Once the web servers and the reporter machine are all setup, you can test whether the setup works correctly.</p>
|
323
323
|
|
324
324
|
<ol>
|
325
|
-
<li><p>On each web server, run <code>/var/lib/passenger-enterprise-usage/script</code> as the user that
|
325
|
+
<li><p>On each web server, run <code>/var/lib/passenger-enterprise-usage/script</code> as the user that the Passenger core runs as. For example, if the core is running as root:</p>
|
326
326
|
|
327
327
|
<pre><code>sudo -u root -H /var/lib/passenger-enterprise-usage/script
|
328
328
|
</code></pre>
|
@@ -37,16 +37,16 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
37
37
|
|
38
38
|
Then restart Apache/Nginx. This configuration tells Phusion Passenger Enterprise not to automatically send usage data to the Phusion licensing server.
|
39
39
|
|
40
|
-
3. Find out what user the
|
40
|
+
3. Find out what user the Passenger core process is running as.
|
41
41
|
|
42
|
-
First, look for the PID of the
|
42
|
+
First, look for the PID of the Passenger core process.
|
43
43
|
|
44
44
|
bash# passenger-memory-stats
|
45
45
|
...
|
46
46
|
------ Passenger processes ------
|
47
47
|
PID VMSize Resident Name
|
48
48
|
---------------------------------
|
49
|
-
11243 2405.8 MB 2.7 MB
|
49
|
+
11243 2405.8 MB 2.7 MB Passenger: core
|
50
50
|
...
|
51
51
|
|
52
52
|
Then use `ps` to determine what user it's running as. Usually, it's running as root.
|
@@ -59,7 +59,7 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
59
59
|
|
60
60
|
bash# mkdir /var/lib/passenger-enterprise-usage
|
61
61
|
|
62
|
-
Ensure that it's owned by the user that
|
62
|
+
Ensure that it's owned by the user that the core runs as, and make it owner-accessible only:
|
63
63
|
|
64
64
|
bash# chown root: /var/lib/passenger-enterprise-usage
|
65
65
|
bash# chmod 700 /var/lib/passenger-enterprise-usage
|
@@ -86,7 +86,7 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
86
86
|
|
87
87
|
Here, `foo@reporter-machine-host-name` specifies which reporter machine you want to copy the package to, and which username you want to use to login to the reporter machine. Replace this with an appropriate value.
|
88
88
|
|
89
|
-
**Notes about SSH keys**: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that
|
89
|
+
**Notes about SSH keys**: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that the Passenger core is running as.
|
90
90
|
|
91
91
|
**Notes about PATH**: the above script assumes that the `passenger-config` command is in PATH. This is always the case if you installed Passenger Enterprise using Debian or RPM packages, but may not be the case if you installed it using RubyGems or tarball. If it's not in PATH, or when in doubt, you should specify the full path to passenger-config. You can find out where passenger-config is using `which`. For example:
|
92
92
|
|
@@ -97,7 +97,7 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
97
97
|
|
98
98
|
/opt/passenger-enterprise-x.x.x/bin/passenger-config package-cloud-usage ...
|
99
99
|
|
100
|
-
6. Open the crontab of the user that
|
100
|
+
6. Open the crontab of the user that the Passenger core is running as. For example, if the core is running as root:
|
101
101
|
|
102
102
|
bash# sudo -u root -H crontab -e
|
103
103
|
|
@@ -105,7 +105,7 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
105
105
|
|
106
106
|
0 0 1 * * /var/lib/passenger-enterprise-usage/script
|
107
107
|
|
108
|
-
8. Ensure that `/var/lib/passenger-enterprise-usage/script` is run during system shutdown, as the user that
|
108
|
+
8. Ensure that `/var/lib/passenger-enterprise-usage/script` is run during system shutdown, as the user that the Passenger core is running as. On most Linux systems, this can be achieved by as follows:
|
109
109
|
|
110
110
|
bash# touch /etc/init.d/passenger-enterprise-cloud-license
|
111
111
|
bash# chmod +x /etc/init.d/passenger-enterprise-cloud-license
|
@@ -113,13 +113,13 @@ Follow these instructions on each server running Phusion Passenger Enterprise wi
|
|
113
113
|
bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc6.d/K00passenger-enterprise-cloud-license
|
114
114
|
bash# editor /etc/init.d/passenger-enterprise-cloud-license
|
115
115
|
|
116
|
-
If
|
116
|
+
If the Passenger core is running as root, then `/etc/init.d/passenger-enterprise-cloud-license` should contain:
|
117
117
|
|
118
118
|
#!/bin/bash
|
119
119
|
set -e
|
120
120
|
exec /var/lib/passenger-enterprise-usage/script
|
121
121
|
|
122
|
-
If
|
122
|
+
If the Passenger core is not running as root, then it should contain:
|
123
123
|
|
124
124
|
#!/bin/bash
|
125
125
|
set -e
|
@@ -166,7 +166,7 @@ In phase 1, you've setup web servers to scp usage data packages to the reporter
|
|
166
166
|
|
167
167
|
Once the web servers and the reporter machine are all setup, you can test whether the setup works correctly.
|
168
168
|
|
169
|
-
1. On each web server, run `/var/lib/passenger-enterprise-usage/script` as the user that
|
169
|
+
1. On each web server, run `/var/lib/passenger-enterprise-usage/script` as the user that the Passenger core runs as. For example, if the core is running as root:
|
170
170
|
|
171
171
|
sudo -u root -H /var/lib/passenger-enterprise-usage/script
|
172
172
|
|