Merge pull request #117820 from dims/use-right-executable-name-for-ss-netstat-in-log-message

Use the right command for ss/netstat when we log the usage message
This commit is contained in:
Kubernetes Prow Robot 2023-05-05 18:35:22 -07:00 committed by GitHub
commit 8f3f997a98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ 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 "$(${port_check_command} -nat | grep "LISTEN" | grep "[\.:]${ETCD_PORT:?}")"
exit 1
fi