Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Stop etcd VMs trying to monitor ct-mirror log files
Browse files Browse the repository at this point in the history
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
Rob Percival authored and RJPercival committed Jun 8, 2017
1 parent fc64c47 commit c0ea84d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cloud/google/node_init.sh
Expand Up @@ -42,12 +42,17 @@ fi
sudo bash ./${AGENT_INSTALL_SCRIPT} sudo bash ./${AGENT_INSTALL_SCRIPT}


# Examine what kind of Docker image is on this machine to determine what to log. # 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" 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" CT_LOGS_PREFIX="${DATA_DIR}/ctmirror/logs/ct-mirror"
fi fi


rm "${DOCKER_REPOS_FILE}"

if [[ -n "${CT_LOGS_PREFIX}" ]]; then if [[ -n "${CT_LOGS_PREFIX}" ]]; then
sudo cat > /etc/google-fluentd/config.d/ct-info.conf <<EOF sudo cat > /etc/google-fluentd/config.d/ct-info.conf <<EOF
<source> <source>
Expand Down

0 comments on commit c0ea84d

Please sign in to comment.