passenger 5.0.11 → 5.0.13

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjFiNWQ0MmNkOTQ1MWMzNzNiNmY1NTE0ZDQ2YTM3YzJhNTA0ZDU2OQ==
4
+ YWNmODU4ZmM3Zjk1YjliNGU3MWNlZmQyMzNkMmJmMzNkNWU3YzdjMg==
5
5
  data.tar.gz: !binary |-
6
- OGRhYmI2NzNiOThlYWM2YWMwOWEyMWU1MDUyNTJkYWM0NmIzMzBjMg==
6
+ YjlkZmM4YTUxZWNjMmE2YTY1OTJjZTllMjgwZWFiNmY2MGVlNDJjNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGJmZjE1YTQzYTg1NTU5YmE2NTE2YjFhZGFhNmZjMzc0NzQ1MmFhOTZjOGVh
10
- ZjQzMDIyNjcxNmIyZjdkNjQxZmMwNDgwNWI2MmQ3MDlkZGYzZmU2OTk3YzM0
11
- ZmYyMjAzMTc4NDdlYzQxYzdhODBlY2NjMjYxNzQ1OWE2MDg1OTg=
9
+ NDc5YTA5MjRjOTdiZDlkNGIyN2EyZDcxOTFiNzcyYWU5ZjY4OWMyZWQ0YjBj
10
+ NmY4ZjMxNzY0ZDIwMDQwOWQ4OWE3NTFlZTZiZGFjNTg3Yzk2ZTQ5MGNkZDI0
11
+ MWM0MTBkYWM5NTRhNzYzM2NjMjc1YzMwYmFiYjM2MzI3ODVlNDg=
12
12
  data.tar.gz: !binary |-
13
- NDcwOTRlZDkwYmExOTQyZWEwNDlhODhhNDQ4MzczYTQwYTA5MjYzNzA2ZjE1
14
- NTYwZWQ5OWIyMWYyZjUxMjUxY2YwMTk4YzAyMDMzNDM1YTE5ZmIzOTIyZmRh
15
- YzFlZDljMzE1MGFmMmI2MmU2MTE1NWZkZDQwMzMzNWIxNGI0MDc=
13
+ YzJiNmM4Y2FjOTM4ZTk3NDZlYTA3Y2I5MmEzODMyYzQ0Y2QyZDlmNDkzODY3
14
+ MTQ2NDRmZTA4YjM5M2I5ZGYyNzE4Mzk0NGNjMWNjZTQwZWVjM2U4Yzc3ZWY0
15
+ NTliODY0ZDFmODNlMmMxNDg3MDliYTFjMGFiYTM4N2ZmNmMxOGM=
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
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
5
+ iQEcBAABAgAGBQJVlbSXAAoJECrHRaUKISqMnY4H/0mq05PDibFb5mZEoNx2fxAX
6
+ 3EZiHtDSMvgnMTDYVcUVQlXZlBHZMgUdkjTzNNhbzy2+/rjJDOhwK6qrWUXBoS4T
7
+ uoOBcjGjrAQewkbjgBTLXUl8lFn7ZPK9NbaoHKqcrEtCyCFGpRTZe5aK3g4+/VAj
8
+ ml4lZ1ANC1MET22SYR4/FNTu6jH+upUJKZlkNWuFq/7BcNrwGbOFVtp+9jnm699a
9
+ yXnNpPGVcgba+5Zxvzs7gTPq62ReaBYhOB4iW2G7i5xl4Hz8wCKggA/YxdCAT1Dw
10
+ Qm6acCJt85Fjanf1I46GSGBA5WurDadX7NwFw3MdrSHsizbDIw1PoBDNID8CCTY=
11
+ =b/iP
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
- iQEcBAABAgAGBQJViQ+SAAoJECrHRaUKISqMrPsIAIotbspFEsXcIDrDK5Fzzdk8
6
- /LpiPwn3tsH9ieSasBJnwNmjFWrMp5slr8ta67EqSW+pnP7wmw2EsK7/J9kLDP8c
7
- UtLFCBm7eAju4CmprZhu2UtqrpwiOZgSLk0Ze8HuIPE4dnYxa9N69HSeOtSyW4lO
8
- J2TzUC1/QZJSmLG4WXPyBah6e6sFhZdoHGge78xCsoQR8fspAj1p7t6TBmESVAmA
9
- MW7A0ZPXlXRdw0N3OaTK9vnG+Y1UtMmN45PD4NjZHpntOB3wcWv+Sm8nYRWzFdAx
10
- hjKsZFLqQHkNXfcsVdCeStyzEcbmdE8fbUSBDPtjDVPlicD2AvHjG4rMOdgOZ1s=
11
- =UBLz
5
+ iQEcBAABAgAGBQJVlbSXAAoJECrHRaUKISqMvv0H/3EdFquHBvaanNXhPdyGC3BJ
6
+ N9IgjHe9PrHrrAATNAWOeGeiLzeiusWWm1t4SHfMsTfY7u7YICQBVkMvum/JQiZY
7
+ E1ms/79bBHz7oeDq9J5PAlmqXCZZ8KGg3eNlVJm3ASZIydjL+8i0EciQcrDpYiMV
8
+ 5daAummZTuS932whowpdIYd0zqdtqIKtlRq6IVYrhPGfSiIDCSjVMEkf4gl1uhKx
9
+ hzyGkGPIg4XUKhjPpiddAVlahiWdshDiytxXV4qeholJycXjZYAUL0DxLgkOyU1F
10
+ 9yCM2r5uXB/pQpwo+sOFgrjDSUr3zYkO3uMUUogO78rOIgcnJ2WMXZTz/0Oo2TM=
11
+ =VV1v
12
12
  -----END PGP SIGNATURE-----
data/CHANGELOG CHANGED
@@ -1,3 +1,18 @@
1
+ Release 5.0.13
2
+ --------------
3
+
4
+ * The `passenger-config restart-app` command now supports the option `--ignore-passenger-not-running`. If this option is given, the command will exit normally instead of exiting with an error, if Passenger is not running. This option is useful in deployments involving Passenger Standalone. In an initial deployment, Passenger Standalone may not yet be running. Passenger this option allows you to ignore that issue.
5
+ * SELinux policy issues in the RPMs have been fixed.
6
+ * [Apache] `passenger-config reopen-logs` didn't work on Apache unless you explicitly set `PassengerLogFile`. This has now been fixed.
7
+ * [Standalone] Due to some internal refactorings, the Passenger Standalone Nginx configuration template has changed. If you used a custom Nginx configuration template, please merge our latest changes into it.
8
+
9
+
10
+ Release 5.0.12
11
+ --------------
12
+
13
+ * [Enterprise] Fixed passenger-irb. It was broken in 5.0.10 because of the change that made using admin commands without sudo possible.
14
+
15
+
1
16
  Release 5.0.11
2
17
  --------------
3
18
 
@@ -114,7 +114,7 @@ def show_status(instance, options)
114
114
  when 'pool'
115
115
  request = Net::HTTP::Get.new("/pool.txt?colorize=#{options[:color]}&verbose=#{options[:verbose]}")
116
116
  try_performing_ro_admin_basic_auth(request, instance)
117
- response = instance.http_request("agents.s/server_api", request)
117
+ response = instance.http_request("agents.s/core_api", request)
118
118
  if response.code.to_i / 100 == 2
119
119
  puts response.body
120
120
  elsif response.code.to_i == 401
@@ -133,7 +133,7 @@ def show_status(instance, options)
133
133
  when 'requests', 'server'
134
134
  request = Net::HTTP::Get.new("/server.json")
135
135
  try_performing_ro_admin_basic_auth(request, instance)
136
- response = instance.http_request("agents.s/server_api", request)
136
+ response = instance.http_request("agents.s/core_api", request)
137
137
  if response.code.to_i / 100 == 2
138
138
  puts response.body
139
139
  elsif response.code.to_i == 401
@@ -148,7 +148,7 @@ def show_status(instance, options)
148
148
  when 'backtraces'
149
149
  request = Net::HTTP::Get.new("/backtraces.txt")
150
150
  try_performing_ro_admin_basic_auth(request, instance)
151
- response = instance.http_request("agents.s/server_api", request)
151
+ response = instance.http_request("agents.s/core_api", request)
152
152
  if response.code.to_i / 100 == 2
153
153
  text = response.body
154
154
  # Colorize output
@@ -168,7 +168,7 @@ def show_status(instance, options)
168
168
  when 'xml'
169
169
  request = Net::HTTP::Get.new("/pool.xml?secrets=#{options[:verbose]}")
170
170
  try_performing_ro_admin_basic_auth(request, instance)
171
- response = instance.http_request("agents.s/server_api", request)
171
+ response = instance.http_request("agents.s/core_api", request)
172
172
  if response.code.to_i / 100 == 2
173
173
  indented = format_with_xmllint(response.body)
174
174
  if indented
@@ -193,7 +193,7 @@ def show_status(instance, options)
193
193
  when 'union_station'
194
194
  request = Net::HTTP::Get.new("/status.txt")
195
195
  try_performing_ro_admin_basic_auth(request, instance)
196
- response = instance.http_request("agents.s/logging_api", request)
196
+ response = instance.http_request("agents.s/ust_router_api", request)
197
197
  if response.code.to_i / 100 == 2
198
198
  puts response.body
199
199
  elsif response.code.to_i == 401
@@ -1287,12 +1287,11 @@ public:
1287
1287
 
1288
1288
  VariantMap params;
1289
1289
  params
1290
- .setPid ("web_server_pid", getpid())
1290
+ .setPid ("web_server_control_process_pid", getpid())
1291
1291
  .setStrSet("web_server_config_files", getConfigFiles(s))
1292
1292
  .set ("server_software", webServerDesc)
1293
1293
  .setBool("multi_app", true)
1294
1294
  .setBool("load_shell_envvars", true)
1295
- .set ("log_file", (serverConfig.logFile == NULL) ? "" : serverConfig.logFile)
1296
1295
  .set ("file_descriptor_log_file", (serverConfig.fileDescriptorLogFile == NULL)
1297
1296
  ? "" : serverConfig.fileDescriptorLogFile)
1298
1297
  .set ("data_buffer_dir", serverConfig.dataBufferDir)
@@ -1313,6 +1312,29 @@ public:
1313
1312
  .set ("union_station_proxy_address", serverConfig.unionStationProxyAddress)
1314
1313
  .setBool("turbocaching", serverConfig.turbocaching)
1315
1314
  .setStrSet("prestart_urls", serverConfig.prestartURLs);
1315
+
1316
+ if (serverConfig.logFile != NULL) {
1317
+ params.set("log_file", serverConfig.logFile);
1318
+ } else if (s->error_fname == NULL) {
1319
+ throw ConfigurationException("Cannot initialize " PROGRAM_NAME
1320
+ " because Apache is not configured with an error log file."
1321
+ " Please either configure Apache with an error log file"
1322
+ " (with the ErrorLog directive), or configure "
1323
+ PROGRAM_NAME " with a `PassengerLogFile` directive.");
1324
+ } else if (s->error_fname[0] == '|') {
1325
+ throw ConfigurationException("Apache is configured to log to a pipe,"
1326
+ " so " SHORT_PROGRAM_NAME " cannot be initialized because it doesn't"
1327
+ " support logging to a pipe. Please configure " SHORT_PROGRAM_NAME
1328
+ " with an explicit log file using the `PassengerLogFile` directive.");
1329
+ } else if (strcmp(s->error_fname, "syslog") == 0) {
1330
+ throw ConfigurationException("Apache is configured to log to syslog,"
1331
+ " so " SHORT_PROGRAM_NAME " cannot be initialized because it doesn't"
1332
+ " support logging to syslog. Please configure " SHORT_PROGRAM_NAME
1333
+ " with an explicit log file using the `PassengerLogFile` directive.");
1334
+ } else {
1335
+ params.set("log_file", ap_server_root_relative(pconf, s->error_fname));
1336
+ }
1337
+
1316
1338
  serverConfig.ctl.addTo(params);
1317
1339
 
1318
1340
  agentsStarter.start(serverConfig.root, params);
@@ -35,7 +35,8 @@
35
35
 
36
36
  typedef enum {
37
37
  AS_APACHE,
38
- AS_NGINX
38
+ AS_NGINX,
39
+ AS_STANDALONE
39
40
  } PP_AgentsStarterType;
40
41
 
41
42
  typedef void PP_AgentsStarter;
@@ -289,6 +290,19 @@ public:
289
290
  return pid;
290
291
  }
291
292
 
293
+ const char *getIntegrationModeString() const {
294
+ switch (type) {
295
+ case AS_APACHE:
296
+ return "apache";
297
+ case AS_NGINX:
298
+ return "nginx";
299
+ case AS_STANDALONE:
300
+ return "standalone";
301
+ default:
302
+ return "unknown";
303
+ }
304
+ }
305
+
292
306
  // The 'const string &' here is on purpose. The C getter functions
293
307
  // return the string pointer directly.
294
308
  const string &getCoreAddress() const {
@@ -341,9 +355,9 @@ public:
341
355
 
342
356
  VariantMap params;
343
357
  params
344
- .set ("web_server_type", type == AS_APACHE ? "apache" : "nginx")
345
- .setPid ("web_server_pid", getpid())
358
+ .setPid ("web_server_control_process_pid", getpid())
346
359
  .set ("web_server_passenger_version", PASSENGER_VERSION)
360
+ .set ("integration_mode", getIntegrationModeString())
347
361
  .set ("passenger_root", passengerRoot)
348
362
  .setInt ("log_level", getLogLevel());
349
363
  extraParams.addTo(params);
@@ -124,7 +124,7 @@
124
124
 
125
125
  #define PASSENGER_DEFAULT_USER "nobody"
126
126
 
127
- #define PASSENGER_VERSION "5.0.11"
127
+ #define PASSENGER_VERSION "5.0.13"
128
128
 
129
129
  #define POOL_HELPER_THREAD_STACK_SIZE 262144
130
130
 
@@ -142,11 +142,11 @@
142
142
 
143
143
  #define RPM_NGINX_PACKAGE "nginx"
144
144
 
145
- #define SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION 2
145
+ #define SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION 3
146
146
 
147
- #define SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION 3
147
+ #define SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION 0
148
148
 
149
- #define SERVER_INSTANCE_DIR_STRUCTURE_MIN_SUPPORTED_MINOR_VERSION 3
149
+ #define SERVER_INSTANCE_DIR_STRUCTURE_MIN_SUPPORTED_MINOR_VERSION 0
150
150
 
151
151
  #define SERVER_KIT_MAX_SERVER_ENDPOINTS 4
152
152
 
@@ -500,7 +500,6 @@ setAgentsOptionsDefaults() {
500
500
  static void
501
501
  sanityCheckOptions() {
502
502
  VariantMap &options = *agentsOptions;
503
- string webServerType = options.get("web_server_type", false);
504
503
  bool ok = true;
505
504
 
506
505
  if (!options.has("passenger_root")) {
@@ -799,6 +799,10 @@ setAgentsOptionsDefaults() {
799
799
  options.set("default_group",
800
800
  inferDefaultGroup(options.get("default_user")));
801
801
  }
802
+ options.setDefault("integration_mode", "standalone");
803
+ if (options.get("integration_mode") == "standalone") {
804
+ options.setDefault("standalone_engine", "builtin");
805
+ }
802
806
  options.setDefault("server_software", SERVER_TOKEN_NAME "/" PASSENGER_VERSION);
803
807
  options.setDefaultStrSet("cleanup_pidfiles", vector<string>());
804
808
  options.setDefault("data_buffer_dir", getSystemTempDir());
@@ -988,7 +992,11 @@ initializeWorkingObjects(const WorkingObjectsPtr &wo, InstanceDirToucherPtr &ins
988
992
  instanceOptions.defaultUid = wo->defaultUid;
989
993
  instanceOptions.defaultGid = wo->defaultGid;
990
994
  instanceOptions.properties["name"] = wo->randomGenerator.generateAsciiString(8);
995
+ instanceOptions.properties["integration_mode"] = options.get("integration_mode");
991
996
  instanceOptions.properties["server_software"] = options.get("server_software");
997
+ if (options.get("integration_mode") == "standalone") {
998
+ instanceOptions.properties["standalone_engine"] = options.get("standalone_engine");
999
+ }
992
1000
  if (options.has("web_server_config_files")) {
993
1001
  vector<string> configFiles = options.getStrSet("web_server_config_files");
994
1002
  Json::Value array(Json::arrayValue);
@@ -1149,89 +1157,6 @@ initializeApiServer(const WorkingObjectsPtr &wo) {
1149
1157
  }
1150
1158
  }
1151
1159
 
1152
- static void
1153
- createCompatSymlinks(const WorkingObjectsPtr &wo) {
1154
- /* To maintain backward compatibility with older versions of
1155
- * passenger-status etc, we create compatibility symlinks.
1156
- */
1157
- int ret, e;
1158
- string instanceDir = wo->instanceDir->getPath() + "/";
1159
- string prefix = wo->instanceDir->getPath() + "/agents.s/";
1160
-
1161
- do {
1162
- ret = symlink("watchdog_api", (prefix + "watchdog").c_str());
1163
- } while (ret == -1 && errno == EAGAIN);
1164
- if (ret == -1) {
1165
- e = errno;
1166
- throw FileSystemException("Cannot create symlink: " + prefix + "watchdog",
1167
- e, prefix + "watchdog");
1168
- }
1169
-
1170
- do {
1171
- ret = symlink("core", (prefix + "server").c_str());
1172
- } while (ret == -1 && errno == EAGAIN);
1173
- if (ret == -1) {
1174
- e = errno;
1175
- throw FileSystemException("Cannot create symlink: " + prefix + "server",
1176
- e, prefix + "server");
1177
- }
1178
-
1179
- do {
1180
- ret = symlink("core_api", (prefix + "server_admin").c_str());
1181
- } while (ret == -1 && errno == EAGAIN);
1182
- if (ret == -1) {
1183
- e = errno;
1184
- throw FileSystemException("Cannot create symlink: " + prefix + "server_admin",
1185
- e, prefix + "server_admin");
1186
- }
1187
-
1188
- do {
1189
- ret = symlink("core_api", (prefix + "server_api").c_str());
1190
- } while (ret == -1 && errno == EAGAIN);
1191
- if (ret == -1) {
1192
- e = errno;
1193
- throw FileSystemException("Cannot create symlink: " + prefix + "server_api",
1194
- e, prefix + "server_api");
1195
- }
1196
-
1197
- do {
1198
- ret = symlink("ust_router", (prefix + "logging").c_str());
1199
- } while (ret == -1 && errno == EAGAIN);
1200
- if (ret == -1) {
1201
- e = errno;
1202
- throw FileSystemException("Cannot create symlink: " + prefix + "logging",
1203
- e, prefix + "logging");
1204
- }
1205
-
1206
- do {
1207
- ret = symlink("ust_router_api", (prefix + "logging_admin").c_str());
1208
- } while (ret == -1 && errno == EAGAIN);
1209
- if (ret == -1) {
1210
- e = errno;
1211
- throw FileSystemException("Cannot create symlink: " + prefix + "logging_admin",
1212
- e, prefix + "logging_admin");
1213
- }
1214
-
1215
- do {
1216
- ret = symlink("ust_router_api", (prefix + "logging_api").c_str());
1217
- } while (ret == -1 && errno == EAGAIN);
1218
- if (ret == -1) {
1219
- e = errno;
1220
- throw FileSystemException("Cannot create symlink: " + prefix + "logging_api",
1221
- e, prefix + "logging_api");
1222
- }
1223
-
1224
-
1225
- do {
1226
- ret = symlink("core.pid", (instanceDir + "server.pid").c_str());
1227
- } while (ret == -1 && errno == EAGAIN);
1228
- if (ret == -1) {
1229
- e = errno;
1230
- throw FileSystemException("Cannot create symlink: " + instanceDir + "logging_api",
1231
- e, instanceDir + "server.pid");
1232
- }
1233
- }
1234
-
1235
1160
  static void
1236
1161
  startAgents(const WorkingObjectsPtr &wo, vector<AgentWatcherPtr> &watchers) {
1237
1162
  TRACE_POINT();
@@ -1362,7 +1287,6 @@ watchdogMain(int argc, char *argv[]) {
1362
1287
  initializeWorkingObjects(wo, instanceDirToucher, uidBeforeLoweringPrivilege);
1363
1288
  initializeAgentWatchers(wo, watchers);
1364
1289
  initializeApiServer(wo);
1365
- createCompatSymlinks(wo);
1366
1290
  UPDATE_TRACE_POINT();
1367
1291
  runHookScriptAndThrowOnError("before_watchdog_initialization");
1368
1292
  } catch (const std::exception &e) {
@@ -113,14 +113,14 @@ pp_variant_map_set_ngx_str(PP_VariantMap *m,
113
113
  }
114
114
 
115
115
  /**
116
- * Save the Nginx master process's PID into a file under the server instance directory.
116
+ * Save the Nginx master process's PID into a file in the instance directory.
117
+ * This PID file isn't currently used, but it might be useful for future tooling.
117
118
  *
118
- * A bug/limitation in Nginx doesn't allow us to create the server instance dir
119
- * *after* Nginx has daemonized, so the server instance dir's filename contains Nginx's
120
- * PID before daemonization. Normally PhusionPassenger::AdminTools::ServerInstance (used
121
- * by e.g. passenger-status) will think that the server instance dir is stale because the
122
- * PID in the filename doesn't exist. This PID file tells AdminTools::ServerInstance
123
- * what the actual PID is.
119
+ * The master process's PID is already passed to the Watchdog through the
120
+ * "web_server_control_process_pid" property, but that isn't enough. The Watchdog
121
+ * is started *before* Nginx has daemonized, so after Nginx has daemonized,
122
+ * the PID that we passed to the Watchdog is no longer valid. We fix that by
123
+ * creating this PID file after daemonization.
124
124
  */
125
125
  static ngx_int_t
126
126
  save_master_process_pid(ngx_cycle_t *cycle) {
@@ -128,7 +128,7 @@ save_master_process_pid(ngx_cycle_t *cycle) {
128
128
  u_char *last;
129
129
  FILE *f;
130
130
 
131
- last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/control_process.pid",
131
+ last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/web_server_control_process.pid",
132
132
  pp_agents_starter_get_instance_dir(pp_agents_starter, NULL));
133
133
  *last = (u_char) '\0';
134
134
 
@@ -277,7 +277,7 @@ start_watchdog(ngx_cycle_t *cycle) {
277
277
  }
278
278
  }
279
279
 
280
- pp_variant_map_set_int (params, "web_server_pid", getpid());
280
+ pp_variant_map_set_int (params, "web_server_control_process_pid", getpid());
281
281
  pp_variant_map_set_strset (params, "web_server_config_files", (const char **) &config_file, 1);
282
282
  pp_variant_map_set (params, "server_software", NGINX_VER, strlen(NGINX_VER));
283
283
  pp_variant_map_set_bool (params, "multi_app", 1);
@@ -338,12 +338,12 @@ start_watchdog(ngx_cycle_t *cycle) {
338
338
  goto cleanup;
339
339
  }
340
340
 
341
- /* Create the file instance_dir + "/control_process.pid"
341
+ /* Create the file instance_dir + "/web_server_control_process.pid"
342
342
  * and make it writable by the worker processes. This is because
343
343
  * save_master_process_pid is run after Nginx has lowered privileges.
344
344
  */
345
345
  last = ngx_snprintf(filename, sizeof(filename) - 1,
346
- "%s/control_process.pid",
346
+ "%s/web_server_control_process.pid",
347
347
  pp_agents_starter_get_instance_dir(pp_agents_starter, NULL));
348
348
  *last = (u_char) '\0';
349
349
  if (create_file(cycle, filename, (const u_char *) "", 0) != NGX_OK) {
@@ -30,7 +30,7 @@ module PhusionPassenger
30
30
 
31
31
  PACKAGE_NAME = 'passenger'
32
32
  # Run 'rake ext/common/Constants.h' after changing this number.
33
- VERSION_STRING = '5.0.11'
33
+ VERSION_STRING = '5.0.13'
34
34
 
35
35
  PREFERRED_NGINX_VERSION = '1.8.0'
36
36
  NGINX_SHA256_CHECKSUM = '23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5'
@@ -63,14 +63,14 @@ module PhusionPassenger
63
63
  opts.separator " PATH is the admin URI. You can pass POST data with '-d'."
64
64
  opts.separator ""
65
65
  opts.separator " Example 1: passenger-config api-call GET /server.json"
66
- opts.separator " Sends the 'GET /server.json' command to the HTTP server agent."
66
+ opts.separator " Sends the 'GET /server.json' command to the Passenger core process."
67
67
  opts.separator ""
68
68
  opts.separator " Example 2: passenger-config api-call PUT /config.json \\"
69
69
  opts.separator " -d '{\"log_level\", 7}'"
70
- opts.separator " Sends the 'PUT /config.json' command to the HTTP server agent, with the"
71
- opts.separator " given PUT data."
70
+ opts.separator " Sends the 'PUT /config.json' command to the Passenger core process, with"
71
+ opts.separator " the given PUT data."
72
72
  opts.separator ""
73
- opts.separator " Example 3: passenger-config api-call POST /shutdown.json -a watchdog"
73
+ opts.separator " Example 3: passenger-config api-call POST /shutdown.json -a watchdog_api"
74
74
  opts.separator " Sends the 'POST /shutdown.json' command to the watchdog, with no POST data."
75
75
  opts.separator ""
76
76
  opts.separator " Example 4: passenger-config api-call POST /shutdown.json \\"
@@ -92,7 +92,7 @@ module PhusionPassenger
92
92
  try_performing_full_admin_basic_auth(request, @instance)
93
93
  request.content_type = "application/json"
94
94
  request.body = PhusionPassenger::Utils::JSON.generate(:pid => @pid)
95
- response = @instance.http_request("agents.s/server_api", request)
95
+ response = @instance.http_request("agents.s/core_api", request)
96
96
  if response.code.to_i / 100 == 2
97
97
  body = PhusionPassenger::Utils::JSON.parse(response.body)
98
98
  if body['detached']
@@ -68,14 +68,14 @@ module PhusionPassenger
68
68
  end
69
69
 
70
70
  def perform_reopen_logs
71
- perform_reopen_logs_on("watchdog", "watchdog")
71
+ perform_reopen_logs_on("watchdog", "watchdog_api")
72
72
  perform_reinherit_logs_on("core", "core_api")
73
73
  perform_reinherit_logs_on("UstRouter", "ust_router_api")
74
74
  puts "All done"
75
75
  end
76
76
 
77
77
  def perform_reopen_logs_on(name, socket_name)
78
- puts "Reopening logs for #{AGENT_EXE} #{name}"
78
+ puts "Reopening logs for #{PROGRAM_NAME} #{name}"
79
79
  request = Net::HTTP::Post.new("/reopen_logs.json")
80
80
  try_performing_full_admin_basic_auth(request, @instance)
81
81
  request.content_type = "application/json"
@@ -96,6 +96,11 @@ module PhusionPassenger
96
96
  "default is to exit with an error") do
97
97
  options[:ignore_app_not_running] = true
98
98
  end
99
+ opts.on("--ignore-passenger-not-running", "Exit successfully if #{PROGRAM_NAME}#{nl}" +
100
+ "is not currently running. The default is to#{nl}" +
101
+ "exit with an error") do
102
+ options[:ignore_passenger_not_running] = true
103
+ end
99
104
  opts.on("--instance NAME", String, "The #{PROGRAM_NAME} instance to select") do |value|
100
105
  options[:instance] = value
101
106
  end
@@ -220,7 +225,7 @@ module PhusionPassenger
220
225
  request.body = PhusionPassenger::Utils::JSON.generate(
221
226
  :name => group_name,
222
227
  :method => restart_method)
223
- response = @instance.http_request("agents.s/server_api", request)
228
+ response = @instance.http_request("agents.s/core_api", request)
224
229
  if response.code.to_i / 100 == 2
225
230
  response.body
226
231
  elsif response.code.to_i == 401
@@ -246,7 +251,7 @@ module PhusionPassenger
246
251
  def query_pool_xml
247
252
  request = Net::HTTP::Get.new("/pool.xml")
248
253
  try_performing_ro_admin_basic_auth(request, @instance)
249
- response = @instance.http_request("agents.s/server_api", request)
254
+ response = @instance.http_request("agents.s/core_api", request)
250
255
  if response.code.to_i / 100 == 2
251
256
  REXML::Document.new(response.body)
252
257
  elsif response.code.to_i == 401
@@ -41,18 +41,32 @@ module PhusionPassenger
41
41
  if name = @options[:instance]
42
42
  @instance = AdminTools::InstanceRegistry.new.find_by_name_prefix(name)
43
43
  if !@instance
44
- STDERR.puts "*** ERROR: there doesn't seem to be a #{PROGRAM_NAME} instance running with the name '#{name}'."
44
+ if @options[:ignore_passenger_not_running]
45
+ message_type = "WARNING"
46
+ else
47
+ message_type = "ERROR"
48
+ end
49
+ STDERR.puts "*** #{message_type}: there doesn't seem to be a #{PROGRAM_NAME} instance running with the name '#{name}'."
45
50
  list_all_passenger_instances(AdminTools::InstanceRegistry.new.list)
46
51
  STDERR.puts
47
52
  STDERR.puts "Please pass `--instance <NAME>` to select a specific #{PROGRAM_NAME} instance."
48
- abort
53
+ if @options[:ignore_passenger_not_running]
54
+ exit
55
+ else
56
+ abort
57
+ end
49
58
  elsif @instance == :ambigious
50
59
  abort "*** ERROR: there are multiple instances whose name start with '#{name}'. Please specify the full name."
51
60
  end
52
61
  else
53
62
  instances = AdminTools::InstanceRegistry.new.list
54
63
  if instances.empty?
55
- STDERR.puts "*** ERROR: #{PROGRAM_NAME} doesn't seem to be running. If you are sure that it"
64
+ if @options[:ignore_passenger_not_running]
65
+ message_type = "WARNING"
66
+ else
67
+ message_type = "ERROR"
68
+ end
69
+ STDERR.puts "*** #{message_type}: #{PROGRAM_NAME} doesn't seem to be running. If you are sure that it"
56
70
  STDERR.puts "is running, then the causes of this problem could be one of:"
57
71
  STDERR.puts
58
72
  STDERR.puts " 1. You customized the instance registry directory using Apache's"
@@ -66,7 +80,11 @@ module PhusionPassenger
66
80
  STDERR.puts " PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir"
67
81
  STDERR.puts " option, or #{PROGRAM_NAME} Standalone's --instance-registry-dir command"
68
82
  STDERR.puts " line argument."
69
- abort
83
+ if @options[:ignore_passenger_not_running]
84
+ exit
85
+ else
86
+ abort
87
+ end
70
88
  elsif instances.size == 1
71
89
  @instance = instances.first
72
90
  else
@@ -91,8 +109,12 @@ module PhusionPassenger
91
109
  puts
92
110
  printf "%-25s %s\n", "Name", "Description"
93
111
  puts "------------------------------------------------------------------"
94
- instances.each do |instance|
95
- printf "%-25s %s\n", instance.name, instance.server_software
112
+ if instances.empty?
113
+ printf "%-25s %s\n", "(list empty)", "-"
114
+ else
115
+ instances.each do |instance|
116
+ printf "%-25s %s\n", instance.name, instance.server_software
117
+ end
96
118
  end
97
119
  end
98
120
 
@@ -87,9 +87,9 @@ module PhusionPassenger
87
87
  PASSENGER_API_VERSION_MAJOR = 0
88
88
  PASSENGER_API_VERSION_MINOR = 2
89
89
  PASSENGER_API_VERSION = "#{PASSENGER_API_VERSION_MAJOR}.#{PASSENGER_API_VERSION_MINOR}"
90
- SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION = 2
91
- SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION = 3
92
- SERVER_INSTANCE_DIR_STRUCTURE_MIN_SUPPORTED_MINOR_VERSION = 3
90
+ SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION = 3
91
+ SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION = 0
92
+ SERVER_INSTANCE_DIR_STRUCTURE_MIN_SUPPORTED_MINOR_VERSION = 0
93
93
 
94
94
  # Misc
95
95
  FEEDBACK_FD = 3
@@ -57,6 +57,8 @@ http {
57
57
  passenger_root '<%= PhusionPassenger.install_spec %>';
58
58
  passenger_abort_on_startup_error on;
59
59
  passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@working_dir}/temp_dir_toucher.pid") %>;
60
+ passenger_ctl integration_mode standalone;
61
+ passenger_ctl standalone_engine nginx;
60
62
  passenger_user_switching off;
61
63
  <%= nginx_option :passenger_log_level, :log_level %>
62
64
  <%= nginx_option :passenger_max_pool_size, :max_pool_size %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.11
4
+ version: 5.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-23 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
metadata.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
- iQEcBAABAgAGBQJViQ+RAAoJECrHRaUKISqMZEoH/1ZOrd7Jy/XT5Nz9oGGDFGSJ
6
- j/0JK1zsoS3Osa8BWO90kaRBmFasijLXfjYSsTKa15BII8kjS2/kx/6qpSWoDijZ
7
- 7bZ+FHKvGo0YRNGLntTZ2TldUH6LZwk+CPrSagUe9E8P9wdHzRSiNVGnVd/06uVp
8
- cmMQ7E6NA/ljqWcLSZ2/FJexF1ahkxwbTx6wf+OsD+UkO/SARNQSPj4G/iSeSJHm
9
- E2/JDNnS7xfFszyQlltjIcv8wS3XRzxm8lN8jQpyLYZvaOa86E2Hg4U/yoeXk5vh
10
- nfS+DnYCetzkLAmGgO2QVePxIUJw+JQkfvX28uov9udAZYElk8FCErD5favZE+M=
11
- =/+ym
5
+ iQEcBAABAgAGBQJVlbSXAAoJECrHRaUKISqMi64H/iywK6Kt+04DltbH1fGq/7w1
6
+ L3RonHItoOovzPQ7hE31/7STmbOQ2NcV2pMBIRG6Ble4Oywtk2bAPEIGkHCiUg+e
7
+ Tq2hAOJwnRZQmO2AqV7Hm1R/Ec75gDwuRsqz7sCSkCm9kMR7LK+G4T4/SFfvlpNf
8
+ pxh8aL5B06bvIM2LOE9lxYA6JgpS7aTRDe2WiAoU3vvVOc0QyWCm8aj0AKGn8kKc
9
+ KRsZtYkQ64+kReRuFbu/WymDTYXDDVZ1xQiRjaU/2ZD2Xw8giA+/p2WXoSEuy9kk
10
+ 2WBtDeMoeVSKMx7mgm/4ZWubOH2KON/OPoDQ20oDD/N8nXQkVKUcrWSPxi5B76I=
11
+ =ZTHP
12
12
  -----END PGP SIGNATURE-----