Commit 43d4287
Cleanup Replica sets only in single node mode
This commit fixes a serious bug in cluster configuration.
Basically whenever domainmgr restarts there was a legacy code which deletes all
VMs running. That was implemented to handle a corner case where apps were deleted when device is
powered off. We want to delete any app config in kubernetes as soon as device reboots. Assumption is
device will resync config with the controller.
That works fine for single node cases. In a cluster setup, apps would have moved to other nodes when this
device went to reboot. Because of this bug as soon as this device reboots its deleting VMs running on other nodes,
basically bouncing all VMs.
Added a new API to check if this device is in cluster mode and ignore delete of VMs.
Also, we no longer directly deal with VMs, its all VM replica sets now. So moved CleanupVMs to CleanupVMRs.
Move the const to types/locationconstants.go
Change the logging to Debugf
Signed-off-by: Pramodh Pallapothu <pramodh@zededa.com>1 parent 75a8739 commit 43d4287
File tree
4 files changed
+77
-14
lines changed- pkg/pillar
- cmd/domainmgr
- kubeapi
- types
4 files changed
+77
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
650 | 662 | | |
651 | 663 | | |
652 | 664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
367 | | - | |
368 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
377 | 383 | | |
378 | 384 | | |
379 | 385 | | |
380 | | - | |
| 386 | + | |
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
386 | 392 | | |
387 | | - | |
388 | | - | |
| 393 | + | |
| 394 | + | |
389 | 395 | | |
390 | | - | |
| 396 | + | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
394 | | - | |
395 | | - | |
396 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
397 | 404 | | |
398 | 405 | | |
399 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
400 | 423 | | |
401 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
0 commit comments