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

No logs in stdout/stderr if uses stdoutConfig #6136

Closed
ghost opened this issue Feb 9, 2023 · 2 comments · Fixed by #6162
Closed

No logs in stdout/stderr if uses stdoutConfig #6136

ghost opened this issue Feb 9, 2023 · 2 comments · Fixed by #6162
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ghost
Copy link

ghost commented Feb 9, 2023

Expected Behavior

Should have log

Actual Behavior

No logs

Steps to Reproduce the Problem

  1. Run kubectl create -f test.yaml to create a taskrun
  2. Run k get pod | grep test to the pod id
  3. Run kl pod/testlvv64-pod, there is no any log. but the doc says Once stdoutConfig.path or stderrConfig.path is specified, the corresponding output stream will be duplicated to both the given file and the standard output stream of the container, so users can still view the output through the Pod log API.

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.9", GitCommit:"9710807c82740b9799453677c977758becf0acbb", GitTreeState:"clean", BuildDate:"2022-12-08T10:15:09Z", GoVersion:"go1.18.9", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24+", GitVersion:"v1.24.8-eks-ffeb93d", GitCommit:"abb98ec0631dfe573ec5eae40dc48fd8f2017424", GitTreeState:"clean", BuildDate:"2022-11-29T18:45:03Z", GoVersion:"go1.18.8", Compiler:"gc", Platform:"linux/amd64"}
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.28.0
Pipeline version: v0.42.0
Triggers version: v0.22.0
Dashboard version: v0.31.0
Operator version: v0.64.0

the test.yaml file

kind: TaskRun
apiVersion: tekton.dev/v1beta1
metadata:
  generateName: test
spec:
  serviceAccountName: default
  taskSpec:
    volumes:
      - name: data
    steps:
      - name: echo
        image: alpine
        volumeMounts:
          - name: data
            mountPath: /data
        onError: continue
        script: |
          #!/bin/sh

          echo -n "hello world"
          echo "not an error" && nonsense
        stdoutConfig:
          path: /data/log
        stderrConfig:
          path: /data/error
@ghost ghost added the kind/bug Categorizes issue or PR as related to a bug. label Feb 9, 2023
@chengjoey
Copy link
Member

hi @lsdbitrue , thank you for opening this issue about strdout log, i am willing to try to fix it

@khrm
Copy link
Contributor

khrm commented Mar 3, 2023

/assign @chengjoey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants