MCPcopy Create free account
hub / github.com/containerd/nerdctl / UpdateErrorLabel

Function UpdateErrorLabel

pkg/containerutil/containerutil.go:126–131  ·  view source on GitHub ↗

UpdateErrorLabel updates the "nerdctl/error" label of the container according to the container error.

(ctx context.Context, container containerd.Container, err error)

Source from the content-addressed store, hash-verified

124// UpdateErrorLabel updates the "nerdctl/error"
125// label of the container according to the container error.
126func UpdateErrorLabel(ctx context.Context, container containerd.Container, err error) error {
127 opt := containerd.WithAdditionalContainerLabels(map[string]string{
128 labels.Error: err.Error(),
129 })
130 return container.Update(ctx, containerd.UpdateContainerOpts(opt))
131}
132
133// WithBindMountHostProcfs replaces procfs mount with rbind.
134// Required for --pid=host on rootless.

Callers 6

RemoveContainerFunction · 0.92
killContainerFunction · 0.92
createActionFunction · 0.92
runActionFunction · 0.92
StartFunction · 0.85
StopFunction · 0.85

Calls 2

UpdateMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…