sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #04895
[Bug 1999816] Re: Failure to get free disk space breaks "rabbitmqctl status" command
Steps to Reproduce
---
lxc launch ubuntu:focal rmq-focal
lxc exec rmq-focal -- su - ubuntu
sudo apt install --yes rabbitmq-server
$ sudo rabbitmqctl status | grep -i disk
Free Disk Space
Low free disk space watermark: 0.05 gb
Free disk space: 327.7867 gb
DF=$(which df)
SH=/tmp/df.sh
cat <<EOF >$SH
#!/bin/sh
sleep 5m
EOF
sudo chmod +x $SH
sudo mount --bind $SH $DF
$ sudo rabbitmqctl status
Status of node rabbit@rmq-focal ...
<... DELAY ...>
Error:
{{:unparseable, []}, {:gen_server, :call, [:rabbit_disk_monitor, :get_disk_free_limit, :infinity]}}
sudo kill $(pidof sleep)
sudo umount $DF
rm $SH
For doc purposes, the chain from rabbitmq-server to the df (sleep)
command:
$ ps axf | sed -n '/rabbitmq-server$/,/sleep/p'
1973 ? Ss 0:00 /bin/sh /usr/sbin/rabbitmq-server
1977 ? Sl 0:31 \_ /usr/lib/erlang/erts-10.6.4/bin/beam.smp ...
2244 ? Ss 0:00 \_ erl_child_setup 65536
2273 ? Ss 0:00 \_ inet_gethost 4
2274 ? S 0:00 | \_ inet_gethost 4
4237 ? Ss 0:00 \_ /bin/sh -s unix:cmd
4238 ? S 0:00 \_ /bin/sh /usr/bin/df -kP /var/lib/rabbitmq/mnesia/rabbit@rmq-focal
4239 ? S 0:00 \_ sleep 5m
--
You received this bug notification because you are a member of SE SRU
("STS") Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1999816
Title:
Failure to get free disk space breaks "rabbitmqctl status" command
Status in rabbitmq-server package in Ubuntu:
Fix Released
Status in rabbitmq-server source package in Focal:
Triaged
Status in rabbitmq-server source package in Jammy:
Triaged
Status in rabbitmq-server source package in Kinetic:
Triaged
Bug description:
[Impact]
When for some reason the df command fails to get the disk free space
(for example timeout on a heavily loaded system) the result is a
harcoded value of "unknown". As this is not a valid number this
generates arithmetic errors when the "rabbitmqctl status" command is
run and tries to divide that value to convert it to another unit.
This has been fixed upstream here:
https://github.com/rabbitmq/rabbitmq-server/pull/4897
[Test Plan]
The df command can be linked to another file that just waits for a few
minutes to force a timeout for example: [detailed steps in comment
#5].
#!/bin/bash
sleep 5m
After the timeout occurs the "rabbitmqctl status" returns an error
with the unpatched version. After the patch it shows all the
information and displays unknown in the free space line.
[Where problems could occur]
The patch just changes the display of information, it should not break
anything in the core operations of the package
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/1999816/+subscriptions