I tried to upgrade from 0.8.7g to 0.8.7i. I followed the upgrade guide in the documentation, but when running the database upgrade in the browser I got an error:
Code: Select all
Upgrade results:
WARNING: One or more of the SQL queries needed to upgraded your Cacti installation has failed. Please see below for more details. Your Cacti MySQL user must have SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE, and DROP permissions. You should try executing the failed queries as 'root' to ensure that you do not have a permissions problem.
0.8.7g -> 0.8.7h
[Success] ALTER TABLE host_snmp_cache ADD COLUMN present tinyint NOT NULL DEFAULT '1' AFTER `oid`
[Success] ALTER TABLE host_snmp_cache ADD INDEX present (present)
[Success] ALTER TABLE poller_item ADD COLUMN present tinyint NOT NULL DEFAULT '1' AFTER `action`
[Success] ALTER TABLE poller_item ADD INDEX present (present)
[Success] ALTER TABLE poller_reindex ADD COLUMN present tinyint NOT NULL DEFAULT '1' AFTER `action`
[Success] ALTER TABLE poller_reindex ADD INDEX present (present)
[Success] ALTER TABLE host ADD COLUMN device_threads tinyint(2) unsigned NOT NULL DEFAULT '1' AFTER max_oids;
[Fail] ALTER TABLE `data_template_rrd` ADD UNIQUE INDEX `duplicate_dsname_contraint` (`local_data_id`, `data_source_name`, `data_template_id`)
Code: Select all
mysql> ALTER TABLE `data_template_rrd` ADD UNIQUE INDEX `duplicate_dsname_contraint` (`local_data_id`, `data_source_name`, `data_template_id`) ;
ERROR 1062 (23000): Duplicate entry '0-Total-268' for key 'duplicate_dsname_contraint'
Code: Select all
SELECT * FROM `data_template_rrd` WHERE local_data_id =0 AND data_source_name = 'total' AND data_template_id =268;
+------+----------------------------------+----------------------------+---------------+------------------+---------------+-------------+---------------+-------------+-----------------+---------------+-----------------------+---------------------+--------------------+------------------+-----------------------+---------------------+
| id | hash | local_data_template_rrd_id | local_data_id | data_template_id | t_rrd_maximum | rrd_maximum | t_rrd_minimum | rrd_minimum | t_rrd_heartbeat | rrd_heartbeat | t_data_source_type_id | data_source_type_id | t_data_source_name | data_source_name | t_data_input_field_id | data_input_field_id |
+------+----------------------------------+----------------------------+---------------+------------------+---------------+-------------+---------------+-------------+-----------------+---------------+-----------------------+---------------------+--------------------+------------------+-----------------------+---------------------+
| 7127 | c1143b69a182e12cb36d6cbf471449b3 | 0 | 0 | 268 | NULL | 100 | NULL | 0 | NULL | 600 | NULL | 1 | NULL | Total | NULL | 0 |
| 7183 | 389ac27bafed3bdc7430274f3968250d | 0 | 0 | 268 | NULL | 100 | NULL | 0 | NULL | 600 | NULL | 1 | NULL | Total | NULL | 686 |
| 7190 | 97ba3fdfa64c57cf888bf62195637062 | 0 | 0 | 268 | NULL | 100 | NULL | 0 | NULL | 600 | NULL | 1 | NULL | Total | NULL | 0 |
+------+----------------------------------+----------------------------+---------------+------------------+---------------+-------------+---------------+-------------+-----------------+---------------+-----------------------+---------------------+--------------------+------------------+-----------------------+---------------------+
Edit:
Checked the data template with ID 268, and there are three "tabs" named "Total". I guess there was something wrong with this template.