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
7270010a
Commit
7270010a
authored
Apr 06, 2015
by
Nikhil Jindal
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6444 from you-n-g/master
etcd should be started after the trap func set
parents
ebb98287
802610b1
Show 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 @
7270010a
...
@@ -48,8 +48,16 @@ kube::etcd::start() {
...
@@ -48,8 +48,16 @@ kube::etcd::start() {
curl
-X
PUT
"http://
${
host
}
:
${
port
}
/v2/keys/_test"
curl
-X
PUT
"http://
${
host
}
:
${
port
}
/v2/keys/_test"
}
}
kube::etcd::
cleanu
p
()
{
kube::etcd::
sto
p
()
{
kill
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
kill
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
wait
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
wait
"
${
ETCD_PID
-
}
"
>
/dev/null 2>&1
||
:
}
kube::etcd::clean_etcd_dir
()
{
rm
-rf
"
${
ETCD_DIR
-
}
"
rm
-rf
"
${
ETCD_DIR
-
}
"
}
}
kube::etcd::cleanup
()
{
kube::etcd::stop
kube::etcd::clean_etcd_dir
}
hack/local-up-cluster.sh
View file @
7270010a
...
@@ -36,9 +36,6 @@ if [ "$?" != "0" ]; then
...
@@ -36,9 +36,6 @@ if [ "$?" != "0" ]; then
exit
1
exit
1
fi
fi
echo
"Starting etcd"
kube::etcd::start
# Shut down anyway if there's an error.
# Shut down anyway if there's an error.
set
+e
set
+e
...
@@ -106,14 +103,17 @@ cleanup()
...
@@ -106,14 +103,17 @@ cleanup()
[[
-n
"
${
PROXY_PID
-
}
"
]]
&&
sudo kill
"
${
PROXY_PID
}
"
[[
-n
"
${
PROXY_PID
-
}
"
]]
&&
sudo kill
"
${
PROXY_PID
}
"
[[
-n
"
${
SCHEDULER_PID
-
}
"
]]
&&
sudo kill
"
${
SCHEDULER_PID
}
"
[[
-n
"
${
SCHEDULER_PID
-
}
"
]]
&&
sudo kill
"
${
SCHEDULER_PID
}
"
[[
-n
"
${
ETCD_PID
-
}
"
]]
&&
k
ill
"
${
ETCD_PID
}
"
[[
-n
"
${
ETCD_PID
-
}
"
]]
&&
k
ube::etcd::stop
[[
-n
"
${
ETCD_DIR
-
}
"
]]
&&
rm
-rf
"
${
ETCD_DIR
}
"
[[
-n
"
${
ETCD_DIR
-
}
"
]]
&&
kube::etcd::clean_etcd_dir
exit
0
exit
0
}
}
trap
cleanup EXIT
trap
cleanup EXIT
echo
"Starting etcd"
kube::etcd::start
APISERVER_LOG
=
/tmp/kube-apiserver.log
APISERVER_LOG
=
/tmp/kube-apiserver.log
sudo
-E
"
${
GO_OUT
}
/kube-apiserver"
\
sudo
-E
"
${
GO_OUT
}
/kube-apiserver"
\
--v
=
${
LOG_LEVEL
}
\
--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