Skip to content

Commit 676342f

Browse files
committed
Fix systemd failed unit condition
1 parent 00e7aaf commit 676342f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/controller/hypervisor_controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ func (r *HypervisorReconciler) Reconcile(ctx context.Context, req ctrl.Request)
9494
var unitReasonsMap = map[string]string{
9595
"active": "Running",
9696
"inactive": "Stopped",
97+
"failed": "Failed",
9798
}
9899
var unitStatusesMap = map[string]metav1.ConditionStatus{
99100
"active": metav1.ConditionTrue,
100101
"inactive": metav1.ConditionFalse,
102+
"failed": metav1.ConditionFalse,
101103
}
102104

103105
for _, unit := range units {
@@ -292,7 +294,7 @@ func (r *HypervisorReconciler) SetupWithManager(mgr ctrl.Manager) error {
292294

293295
// Initialize Libvirt connection
294296
if err := r.Libvirt.Connect(); err != nil {
295-
log.Error(err, "unable to connect to Libvirt system bus, reconnecting on reconcillation")
297+
log.Error(err, "unable to connect to Libvirt system bus, reconnecting on reconciliation")
296298
}
297299

298300
var err error

0 commit comments

Comments
 (0)