Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
afd8b70a
Commit
afd8b70a
authored
Feb 22, 2017
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collect npd log in cluster e2e test.
parent
2e127111
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
npd.yaml
cluster/addons/node-problem-detector/npd.yaml
+3
-4
log-dump.sh
cluster/log-dump.sh
+7
-4
No files found.
cluster/addons/node-problem-detector/npd.yaml
View file @
afd8b70a
...
...
@@ -42,10 +42,10 @@ spec:
-
name
:
node-problem-detector
image
:
gcr.io/google_containers/node-problem-detector:v0.3.0-alpha.1
command
:
-
/node-problem-detector
-
--logtostderr
-
"
/bin/sh"
-
"
-c"
# Pass both config to support both journald and syslog.
-
--system-log-monitors=/config/kernel-monitor.json,/config/kernel-monitor-filelog.json
-
"
/node-problem-detector
--logtostderr
--system-log-monitors=/config/kernel-monitor.json,/config/kernel-monitor-filelog.json
>>/var/log/node-problem-detector.log
2>&1"
securityContext
:
privileged
:
true
resources
:
...
...
@@ -63,7 +63,6 @@ spec:
volumeMounts
:
-
name
:
log
mountPath
:
/var/log
readOnly
:
true
-
name
:
localtime
mountPath
:
/etc/localtime
readOnly
:
true
...
...
cluster/log-dump.sh
View file @
afd8b70a
...
...
@@ -37,7 +37,8 @@ readonly master_ssh_supported_providers="gce aws kubemark"
readonly
node_ssh_supported_providers
=
"gce gke aws kubemark"
readonly
master_logfiles
=
"kube-apiserver kube-scheduler rescheduler kube-controller-manager etcd etcd-events glbc cluster-autoscaler kube-addon-manager fluentd"
readonly
node_logfiles
=
"kube-proxy fluentd"
readonly
node_logfiles
=
"kube-proxy fluentd node-problem-detector"
readonly
node_systemd_services
=
"node-problem-detector"
readonly
hollow_node_logfiles
=
"kubelet-hollow-node-* kubeproxy-hollow-node-* npd-*"
readonly
aws_logfiles
=
"cloud-init-output"
readonly
gce_logfiles
=
"startupscript"
...
...
@@ -115,12 +116,14 @@ function copy-logs-from-node() {
}
# Save logs for node $1 into directory $2. Pass in any non-common files in $3.
# $3 should be a space-separated list of files.
# Pass in any non-common systemd services in $4.
# $3 and $4 should be a space-separated list of files.
# This function shouldn't ever trigger errexit
function
save-logs
()
{
local
-r
node_name
=
"
${
1
}
"
local
-r
dir
=
"
${
2
}
"
local
files
=
"
${
3
}
"
local
opt_systemd_services
=
"
${
4
:-
""
}
"
if
[[
-n
"
${
use_custom_instance_list
}
"
]]
;
then
if
[[
-n
"
${
LOG_DUMP_SAVE_LOGS
:-}
"
]]
;
then
files
=
"
${
files
}
${
LOG_DUMP_SAVE_LOGS
:-}
"
...
...
@@ -138,7 +141,7 @@ function save-logs() {
;;
esac
fi
local
-r
services
=(
${
systemd_services
}
${
LOG_DUMP_SAVE_SERVICES
:-}
)
local
-r
services
=(
${
systemd_services
}
${
opt_systemd_services
}
${
LOG_DUMP_SAVE_SERVICES
:-}
)
if
log-dump-ssh
"
${
node_name
}
"
"command -v journalctl"
&> /dev/null
;
then
log-dump-ssh
"
${
node_name
}
"
"sudo journalctl --output=short-precise -u kube-node-installation.service"
>
"
${
dir
}
/kube-node-installation.log"
||
true
...
...
@@ -223,7 +226,7 @@ function dump_nodes() {
mkdir
-p
"
${
node_dir
}
"
# Save logs in the background. This speeds up things when there are
# many nodes.
save-logs
"
${
node_name
}
"
"
${
node_dir
}
"
"
${
node_logfiles
}
"
&
save-logs
"
${
node_name
}
"
"
${
node_dir
}
"
"
${
node_logfiles
}
"
"
${
node_systemd_services
}
"
&
# We don't want to run more than ${max_scp_processes} at a time, so
# wait once we hit that many nodes. This isn't ideal, since one might
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment