Files
sablier/pkg/provider/podman/container_start.go
Alexis Couvreur fad97d7901 fix(provider): add debug logging (#653)
* fix(provider): add debug logging

Add a bunch of debug logging calls

* return a swarm service pointer

* revert to service list with status true

* change trace to debug

* --no-verify
2025-07-30 22:44:20 -04:00

22 lines
561 B
Go

package podman
import (
"context"
"fmt"
"log/slog"
"github.com/containers/podman/v5/pkg/bindings/containers"
)
func (p *Provider) InstanceStart(ctx context.Context, name string) error {
p.l.DebugContext(ctx, "starting container", "name", name)
// TODO: Create a context from the ctx argument with the p.conn
err := containers.Start(p.conn, name, nil)
if err != nil {
p.l.ErrorContext(ctx, "cannot start container", slog.String("name", name), slog.Any("error", err))
return fmt.Errorf("cannot start container %s: %w", name, err)
}
return nil
}