From 162cb69cd1dbaadb674b13163b385879d13481f1 Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Fri, 15 Sep 2023 17:17:06 +0300 Subject: [PATCH] fix: replace bolter with bbolt (#48) --- Dockerfile | 9 ++++----- run.sh | 8 ++++---- service.yaml | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22706eb..69cdcb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,10 +14,9 @@ RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd && \ chmod +x /usr/local/bin/dind-cleaner && \ rm -rf /go/* -# bolter -FROM golang:1.21-alpine3.18 AS bolter -RUN apk add git -RUN go install github.com/hasit/bolter@v0.0.0-20210331045447-e1283cecdb7b +# bbolt +FROM golang:1.21-alpine3.18 AS bbolt +RUN go install go.etcd.io/bbolt/cmd/bbolt@latest # node-exporter FROM quay.io/prometheus/node-exporter:v1.6.1 AS node-exporter @@ -41,7 +40,7 @@ ENV DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns COPY --from=node-exporter /bin/node_exporter /bin/ COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/ -COPY --from=bolter /go/bin/bolter /bin/ +COPY --from=bbolt /go/bin/bbolt /bin/ WORKDIR /dind ADD . /dind diff --git a/run.sh b/run.sh index 13d45d7..7086568 100755 --- a/run.sh +++ b/run.sh @@ -55,7 +55,7 @@ sigterm_trap(){ echo "Starting Cleaner" ${DIR}/cleaner/docker-clean.sh fi - + echo "Cleaning old events files" find ${DOCKER_EVENTS_DIR} -type f -mtime +10 -exec rm -fv {} \; @@ -152,7 +152,7 @@ do DOCKERD_PID=$(cat ${DOCKERD_PID_FILE}) echo " Waiting for dockerd pid ${DOCKERD_PID_FILE} to exit ..." CNT=0 - pkill dockerd + pkill dockerd while pgrep -l dockerd do [[ -n "${SIGTERM}" ]] && break 2 @@ -173,7 +173,7 @@ do if [[ -f ${CONTEINERD_DB} ]]; then echo "Checking if another dockerd is running on same ${DOCKERD_DATA_ROOT} boltdb $CONTEINERD_DB is locked" CNT=0 - while ! bolter --file ${CONTEINERD_DB} + while ! bbolt check ${CONTEINERD_DB} do [[ -n "${SIGTERM}" ]] && break 2 echo "$(date) - Waiting for containerd boltd ${CONTEINERD_DB}" @@ -184,7 +184,7 @@ do fi sleep 1 done - else + else echo "containerd db is not locked" fi diff --git a/service.yaml b/service.yaml index 1ed63ed..c85910d 100644 --- a/service.yaml +++ b/service.yaml @@ -1 +1 @@ -version: 1.28.0 +version: 1.28.1