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.

Files changed (124) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +18 -0
  5. data/CONTRIBUTING.md +3 -3
  6. data/bin/passenger-status +12 -4
  7. data/build/agents.rb +45 -45
  8. data/build/apache2.rb +1 -1
  9. data/build/basics.rb +1 -1
  10. data/build/cxx_tests.rb +12 -12
  11. data/doc/CloudLicensingConfiguration.html +10 -10
  12. data/doc/CloudLicensingConfiguration.txt.md +10 -10
  13. data/doc/DebuggingAndStressTesting.md +3 -3
  14. data/doc/Design and Architecture.html +30 -30
  15. data/doc/Design and Architecture.txt +28 -28
  16. data/doc/ServerOptimizationGuide.html +3 -3
  17. data/doc/ServerOptimizationGuide.txt.md +3 -3
  18. data/doc/Users guide Apache.html +24 -12
  19. data/doc/Users guide Apache.txt +2 -2
  20. data/doc/Users guide Nginx.html +24 -12
  21. data/doc/Users guide Nginx.txt +2 -2
  22. data/doc/Users guide Standalone.html +18 -6
  23. data/doc/images/passenger_architecture.png +0 -0
  24. data/doc/images/passenger_architecture.svg +10 -9
  25. data/doc/images/{helper_agent_core_architecture.png → passenger_core_architecture.png} +0 -0
  26. data/doc/users_guide_snippets/environment_variables.txt +1 -1
  27. data/doc/users_guide_snippets/installation/verify_running_epilogue.txt +1 -1
  28. data/doc/users_guide_snippets/support_information.txt +1 -1
  29. data/doc/users_guide_snippets/tips.txt +2 -2
  30. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +1 -1
  31. data/ext/apache2/Bucket.h +5 -5
  32. data/ext/apache2/Configuration.cpp +1 -1
  33. data/ext/apache2/Configuration.hpp +2 -3
  34. data/ext/apache2/ConfigurationFields.hpp +3 -0
  35. data/ext/apache2/ConfigurationFields.hpp.erb +3 -0
  36. data/ext/apache2/Hooks.cpp +42 -34
  37. data/ext/common/Account.h +3 -3
  38. data/ext/common/AgentsStarter.cpp +7 -7
  39. data/ext/common/AgentsStarter.h +20 -20
  40. data/ext/common/ApplicationPool2/Options.h +12 -12
  41. data/ext/common/Constants.h +10 -8
  42. data/ext/common/Logging.cpp +22 -1
  43. data/ext/common/Logging.h +19 -2
  44. data/ext/common/ServerKit/AcceptLoadBalancer.h +3 -3
  45. data/ext/common/ServerKit/Server.h +24 -0
  46. data/ext/common/UnionStation/Connection.h +1 -1
  47. data/ext/common/UnionStation/Core.h +21 -21
  48. data/ext/common/UnionStation/Transaction.h +3 -3
  49. data/ext/common/Utils.cpp +2 -2
  50. data/ext/common/Utils/IOUtils.cpp +5 -1
  51. data/ext/common/{agents → agent}/ApiServerUtils.h +3 -3
  52. data/ext/common/{agents → agent}/Base.cpp +2 -2
  53. data/ext/common/{agents → agent}/Base.h +0 -0
  54. data/ext/common/{agents/HelperAgent → agent/Core}/ApiServer.h +33 -9
  55. data/ext/common/{agents/HelperAgent → agent/Core}/Main.cpp +60 -59
  56. data/ext/common/{agents/HelperAgent → agent/Core}/OptionParser.h +32 -25
  57. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler.h +17 -17
  58. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/AppResponse.h +0 -0
  59. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/BufferBody.cpp +0 -0
  60. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/CheckoutSession.cpp +0 -0
  61. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Client.h +2 -2
  62. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/ForwardResponse.cpp +0 -0
  63. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Hooks.cpp +0 -0
  64. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/InitRequest.cpp +4 -3
  65. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Request.h +1 -1
  66. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/SendRequest.cpp +0 -0
  67. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/TurboCaching.h +1 -1
  68. data/ext/common/{agents/HelperAgent → agent/Core}/RequestHandler/Utils.cpp +0 -0
  69. data/ext/common/{agents/HelperAgent → agent/Core}/ResponseCache.h +0 -0
  70. data/ext/common/{agents → agent}/Main.cpp +9 -9
  71. data/ext/common/{agents → agent}/SpawnPreparer/Main.cpp +0 -0
  72. data/ext/common/{agents/HelperAgent/SystemMetricsTool.cpp → agent/SystemMetrics/Main.cpp} +0 -0
  73. data/ext/common/{agents → agent}/TempDirToucher/Main.cpp +0 -0
  74. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/ApiServer.h +7 -7
  75. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/DataStoreId.h +0 -0
  76. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/FilterSupport.cpp +0 -0
  77. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/FilterSupport.h +0 -0
  78. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/LoggingServer.h +4 -4
  79. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/Main.cpp +45 -45
  80. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/OptionParser.h +20 -20
  81. data/ext/common/{agents/LoggingAgent → agent/UstRouter}/RemoteSender.h +0 -0
  82. data/ext/common/{agents → agent}/Watchdog/AgentWatcher.cpp +0 -0
  83. data/ext/common/{agents → agent}/Watchdog/ApiServer.h +1 -1
  84. data/ext/common/{agents/Watchdog/HelperAgentWatcher.cpp → agent/Watchdog/CoreWatcher.cpp} +14 -10
  85. data/ext/common/{agents → agent}/Watchdog/InstanceDirToucher.cpp +0 -0
  86. data/ext/common/{agents → agent}/Watchdog/Main.cpp +131 -75
  87. data/ext/common/{agents/Watchdog/LoggingAgentWatcher.cpp → agent/Watchdog/UstRouterWatcher.cpp} +13 -9
  88. data/ext/nginx/CacheLocationConfig.c +11 -6
  89. data/ext/nginx/CacheLocationConfig.c.erb +11 -6
  90. data/ext/nginx/Configuration.c +22 -7
  91. data/ext/nginx/Configuration.h +1 -19
  92. data/ext/nginx/ConfigurationFields.h +19 -0
  93. data/ext/nginx/ConfigurationFields.h.erb +19 -0
  94. data/ext/nginx/ContentHandler.c +33 -33
  95. data/ext/nginx/CreateLocationConfig.c +3 -1
  96. data/ext/nginx/CreateLocationConfig.c.erb +3 -1
  97. data/ext/nginx/MergeLocationConfig.c +8 -4
  98. data/ext/nginx/MergeLocationConfig.c.erb +7 -3
  99. data/ext/nginx/ngx_http_passenger_module.c +33 -42
  100. data/helper-scripts/backtrace-sanitizer.rb +2 -2
  101. data/lib/phusion_passenger.rb +1 -1
  102. data/lib/phusion_passenger/admin_tools/instance.rb +2 -2
  103. data/lib/phusion_passenger/admin_tools/instance_registry.rb +7 -3
  104. data/lib/phusion_passenger/common_library.rb +8 -8
  105. data/lib/phusion_passenger/config/about_command.rb +1 -1
  106. data/lib/phusion_passenger/config/api_call_command.rb +3 -3
  107. data/lib/phusion_passenger/config/installation_utils.rb +34 -21
  108. data/lib/phusion_passenger/config/reopen_logs_command.rb +2 -2
  109. data/lib/phusion_passenger/config/restart_app_command.rb +18 -4
  110. data/lib/phusion_passenger/constants.rb +7 -5
  111. data/lib/phusion_passenger/loader_shared_helpers.rb +2 -6
  112. data/lib/phusion_passenger/message_client.rb +8 -8
  113. data/lib/phusion_passenger/platform_info/ruby.rb +1 -2
  114. data/lib/phusion_passenger/preloader_shared_helpers.rb +1 -1
  115. data/lib/phusion_passenger/request_handler.rb +3 -2
  116. data/lib/phusion_passenger/request_handler/thread_handler.rb +4 -4
  117. data/lib/phusion_passenger/standalone/start_command.rb +13 -3
  118. data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -1
  119. data/lib/phusion_passenger/union_station/core.rb +18 -18
  120. data/lib/phusion_passenger/union_station/transaction.rb +5 -5
  121. data/resources/oss-binaries.phusionpassenger.com.crt +0 -84
  122. data/resources/templates/standalone/config.erb +1 -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yLk=
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
- iQEcBAABAgAGBQJVeH7/AAoJECrHRaUKISqMQZ8H/RnWcjNuNcpgRko+KV6nLxof
6
- /meZflUvmMn6QvR2kE4f4zEsGrhwoP5w17f4+gvg19b8IfSOrqHOFrET8rc4UEUu
7
- TOytgbpyPD4BGSjjy4LCn5Ldv+AA/VE3817IZuozo+j6NuQ6qcKReeNt8K4DXDZ6
8
- aPSRwuY5zqWpK/g69e1byqxn5LrotoyLSmmbpCDObQxAXDHelnluRw1JiEFzojAj
9
- 6ObZj/i7XbHnGKIa3QsvdEh1y63Lnc8T+7N1seukqceLmbQ+D85cWuE7BEbTJhBA
10
- /8+RF4t1v5tuRaXOPaQKDT/SD+Re3KO5kuuNc8a6q4TiLVGyJ3eApkilqFzCEsA=
11
- =LCRZ
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
 
@@ -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 is the main Phusion Passenger control process, starts the HTTP server and the logging agent, and restarts them when they crash. It also cleans everything up upon shut down.
182
- * The HTTP server 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 logging agent processes Union Station data and sends them to the Union Station server.
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>
@@ -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
- print_permission_error_message
122
- exit 2
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
- print_permission_error_message
178
- exit 2
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}"
@@ -23,16 +23,16 @@
23
23
 
24
24
  AGENT_OBJECTS = {
25
25
  'WatchdogMain.o' => [
26
- 'ext/common/agents/Watchdog/Main.cpp',
27
- 'ext/common/agents/Watchdog/Main.cpp',
28
- 'ext/common/agents/Watchdog/AgentWatcher.cpp',
29
- 'ext/common/agents/Watchdog/HelperAgentWatcher.cpp',
30
- 'ext/common/agents/Watchdog/LoggingAgentWatcher.cpp',
31
- 'ext/common/agents/Watchdog/InstanceDirToucher.cpp',
32
- 'ext/common/agents/Watchdog/ApiServer.h',
33
- 'ext/common/agents/ApiServerUtils.h',
34
- 'ext/common/agents/HelperAgent/OptionParser.h',
35
- 'ext/common/agents/LoggingAgent/OptionParser.h',
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
- 'ServerMain.o' => [
46
- 'ext/common/agents/HelperAgent/Main.cpp',
47
- 'ext/common/agents/HelperAgent/OptionParser.h',
48
- 'ext/common/agents/HelperAgent/ApiServer.h',
49
- 'ext/common/agents/HelperAgent/ResponseCache.h',
50
- 'ext/common/agents/HelperAgent/RequestHandler.h',
51
- 'ext/common/agents/HelperAgent/RequestHandler/Client.h',
52
- 'ext/common/agents/HelperAgent/RequestHandler/AppResponse.h',
53
- 'ext/common/agents/HelperAgent/RequestHandler/TurboCaching.h',
54
- 'ext/common/agents/HelperAgent/RequestHandler/Utils.cpp',
55
- 'ext/common/agents/HelperAgent/RequestHandler/Hooks.cpp',
56
- 'ext/common/agents/HelperAgent/RequestHandler/InitRequest.cpp',
57
- 'ext/common/agents/HelperAgent/RequestHandler/BufferBody.cpp',
58
- 'ext/common/agents/HelperAgent/RequestHandler/CheckoutSession.cpp',
59
- 'ext/common/agents/HelperAgent/RequestHandler/SendRequest.cpp',
60
- 'ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp',
61
- 'ext/common/agents/ApiServerUtils.h',
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
- 'LoggingMain.o' => [
88
- 'ext/common/agents/LoggingAgent/Main.cpp',
89
- 'ext/common/agents/LoggingAgent/OptionParser.h',
90
- 'ext/common/agents/LoggingAgent/ApiServer.h',
91
- 'ext/common/agents/LoggingAgent/LoggingServer.h',
92
- 'ext/common/agents/LoggingAgent/RemoteSender.h',
93
- 'ext/common/agents/LoggingAgent/DataStoreId.h',
94
- 'ext/common/agents/LoggingAgent/FilterSupport.h',
95
- 'ext/common/agents/ApiServerUtils.h',
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
- 'SystemMetricsTool.o' => [
108
- 'ext/common/agents/HelperAgent/SystemMetricsTool.cpp',
107
+ 'SystemMetricsMain.o' => [
108
+ 'ext/common/agent/SystemMetrics/Main.cpp',
109
109
  'ext/common/Utils/SystemMetricsCollector.h'
110
110
  ],
111
- 'TempDirToucher.o' => [
112
- 'ext/common/agents/TempDirToucher/Main.cpp'
111
+ 'TempDirToucherMain.o' => [
112
+ 'ext/common/agent/TempDirToucher/Main.cpp'
113
113
  ],
114
- 'SpawnPreparer.o' => [
115
- 'ext/common/agents/SpawnPreparer/Main.cpp'
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, :logging_agent, :other).
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/agents/Main.cpp',
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/agents/Main.cpp",
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 " <<
@@ -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/agents/LoggingAgent/FilterSupport.h),
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),
@@ -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 AgentsBase.cpp).
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"
@@ -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/agents/HelperAgent/ResponseCache.h
164
- ext/common/agents/HelperAgent/RequestHandler/Request.h
165
- ext/common/agents/HelperAgent/RequestHandler/AppResponse.h
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/agents/LoggingAgent/LoggingServer.h
170
- ext/common/agents/LoggingAgent/RemoteSender.h
171
- ext/common/agents/LoggingAgent/DataStoreId.h
172
- ext/common/agents/LoggingAgent/FilterSupport.h
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/agents/HelperAgent/RequestHandler.h
194
- # ext/common/agents/HelperAgent/FileBackedPipe.h
195
- # ext/common/agents/HelperAgent/ScgiRequestParser.h
196
- # ext/common/agents/HelperAgent/AgentOptions.h
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/agents/LoggingAgent/FilterSupport.h),
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 PassengerHelperAgent process is running as.</p>
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 PassengerHelperAgent process.</p>
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 PassengerHelperAgent
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 PassengerHelperAgent runs as, and make it owner-accessible only:</p>
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 PassengerHelperAgent is running as.</p>
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 PassengerHelperAgent is running as. For example, if PassengerHelperAgent is running as root:</p>
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 PassengerHelperAgent is running as. On most Linux systems, this can be achieved by as follows:</p>
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 PassengerHelperAgent is running as root, then <code>/etc/init.d/passenger-enterprise-cloud-license</code> should contain:</p>
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 PassengerHelperAgent is not running as root, then it should contain:</p>
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 &amp;&amp; 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 PassengerHelperAgent runs as. For example, if PassengerHelperAgent is running as root:</p>
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 PassengerHelperAgent process is running as.
40
+ 3. Find out what user the Passenger core process is running as.
41
41
 
42
- First, look for the PID of the PassengerHelperAgent process.
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 PassengerHelperAgent
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 PassengerHelperAgent runs as, and make it owner-accessible only:
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 PassengerHelperAgent is running as.
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 PassengerHelperAgent is running as. For example, if PassengerHelperAgent is running as root:
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 PassengerHelperAgent is running as. On most Linux systems, this can be achieved by as follows:
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 PassengerHelperAgent is running as root, then `/etc/init.d/passenger-enterprise-cloud-license` should contain:
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 PassengerHelperAgent is not running as root, then it should contain:
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 PassengerHelperAgent runs as. For example, if PassengerHelperAgent is running as root:
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