etcd should be started after the trap func set

This commit is contained in:
Young
2015-04-05 03:16:27 -04:00
parent c048e6fcbf
commit 802610b13a
2 changed files with 14 additions and 6 deletions

View File

@@ -48,8 +48,16 @@ kube::etcd::start() {
curl -X PUT "http://${host}:${port}/v2/keys/_test"
}
kube::etcd::cleanup() {
kube::etcd::stop() {
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
}