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

Logging does not work after pod completes #1005

Closed
strin opened this issue Sep 16, 2018 · 5 comments
Closed

Logging does not work after pod completes #1005

strin opened this issue Sep 16, 2018 · 5 comments

Comments

@strin
Copy link

strin commented Sep 16, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

Bug report.

What happened:

We are running argo on Google Kubernetes Engine, with autoscaling enabled. Argo launched the container successfully, but after it completes the node gets deleted by autoscaler and the completed pod is no longer available.

What you expected to happen:

In Argo UI clicking on logs should reveal the container logs

image

How to reproduce it (as minimally and precisely as possible):

Launch a job on GKE with the following config enabled.

        resources:
          limits:
            nvidia.com/gpu: 1

Anything else we need to know?:

Environment:

  • Argo version: v2.2.0
$ argo version
  • Kubernetes version :
$ kubectl version -o yaml
clientVersion:
  buildDate: 2017-11-09T07:26:41Z
  compiler: gc
  gitCommit: f0efb3cb883751c5ffdbe6d515f3cb4fbe7b7acd
  gitTreeState: clean
  gitVersion: v1.8.3
  goVersion: go1.9.2
  major: "1"
  minor: "8"
  platform: darwin/amd64
serverVersion:
  buildDate: 2018-08-02T23:42:40Z
  compiler: gc
  gitCommit: 9b635efce81582e1da13b35a7aa539c0ccb32987
  gitTreeState: clean
  gitVersion: v1.9.7-gke.5
  goVersion: go1.9.3b4
  major: "1"
  minor: 9+
  platform: linux/amd64

@aisensiy
Copy link

Yes, the log is gone when pod is gone. It is the default behavior of kubernetes. See more infomation from https://kubernetes.io/docs/concepts/cluster-administration/logging/

@strin
Copy link
Author

strin commented Sep 25, 2018

@aisensiy I wonder why argo chose to remove the pods after they are done. Another option is to follow the pattern of Kubernetes jobs:

https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-termination-and-cleanup

It will keep the pods unless deleted by users.

@alexmt
Copy link
Contributor

alexmt commented Sep 25, 2018

Workflow controller (v2.2.0) has ability to save logs in artifacts repository:

https://github.com/argoproj/argo/blob/47a9e5560229c789b70a6624f23fb4433412fbc4/docs/workflow-controller-configmap.yaml#L23-L25

UI don't use that feature yet, though. This will be resolved in #1018

@alexmt
Copy link
Contributor

alexmt commented Sep 25, 2018

I guess we can close it. @strin please feel free to reopen if necessary

@alexmt alexmt closed this as completed Sep 25, 2018
@robintanner
Copy link

This archiveLogs setting isn't working for me. I don't see anything in any logs for controllers, sensors, events in the namespace that would indicate why this is not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants