Skip to content

set-datadir-ownership container fails to init because /bin/sh isn't found #1117

@gabschne

Description

@gabschne

Hi, when trying to use setDataDirOwnership:

Error: failed to start container "set-datadir-ownership": Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown

Reproduction template:

apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  clusterSpec:
    external:
      domain: customredpandadomain.local
    statefulset:
      initContainers:
        setDataDirOwnership:
          enabled: true

Workaround:

apiVersion: cluster.redpanda.com/v1alpha2
kind: Redpanda
metadata:
  name: redpanda
spec:
  clusterSpec:
    external:
      domain: customredpandadomain.local
    statefulset:
      initContainerImage:
        repository: alpine
        tag: latest
      initContainers:
        setDataDirOwnership:
          enabled: true

Operator (chart) version: v25.1.3

Sorry for the few words, but I'm in a bit of a hurry, unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions