My system is configured to use fr_FR.UTF-8 locale by default. yann@localhost ~]$ locale LANG=fr_FR.UTF-8 LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL= On mageia 6 and 7, the ping.pl script provided by cacti works well: [yann@localhost ~]$ perl /var/www/html/cacti/scripts/ping.pl localhost 0.059 But on mageia 8, it didn’t and always return U: [yann@localhost ~]$ perl /var/www/html/cacti/scripts/ping.pl localhost U If I force the locale with LC_ALL=C in the bash CLI, script is working well: [yann@localhost ~]$ LC_ALL=C perl /var/www/html/cacti/scripts/ping.pl localhost 0.031 It is like the line "$ENV{LANG}='en_US.UTF-8';" in the script is not taken into account. For understand the issue, I made some modifications in ping.pl script… Replace the line: open(PROCESS, "$pingcmd 2>&1 | grep -E '(icmp_[s|r]eq.*time|unknown host|Unknown host|not supported|Name or service not known|No address associated with name)' 2>/dev/null |"); By the line: open(PROCESS, "$pingcmd 2>&1 | grep -E '(icmp_[s|r]eq|unknown host|Unknown host|not supported|Name or service not known|No address associated with name)' 2>/dev/null |"); And just after line: chomp($ping); Add the line: print "Test:".$ping."\n"; Then there is the new results: [yann@localhost ~]$ LC_ALL=C perl /var/www/html/cacti/scripts/ping.pl localhost Test:64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.058 ms 0.058[yann@localhost ~]$ [yann@localhost ~]$ [yann@localhost ~]$ perl /var/www/html/cacti/scripts/ping.pl localhost Test:64 octets de localhost (::1) : icmp_seq=1 ttl=64 temps=0.042 ms U In the second case, it is interesting to note this is "temps" and not "time" that is used in the result. And it explains why script always failed. For me, this is a regression in Mageia 8. Regards, Yann
CC: (none) => mageia
Hi, thanks reporting this. Assigning to Perl Stack maintainer.
Assignee: bugsquad => perlCC: (none) => ouaurelien
Hello, I update severity and priority because it is a blocker for my migration to latest mageia release. thank you
Priority: Normal => HighSeverity: normal => major
Sounds like it's an issue that needs to reported upstream to cacti. We don't provide that in Mageia.
Hello David, I know cacti is not packaged for Mageia 8. But before open a ticket to cacti part, I would like to understand what has changed in Perl between mageia 6 and 7 which worked and mageia 8 for which the script no longer works because of the locale. Because I can see that in my cacti ticket, I will be told to open a Mageia ticket ;)
Could be an upstream change in perl or ping (iputils) that the script needs to adapt to (or possibly a bug in one of those).
Hello, it seems to be an iputils issue when IPv6 is disabled: https://github.com/iputils/iputils/issues/293
A fix was published: https://github.com/iputils/iputils/commit/79d713eab6181e219bf932b404706f6f59ff2539 Please include it in current Mageia 8.
Source RPM: perl-5.32.1-1.mga8.src.rpm => iputils-20200821-2.mga8.src.rpmStatus: NEW => UPSTREAM
Assignee: perl => bugsquad