Commit 0fc0059
committed
Fix "live get after write" in static pod installer controller.
The static pod installer controller builds an apply configuration for the status of the nodes it
manages based on potentially-stale state from an informer cache. The controller is written to assume
that it has observed the effect of its own previous writes. If the cache is stale, this assumption
can be violated which results in unpredictable installation decisions.
A mechanism was recently introduced requiring the installer controller to wait for its lister to
catch up to the latest version after performing a write. This mechanism did not work because it
depended on keeping state across calls to the Sync method, and because Sync has a value receiver,
field writes were not visible on subsequent calls.1 parent 0f76e23 commit 0fc0059
File tree
2 files changed
+136
-6
lines changed- pkg/operator/staticpod/controller/installer
2 files changed
+136
-6
lines changedLines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
95 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
| 213 | + | |
| 214 | + | |
203 | 215 | | |
204 | 216 | | |
205 | 217 | | |
| |||
1111 | 1123 | | |
1112 | 1124 | | |
1113 | 1125 | | |
1114 | | - | |
| 1126 | + | |
1115 | 1127 | | |
1116 | 1128 | | |
1117 | 1129 | | |
| |||
1123 | 1135 | | |
1124 | 1136 | | |
1125 | 1137 | | |
1126 | | - | |
| 1138 | + | |
1127 | 1139 | | |
1128 | 1140 | | |
1129 | 1141 | | |
| |||
1152 | 1164 | | |
1153 | 1165 | | |
1154 | 1166 | | |
1155 | | - | |
| 1167 | + | |
1156 | 1168 | | |
1157 | 1169 | | |
1158 | 1170 | | |
| |||
1161 | 1173 | | |
1162 | 1174 | | |
1163 | 1175 | | |
1164 | | - | |
| 1176 | + | |
1165 | 1177 | | |
1166 | 1178 | | |
1167 | 1179 | | |
| |||
Lines changed: 118 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2651 | 2651 | | |
2652 | 2652 | | |
2653 | 2653 | | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
0 commit comments