Cacti / spine

Spine C Based Poller for Cacti
GNU Lesser General Public License v2.1
81 stars 45 forks source link

[1.3 QA] spine develop SQL Error with latest cacti develop #341

Closed interceptor closed 8 months ago

interceptor commented 10 months ago

Describe the bug Running: ./spine --readonly --stdout --verbosity 5 against the latest cacti schema results in:

ERROR: The Query Was:'SELECT SQL_NO_CACHE id, device_threads, picount, picount/device_threads AS tppi FROM host LEFT JOIN (SELECT host_id, COUNT(*) AS picount FROM poller_item GROUP BY host_id) AS pi ON host.id = pi.host_id WHERE disabled = '' AND h.id BETWEEN 1 AND 1 AND h.poller_id=1 ORDER BY h.polling_time DESC'

To Reproduce Steps to reproduce the behavior:

  1. install Cacti from git clone https://github.com/Cacti/cacti.git current revision 64b395f16edb01d5f692e6760c858d3f6bbd4622
  2. Execute DB update: sudo php -q cli/upgrade_database.php --forcever=1.2.22 --debug

Expected behavior spine does not throw exceptions when poller is run

Server (please complete the following information):

This issue did not occur with spine revision 09e5a8c3c2ffe51a92b03d9f3725c3149ad2abf9

interceptor commented 10 months ago

Problem was likely introduced with this commit here: https://github.com/Cacti/spine/commit/a782364e136d8c94f274203daf20eaacc6e632e5

TheWitness commented 10 months ago

What is the SQL Error number?

interceptor commented 10 months ago

@TheWitness FATAL: Database Error:'1054', Message:'Unknown column 'h.poller_id' in 'where clause''

TheWitness commented 10 months ago

Okay. Darn it.

TheWitness commented 10 months ago

Looks like it's only develop thankfully.

TheWitness commented 10 months ago

All fixed now.