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
c25331f2
Commit
c25331f2
authored
Feb 12, 2016
by
Matt Liggett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save the master logs to separate files rather than dumping to stdout.
parent
2172e0de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
util.sh
cluster/gce/util.sh
+18
-9
No files found.
cluster/gce/util.sh
View file @
c25331f2
...
...
@@ -745,16 +745,25 @@ function check-cluster() {
if
[[
${
elapsed
}
-gt
${
KUBE_CLUSTER_INITIALIZATION_TIMEOUT
}
]]
;
then
echo
-e
"
${
color_red
}
Cluster failed to initialize within
${
KUBE_CLUSTER_INITIALIZATION_TIMEOUT
}
seconds.
${
color_norm
}
"
>
&2
if
[[
${
KUBE_TEST_DEBUG
-
}
=
~ ^[yY]
$
]]
;
then
local
tmp_log
=
"
$(
mktemp
)
"
local
file
for
file
in
/var/log/startupscript.log /var/log/kube-apiserver.log
;
do
echo
"
${
MASTER_NAME
}
:
${
file
}
contents:"
if
gcloud compute copy-files
--project
"
${
PROJECT
}
"
\
--zone
"
${
ZONE
}
"
"
${
MASTER_NAME
}
:
${
file
}
"
"
${
tmp_log
}
"
;
then
cat
"
${
tmp_log
}
"
fi
local
savedir
=
"
${
E2E_REPORT_DIR
-
}
"
if
[[
-z
"
${
savedir
}
"
]]
;
then
savedir
=
"
$(
mktemp
-t
-d
k8s-e2e.XXX
)
"
fi
echo
"Preserving master logs in
${
savedir
}
"
local
logdir
=
/var/log
local basename
for
basename
in
startupscript kube-apiserver
;
do
# TODO(mml): Perhaps revisit how we name logs for preservation and
# centralize an implementation. Options include putting basename
# before hostname and including a timestamp.
local
src
=
"
${
logdir
}
/
${
basename
}
.log"
local
dst
=
"
${
savedir
}
/
${
MASTER_NAME
}
-
${
basename
}
.log"
echo
"Copying
${
MASTER_NAME
}
:
${
src
}
"
gcloud compute copy-files
\
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
\
"
${
MASTER_NAME
}
:
${
src
}
"
"
${
dst
}
"
\
||
true
done
rm
-f
"
${
tmp_log
}
"
fi
exit
2
fi
...
...
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