Skip to content

Commit

Permalink
[Interop] Make C++ xDS Interop Client and Server Responsive to SIGTERM (
Browse files Browse the repository at this point in the history
grpc#34518)

This PR adds `tini` to the C++ interop client and server to make them responsive to SIGTERM.

Closes grpc#34518

COPYBARA_INTEGRATE_REVIEW=grpc#34518 from gnossen:ssa_interop_server a762b27
PiperOrigin-RevId: 610766377
  • Loading branch information
gnossen authored and copybara-github committed Feb 27, 2024
1 parent 40577dd commit 12897ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ COPY . .
RUN tools/bazel build //test/cpp/interop:xds_interop_client
RUN cp -rL /workdir/bazel-bin/test/cpp/interop/xds_interop_client /artifacts/

ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

FROM python:3.9-slim-bookworm

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

COPY --from=0 /artifacts ./

ENTRYPOINT ["/xds_interop_client"]
# tini serves as PID 1 and enables the server to properly respond to signals.
COPY --from=0 /tini /tini

ENTRYPOINT ["/tini", "-g", "-vv", "--", "/xds_interop_client"]
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ COPY . .
RUN tools/bazel build //test/cpp/interop:xds_interop_server
RUN cp -rL /workdir/bazel-bin/test/cpp/interop/xds_interop_server /artifacts/

ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

FROM python:3.9-slim-bookworm

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

COPY --from=0 /artifacts ./

ENTRYPOINT ["/xds_interop_server"]
# tini serves as PID 1 and enables the server to properly respond to signals.
COPY --from=0 /tini /tini

ENTRYPOINT ["/tini", "-g", "-vv", "--", "/xds_interop_server"]

0 comments on commit 12897ab

Please sign in to comment.