Permalink
Browse files

Stop etcd VMs trying to monitor ct-mirror log files

The previous grep would match "ct-mirror" part was through the etcd image
name, e.g. "gcr.io/ct-mirror-pilot/etcd". Now, it should only match the
intended image, e.g. "gcr.io/ct-mirror-pilot/ct-mirror".
  • Loading branch information...
RJPercival committed Jun 5, 2017
1 parent fc64c47 commit c0ea84d0bc1b83f4c0f96f9b2f73fc7742260232
Showing with 7 additions and 2 deletions.
  1. +7 −2 cloud/google/node_init.sh
@@ -42,12 +42,17 @@ fi
sudo bash ./${AGENT_INSTALL_SCRIPT}
# Examine what kind of Docker image is on this machine to determine what to log.
if docker images | grep ct-server; then
DOCKER_REPOS_FILE=$(mktemp)
docker images --format '{{ .Repository }}' > "${DOCKER_REPOS_FILE}"
if grep '/ct-server$' "${DOCKER_REPOS_FILE}"; then
CT_LOGS_PREFIX="${DATA_DIR}/ctlog/logs/ct-server"
elif docker images | grep ct-mirror; then
elif grep '/ct-mirror$' "${DOCKER_REPOS_FILE}"; then
CT_LOGS_PREFIX="${DATA_DIR}/ctmirror/logs/ct-mirror"
fi
rm "${DOCKER_REPOS_FILE}"
if [[ -n "${CT_LOGS_PREFIX}" ]]; then
sudo cat > /etc/google-fluentd/config.d/ct-info.conf <<EOF
<source>

0 comments on commit c0ea84d

Please sign in to comment.