You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
daemon & upgrade_monitor: split 'MachineConfigNodeUpdateFilesAndOS' condition to 'MachineConfigNodeUpdateOS' and 'MachineConfigNodeUpdateFiles' when 'ImageModeStatusReporting' is enabled
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFiles), Message: fmt.Sprintf("Updating the Files on disk as a part of the in progress phase")},
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateOS), Message: fmt.Sprintf("Updating the OS on disk as a part of the in progress phase")},
1135
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateOS)), Message: fmt.Sprintf("Applying new OS config to node.")},
1136
+
metav1.ConditionUnknown,
1137
+
metav1.ConditionUnknown,
1138
+
dn.node,
1139
+
dn.mcfgClient,
1140
+
dn.fgHandler,
1141
+
pool,
1142
+
)
1143
+
}
1144
+
iferr!=nil {
1145
+
klog.Errorf("Error making MCN for Updating Files: %v", err)
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFilesAndOS), Message: fmt.Sprintf("Updating the Files and OS on disk as a part of the in progress phase")},
1108
-
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateFilesAndOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateFilesAndOS)), Message: fmt.Sprintf("Applying files and new OS config to node. OS will %s need an update. SSH Keys will %s need an update", updatesNeeded[0], updatesNeeded[1])},
1109
-
metav1.ConditionUnknown,
1110
-
metav1.ConditionUnknown,
1111
-
dn.node,
1112
-
dn.mcfgClient,
1113
-
dn.fgHandler,
1114
-
pool,
1115
-
)
1116
-
iferr!=nil {
1117
-
klog.Errorf("Error making MCN for Updating Files and OS: %v", err)
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFilesAndOS), Message: fmt.Sprintf("Updating the Files and OS on disk as a part of the in progress phase")},
1151
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateFilesAndOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateFilesAndOS)), Message: fmt.Sprintf("Applying files and new OS config to node. OS will %s need an update. SSH Keys will %s need an update", updatesNeeded[0], updatesNeeded[1])},
1152
+
metav1.ConditionUnknown,
1153
+
metav1.ConditionUnknown,
1154
+
dn.node,
1155
+
dn.mcfgClient,
1156
+
dn.fgHandler,
1157
+
pool,
1158
+
)
1159
+
iferr!=nil {
1160
+
klog.Errorf("Error making MCN for Updating OS: %v", err)
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFiles), Message: fmt.Sprintf("Error updating the Files on disk as a part of the in progress phase")},
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFiles), Message: fmt.Sprintf("Error updating the Files on disk as a part of the in progress phase")},
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateOS), Message: fmt.Sprintf("Error the OS on disk as a part of the in progress phase")},
1255
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateOS)), Message: fmt.Sprintf("Update failed applying new OS config to node: %s", err.Error())},
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFilesAndOS), Message: fmt.Sprintf("Updated the Files and OS on disk as a part of the in progress phase")},
1230
-
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateFilesAndOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateFilesAndOS)), Message: fmt.Sprintf("Applied files and new OS config to node. OS did %s need an update. SSH Keys did %s need an update", updatesNeeded[0], updatesNeeded[1])},
1231
-
metav1.ConditionTrue,
1232
-
metav1.ConditionTrue,
1233
-
dn.node,
1234
-
dn.mcfgClient,
1235
-
dn.fgHandler,
1236
-
pool,
1237
-
)
1238
-
iferr!=nil {
1239
-
klog.Errorf("Error making MCN for Updated Files and OS: %v", err)
1310
+
// TODO (MCO-1775): Once ImageModeStatusReporting is GA, clean up the below logic. Updates to
1311
+
// the `MachineConfigNodeUpdateFilesAndOS` condition will no longer be necessary and should be
1312
+
// fully replaced by updates to the individual `MachineConfigNodeUpdateFiles` and
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFiles), Message: fmt.Sprintf("Updated the Files on disk as a part of the in progress phase")},
1319
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateFiles, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateFiles)), Message: fmt.Sprintf("Applied files. SSH Keys did need an update")},
1320
+
metav1.ConditionTrue,
1321
+
metav1.ConditionTrue,
1322
+
dn.node,
1323
+
dn.mcfgClient,
1324
+
dn.fgHandler,
1325
+
pool,
1326
+
)
1327
+
iferr!=nil {
1328
+
klog.Errorf("Error making MCN for Updated Files: %v", err)
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateOS), Message: fmt.Sprintf("Updated the OS on disk as a part of the in progress phase")},
1335
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateOS)), Message: fmt.Sprintf("Applied new OS config to node.")},
1336
+
metav1.ConditionTrue,
1337
+
metav1.ConditionTrue,
1338
+
dn.node,
1339
+
dn.mcfgClient,
1340
+
dn.fgHandler,
1341
+
pool,
1342
+
)
1343
+
iferr!=nil {
1344
+
klog.Errorf("Error making MCN for Updated OS: %v", err)
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateExecuted, Reason: string(mcfgv1.MachineConfigNodeUpdateFilesAndOS), Message: fmt.Sprintf("Updated the Files and OS on disk as a part of the in progress phase")},
1350
+
&upgrademonitor.Condition{State: mcfgv1.MachineConfigNodeUpdateFilesAndOS, Reason: fmt.Sprintf("%s%s", string(mcfgv1.MachineConfigNodeUpdateExecuted), string(mcfgv1.MachineConfigNodeUpdateFilesAndOS)), Message: fmt.Sprintf("Applied files and new OS config to node. OS did %s need an update. SSH Keys did %s need an update", updatesNeeded[0], updatesNeeded[1])},
1351
+
metav1.ConditionTrue,
1352
+
metav1.ConditionTrue,
1353
+
dn.node,
1354
+
dn.mcfgClient,
1355
+
dn.fgHandler,
1356
+
pool,
1357
+
)
1358
+
iferr!=nil {
1359
+
klog.Errorf("Error making MCN for Updated Files and OS: %v", err)
1360
+
}
1240
1361
}
1362
+
1241
1363
// Node Disruption Policies cannot be used during firstboot as API is not accessible.
0 commit comments