@@ -126,6 +126,26 @@ func (r *MachineBackendReconciler) ReconcileNormal(ctx context.Context, cluster
126
126
Status : metav1 .ConditionTrue ,
127
127
Reason : infrav1 .DevMachineDockerContainerProvisionedV1Beta2Reason ,
128
128
})
129
+ // In case of upgrades the v1beta2 condition for BootstrapExecSucceeded does not exist.
130
+ // In this case recover the information from the existing v1beta1 condition, because we do not know if
131
+ // all commands succeeded.
132
+ if ! v1beta2conditions .Has (dockerMachine , infrav1 .DevMachineDockerContainerBootstrapExecSucceededV1Beta2Condition ) {
133
+ condition := conditions .Get (dockerMachine , infrav1 .BootstrapExecSucceededCondition )
134
+ if condition == nil || condition .Status == corev1 .ConditionTrue {
135
+ v1beta2conditions .Set (dockerMachine , metav1.Condition {
136
+ Type : infrav1 .DevMachineDockerContainerBootstrapExecSucceededV1Beta2Condition ,
137
+ Status : metav1 .ConditionTrue ,
138
+ Reason : infrav1 .DevMachineDockerContainerBootstrapExecSucceededV1Beta2Reason ,
139
+ })
140
+ } else {
141
+ v1beta2conditions .Set (dockerMachine , metav1.Condition {
142
+ Type : infrav1 .DevMachineDockerContainerBootstrapExecSucceededV1Beta2Condition ,
143
+ Status : metav1 .ConditionFalse ,
144
+ Message : condition .Message ,
145
+ Reason : infrav1 .DevMachineDockerContainerBootstrapExecNotSucceededV1Beta2Reason ,
146
+ })
147
+ }
148
+ }
129
149
130
150
// Setting machine address is required after move, because status.Address field is not retained during move.
131
151
if err := setMachineAddress (ctx , dockerMachine , externalMachine ); err != nil {
0 commit comments