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
802610b1
Commit
802610b1
authored
Apr 05, 2015
by
Young
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
etcd should be started after the trap func set
parent
c048e6fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
etcd.sh
hack/lib/etcd.sh
+9
-1
local-up-cluster.sh
hack/local-up-cluster.sh
+5
-5
No files found.
hack/lib/etcd.sh
View file @
802610b1
...
...
@@ -48,8 +48,16 @@ kube::etcd::start() {
curl
-X
PUT
"http://
${
host
}
:
${
port
}
/v2/keys/_test"
}
kube::etcd::
cleanu
p
()
{
kube::etcd::
sto
p
()
{
kill
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
wait
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
}
kube::etcd::clean_etcd_dir
()
{
rm
-rf
"
${
ETCD_DIR
-
}
"
}
kube::etcd::cleanup
()
{
kube::etcd::stop
kube::etcd::clean_etcd_dir
}
hack/local-up-cluster.sh
View file @
802610b1
...
...
@@ -36,9 +36,6 @@ if [ "$?" != "0" ]; then
exit
1
fi
echo
"Starting etcd"
kube::etcd::start
# Shut down anyway if there's an error.
set
+e
...
...
@@ -106,14 +103,17 @@ cleanup()
[[
-n
"
${
PROXY_PID
-
}
"
]]
&&
sudo kill
"
${
PROXY_PID
}
"
[[
-n
"
${
SCHEDULER_PID
-
}
"
]]
&&
sudo kill
"
${
SCHEDULER_PID
}
"
[[
-n
"
${
ETCD_PID
-
}
"
]]
&&
k
ill
"
${
ETCD_PID
}
"
[[
-n
"
${
ETCD_DIR
-
}
"
]]
&&
rm
-rf
"
${
ETCD_DIR
}
"
[[
-n
"
${
ETCD_PID
-
}
"
]]
&&
k
ube::etcd::stop
[[
-n
"
${
ETCD_DIR
-
}
"
]]
&&
kube::etcd::clean_etcd_dir
exit
0
}
trap
cleanup EXIT
echo
"Starting etcd"
kube::etcd::start
APISERVER_LOG
=
/tmp/kube-apiserver.log
sudo
-E
"
${
GO_OUT
}
/kube-apiserver"
\
--v
=
${
LOG_LEVEL
}
\
...
...
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