Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create aggregate graphs on new installations #3146

Closed
brucereg opened this issue Dec 13, 2019 · 5 comments
Closed

Unable to create aggregate graphs on new installations #3146

brucereg opened this issue Dec 13, 2019 · 5 comments
Labels
bug Undesired behaviour installer Installation issue resolved A fixed issue
Milestone

Comments

@brucereg
Copy link

Describe the bug
This update added the gprint_format column to the aggregate_graphs and aggregate_graph_templates tables. The update include a patch to install/upgrades/1_2_8.php to perform an ALTER table to add the new column, unfortunately, the base cacti.sql file was not updated which causes new installations to fail when trying to create an aggregate template.
Also, the install/upgrades/1_2_8.php patch is trying to alter table aggregate_graph when it should be aggregate_graphs.

To Reproduce
Install a new 1.2.8 installation and try to create an aggregate template.

@netniV netniV changed the title Update for "Resolve a regression around #3027" is broken. Unable to create aggregate graphs on new installations Dec 14, 2019
@netniV
Copy link
Member

netniV commented Dec 14, 2019

Update for "Resolve a regression around #3027" is broken.

That would seem to be an issue. Thanks for reporting it.

@netniV netniV added bug Undesired behaviour installer Installation issue labels Dec 14, 2019
@netniV netniV added this to the 1.2.9 milestone Dec 14, 2019
@netniV
Copy link
Member

netniV commented Dec 16, 2019

Hmm, I just looked at the 1_2_8.php and it is definitely trying to do the right table:

function upgrade_to_1_2_8() {
	...
        // Needed to fix aggregate bug
        if (!db_column_exists('aggregate_graphs', 'gprint_format')) {
                db_install_execute('ALTER TABLE aggregate_graphs ADD COLUMN gprint_format CHAR(2) default "" AFTER$
        }

        if (!db_column_exists('aggregate_graph_templates', 'gprint_format')) {
                db_install_execute('ALTER TABLE aggregate_graph_templates ADD COLUMN gprint_format CHAR(2) default$
        }
   ...
show tables like 'agg%';
+---------------------------------+
| Tables_in_cacti_site (agg%)     |
+---------------------------------+
| aggregate_graph_templates       |
| aggregate_graph_templates_graph |
| aggregate_graph_templates_item  |
| aggregate_graphs                |
| aggregate_graphs_graph_item     |
| aggregate_graphs_items          |
+---------------------------------+
6 rows in set (0.00 sec)

@netniV netniV added the unverified Some days we don't have a clue label Dec 16, 2019
@brucereg
Copy link
Author

brucereg commented Dec 16, 2019 via email

@netniV
Copy link
Member

netniV commented Dec 17, 2019

Yes, it looks like cacti.sql does not have the correct layout for those tables. I will add a patch for that which @mortenstevens and @paulgevers will likely want to implement. The quick fix is to run:

sudo -u <website user> php -q <cacti>/cli/upgrade_database.php --forcever=1.2.7

@netniV
Copy link
Member

netniV commented Dec 17, 2019

I believe that this should now be resolved, though @TheWitness and @cigamit should probably review the changes to the audit_schema.sql to make sure nothing majorly appears wrong.

@netniV netniV closed this as completed Dec 17, 2019
@netniV netniV added resolved A fixed issue and removed unverified Some days we don't have a clue labels Dec 17, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour installer Installation issue resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants