Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminationMessagePath does not work with peer-pods #2220

Open
ldoktor opened this issue Dec 20, 2024 · 1 comment
Open

terminationMessagePath does not work with peer-pods #2220

ldoktor opened this issue Dec 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ldoktor
Copy link
Contributor

ldoktor commented Dec 20, 2024

Describe the bug

Setting terminationMessagePath should result in the content of that file being stored as Message in the pod status, but with peer-pods it does nothing, while it works with kubernetes as well as with kata-qemu.

How to reproduce

cat <<\EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: test
spec:
  terminationGracePeriodSeconds: 0
  restartPolicy: Never
  containers:
  - name: test
    image: busybox
    command:
    - sh
    - -cx
    - echo FOO > /tmp/foo
    terminationMessagePath: /tmp/foo
    terminatioNMessagePolicy: File
  runtimeClassName: kata-remote
EOF

# Wait for the pod to complete
kubectl describe pods/test

CoCo version information

cloud-api-adaptor-464f734ef28dd8f5f83fb5ef644dd73de3e409d7

What TEE are you seeing the problem on

None

Failing command and relevant log output

# Peer-pods
Containers:
  test:
    Container ID:  containerd://d03c5b1c1d20ec1ab41d8cf55fee29c52b58ac376a305b4567171057e22171ae
    Image:         busybox
    Image ID:      docker.io/library/busybox@sha256:2919d0172f7524b2d8df9e50066a682669e6d170ac0f6a49676d54358fe970b5
    Port:          <none>
    Host Port:     <none>
    Command:
      sh
      -cx
      echo FOO > /tmp/foo
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Fri, 20 Dec 2024 10:00:13 +0100
      Finished:     Fri, 20 Dec 2024 10:00:14 +0100
    Ready:          False


# Default pod
Containers:
  test:
    Container ID:  containerd://244019d356d7a2d421b71c3591704db7ec49d6078a8d114d8583f707863cf8d4
    Image:         busybox
    Image ID:      docker.io/library/busybox@sha256:2919d0172f7524b2d8df9e50066a682669e6d170ac0f6a49676d54358fe970b5
    Port:          <none>
    Host Port:     <none>
    Command:
      sh
      -cx
      echo FOO > /tmp/foo
    State:      Terminated
      Reason:   Completed
      Message:  FOO

      Exit Code:    0
      Started:      Fri, 20 Dec 2024 10:26:42 +0100
      Finished:     Fri, 20 Dec 2024 10:26:42 +0100
@ldoktor ldoktor added the bug Something isn't working label Dec 20, 2024
@ldoktor
Copy link
Contributor Author

ldoktor commented Dec 20, 2024

Forgot to mention this is most likely the reason some of the test failures from #833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant