flaky dep8 test

Bug #1814097 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cacti (Ubuntu)
Fix Released
Low
Andreas Hasenack

Bug Description

The cacti dep8 tests run wget to fetch a lot of pages. At the same time, cacti will shortly begin a network scan, and log its results in the log file.

If the dep8 tests finishes quickly, those network scan results won't be seen in the logs and the test succeeds. If the tests take a little longer, though, it will fail because it will find these "unexpected" log entries:

Unexpected output in /var/log/cacti/cacti.log:
01/30/2019 18:05:02 - SYSTEM STATS: Time:1.1452 Method:cmd.php Processes:1 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources:0 RRDsProcessed:0
01/30/2019 18:05:04 - AUTOM8 [PID: 13388] Network Discover is now running for Subnet Range '1'
01/30/2019 18:06:04 - AUTOM8 [PID: 13404] Network Test Network Thread 5 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:04 - AUTOM8 [PID: 13412] Network Test Network Thread 9 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:04 - AUTOM8 [PID: 13400] Network Test Network Thread 3 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:04 - AUTOM8 [PID: 13410] Network Test Network Thread 8 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:04 - AUTOM8 [PID: 13402] Network Test Network Thread 4 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:04 - AUTOM8 [PID: 13408] Network Test Network Thread 7 Finished, 25 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:05 - AUTOM8 [PID: 13396] Network Test Network Thread 1 Finished, 26 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:05 - AUTOM8 [PID: 13398] Network Test Network Thread 2 Finished, 26 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:06 - AUTOM8 [PID: 13414] Network Test Network Thread 10 Finished, 26 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti
01/30/2019 18:06:06 - AUTOM8 [PID: 13406] Network Test Network Thread 6 Finished, 26 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti

The fix is to probably allow for these messages.

This can be seen by just installing cacti and watching cacti.log. After 2min or so, these log entries will appear.

Related branches

Revision history for this message
Paul Gevers (paul-climbing) wrote :

For which version of cacti is this? I thought I fixed this ages ago.

Changed in cacti (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Hmm, my fix is indeed flaky. Probably I should clear the Apache log after the cron job is removed (and any version currently running is finished).

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is for 1.2.1+ds1-1.

I'm testing this patch:
--- a/debian/tests/check-all-pages
+++ b/debian/tests/check-all-pages
@@ -126,6 +126,8 @@ FILTERED_LOG="$(grep -v \
      -e "IMPORT NOTE: File is Signed Correctly" \
      -e "IMPORT Importing XML Data for " \
      -e "CMDPHP SQL Backtrace: " \
+ -e "SYSTEM STATS: Time:" \
+ -e "AUTOM8 \[PID: [0-9]\+\] Network Test Network Thread [0-9]\+ Finished" \
      /var/log/cacti/cacti.log)" || true

 if [ -n "${FILTERED_LOG}" ] ; then

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cacti - 1.2.1+ds1-1ubuntu1

---------------
cacti (1.2.1+ds1-1ubuntu1) disco; urgency=medium

  * d/t/check-all-pages: exclude from the cacti log messages about system
    stats and the network scanner, which can show up depending on how long
    this test takes to run. (LP: #1814097)

 -- Andreas Hasenack <email address hidden> Thu, 31 Jan 2019 11:44:23 -0200

Changed in cacti (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.