Commit 0817b69
MS maintenance improvements (apache#10417)
* Update last agents during ms maintenance, and some code improvements
* Send 503 (Service Unavailable) response status when maintenance or shutdown is initiated
[Any load balancer in the clustered environment can avoid routing requests to this MS node]
* Migrate systemvm agents before routing host agents, and some code improvements
* Added events for ms maintenance and shutdown operations
* Added the following ms maintenance and shutdown improvements
- block new agent connections during prepare for maintenance of ms
- maintain avoids ms list
- propagate updated management servers list and lb algorithm in host and indirect.agent.lb.algorithm settings respectively, to systemvm (non-routing) agents
- updated setup ms list and migrate agent connections to executor service
- migrate agent connection through executor, and send the answer to the ms host that initiated the migration
- re-initialize ssl handshake executor if it is shutdown
- don't allow prepare for maintenance or shutdown when other management server nodes are in preparing states
- don't allow trigger shutdown when management server is up and other management server nodes are in preparing states
- stop agent connections monitor on ms maintenance
- update avoid ms list in ready command
- updated connected host from the client connection
- update last agents in ms metrics from the database
- updated some agent config descriptions
- update last management server in the hosts during shutdown
- added agents and lastagents in management server response
- updated management server maintenance & shutdown unit tests
- some code improvements
* refactored code / addressed comments
* removed shutdown testcase (maybe, calling System.exit)
* Revert "removed shutdown testcase (maybe, calling System.exit)"
This reverts commit e14b071.
* avoid system.exit during shutdown test
* code improvements
* testcase fix
* Fix cutoff time in agent connections monitor thread1 parent 8a57308 commit 0817b69
File tree
35 files changed
+1307
-216
lines changed- agent/src
- main/java/com/cloud/agent
- properties
- test/java/com/cloud/agent
- api/src/main/java
- com/cloud/event
- org/apache/cloudstack/api
- response
- core/src/main/java
- com/cloud/agent/api
- org/apache/cloudstack/agent/lb
- engine
- components-api/src/main/java/com/cloud/agent
- orchestration/src/main/java/com/cloud/agent/manager
- schema/src
- main/java/com/cloud
- configuration
- host/dao
- test/java/com/cloud/host/dao
- framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl
- plugins
- maintenance/src
- main/java/org/apache/cloudstack/maintenance
- test/java/org/apache/cloudstack/maintenance
- metrics/src/main/java/org/apache/cloudstack/response
- server/src
- main/java
- com/cloud
- api
- query
- server
- org/apache/cloudstack/agent/lb
- test/java/org/apache/cloudstack/agent/lb
- utils/src/main/java/com/cloud/utils/nio
35 files changed
+1307
-216
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
| 623 | + | |
624 | 624 | | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | 625 | | |
630 | 626 | | |
631 | 627 | | |
| |||
637 | 633 | | |
638 | 634 | | |
639 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
640 | 641 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
649 | 651 | | |
650 | 652 | | |
| 653 | + | |
651 | 654 | | |
652 | | - | |
| 655 | + | |
653 | 656 | | |
654 | 657 | | |
655 | 658 | | |
| |||
919 | 922 | | |
920 | 923 | | |
921 | 924 | | |
922 | | - | |
| 925 | + | |
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
| |||
931 | 934 | | |
932 | 935 | | |
933 | 936 | | |
| 937 | + | |
934 | 938 | | |
935 | 939 | | |
936 | 940 | | |
| |||
939 | 943 | | |
940 | 944 | | |
941 | 945 | | |
942 | | - | |
| 946 | + | |
943 | 947 | | |
944 | 948 | | |
945 | 949 | | |
946 | 950 | | |
947 | 951 | | |
948 | 952 | | |
949 | | - | |
| 953 | + | |
950 | 954 | | |
951 | | - | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
952 | 958 | | |
953 | 959 | | |
954 | 960 | | |
| |||
969 | 975 | | |
970 | 976 | | |
971 | 977 | | |
972 | | - | |
| 978 | + | |
973 | 979 | | |
974 | 980 | | |
975 | | - | |
976 | | - | |
| 981 | + | |
| 982 | + | |
977 | 983 | | |
978 | 984 | | |
979 | 985 | | |
980 | 986 | | |
981 | 987 | | |
982 | 988 | | |
983 | | - | |
| 989 | + | |
984 | 990 | | |
985 | 991 | | |
986 | 992 | | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
991 | 998 | | |
992 | 999 | | |
993 | 1000 | | |
| |||
1000 | 1007 | | |
1001 | 1008 | | |
1002 | 1009 | | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
| 1010 | + | |
| 1011 | + | |
1006 | 1012 | | |
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | 1016 | | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1011 | 1025 | | |
1012 | 1026 | | |
1013 | 1027 | | |
| |||
1024 | 1038 | | |
1025 | 1039 | | |
1026 | 1040 | | |
1027 | | - | |
| 1041 | + | |
1028 | 1042 | | |
1029 | 1043 | | |
1030 | 1044 | | |
| |||
1371 | 1385 | | |
1372 | 1386 | | |
1373 | 1387 | | |
1374 | | - | |
| 1388 | + | |
1375 | 1389 | | |
1376 | 1390 | | |
1377 | | - | |
1378 | | - | |
| 1391 | + | |
| 1392 | + | |
1379 | 1393 | | |
1380 | 1394 | | |
1381 | 1395 | | |
1382 | 1396 | | |
1383 | | - | |
| 1397 | + | |
1384 | 1398 | | |
1385 | 1399 | | |
1386 | | - | |
| 1400 | + | |
1387 | 1401 | | |
1388 | 1402 | | |
1389 | 1403 | | |
1390 | | - | |
| 1404 | + | |
1391 | 1405 | | |
1392 | 1406 | | |
1393 | | - | |
| 1407 | + | |
1394 | 1408 | | |
1395 | 1409 | | |
1396 | 1410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
| |||
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
169 | 178 | | |
170 | 179 | | |
171 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | | - | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
| 831 | + | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
751 | 758 | | |
752 | 759 | | |
753 | 760 | | |
| |||
1249 | 1256 | | |
1250 | 1257 | | |
1251 | 1258 | | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1252 | 1265 | | |
1253 | 1266 | | |
1254 | 1267 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| 1221 | + | |
1221 | 1222 | | |
1222 | 1223 | | |
1223 | 1224 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
| |||
190 | 206 | | |
191 | 207 | | |
192 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
193 | 217 | | |
194 | 218 | | |
195 | 219 | | |
| |||
0 commit comments