1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
%% ranch_conns_sup is a custom supervisor (special process),
%% not an OTP supervisor. When "supervisor" is used, the
%% module is always loaded before calling system_code_change,
%% for both upgrade and downgrade operations. This is so that
%% the supervisor's init callback of the upgraded/downgraded
%% module gets called. But the custom supervisors in Ranch
%% do not have an init callback and therefore can function
%% like other special processes: when upgrading, load the
%% module then call system_code_change; and when downgrading,
%% call system_code_change and then load the module.
{"2.2.0",
[{<<"2\\.1\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
{update, ranch_server, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}],
[{<<"2\\.1\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server, {advanced, []}},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}]
}.
{"2.1.0",
[{<<"2\\.0\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
{update, ranch_server, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}],
[{<<"2\\.0\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server, {advanced, []}},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}]
}.
{"2.0.0",
[{<<"2\\.0\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
{update, ranch_server, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}],
[{<<"2\\.0\\.[0-9]+.*">>, [
{apply, {ranch, stop_all_acceptors, []}},
{load_module, ranch},
{load_module, ranch_acceptor},
{update, ranch_acceptors_sup, supervisor},
{load_module, ranch_app},
%% See comments at the top of the file about ranch_conns_sup.
{update, ranch_conns_sup, {advanced, []}},
{update, ranch_conns_sup_sup, supervisor},
{load_module, ranch_crc32c},
{update, ranch_embedded_sup, supervisor},
{update, ranch_listener_sup, supervisor},
{load_module, ranch_protocol},
{load_module, ranch_proxy_header},
{update, ranch_server, {advanced, []}},
{update, ranch_server_proxy, {advanced, []}},
{load_module, ranch_ssl},
{update, ranch_sup, supervisor},
{load_module, ranch_tcp},
{load_module, ranch_transport},
{apply, {ranch, restart_all_acceptors, []}}
]}]
}.
|