Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F35244274
wait_for_galera_issue.sh
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dcaro
Jun 15 2022, 4:21 PM
2022-06-15 16:21:20 (UTC+0)
Size
682 B
Referenced Files
None
Subscribers
None
wait_for_galera_issue.sh
View Options
#!/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
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9524260
Default Alt Text
wait_for_galera_issue.sh (682 B)
Attached To
Mode
P29846 wait_for_galera_issue.sh
Attached
Detach File
Event Timeline
Log In to Comment