Commit 9dceae4
authored
MS maintenance improvements (#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 ea36568 commit 9dceae4
File tree
35 files changed
+1137
-221
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
+1137
-221
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 | | |
| |||
922 | 925 | | |
923 | 926 | | |
924 | 927 | | |
925 | | - | |
| 928 | + | |
926 | 929 | | |
927 | 930 | | |
928 | 931 | | |
| |||
934 | 937 | | |
935 | 938 | | |
936 | 939 | | |
| 940 | + | |
937 | 941 | | |
938 | 942 | | |
939 | 943 | | |
| |||
942 | 946 | | |
943 | 947 | | |
944 | 948 | | |
945 | | - | |
| 949 | + | |
946 | 950 | | |
947 | 951 | | |
948 | 952 | | |
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
952 | | - | |
| 956 | + | |
953 | 957 | | |
954 | | - | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
955 | 961 | | |
956 | 962 | | |
957 | 963 | | |
| |||
972 | 978 | | |
973 | 979 | | |
974 | 980 | | |
975 | | - | |
| 981 | + | |
976 | 982 | | |
977 | 983 | | |
978 | 984 | | |
979 | | - | |
| 985 | + | |
980 | 986 | | |
981 | 987 | | |
982 | 988 | | |
983 | 989 | | |
984 | 990 | | |
985 | 991 | | |
986 | | - | |
| 992 | + | |
987 | 993 | | |
988 | 994 | | |
989 | 995 | | |
990 | | - | |
| 996 | + | |
991 | 997 | | |
| 998 | + | |
992 | 999 | | |
993 | | - | |
| 1000 | + | |
994 | 1001 | | |
995 | 1002 | | |
996 | 1003 | | |
| |||
1003 | 1010 | | |
1004 | 1011 | | |
1005 | 1012 | | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
| 1013 | + | |
| 1014 | + | |
1009 | 1015 | | |
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
1013 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1014 | 1028 | | |
1015 | 1029 | | |
1016 | 1030 | | |
| |||
1027 | 1041 | | |
1028 | 1042 | | |
1029 | 1043 | | |
1030 | | - | |
| 1044 | + | |
1031 | 1045 | | |
1032 | 1046 | | |
1033 | 1047 | | |
| |||
1374 | 1388 | | |
1375 | 1389 | | |
1376 | 1390 | | |
1377 | | - | |
| 1391 | + | |
1378 | 1392 | | |
1379 | 1393 | | |
1380 | | - | |
1381 | | - | |
| 1394 | + | |
| 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 | + | |
1397 | 1411 | | |
1398 | 1412 | | |
1399 | 1413 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
| 819 | + | |
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
742 | 749 | | |
743 | 750 | | |
744 | 751 | | |
| |||
1233 | 1240 | | |
1234 | 1241 | | |
1235 | 1242 | | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1236 | 1249 | | |
1237 | 1250 | | |
1238 | 1251 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
| 1153 | + | |
1153 | 1154 | | |
1154 | 1155 | | |
1155 | 1156 | | |
| |||
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