passenger 5.2.1 → 5.2.2
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 +4 -4
- data/CHANGELOG +8 -0
- data/CODE_OF_CONDUCT.md +52 -0
- data/README.md +17 -9
- data/build/agent.rb +3 -1
- data/build/cxx_tests.rb +1 -0
- data/build/schema_printer.rb +1 -0
- data/build/support/cxx_dependency_map.rb +338 -31
- data/dev/configkit-schemas/index.json +64 -15
- data/dev/copy_boost_headers +1 -0
- data/images/justin.png +0 -0
- data/images/passenger_logo.svg +45 -0
- data/images/spark.png +0 -0
- data/resources/templates/standalone/http.erb +4 -0
- data/src/agent/AgentMain.cpp +4 -0
- data/src/agent/Core/AdminPanelConnector.h +133 -5
- data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -0
- data/src/agent/Core/ApplicationPool/Options.h +7 -1
- data/src/agent/Core/ApplicationPool/Pool.h +1 -0
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +11 -0
- data/src/agent/Core/ApplicationPool/Process.cpp +52 -0
- data/src/agent/Core/ApplicationPool/Process.h +4 -8
- data/src/agent/Core/Config.h +6 -2
- data/src/agent/Core/ConfigChange.cpp +12 -1
- data/src/agent/Core/ConfigChange.h +3 -0
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +1 -1
- data/src/agent/Core/Controller/InternalUtils.cpp +2 -2
- data/src/agent/Core/CoreMain.cpp +18 -5
- data/src/agent/Core/SpawningKit/BackgroundIOCapturer.h +8 -4
- data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -1
- data/src/agent/Core/SpawningKit/PipeWatcher.h +9 -4
- data/src/agent/Core/SpawningKit/SmartSpawner.h +5 -3
- data/src/agent/Core/SpawningKit/Spawner.h +1 -1
- data/src/agent/ExecHelper/ExecHelperMain.cpp +295 -0
- data/src/agent/Shared/Fundamentals/Initialization.cpp +11 -8
- data/src/agent/Shared/Fundamentals/Initialization.h +2 -2
- data/src/agent/Watchdog/Config.h +5 -2
- data/src/apache2_module/Config.cpp +13 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +30 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +90 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +18 -2
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +12 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
- data/src/apache2_module/Hooks.cpp +4 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +55 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +65 -0
- data/src/cxx_supportlib/BackgroundEventLoop.cpp +3 -3
- data/src/cxx_supportlib/ConfigKit/Schema.h +53 -31
- data/src/cxx_supportlib/ConfigKit/Store.h +12 -8
- data/src/cxx_supportlib/Constants.h +2 -1
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +4 -0
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +22 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.h +3 -1
- data/src/cxx_supportlib/LoggingKit/Config.h +2 -0
- data/src/cxx_supportlib/LoggingKit/Context.h +28 -0
- data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +112 -9
- data/src/cxx_supportlib/LoggingKit/Logging.h +4 -2
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +34 -43
- data/src/cxx_supportlib/vendor-modified/boost/call_traits.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +3123 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +248 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +498 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +1719 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer_fwd.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/call_traits.hpp +172 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +48 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +72 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +32 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
- data/src/nginx_module/Configuration.c +25 -0
- data/src/nginx_module/ContentHandler.c +42 -4
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +5 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +13 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +5 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +30 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +60 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +20 -0
- data/src/nginx_module/ngx_http_passenger_module.c +4 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +37 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +42 -1
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +13 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +20 -0
- metadata +16 -2
@@ -1,8 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"Passenger::Core::AdminPanelConnector::Schema" : {
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
3
|
+
"auth_type" : {
|
4
|
+
"default_value" : "basic",
|
5
|
+
"has_default_value" : "static",
|
6
|
+
"type" : "string"
|
6
7
|
},
|
7
8
|
"close_timeout" : {
|
8
9
|
"default_value" : 10.0,
|
@@ -31,6 +32,13 @@
|
|
31
32
|
"log_prefix" : {
|
32
33
|
"type" : "string"
|
33
34
|
},
|
35
|
+
"password" : {
|
36
|
+
"secret" : true,
|
37
|
+
"type" : "string"
|
38
|
+
},
|
39
|
+
"password_file" : {
|
40
|
+
"type" : "string"
|
41
|
+
},
|
34
42
|
"ping_interval" : {
|
35
43
|
"default_value" : 30.0,
|
36
44
|
"has_default_value" : "static",
|
@@ -74,6 +82,9 @@
|
|
74
82
|
"required" : true,
|
75
83
|
"type" : "string"
|
76
84
|
},
|
85
|
+
"username" : {
|
86
|
+
"type" : "string"
|
87
|
+
},
|
77
88
|
"web_server_module_version" : {
|
78
89
|
"read_only" : true,
|
79
90
|
"type" : "string"
|
@@ -278,7 +289,7 @@
|
|
278
289
|
"type" : "unsigned integer"
|
279
290
|
},
|
280
291
|
"server_software" : {
|
281
|
-
"default_value" : "Phusion_Passenger/5.2.
|
292
|
+
"default_value" : "Phusion_Passenger/5.2.2",
|
282
293
|
"has_default_value" : "static",
|
283
294
|
"type" : "string"
|
284
295
|
},
|
@@ -342,9 +353,10 @@
|
|
342
353
|
}
|
343
354
|
},
|
344
355
|
"Passenger::Core::Schema" : {
|
345
|
-
"
|
346
|
-
"
|
347
|
-
"
|
356
|
+
"admin_panel_auth_type" : {
|
357
|
+
"default_value" : "basic",
|
358
|
+
"has_default_value" : "static",
|
359
|
+
"type" : "string"
|
348
360
|
},
|
349
361
|
"admin_panel_close_timeout" : {
|
350
362
|
"default_value" : 10.0,
|
@@ -361,6 +373,13 @@
|
|
361
373
|
"has_default_value" : "static",
|
362
374
|
"type" : "boolean"
|
363
375
|
},
|
376
|
+
"admin_panel_password" : {
|
377
|
+
"secret" : true,
|
378
|
+
"type" : "string"
|
379
|
+
},
|
380
|
+
"admin_panel_password_file" : {
|
381
|
+
"type" : "string"
|
382
|
+
},
|
364
383
|
"admin_panel_ping_interval" : {
|
365
384
|
"default_value" : 30.0,
|
366
385
|
"has_default_value" : "static",
|
@@ -395,6 +414,9 @@
|
|
395
414
|
"read_only" : true,
|
396
415
|
"type" : "string"
|
397
416
|
},
|
417
|
+
"admin_panel_username" : {
|
418
|
+
"type" : "string"
|
419
|
+
},
|
398
420
|
"admin_panel_websocketpp_debug_access" : {
|
399
421
|
"default_value" : false,
|
400
422
|
"has_default_value" : "static",
|
@@ -772,7 +794,7 @@
|
|
772
794
|
"type" : "string"
|
773
795
|
},
|
774
796
|
"server_software" : {
|
775
|
-
"default_value" : "Phusion_Passenger/5.2.
|
797
|
+
"default_value" : "Phusion_Passenger/5.2.2",
|
776
798
|
"has_default_value" : "static",
|
777
799
|
"type" : "string"
|
778
800
|
},
|
@@ -843,6 +865,11 @@
|
|
843
865
|
"has_default_value" : "static",
|
844
866
|
"type" : "string"
|
845
867
|
},
|
868
|
+
"buffer_logs" : {
|
869
|
+
"default_value" : false,
|
870
|
+
"has_default_value" : "static",
|
871
|
+
"type" : "boolean"
|
872
|
+
},
|
846
873
|
"file_descriptor_log_target" : {
|
847
874
|
"type" : "any"
|
848
875
|
},
|
@@ -1023,9 +1050,10 @@
|
|
1023
1050
|
}
|
1024
1051
|
},
|
1025
1052
|
"Passenger::Watchdog::Schema" : {
|
1026
|
-
"
|
1027
|
-
"
|
1028
|
-
"
|
1053
|
+
"admin_panel_auth_type" : {
|
1054
|
+
"default_value" : "basic",
|
1055
|
+
"has_default_value" : "static",
|
1056
|
+
"type" : "string"
|
1029
1057
|
},
|
1030
1058
|
"admin_panel_close_timeout" : {
|
1031
1059
|
"default_value" : 10.0,
|
@@ -1042,6 +1070,13 @@
|
|
1042
1070
|
"has_default_value" : "static",
|
1043
1071
|
"type" : "boolean"
|
1044
1072
|
},
|
1073
|
+
"admin_panel_password" : {
|
1074
|
+
"secret" : true,
|
1075
|
+
"type" : "string"
|
1076
|
+
},
|
1077
|
+
"admin_panel_password_file" : {
|
1078
|
+
"type" : "string"
|
1079
|
+
},
|
1045
1080
|
"admin_panel_ping_interval" : {
|
1046
1081
|
"default_value" : 30.0,
|
1047
1082
|
"has_default_value" : "static",
|
@@ -1076,6 +1111,9 @@
|
|
1076
1111
|
"read_only" : true,
|
1077
1112
|
"type" : "string"
|
1078
1113
|
},
|
1114
|
+
"admin_panel_username" : {
|
1115
|
+
"type" : "string"
|
1116
|
+
},
|
1079
1117
|
"admin_panel_websocketpp_debug_access" : {
|
1080
1118
|
"default_value" : false,
|
1081
1119
|
"has_default_value" : "static",
|
@@ -1481,7 +1519,7 @@
|
|
1481
1519
|
"type" : "string"
|
1482
1520
|
},
|
1483
1521
|
"server_software" : {
|
1484
|
-
"default_value" : "Phusion_Passenger/5.2.
|
1522
|
+
"default_value" : "Phusion_Passenger/5.2.2",
|
1485
1523
|
"has_default_value" : "static",
|
1486
1524
|
"type" : "string"
|
1487
1525
|
},
|
@@ -1637,9 +1675,10 @@
|
|
1637
1675
|
}
|
1638
1676
|
},
|
1639
1677
|
"Passenger::WebSocketCommandReverseServer::Schema" : {
|
1640
|
-
"
|
1641
|
-
"
|
1642
|
-
"
|
1678
|
+
"auth_type" : {
|
1679
|
+
"default_value" : "basic",
|
1680
|
+
"has_default_value" : "static",
|
1681
|
+
"type" : "string"
|
1643
1682
|
},
|
1644
1683
|
"close_timeout" : {
|
1645
1684
|
"default_value" : 10.0,
|
@@ -1659,6 +1698,13 @@
|
|
1659
1698
|
"log_prefix" : {
|
1660
1699
|
"type" : "string"
|
1661
1700
|
},
|
1701
|
+
"password" : {
|
1702
|
+
"secret" : true,
|
1703
|
+
"type" : "string"
|
1704
|
+
},
|
1705
|
+
"password_file" : {
|
1706
|
+
"type" : "string"
|
1707
|
+
},
|
1662
1708
|
"ping_interval" : {
|
1663
1709
|
"default_value" : 30.0,
|
1664
1710
|
"has_default_value" : "static",
|
@@ -1693,6 +1739,9 @@
|
|
1693
1739
|
"required" : true,
|
1694
1740
|
"type" : "string"
|
1695
1741
|
},
|
1742
|
+
"username" : {
|
1743
|
+
"type" : "string"
|
1744
|
+
},
|
1696
1745
|
"websocketpp_debug_access" : {
|
1697
1746
|
"default_value" : false,
|
1698
1747
|
"has_default_value" : "static",
|
data/dev/copy_boost_headers
CHANGED
data/images/justin.png
ADDED
Binary file
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="64px" height="54px" viewBox="0 0 64 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<title>Logo</title>
|
5
|
+
<desc>Created with Sketch.</desc>
|
6
|
+
<defs>
|
7
|
+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
8
|
+
<stop stop-color="#448FF6" offset="0%"></stop>
|
9
|
+
<stop stop-color="#04129F" offset="100%"></stop>
|
10
|
+
</linearGradient>
|
11
|
+
<path d="M33.7776168,53.6718916 L30.1562274,53.6718916 C29.8891116,53.6718916 29.6361432,53.5422241 29.4795116,53.3250985 L26.2697432,48.8566337 C26.2030484,48.7647858 26.1562274,48.6597686 26.1316379,48.5463095 L26.0575326,48.2045816 L25.9558063,48.1205003 C25.7698695,48.4602022 25.4276379,48.8846608 24.8694905,48.9278833 C24.5370274,48.9535466 23.0795116,48.9386889 22.46848,48.9305847 C22.2707537,48.9282209 22.0794274,48.8546076 21.9295326,48.722914 L16.6993853,44.1450422 C16.5380379,44.0038937 16.4383326,43.8093924 16.4174484,43.5973319 L15.9950484,39.3628765 L14.0309221,37.5573236 C13.8308379,37.4242793 13.5300379,37.1196957 13.5300379,36.4976967 C13.5300379,36.2356602 13.4566063,33.8523439 13.4091116,32.3618426 L12.2867537,31.5841751 C12.0610695,31.4271558 11.9266695,31.1698468 11.9266695,30.8959917 L11.9266695,26.8269974 C11.9266695,26.4315789 12.1840168,25.9284419 12.7482274,25.7589286 C12.8469221,25.7282001 13.5926905,25.4151746 14.6567747,24.9515456 C14.5382063,24.5696342 14.2566063,23.7794726 13.8978695,22.8417467 C13.7907537,22.7238979 13.6987958,22.6421803 13.6630905,22.6171923 C13.4434695,22.5111621 12.2183747,21.7368713 0.521532632,13.7646816 C0.396564211,13.6795873 0.296858947,13.5614007 0.233195789,13.4229536 C0.164143158,13.2733632 -0.0554778947,12.7357832 0.0132378947,12.1147973 C0.0630905263,11.6653507 0.410374737,10.027285 0.557574737,9.34416675 C0.588564211,9.20301824 0.654585263,9.07267535 0.748564211,8.96630745 C1.07799579,8.59250026 1.67285895,8.27879937 2.35462737,8.51854924 C2.77197474,8.66645128 16.4507958,13.2379072 18.4223326,13.8963752 C18.4411958,13.8673351 18.4624168,13.8315414 18.4859958,13.7879812 C18.9144589,12.986001 20.5279326,11.6119979 21.0126484,11.2101636 C21.1531116,11.0933278 21.3238905,11.027481 21.5067958,11.0190391 L21.8315116,11.005532 C22.4725221,10.3960271 24.3133642,8.82110683 26.6564379,8.338568 C26.6567747,8.33755498 26.6571116,8.33654195 26.6577853,8.33552892 C26.7655747,8.07079104 27.4975326,4.97835539 28.3241432,1.29701303 C28.3460379,1.19604794 28.38848,1.09879729 28.4494484,1.00897551 C28.6687326,0.687845753 29.0200589,0.278244919 29.4495326,0.149252736 C29.5334063,0.123927045 29.7803116,0.0496383533 31.5955537,0.015870766 L31.5955537,0 L31.9425011,0.00911724857 L31.9667537,0.346793121 L31.9792168,0.00945492444 L32.3211116,0.00438978635 L32.3214484,0.0155330902 C34.1518484,0.0489630016 34.4001011,0.123927045 34.4846484,0.149252736 C34.9131116,0.278244919 35.2647747,0.687845753 35.4837221,1.00897551 C35.5443537,1.09710891 35.5871326,1.19503491 35.6097011,1.29870141 C36.4366484,4.97936842 37.1686063,8.07180406 37.2767326,8.33789265 C37.2770695,8.33823033 37.2770695,8.338568 37.2770695,8.338568 C39.6211537,8.82110683 41.4613221,10.3960271 42.1023326,11.005532 L42.4257011,11.0190391 C42.60928,11.027481 42.7800589,11.0933278 42.9208589,11.209826 C43.4059116,11.6119979 45.0197221,12.9863387 45.4478484,13.7883189 C45.4710905,13.8315414 45.4923116,13.8673351 45.5115116,13.8967129 C47.5258274,13.2233872 61.1686063,8.66374987 61.57888,8.51854924 C62.2606484,8.27879937 62.8555116,8.59250026 63.1856168,8.96664513 C63.2799326,9.0733507 63.3456168,9.20403127 63.3759326,9.34382908 C63.4904589,9.87330485 63.8677221,11.6383366 63.9202695,12.1147973 C63.9893221,12.7384846 63.7690274,13.2743762 63.6999747,13.4239666 C63.6373221,13.5610631 63.5376168,13.6789119 63.4126484,13.7643439 C51.4453221,21.920567 50.4395116,22.5429036 50.2569432,22.6236081 C50.2411116,22.6364398 50.1478063,22.718495 50.0356379,22.8417467 C49.6735326,23.7892652 49.3902484,24.5848296 49.2743747,24.9505326 C50.3408168,25.4151746 51.0872589,25.7282001 51.1869642,25.7592663 C51.7498274,25.9287796 52.0068379,26.4315789 52.0068379,26.8269974 L52.0068379,30.8959917 C52.0068379,31.1698468 51.8727747,31.4271558 51.6477642,31.5838374 L50.5243958,32.3618426 C50.4769011,33.8523439 50.4034695,36.2356602 50.4034695,36.4976967 C50.4034695,37.119358 50.1030063,37.4239416 49.9032589,37.5573236 L47.9384589,39.3628765 L47.5160589,43.5976696 C47.4951747,43.8097301 47.3954695,44.0038937 47.2351326,44.1447045 L42.0033011,48.7235894 C41.8547537,48.8546076 41.6630905,48.9282209 41.4643537,48.9305847 C40.8543326,48.9386889 39.3971537,48.953209 39.0643537,48.9278833 C38.50688,48.8846608 38.1643116,48.4602022 37.9780379,48.1201626 L37.8763116,48.2045816 L37.8025432,48.5452965 C37.7776168,48.6597686 37.7307958,48.7647858 37.6634274,48.8576467 L34.4543326,53.3244231 C34.2980379,53.5418864 34.0450695,53.6718916 33.7776168,53.6718916" id="path-2"></path>
|
12
|
+
</defs>
|
13
|
+
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
14
|
+
<g id="Header" transform="translate(-250.000000, -39.000000)">
|
15
|
+
<g id="Logo">
|
16
|
+
<g transform="translate(250.000000, 39.000000)">
|
17
|
+
<g id="64">
|
18
|
+
<g id="Fill-1">
|
19
|
+
<use fill="url(#linearGradient-1)" xlink:href="#path-2"></use>
|
20
|
+
<use fill="#0E121B" xlink:href="#path-2"></use>
|
21
|
+
</g>
|
22
|
+
<path d="M41.4823411,34.6559787 C41.4823411,34.6559787 41.0814989,41.9892857 40.7608253,45.6861611 C40.7608253,45.6861611 40.6607832,46.4293857 40.2798147,46.5300131 C39.8991832,46.6303029 40.0194358,45.143516 40.0194358,45.143516 L40.5604042,34.7562685 C40.5604042,34.7562685 40.7008674,34.1335942 41.1017095,34.1136713 C41.6025937,34.1129959 41.4823411,34.6559787 41.4823411,34.6559787" id="Fill-5" fill="#FEFEFE"></path>
|
23
|
+
<path d="M39.3679495,30.7482247 C39.3679495,30.7482247 40.07936,31.9236744 39.1173389,33.571195 C38.1553179,35.2183779 35.8907284,33.9828219 35.8907284,33.9828219 C35.8907284,33.9828219 34.5979284,33.2696504 35.9810021,32.3754847 C37.3637389,31.4816567 38.7164968,30.7482247 38.7164968,30.7482247 C38.7164968,30.7482247 39.2402863,30.4493816 39.3679495,30.7482247" id="Fill-7" fill="#FEFEFE"></path>
|
24
|
+
<path d="M41.5825516,31.5318016 C41.6829305,31.8330084 41.9534147,31.5318016 41.9534147,31.5318016 L43.7770779,29.4122101 L43.9273095,29.040429 C43.9273095,29.040429 43.9774989,28.4076244 43.94752,28.2468907 C43.9175411,28.086157 44.0074779,28.0057901 44.0074779,28.0057901 C44.0074779,28.0057901 46.9137516,24.4598558 47.0137937,24.1282581 C47.1141726,23.7966603 46.9137516,23.8770272 46.9137516,23.8770272 C44.40832,25.2631867 43.1158568,26.1975358 43.1158568,26.1975358 C43.1158568,26.1975358 40.6905937,28.0561038 40.5103832,28.2468907 C40.3298358,28.4376775 40.5103832,28.6787781 40.5103832,28.6787781" id="Fill-9" fill="#FEFEFE"></path>
|
25
|
+
<path d="M46.0985937,32.5215633 L45.0564042,42.0963627 C45.0564042,42.0963627 45.0830147,42.3644773 44.8960674,42.6322543 C44.70912,42.9000313 41.66272,45.7665618 41.66272,45.7665618 C41.66272,45.7665618 41.4875621,45.9806483 41.4949726,45.2573465 C41.5023832,44.5340448 41.9567832,41.1319604 41.9833937,34.2474247 L42.0369516,33.7658989 C42.0369516,33.7658989 42.0635621,33.3633893 42.3306779,33.1222887 C42.5981305,32.8811881 45.2702989,29.8542616 45.2702989,29.8542616 C45.2702989,29.8542616 45.4838568,29.6935279 45.4838568,29.4254132 L45.4838568,28.0325003 C45.4838568,28.0325003 45.4306358,27.7380469 45.8580884,27.4165795 C46.2855411,27.095112 46.9002779,26.7736446 46.9002779,26.7736446 L49.8665095,27.4432559 C49.8665095,27.4432559 50.1070147,27.5236227 50.1070147,27.9791475 L50.1070147,29.5594706 C50.1070147,29.5594706 50.0800674,29.880938 49.7593937,30.0953622 C49.43872,30.3094487 46.0985937,32.5215633 46.0985937,32.5215633" id="Fill-11" fill="#FEFEFE"></path>
|
26
|
+
<path d="M56.3599158,15.8706647 L38.9104842,26.4253995 C38.9104842,26.4253995 37.9417263,27.0882572 38.2421895,26.0502416 C38.5362526,24.8714151 39.3113263,22.3803802 39.3113263,22.3803802 C39.3113263,22.3803802 39.4103579,22.007586 39.6212211,21.871165 C40.1126737,21.6300644 49.4991158,17.0427377 49.8396632,16.8617434 C50.1269895,16.7145167 50.3742316,16.1654558 50.3742316,16.1654558 L51.1132632,14.7080467 C51.1132632,14.7080467 51.2382316,14.5614954 51.4261895,14.4919341 C51.6141474,14.4223729 57.0278737,12.4148898 57.0278737,12.4148898 C57.0278737,12.4148898 57.4021053,12.2008033 57.2683789,12.629314 C57.1349895,13.0578247 56.7341474,15.3617872 56.7341474,15.3617872 C56.7341474,15.3617872 56.6896842,15.671436 56.3599158,15.8706647" id="Fill-13" fill="#FEFEFE"></path>
|
27
|
+
<path d="M50.2004547,15.2880388 L49.8396968,15.9910799 C49.8396968,15.9910799 49.6594863,16.3729913 49.2785179,16.5938314 C48.8978863,16.8150091 39.4181389,21.2149257 39.4181389,21.2149257 C39.4181389,21.2149257 39.2709389,21.3155531 39.1574232,20.9336417 C39.0371705,20.4717011 38.1863074,19.5272217 38.1863074,19.5272217 C38.1863074,19.5272217 37.9350232,19.2125078 38.4561179,19.0450205 C39.0974653,18.8241805 50.2004547,14.8260982 50.2004547,14.8260982 C50.2004547,14.8260982 50.4709389,14.7609267 50.2004547,15.2880388" id="Fill-15" fill="#FEFEFE"></path>
|
28
|
+
<path d="M27.0409095,11.6916894 C24.7594779,12.6753392 23.2702989,14.1368004 23.0368674,14.365407 C22.9950989,14.4066034 22.9637726,14.3502116 22.9637726,14.3502116 L22.2041937,13.4999437 C22.0172463,13.2588431 21.6564884,13.5668035 21.6564884,13.5668035 C20.6274358,14.3704721 20.0261726,15.2410005 19.8658358,15.5222845 C19.7280674,15.7576446 19.9729516,15.8305826 19.9729516,15.8305826 C19.9729516,15.8305826 25.1434779,17.6655133 25.3573726,17.7056967 C25.7632674,17.8269224 25.7959411,17.8120646 25.8636463,17.5729901 C25.9017095,17.4396081 27.0944674,12.200567 27.1210779,11.919283 C27.1796884,11.6113226 27.0409095,11.6916894 27.0409095,11.6916894" id="Fill-17" fill="#FEFEFE"></path>
|
29
|
+
<path d="M44.0677053,15.5224196 C43.9073684,15.2411356 43.3061053,14.3706072 42.2773895,13.5669386 C42.2773895,13.5669386 41.9166316,13.2589782 41.7293474,13.4997411 L40.9697684,14.3503466 C40.9697684,14.3503466 40.9387789,14.4064008 40.8970105,14.3655421 C40.6635789,14.1365978 39.1740632,12.6754743 36.8929684,11.6918245 C36.8929684,11.6918245 36.7541895,11.6114576 36.8128,11.919418 C36.8394105,12.200702 38.0318316,17.4394055 38.0698947,17.5727875 C38.1379368,17.811862 38.1706105,17.8270574 38.5761684,17.7058318 C38.7900632,17.6656484 43.9609263,15.83038 43.9609263,15.83038 C43.9609263,15.83038 44.2054737,15.7577797 44.0677053,15.5224196" id="Fill-19" fill="#FEFEFE"></path>
|
30
|
+
<path d="M34.0669642,15.0067548 L31.9711326,15.0067548 L31.9627116,15.0067548 L29.86688,15.0067548 C29.86688,15.0067548 29.5462063,15.0016896 29.5462063,14.8233968 C29.5462063,14.6451039 30.5082274,5.26244211 30.5082274,5.26244211 C30.5082274,5.26244211 30.6884379,5.16215237 30.7086484,5.34280896 C30.7285221,5.52380323 30.6109642,11.6617376 30.6109642,11.6617376 C30.6109642,11.6617376 30.5981642,11.8423942 30.8289011,11.8525244 C31.0296589,11.861304 31.7643116,11.862317 31.9775326,11.862317 L31.9775326,11.862317 L32.0058274,11.862317 L32.0361432,11.862317 L32.0361432,11.862317 C32.2385853,11.862317 32.9058695,11.8609663 33.1049432,11.8525244 C33.3353432,11.8423942 33.32288,11.6617376 33.32288,11.6617376 C33.32288,11.6617376 33.2053221,5.52380323 33.2251958,5.34280896 C33.2454063,5.16215237 33.4256168,5.26244211 33.4256168,5.26244211 C33.4256168,5.26244211 34.3876379,14.6451039 34.3876379,14.8233968 C34.3876379,15.0016896 34.0669642,15.0067548 34.0669642,15.0067548 M33.6462484,2.40941866 C33.6061642,2.14839521 33.3454484,2.14839521 33.3454484,2.14839521 L31.9775326,2.08795122 L31.9559747,2.08795122 L30.5883958,2.14839521 C30.5883958,2.14839521 30.32768,2.14839521 30.2875958,2.40941866 C30.2475116,2.67077978 27.4817011,17.1965828 27.4817011,17.1965828 C27.4817011,17.1965828 27.4015326,17.5784942 27.7622905,17.4579439 C29.4731116,16.5972081 31.8771537,16.5357511 31.9667537,16.5337251 C32.0566905,16.5357511 34.4603958,16.5972081 36.1712168,17.4579439 C36.5319747,17.5784942 36.4518063,17.1965828 36.4518063,17.1965828 C36.4518063,17.1965828 33.6863326,2.67077978 33.6462484,2.40941866" id="Fill-21" fill="#FEFEFE"></path>
|
31
|
+
<path d="M27.9528084,32.3756198 C26.5700716,31.4814541 25.2169768,30.7483598 25.2169768,30.7483598 C25.2169768,30.7483598 24.6935242,30.4491789 24.5658611,30.7483598 C24.5658611,30.7483598 23.8544505,31.9234718 24.8161347,33.5709924 C25.7781558,35.218513 28.0430821,33.982957 28.0430821,33.982957 C28.0430821,33.982957 29.3355453,33.2697855 27.9528084,32.3756198" id="Fill-23" fill="#FEFEFE"></path>
|
32
|
+
<path d="M20.8179874,26.1975696 C20.8179874,26.1975696 19.5251874,25.2632204 17.0200926,23.877061 C17.0200926,23.877061 16.8196716,23.7966941 16.9200505,24.1282918 C17.0200926,24.4595518 19.9260295,28.0058239 19.9260295,28.0058239 C19.9260295,28.0058239 20.0163032,28.0861907 19.9863242,28.2469244 C19.9563453,28.4076582 20.0061979,29.0404627 20.0061979,29.0404627 L20.1567663,29.4122439 L21.9804295,31.5318353 C21.9804295,31.5318353 22.2509137,31.8330422 22.3512926,31.5318353 L23.4234611,28.6788119 C23.4234611,28.6788119 23.6036716,28.4377113 23.4234611,28.2469244 C23.2429137,28.0561376 20.8179874,26.1975696 20.8179874,26.1975696" id="Fill-25" fill="#FEFEFE"></path>
|
33
|
+
<path d="M23.9144084,45.1436173 L23.37344,34.7563698 C23.37344,34.7563698 23.2329768,34.1336955 22.8321347,34.1134349 C22.3312505,34.1130972 22.4515032,34.65608 22.4515032,34.65608 C22.4515032,34.65608 22.8523453,41.989387 23.1730189,45.6859248 C23.1730189,45.6859248 23.2730611,46.429487 23.6540295,46.5297768 C24.0346611,46.6304042 23.9144084,45.1436173 23.9144084,45.1436173" id="Fill-27" fill="#FEFEFE"></path>
|
34
|
+
<path d="M21.9503495,34.2474585 L21.8967916,33.7659327 C21.8967916,33.7659327 21.8701811,33.363423 21.6030653,33.1223225 C21.3356126,32.8812219 18.6634442,29.8542954 18.6634442,29.8542954 C18.6634442,29.8542954 18.4498863,29.6935616 18.4498863,29.425447 L18.4498863,28.032534 C18.4498863,28.032534 18.5031074,27.737743 18.0756547,27.4162756 C17.6482021,27.0951458 17.0334653,26.7736784 17.0334653,26.7736784 L14.0672337,27.4432896 C14.0672337,27.4432896 13.8267284,27.5236565 13.8267284,27.9788436 L13.8267284,29.5595043 C13.8267284,29.5595043 13.8536758,29.8809718 14.1743495,30.0953959 C14.4950232,30.3094824 17.8351495,32.5215971 17.8351495,32.5215971 L18.8773389,42.0963965 C18.8773389,42.0963965 18.8507284,42.3641734 19.0376758,42.6322881 C19.2246232,42.900065 22.2710232,45.7665955 22.2710232,45.7665955 C22.2710232,45.7665955 22.4461811,45.980682 22.4387705,45.2573803 C22.43136,44.5340786 21.97696,41.1319942 21.9503495,34.2474585" id="Fill-29" fill="#FEFEFE"></path>
|
35
|
+
<path d="M25.6914526,26.0502416 C25.3973895,24.8714151 24.6226526,22.3803802 24.6226526,22.3803802 C24.6226526,22.3803802 24.5232842,22.007586 24.3124211,21.871165 C23.8209684,21.6300644 14.4348632,17.0427377 14.0939789,16.8617434 C13.8066526,16.7145167 13.5597474,16.1654558 13.5597474,16.1654558 L12.8203789,14.7080467 C12.8203789,14.7080467 12.6954105,14.5614954 12.5074526,14.4919341 C12.3194947,14.4223729 6.90576842,12.4148898 6.90576842,12.4148898 C6.90576842,12.4148898 6.53153684,12.2008033 6.66526316,12.629314 C6.79898947,13.0578247 7.19983158,15.3617872 7.19983158,15.3617872 C7.19983158,15.3617872 7.24429474,15.671436 7.57372632,15.8706647 L25.0231579,26.4253995 C25.0231579,26.4253995 25.9919158,27.0882572 25.6914526,26.0502416" id="Fill-31" fill="#FEFEFE"></path>
|
36
|
+
<path d="M14.0940126,15.991215 C14.0940126,15.991215 14.2742232,16.3727887 14.6551916,16.5939664 C15.0358232,16.8148065 24.5155705,21.2150608 24.5155705,21.2150608 C24.5155705,21.2150608 24.6627705,21.3153505 24.7762863,20.9337768 C24.8965389,20.4714985 25.7474021,19.5270191 25.7474021,19.5270191 C25.7474021,19.5270191 25.9986863,19.2126428 25.4775916,19.0451556 C24.8362442,18.8239779 13.7332547,14.8258956 13.7332547,14.8258956 C13.7332547,14.8258956 13.4627705,14.7610618 13.7332547,15.2881738 L14.0940126,15.991215 Z" id="Fill-33" fill="#FEFEFE"></path>
|
37
|
+
<path d="M31.9668547,27.1466751 C30.0916547,27.1122322 28.5037811,25.5798591 28.5037811,23.6929263 C28.5037811,21.8059935 30.0916547,20.2736204 31.9668547,20.2391775 C33.8420547,20.2736204 35.4299284,21.8059935 35.4299284,23.6929263 C35.4299284,25.5798591 33.8420547,27.1122322 31.9668547,27.1466751 M38.2691705,21.5365282 C36.2097179,17.8234443 32.4172126,17.9186689 31.9668547,17.9439946 C31.5164968,17.9186689 27.7239916,17.8234443 25.6645389,21.5365282 C25.6645389,21.5365282 25.55776,21.7907981 25.55776,21.9917153 C25.55776,22.1926324 27.6155284,29.6799195 27.6155284,29.6799195 C27.6155284,29.6799195 27.6556126,29.7737934 27.8290863,30.028401 C28.0028968,30.282671 30.0606653,31.7829649 30.0606653,31.7829649 C30.0606653,31.7829649 30.2075284,31.983882 30.7286232,32.0105584 C31.1759495,32.0335204 31.7991074,32.0173119 31.9668547,32.0119091 C32.1346021,32.0173119 32.75776,32.0335204 33.2050863,32.0105584 C33.7261811,31.983882 33.8730442,31.7829649 33.8730442,31.7829649 C33.8730442,31.7829649 35.9308126,30.282671 36.1046232,30.028401 C36.2780968,29.7737934 36.3181811,29.6799195 36.3181811,29.6799195 C36.3181811,29.6799195 38.3759495,22.1926324 38.3759495,21.9917153 C38.3759495,21.7907981 38.2691705,21.5365282 38.2691705,21.5365282" id="Fill-35" fill="#FEFEFE"></path>
|
38
|
+
<path d="M38.9103495,43.7037336 L38.9103495,41.8552959 C38.9103495,41.6141953 38.6563705,41.8688029 38.6563705,41.8688029 L37.4407074,42.7528384 C37.0530021,43.0607987 36.7724126,42.8332052 36.7724126,42.8332052 C36.7724126,42.8332052 35.4631074,41.493645 35.27616,41.2258681 C35.0892126,40.9580911 34.8352337,40.9847675 34.8352337,40.9847675 L29.0984758,40.9847675 C29.0984758,40.9847675 28.8444968,40.9580911 28.6575495,41.2258681 C28.4706021,41.493645 27.1612968,42.8332052 27.1612968,42.8332052 C27.1612968,42.8332052 26.8807074,43.0607987 26.4930021,42.7528384 L25.2773389,41.8688029 C25.2773389,41.8688029 25.02336,41.6141953 25.02336,41.8552959 L25.02336,43.7037336 C25.02336,43.7037336 25.0098863,44.0518774 25.3039495,44.2798087 C25.5980126,44.5074022 27.6689179,45.9138222 27.6689179,45.9138222 C27.6689179,45.9138222 28.0680758,46.138039 28.3503495,45.5656784 L29.6330442,43.2482089 C29.6330442,43.2482089 29.7132126,43.0607987 30.20736,43.0472917 C30.6499705,43.0354731 33.2726232,43.0351354 33.7263495,43.0472917 C34.2204968,43.0607987 34.3006653,43.2482089 34.3006653,43.2482089 L35.58336,45.5656784 C35.8656337,46.138039 36.2647916,45.9138222 36.2647916,45.9138222 C36.2647916,45.9138222 38.3356968,44.5074022 38.62976,44.2798087 C38.9238232,44.0518774 38.9103495,43.7037336 38.9103495,43.7037336" id="Fill-37" fill="#FEFEFE"></path>
|
39
|
+
<path d="M38.8099368,35.2014266 L37.0573474,35.9601843 C37.0549895,35.9611973 37.0526316,35.9622103 37.0502737,35.963561 C37.0112,35.987536 36.5709474,36.2380915 35.9841684,35.8548294 C35.9841684,35.8548294 32.5288421,33.7659664 32.0461474,33.7659664 C32.0434526,33.7659664 32.0410947,33.7669795 32.0384,33.7673171 C32.0360421,33.7673171 32.0340211,33.7659664 32.0313263,33.7659664 L31.8440421,33.7659664 C31.8278737,33.7659664 31.8137263,33.7717069 31.8005895,33.7791358 C31.0885053,33.957091 27.9494737,35.8548294 27.9494737,35.8548294 C27.3630316,36.2380915 26.9224421,35.987536 26.8833684,35.963561 C26.8810105,35.9622103 26.8789895,35.9611973 26.8762947,35.9601843 L25.1237053,35.2014266 C25.1193263,35.1994005 24.4931368,34.8418018 24.5157053,35.3857976 C24.5173895,35.425981 24.8629895,39.8731723 24.8629895,39.8731723 C24.8757895,40.656918 25.1738947,40.8797841 25.2075789,40.9024083 C25.2092632,40.903759 25.2109474,40.9044344 25.2129684,40.9057851 L26.1416421,41.4109482 C26.1443368,41.4126366 26.6526316,41.7256621 26.8719158,41.538252 C26.8769684,41.5338622 26.8823579,41.5321738 26.8874105,41.5277841 C26.9429895,41.4761196 27.3296842,41.110079 27.6021895,40.6633338 C27.8848,40.1997048 28.3405474,40.1571577 28.3749053,40.1544563 C28.3765895,40.1544563 28.3779368,40.1541186 28.3792842,40.1541186 L35.5543579,40.1541186 C35.5560421,40.1541186 35.5573895,40.1544563 35.5587368,40.1544563 C35.5934316,40.1571577 36.0488421,40.1997048 36.3317895,40.6633338 C36.6039579,41.110079 36.9909895,41.4761196 37.0465684,41.5277841 C37.0512842,41.5321738 37.0570105,41.5338622 37.0620632,41.538252 C37.2810105,41.7256621 37.7893053,41.4126366 37.792,41.4109482 L38.7210105,40.9057851 C38.7230316,40.9044344 38.7243789,40.903759 38.7264,40.9024083 C38.7597474,40.8797841 39.0581895,40.656918 39.0706526,39.8731723 C39.0706526,39.8731723 39.4162526,35.425981 39.4179368,35.3857976 C39.4405053,34.8418018 38.8146526,35.1994005 38.8099368,35.2014266" id="Fill-39" fill="#FEFEFE"></path>
|
40
|
+
</g>
|
41
|
+
</g>
|
42
|
+
</g>
|
43
|
+
</g>
|
44
|
+
</g>
|
45
|
+
</svg>
|
data/images/spark.png
ADDED
Binary file
|
@@ -36,6 +36,10 @@ passenger_user_switching off;
|
|
36
36
|
<%= nginx_http_option(:security_update_check_proxy) %>
|
37
37
|
<%= nginx_http_option(:data_buffer_dir) %>
|
38
38
|
<%= nginx_http_option(:core_file_descriptor_ulimit) %>
|
39
|
+
<%= nginx_http_option(:admin_panel_url) %>
|
40
|
+
<%= nginx_http_option(:admin_panel_auth_type) %>
|
41
|
+
<%= nginx_http_option(:admin_panel_username) %>
|
42
|
+
<%= nginx_http_option(:admin_panel_password) %>
|
39
43
|
<% @options[:ctls].each do |ctl| %>
|
40
44
|
passenger_ctl '<%= ctl.split("=", 2)[0] %>' '<%= ctl.split("=", 2)[1] %>';
|
41
45
|
<% end %>
|
data/src/agent/AgentMain.cpp
CHANGED
@@ -35,6 +35,7 @@ int coreMain(int argc, char *argv[]);
|
|
35
35
|
int systemMetricsMain(int argc, char *argv[]);
|
36
36
|
int tempDirToucherMain(int argc, char *argv[]);
|
37
37
|
int spawnPreparerMain(int argc, char *argv[]);
|
38
|
+
int execHelperMain(int argc, char *argv[]);
|
38
39
|
|
39
40
|
static bool
|
40
41
|
isHelp(const char *arg) {
|
@@ -56,6 +57,7 @@ usage(int argc, char *argv[]) {
|
|
56
57
|
printf("\n");
|
57
58
|
printf("Utility subcommands:\n");
|
58
59
|
printf(" system-metrics\n");
|
60
|
+
printf(" exec-helper\n");
|
59
61
|
}
|
60
62
|
|
61
63
|
static bool
|
@@ -86,6 +88,8 @@ dispatchSubcommand(int argc, char *argv[]) {
|
|
86
88
|
exit(tempDirToucherMain(argc, argv));
|
87
89
|
} else if (strcmp(argv[1], "spawn-preparer") == 0) {
|
88
90
|
exit(spawnPreparerMain(argc, argv));
|
91
|
+
} else if (strcmp(argv[1], "exec-helper") == 0) {
|
92
|
+
exit(execHelperMain(argc, argv));
|
89
93
|
} else if (strcmp(argv[1], "test-binary") == 0) {
|
90
94
|
printf("PASS\n");
|
91
95
|
exit(0);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2017 Phusion Holding B.V.
|
3
|
+
* Copyright (c) 2017-2018 Phusion Holding B.V.
|
4
4
|
*
|
5
5
|
* "Passenger", "Phusion Passenger" and "Union Station" are registered
|
6
6
|
* trademarks of Phusion Holding B.V.
|
@@ -27,19 +27,29 @@
|
|
27
27
|
#define _PASSENGER_ADMIN_PANEL_CONNECTOR_H_
|
28
28
|
|
29
29
|
#include <sys/wait.h>
|
30
|
+
#include <sstream>
|
31
|
+
#include <unistd.h>
|
30
32
|
|
31
33
|
#include <boost/scoped_ptr.hpp>
|
32
34
|
#include <boost/thread.hpp>
|
33
35
|
#include <boost/bind.hpp>
|
36
|
+
#include <boost/foreach.hpp>
|
37
|
+
|
38
|
+
#include <string>
|
39
|
+
#include <vector>
|
34
40
|
|
35
41
|
#include <Constants.h>
|
36
42
|
#include <WebSocketCommandReverseServer.h>
|
37
43
|
#include <InstanceDirectory.h>
|
38
44
|
#include <ConfigKit/SchemaUtils.h>
|
39
45
|
#include <Core/ApplicationPool/Pool.h>
|
46
|
+
#include <Core/Controller.h>
|
40
47
|
#include <ProcessManagement/Ruby.h>
|
48
|
+
#include <Utils.h>
|
41
49
|
#include <Utils/StrIntUtils.h>
|
42
50
|
#include <Utils/IOUtils.h>
|
51
|
+
#include <Utils/AsyncSignalSafeUtils.h>
|
52
|
+
#include <LoggingKit/Context.h>
|
43
53
|
|
44
54
|
#include <jsoncpp/json.h>
|
45
55
|
|
@@ -48,6 +58,7 @@ namespace Core {
|
|
48
58
|
|
49
59
|
using namespace std;
|
50
60
|
using namespace oxt;
|
61
|
+
namespace ASSU = AsyncSignalSafeUtils;
|
51
62
|
|
52
63
|
class AdminPanelConnector {
|
53
64
|
public:
|
@@ -56,13 +67,15 @@ public:
|
|
56
67
|
* (do not edit: following text is automatically generated
|
57
68
|
* by 'rake configkit_schemas_inline_comments')
|
58
69
|
*
|
59
|
-
*
|
70
|
+
* auth_type string - default("basic")
|
60
71
|
* close_timeout float - default(10.0)
|
61
72
|
* connect_timeout float - default(30.0)
|
62
73
|
* data_debug boolean - default(false)
|
63
74
|
* instance_dir string - read_only
|
64
75
|
* integration_mode string - default("standalone")
|
65
76
|
* log_prefix string - -
|
77
|
+
* password string - secret
|
78
|
+
* password_file string - -
|
66
79
|
* ping_interval float - default(30.0)
|
67
80
|
* ping_timeout float - default(30.0)
|
68
81
|
* proxy_password string - secret
|
@@ -73,6 +86,7 @@ public:
|
|
73
86
|
* ruby string - default("ruby")
|
74
87
|
* standalone_engine string - default
|
75
88
|
* url string required -
|
89
|
+
* username string - -
|
76
90
|
* web_server_module_version string - read_only
|
77
91
|
* web_server_version string - read_only
|
78
92
|
* websocketpp_debug_access boolean - default(false)
|
@@ -106,6 +120,7 @@ public:
|
|
106
120
|
typedef WebSocketCommandReverseServer::ConnectionPtr ConnectionPtr;
|
107
121
|
typedef WebSocketCommandReverseServer::MessagePtr MessagePtr;
|
108
122
|
typedef boost::function<Json::Value (void)> ConfigGetter;
|
123
|
+
typedef vector<Controller*> Controllers;
|
109
124
|
|
110
125
|
private:
|
111
126
|
WebSocketCommandReverseServer server;
|
@@ -151,6 +166,8 @@ private:
|
|
151
166
|
return onGetApplicationProperties(conn, doc);
|
152
167
|
} else if (resource == "application_configuration") {
|
153
168
|
return onGetApplicationConfig(conn, doc);
|
169
|
+
} else if (resource == "application_logs") {
|
170
|
+
return onGetApplicationLogs(conn, doc);
|
154
171
|
} else {
|
155
172
|
return onUnknownResource(conn, doc);
|
156
173
|
}
|
@@ -295,9 +312,14 @@ private:
|
|
295
312
|
|
296
313
|
bool onGetGlobalStatistics(const ConnectionPtr &conn, const Json::Value &doc) {
|
297
314
|
Json::Value reply;
|
298
|
-
reply["result"] = "
|
315
|
+
reply["result"] = "ok";
|
299
316
|
reply["request_id"] = doc["request_id"];
|
300
|
-
reply["data"]["message"] =
|
317
|
+
reply["data"]["message"] = Json::arrayValue;
|
318
|
+
|
319
|
+
for (unsigned int i = 0; i < controllers.size(); i++) {
|
320
|
+
reply["data"]["message"].append(controllers[i]->inspectStateAsJson());
|
321
|
+
}
|
322
|
+
|
301
323
|
sendJsonReply(conn, reply);
|
302
324
|
return true;
|
303
325
|
}
|
@@ -345,7 +367,7 @@ private:
|
|
345
367
|
Json::Value appConfigsContainer = configGetter()["config_manifest"]
|
346
368
|
["effective_value"]["application_configurations"];
|
347
369
|
Json::Value appConfigsContainerOutput;
|
348
|
-
Json::Value
|
370
|
+
Json::Value reply;
|
349
371
|
|
350
372
|
if (doc.isMember("arguments")) {
|
351
373
|
ConfigKit::Schema argumentsSchema =
|
@@ -383,6 +405,111 @@ private:
|
|
383
405
|
return true;
|
384
406
|
}
|
385
407
|
|
408
|
+
void addWatchedFiles() {
|
409
|
+
Json::Value appConfigs = configGetter()["config_manifest"]["effective_value"]["application_configurations"];
|
410
|
+
|
411
|
+
// As a hack, we look up the watched files config (passenger monitor log file) in the manifest. The manifest
|
412
|
+
// is meant for users, which means that key names depend on the integration mode. In the future when
|
413
|
+
// component configuration more routed through ConfigKit we can get rid of the hack.
|
414
|
+
string integrationMode = server.getConfig()["integration_mode"].asString();
|
415
|
+
string passengerMonitorLogFile;
|
416
|
+
string passengerAppRoot;
|
417
|
+
if (integrationMode == "apache") {
|
418
|
+
passengerMonitorLogFile = "PassengerMonitorLogFile";
|
419
|
+
passengerAppRoot = "PassengerAppRoot";
|
420
|
+
} else {
|
421
|
+
passengerMonitorLogFile = "passenger_monitor_log_file";
|
422
|
+
passengerAppRoot = "passenger_app_root";
|
423
|
+
// TODO: this probably doesn't give any results with the builtin engine (not supported in other places either)
|
424
|
+
}
|
425
|
+
|
426
|
+
foreach (HashedStaticString key, appConfigs.getMemberNames()) {
|
427
|
+
Json::Value files = appConfigs[key]["options"][passengerMonitorLogFile]["value_hierarchy"][0]["value"];
|
428
|
+
string appRoot = appConfigs[key]["options"][passengerAppRoot]["value_hierarchy"][0]["value"].asString();
|
429
|
+
|
430
|
+
pair<uid_t, gid_t> ids;
|
431
|
+
try {
|
432
|
+
ids = appPool->getGroupRunUidAndGids(key);
|
433
|
+
} catch (RuntimeException e) {
|
434
|
+
files = Json::nullValue;
|
435
|
+
}
|
436
|
+
if (!files.isNull()) {
|
437
|
+
struct passwd *pwUser = getpwuid(ids.first);
|
438
|
+
|
439
|
+
foreach (Json::Value file, files) {
|
440
|
+
string f = file.asString();
|
441
|
+
string maxLines = toString(LOG_MONITORING_MAX_LINES);
|
442
|
+
Pipe pipe = createPipe(__FILE__, __LINE__);
|
443
|
+
string agentExe = resourceLocator->findSupportBinary(AGENT_EXE);
|
444
|
+
vector<const char *> execArgs;
|
445
|
+
|
446
|
+
execArgs.push_back(agentExe.c_str());
|
447
|
+
execArgs.push_back("exec-helper");
|
448
|
+
if (geteuid() == 0) {
|
449
|
+
execArgs.push_back("--user");
|
450
|
+
execArgs.push_back(pwUser->pw_name);
|
451
|
+
}
|
452
|
+
execArgs.push_back("tail");
|
453
|
+
execArgs.push_back("-n");
|
454
|
+
execArgs.push_back(maxLines.c_str());
|
455
|
+
execArgs.push_back(f.c_str());
|
456
|
+
execArgs.push_back(NULL);
|
457
|
+
|
458
|
+
pid_t pid = syscalls::fork();
|
459
|
+
|
460
|
+
if (pid == -1) {
|
461
|
+
int e = errno;
|
462
|
+
throw SystemException("Cannot fork a new process", e);
|
463
|
+
} else if (pid == 0) {
|
464
|
+
chdir(appRoot.c_str());
|
465
|
+
|
466
|
+
dup2(pipe.second, STDOUT_FILENO);
|
467
|
+
pipe.first.close();
|
468
|
+
pipe.second.close();
|
469
|
+
|
470
|
+
execvp(execArgs[0], (char * const *) &execArgs[0]);
|
471
|
+
|
472
|
+
int e = errno;
|
473
|
+
char buf[256];
|
474
|
+
char *pos = buf;
|
475
|
+
const char *end = pos + 256;
|
476
|
+
|
477
|
+
pos = ASSU::appendData(pos, end, "Cannot execute \"");
|
478
|
+
pos = ASSU::appendData(pos, end, agentExe.c_str());
|
479
|
+
pos = ASSU::appendData(pos, end, "\": ");
|
480
|
+
pos = ASSU::appendData(pos, end, strerror(e));
|
481
|
+
pos = ASSU::appendData(pos, end, " (errno=");
|
482
|
+
pos = ASSU::appendInteger<int, 10>(pos, end, e);
|
483
|
+
pos = ASSU::appendData(pos, end, ")\n");
|
484
|
+
ASSU::writeNoWarn(STDERR_FILENO, buf, pos - buf);
|
485
|
+
_exit(1);
|
486
|
+
} else {
|
487
|
+
pipe.second.close();
|
488
|
+
string out = readAll(pipe.first);
|
489
|
+
pipe.first.close();
|
490
|
+
istringstream iss(out);
|
491
|
+
string line;
|
492
|
+
while (getline(iss, line)) {
|
493
|
+
LoggingKit::context->updateLog(key, f.c_str(), f.size(), line.c_str(), line.size());
|
494
|
+
}
|
495
|
+
syscalls::waitpid(pid, NULL, 0);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
}
|
499
|
+
}
|
500
|
+
}
|
501
|
+
|
502
|
+
bool onGetApplicationLogs(const ConnectionPtr &conn, const Json::Value &doc) {
|
503
|
+
Json::Value reply;
|
504
|
+
reply["result"] = "ok";
|
505
|
+
reply["request_id"] = doc["request_id"];
|
506
|
+
|
507
|
+
addWatchedFiles();
|
508
|
+
|
509
|
+
reply["data"]["logs"] = LoggingKit::context->convertLog();
|
510
|
+
sendJsonReply(conn, reply);
|
511
|
+
return true;
|
512
|
+
}
|
386
513
|
|
387
514
|
bool onUnknownResource(const ConnectionPtr &conn, const Json::Value &doc) {
|
388
515
|
Json::Value reply;
|
@@ -492,6 +619,7 @@ public:
|
|
492
619
|
ResourceLocator *resourceLocator;
|
493
620
|
ApplicationPool2::PoolPtr appPool;
|
494
621
|
ConfigGetter configGetter;
|
622
|
+
Controllers controllers;
|
495
623
|
|
496
624
|
|
497
625
|
AdminPanelConnector(const Schema &schema, const Json::Value &config,
|