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
736baa5e
Unverified
Commit
736baa5e
authored
Feb 25, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73593 from danielqsj/etcd
fix shellcheck failure in etcd shell
parents
d48eb30c
e698682a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
etcd.sh
hack/lib/etcd.sh
+5
-5
No files found.
hack/.shellcheck_failures
View file @
736baa5e
...
...
@@ -35,7 +35,6 @@
./hack/jenkins/test-dockerized.sh
./hack/jenkins/upload-to-gcs.sh
./hack/jenkins/verify-dockerized.sh
./hack/lib/etcd.sh
./hack/lib/golang.sh
./hack/lib/init.sh
./hack/lib/logging.sh
...
...
hack/lib/etcd.sh
View file @
736baa5e
...
...
@@ -41,18 +41,18 @@ kube::etcd::validate() {
fi
if
${
port_check_command
}
-nat
|
grep
"LISTEN"
|
grep
"[
\.
:]
${
ETCD_PORT
:?
}
"
>
/dev/null 2>&1
;
then
kube::log::usage
"unable to start etcd as port
${
ETCD_PORT
}
is in use. please stop the process listening on this port and retry."
kube::log::usage
"
`
netstat
-nat
|
grep
"[
\.
:]
${
ETCD_PORT
:?
}
.*LISTEN"
`
"
kube::log::usage
"
$(
netstat
-nat
|
grep
"[
\.
:]
${
ETCD_PORT
:?
}
.*LISTEN"
)
"
exit
1
fi
# validate installed version is at least equal to minimum
version
=
$(
etcd
--version
|
tail
-n
+1 |
head
-n
1 |
cut
-d
" "
-f
3
)
if
[[
$(
kube::etcd::version
${
ETCD_VERSION
})
-gt
$(
kube::etcd::version
${
version
}
)
]]
;
then
if
[[
$(
kube::etcd::version
"
${
ETCD_VERSION
}
"
)
-gt
$(
kube::etcd::version
"
${
version
}
"
)
]]
;
then
export
PATH
=
${
KUBE_ROOT
}
/third_party/etcd:
${
PATH
}
hash
etcd
echo
"
${
PATH
}
"
version
=
$(
etcd
--version
|
head
-n
1 |
cut
-d
" "
-f
3
)
if
[[
$(
kube::etcd::version
${
ETCD_VERSION
})
-gt
$(
kube::etcd::version
${
version
}
)
]]
;
then
if
[[
$(
kube::etcd::version
"
${
ETCD_VERSION
}
"
)
-gt
$(
kube::etcd::version
"
${
version
}
"
)
]]
;
then
kube::log::usage
"etcd version
${
ETCD_VERSION
}
or greater required."
kube::log::info
"You can use 'hack/install-etcd.sh' to install a copy in third_party/."
exit
1
...
...
@@ -76,7 +76,7 @@ kube::etcd::start() {
ETCD_LOGFILE
=
${
ETCD_LOGFILE
:-
"/dev/null"
}
fi
kube::log::info
"etcd --advertise-client-urls
${
KUBE_INTEGRATION_ETCD_URL
}
--data-dir
${
ETCD_DIR
}
--listen-client-urls http://
${
ETCD_HOST
}
:
${
ETCD_PORT
}
--debug >
\"
${
ETCD_LOGFILE
}
\"
2>/dev/null"
etcd
--advertise-client-urls
${
KUBE_INTEGRATION_ETCD_URL
}
--data-dir
${
ETCD_DIR
}
--listen-client-urls
${
KUBE_INTEGRATION_ETCD_URL
}
--debug
2>
"
${
ETCD_LOGFILE
}
"
>
/dev/null &
etcd
--advertise-client-urls
"
${
KUBE_INTEGRATION_ETCD_URL
}
"
--data-dir
"
${
ETCD_DIR
}
"
--listen-client-urls
"
${
KUBE_INTEGRATION_ETCD_URL
}
"
--debug
2>
"
${
ETCD_LOGFILE
}
"
>
/dev/null &
ETCD_PID
=
$!
echo
"Waiting for etcd to come up."
...
...
@@ -110,7 +110,7 @@ kube::etcd::install() {
os
=
$(
kube::util::host_os
)
arch
=
$(
kube::util::host_arch
)
cd
"
${
KUBE_ROOT
}
/third_party"
cd
"
${
KUBE_ROOT
}
/third_party"
||
return
1
if
[[
$(
readlink
etcd
)
==
etcd-v
${
ETCD_VERSION
}
-
${
os
}
-
*
]]
;
then
kube::log::info
"etcd v
${
ETCD_VERSION
}
already installed at path:"
kube::log::info
"
$(
pwd
)
/
$(
readlink
etcd
)
"
...
...
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