From: "mattock (Code Review)" Date: Fri, 4 Oct 2024 07:20:01 +0000 In-Reply-To: References: Reply-To: samuli@...515..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="xp5Jr9dzJ+g="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: t_server_null: forcibly kill misbehaving servers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , cron2 , flichtenheld Cc: openvpn-devel --xp5Jr9dzJ+g= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mattock, plaisthos. Hello cron2, flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/775?usp=3Demail to look at the new patch set (#3). Change subject: t_server_null: forcibly kill misbehaving servers ...................................................................... t_server_null: forcibly kill misbehaving servers Change-Id: Ic0f98cd3b87a7b86e032e63167ac9036f7c08fcb Signed-off-by: Samuli Sepp=C3=A4nen --- M tests/t_server_null_server.sh 1 file changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/775/3 diff --git a/tests/t_server_null_server.sh b/tests/t_server_null_server.sh index 10bb44b..b85d145 100755 --- a/tests/t_server_null_server.sh +++ b/tests/t_server_null_server.sh @@ -87,11 +87,8 @@ continue fi - if [ -z "${RUN_SUDO}" ]; then - $KILL_EXEC "${SERVER_PID}" - else - $RUN_SUDO $KILL_EXEC "${SERVER_PID}" - fi + # Attempt to kill the OpenVPN server gracefully with SIGTERM + $RUN_SUDO $KILL_EXEC "${SERVER_PID}" count=3D0 maxcount=3D75 @@ -102,7 +99,9 @@ sleep 0.2 done + # If server is still up send a SIGKILL if [ $count -ge $maxcount ]; then - echo "WARNING: could not kill server with pid ${SERVER_PID}!" + $RUN_SUDO $KILL_EXEC -9 "${SERVER_PID}" + echo "WARNING: had to send SIGKILL to server with pid ${SERVER_PID= }!" fi done -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/775?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ic0f98cd3b87a7b86e032e63167ac9036f7c08fcb Gerrit-Change-Number: 775 Gerrit-PatchSet: 3 Gerrit-Owner: mattock Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: mattock Gerrit-MessageType: newpatchset --xp5Jr9dzJ+g= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, mattock, plaisthos.=

mattock uploaded patch set #3 to this change.

View Change<= /a>

t_server_null: forcibly kill misbehaving servers

Change-Id: Ic0f= 98cd3b87a7b86e032e63167ac9036f7c08fcb
Signed-off-by: Samuli Sepp=C3=A4ne= n <samuli.seppanen@...277...>
---
M tests/t_server_null_server.= sh
1 file changed, 5 insertions(+), 6 deletions(-)

git pull ss=
h://gerrit.openvpn.net:29418/openvpn refs/changes/75/775/3
diff --=
git a/tests/t_server_null_server.sh b/tests/t_server_null_server.sh<=
br>index 10bb44b..b85d145 100755
--- a/tests/t_server= _null_server.sh
+++ b/tests/t_server_null_server.sh<= br>@@ -87,11 +87,8 @@
continue
fi

- if [ -z "${RUN_SUDO}" ]; then
- $KILL_EXEC "${SERVER_PID}"
- else
- $RUN_SUDO $KILL_EXEC "$= {SERVER_PID}"

- = fi
+ # Attempt to= kill the OpenVPN server gracefully with SIGTERM
+ $RUN_SUDO $KILL_EXEC "${SERVER_PID}&q= uot;

count=3D0
= maxcount=3D75
@@ -102,7 +99,9 @@
s= leep 0.2
done

+ # If server is still up send a SIGKIL= L
if [ $count -ge $maxcount ]; then
- echo "WARNING: could not ki= ll server with pid ${SERVER_PID}!"
+ $RUN_SUDO $KILL_EXEC -9 "${SERVER_PID}&quo= t;
+ echo &quo= t;WARNING: had to send SIGKILL to server with pid ${SERVER_PID}!"
fi
done

=

To view, visit change 775. To unsubscribe, or for help writing mail filters,= visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic0f98cd3b87a7b86e032e63167a= c9036f7c08fcb
Gerrit-Change-Number: 775
Gerrit-PatchSet: 3
Gerrit-Owner: mattock <samuli@...515...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: mattock <samuli@...515...= >
Gerrit-MessageType: newpatchset
--xp5Jr9dzJ+g=--