Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P29846
wait_for_galera_issue.sh
Active
Public
Actions
Authored by
dcaro
on Jun 15 2022, 4:21 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F35244274: wait_for_galera_issue.sh
Jun 15 2022, 4:21 PM
2022-06-15 16:21:20 (UTC+0)
Subscribers
None
#!/bin/bash
# dcaro trying to catch the haproxy flap
old_logs
=
$(
journalctl -u haproxy -n1
|
tail -n1
)
new_logs
=
$old_logs
count
=
3
gotten
=
0
tcpdump
\
-Z root
\
-i eno1
\
-w /tmp/galera_testing.pcap
\
-G
120
\
host cloudcontrol1003.wikimedia.org or host cloudcontrol1004.wikimedia.org
\
&
while
[[
$gotten
-lt
$count
]]
;
do
while
[[
"
$old_logs
"
==
"
$new_logs
"
]]
;
do
sleep
1
new_logs
=
$(
journalctl -u haproxy -n1
|
tail -n1
)
done
echo
"Got one at
$(
date
)
"
cp /tmp/galera_testing.pcap /tmp/galera_testing.pcap.
$(
date +%H%M%S_%d%m%y
)
gotten
=
$((
gotten+1
))
done
echo
"stopping the tcpdump process, we got a hit"
pkill tcpdump
Event Timeline
dcaro
created this paste.
Jun 15 2022, 4:21 PM
2022-06-15 16:21:20 (UTC+0)
dcaro
mentioned this in
T310664: galera/haproxy service flaps in eqiad1
.
Jun 15 2022, 4:23 PM
2022-06-15 16:23:20 (UTC+0)
Log In to Comment