Skip to content

Automated Networks are not being properly replicated to additional pollers #2632

@mmccaugh1

Description

@mmccaugh1

Describe the bug
In Version 1.2.x Automation Scans appear to be broken.

To Reproduce
Steps to reproduce the behavior:

  1. On Master Node Define a New Scan
  2. Execute Scan by Selecting "Discover Now"

Expected behavior
Scan should run on the selected poller and return valid results which can then be imported to cacti.

Screenshots
When the scan is run the following errors appear in Cacti.log

2019/04/15 19:00:43 - AUTOM8 [PID: 9684] Network Discover is now running for Subnet Range '31'
2019/04/15 19:00:43 - ERROR PHP NOTICE: Undefined index: dns_servers in file: /var/www/html/cacti-1.2.3/poller_automation.php on line: 362
2019/04/15 19:00:43 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller_automation.php[345]:discoverDevices(), /poller_automation.php[362]:CactiErrorHandler())
2019/04/15 19:00:43 - ERROR PHP NOTICE: Undefined index: name in file: /var/www/html/cacti-1.2.3/poller_automation.php on line: 763
2019/04/15 19:00:43 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller_automation.php[345]:discoverDevices(), /poller_automation.php[763]:CactiErrorHandler())
2019/04/15 19:00:43 - AUTOM8 [PID: 9686] Network Thread 1 Finished, 0 IPs Scanned, 0 IPs Responded to Ping, 0 Responded to SNMP, 0 Device Added, 0 Graphs Added to Cacti

Additional context
Digging deeper into this by enabling MySQL logging it appears the new versions are querying automation_networks on the poller (Among other tables), this was I believe originally pulled from MySQL on the master node.

Looking at these database tables on the remote pollers these tables are not being replicated out from the master node, so for instance the SQL Query :

SELECT * FROM automation_networks WHERE id = '32'

Will be run by the automation interface, but as row exists in this table on the poller the variables this query depend on are left as null which causes the above errors.

I have built a master and poller from scratch in my lab on 1.2.3 and confirmed the observed behavior presents even on a new install (This was done to confirm I had a known good db schema, and there were absolutely no chances of any corruption or other issues to cause this, these are fresh, unmodified installs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions