Skip to content

[M9] HTTP API server crash takes down the entire operator #288

Description

@pradeepto

Severity: Medium

Category

Reliability

Files

cmd/main.go:256-261

Description

The API server runs in a goroutine. If apiServer.Start() fails (port conflict, bind error, etc) it calls os.Exit(1) from that goroutine. This bypasses controller-runtime's shutdown sequence and can leave leader election leases held, blocking other replicas from taking over.

Fix

Signal the manager to shut down gracefully instead of calling os.Exit directly. Use the manager's context cancellation or a shared error channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions