Skip to content

Commit 913fee2

Browse files
sergiitkgnossen
andauthored
[Interop] Make C++ xDS Interop Client and Server Responsive to SIGTERM (v1.62.x backport) (#36008)
Backport of #34518 to v1.62.x. --- This PR adds `tini` to the C++ interop client and server to make them responsive to SIGTERM. Co-authored-by: Richard Belleville <[email protected]>
1 parent c643d2a commit 913fee2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_client

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ COPY . .
2727
RUN tools/bazel build //test/cpp/interop:xds_interop_client
2828
RUN cp -rL /workdir/bazel-bin/test/cpp/interop/xds_interop_client /artifacts/
2929

30+
ENV TINI_VERSION v0.19.0
31+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
32+
RUN chmod +x /tini
33+
3034
FROM python:3.9-slim-bookworm
3135

3236
ENV GRPC_VERBOSITY="DEBUG"
@@ -39,4 +43,7 @@ RUN apt-get update \
3943

4044
COPY --from=0 /artifacts ./
4145

42-
ENTRYPOINT ["/xds_interop_client"]
46+
# tini serves as PID 1 and enables the server to properly respond to signals.
47+
COPY --from=0 /tini /tini
48+
49+
ENTRYPOINT ["/tini", "-g", "-vv", "--", "/xds_interop_client"]

tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_server

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ COPY . .
2727
RUN tools/bazel build //test/cpp/interop:xds_interop_server
2828
RUN cp -rL /workdir/bazel-bin/test/cpp/interop/xds_interop_server /artifacts/
2929

30+
ENV TINI_VERSION v0.19.0
31+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
32+
RUN chmod +x /tini
33+
3034
FROM python:3.9-slim-bookworm
3135

3236
ENV GRPC_VERBOSITY="DEBUG"
@@ -39,4 +43,7 @@ RUN apt-get update \
3943

4044
COPY --from=0 /artifacts ./
4145

42-
ENTRYPOINT ["/xds_interop_server"]
46+
# tini serves as PID 1 and enables the server to properly respond to signals.
47+
COPY --from=0 /tini /tini
48+
49+
ENTRYPOINT ["/tini", "-g", "-vv", "--", "/xds_interop_server"]

0 commit comments

Comments
 (0)