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

logs: Add container status & cruntime logs #4960

Merged
merged 3 commits into from
Aug 2, 2019

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Aug 2, 2019

Also decrease default log length from 50 to 30 to decrease log spam.

Example output:

==> container status <==
CONTAINER ID        IMAGE               CREATED              STATE               NAME                       ATTEMPT             POD ID
307e90d0e23a5       4d86ff7d49886       36 seconds ago       Running             nginx-ingress-controller   0                   8c634193971f1
8380f640d1b28       f9aed6605b814       About a minute ago   Running             kubernetes-dashboard       0                   f1ad00355a566
3dbba93d11679       f78e46173de89       About a minute ago   Running             gvisor                     0                   f47b2c03cd389
45a58debe8c1a       4689081edb103       About a minute ago   Running             storage-provisioner        0                   9a703e0f6f625
b0a71f29b3565       eb516548c180f       About a minute ago   Running             coredns                    0                   85a855564150c
0ee1d4be21d4e       eb516548c180f       About a minute ago   Running             coredns                    0                   abf716bbce8d0
eaa45a6122c70       89a062da739d3       About a minute ago   Running             kube-proxy                 0                   083285393f0ad
5e4cb381a0541       119701e77cbc4       About a minute ago   Running             kube-addon-manager         0                   996c1e9057b10
bff23c2c2ecc9       b0b3c4c404da5       About a minute ago   Running             kube-scheduler             0                   7ed16039156bf
2c3592a9d9cda       2c4adeb21b4ff       About a minute ago   Running             etcd                       0                   78e719be1cfdb
5287e048ab7f4       68c3eb07bfc3f       About a minute ago   Running             kube-apiserver             0                   23bde6adfe425
d49482e316b54       d75082f1d1216       About a minute ago   Running             kube-controller-manager    0                   743da82adef40

==> containerd <==
-- Logs begin at Fri 2019-08-02 14:48:23 PDT, end at Fri 2019-08-02 14:51:06 PDT. --
Aug 02 14:50:27 minikube containerd[4775]: time="2019-08-02T14:50:27.582417468-07:00" level=info msg="TaskExit event &TaskExit{ContainerID:2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4,ID:aeb874f1bf07c903102cae6f600084df8830305854d6bce6fde068ced061a147,Pid:5349,ExitStatus:0,ExitedAt:2019-08-02 21:50:27.547108004 +0000 UTC,}"
Aug 02 14:50:27 minikube containerd[4775]: time="2019-08-02T14:50:27.597716763-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" returns with exit code 0"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.679805553-07:00" level=info msg="ImageUpdate event &ImageUpdate{Name:sha256:4d86ff7d4988693ef53611dec59362384842b61498f78238ac6afb44d8b623cb,Labels:map[string]string{io.cri-containerd.image: managed,},}"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.683679547-07:00" level=info msg="ImageUpdate event &ImageUpdate{Name:quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.25.0,Labels:map[string]string{io.cri-containerd.image: managed,},}"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.683985105-07:00" level=info msg="PullImage "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.25.0" returns image reference "sha256:4d86ff7d4988693ef53611dec59362384842b61498f78238ac6afb44d8b623cb""
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.688232163-07:00" level=info msg="CreateContainer within sandbox "8c634193971f1a7edf10fff45365844e6a67808bd2954ddcf9acac1181df8122" for container &ContainerMetadata{Name:nginx-ingress-controller,Attempt:0,}"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.758121613-07:00" level=info msg="CreateContainer within sandbox "8c634193971f1a7edf10fff45365844e6a67808bd2954ddcf9acac1181df8122" for &ContainerMetadata{Name:nginx-ingress-controller,Attempt:0,} returns container id "307e90d0e23a50f1bd96bf80107babb8e86cc64266d2cd4fb2b6d3247a5a1764""
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.758587091-07:00" level=info msg="StartContainer for "307e90d0e23a50f1bd96bf80107babb8e86cc64266d2cd4fb2b6d3247a5a1764""
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.761611157-07:00" level=info msg="shim gvisor-containerd-shim started" address="/containerd-shim/k8s.io/307e90d0e23a50f1bd96bf80107babb8e86cc64266d2cd4fb2b6d3247a5a1764/shim.sock" debug=true pid=5403
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30-07:00" level=debug msg="registering ttrpc server"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30-07:00" level=debug msg="serving api on unix socket" socket="[inherited from parent]"
Aug 02 14:50:30 minikube containerd[4775]: time="2019-08-02T14:50:30.857185509-07:00" level=info msg="StartContainer for "307e90d0e23a50f1bd96bf80107babb8e86cc64266d2cd4fb2b6d3247a5a1764" returns successfully"
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.420629874-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" with command [/bin/sh -ec ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/var/lib/minikube/certs//etcd/ca.crt --cert=/var/lib/minikube/certs//etcd/healthcheck-client.crt --key=/var/lib/minikube/certs//etcd/healthcheck-client.key get foo] and timeout 15 (s)"
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.505514998-07:00" level=info msg="Finish piping "stderr" of container exec "78d4cf75e721f26007ec2bb587bac65daf13555f242f60ce80317cf8b54068fd""
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.505694400-07:00" level=info msg="Finish piping "stdout" of container exec "78d4cf75e721f26007ec2bb587bac65daf13555f242f60ce80317cf8b54068fd""
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.505998272-07:00" level=info msg="Exec process "78d4cf75e721f26007ec2bb587bac65daf13555f242f60ce80317cf8b54068fd" exits with exit code 0 and error <nil>"
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.526686942-07:00" level=info msg="TaskExit event &TaskExit{ContainerID:2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4,ID:78d4cf75e721f26007ec2bb587bac65daf13555f242f60ce80317cf8b54068fd,Pid:5658,ExitStatus:0,ExitedAt:2019-08-02 21:50:37.505878285 +0000 UTC,}"
Aug 02 14:50:37 minikube containerd[4775]: time="2019-08-02T14:50:37.540905570-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" returns with exit code 0"
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.420603739-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" with command [/bin/sh -ec ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/var/lib/minikube/certs//etcd/ca.crt --cert=/var/lib/minikube/certs//etcd/healthcheck-client.crt --key=/var/lib/minikube/certs//etcd/healthcheck-client.key get foo] and timeout 15 (s)"
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.496159634-07:00" level=info msg="Finish piping "stderr" of container exec "73f06322c4ca1a38249c9230f0928a04d6e99fcbc01134e28f3ad0dab408d216""
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.496760315-07:00" level=info msg="Finish piping "stdout" of container exec "73f06322c4ca1a38249c9230f0928a04d6e99fcbc01134e28f3ad0dab408d216""
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.496877831-07:00" level=info msg="Exec process "73f06322c4ca1a38249c9230f0928a04d6e99fcbc01134e28f3ad0dab408d216" exits with exit code 0 and error <nil>"
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.520897481-07:00" level=info msg="TaskExit event &TaskExit{ContainerID:2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4,ID:73f06322c4ca1a38249c9230f0928a04d6e99fcbc01134e28f3ad0dab408d216,Pid:5754,ExitStatus:0,ExitedAt:2019-08-02 21:50:47.496503865 +0000 UTC,}"
Aug 02 14:50:47 minikube containerd[4775]: time="2019-08-02T14:50:47.522826786-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" returns with exit code 0"
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.420570743-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" with command [/bin/sh -ec ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/var/lib/minikube/certs//etcd/ca.crt --cert=/var/lib/minikube/certs//etcd/healthcheck-client.crt --key=/var/lib/minikube/certs//etcd/healthcheck-client.key get foo] and timeout 15 (s)"
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.500768468-07:00" level=info msg="Finish piping "stderr" of container exec "e3bbf3aad37929fb0d2151dd5b4d0b700dc81d101b7ab486e96d6b661ace45c9""
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.500808258-07:00" level=info msg="Finish piping "stdout" of container exec "e3bbf3aad37929fb0d2151dd5b4d0b700dc81d101b7ab486e96d6b661ace45c9""
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.501161188-07:00" level=info msg="Exec process "e3bbf3aad37929fb0d2151dd5b4d0b700dc81d101b7ab486e96d6b661ace45c9" exits with exit code 0 and error <nil>"
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.523854095-07:00" level=info msg="TaskExit event &TaskExit{ContainerID:2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4,ID:e3bbf3aad37929fb0d2151dd5b4d0b700dc81d101b7ab486e96d6b661ace45c9,Pid:5893,ExitStatus:0,ExitedAt:2019-08-02 21:50:57.501018705 +0000 UTC,}"
Aug 02 14:50:57 minikube containerd[4775]: time="2019-08-02T14:50:57.532617006-07:00" level=info msg="ExecSync for "2c3592a9d9cdafecbb4aed08fe6b7bf1982820ce5b0ef8b893fd50ec5b52a1f4" returns with exit code 0"

==> coredns <==
.:53
2019-08-02T21:49:53.986Z [INFO] CoreDNS-1.3.1
2019-08-02T21:49:53.986Z [INFO] linux/amd64, go1.11.4, 6b56a9c
CoreDNS-1.3.1
linux/amd64, go1.11.4, 6b56a9c
2019-08-02T21:49:53.986Z [INFO] plugin/reload: Running configuration MD5 = 5d5369fbc12f985709b924e721217843
...

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 2, 2019
@tstromberg tstromberg changed the title Add container status and container runtime logs logs: Add container status and container runtime logs Aug 2, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 2, 2019
@tstromberg tstromberg changed the title logs: Add container status and container runtime logs logs: Add container status & cruntime logs Aug 2, 2019
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 2, 2019
@tstromberg tstromberg merged commit de84f83 into kubernetes:master Aug 2, 2019
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants