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

Correct issues with corrupted Cacti Packages #4685

Closed
sbbbv opened this issue Apr 8, 2022 · 8 comments
Closed

Correct issues with corrupted Cacti Packages #4685

sbbbv opened this issue Apr 8, 2022 · 8 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@sbbbv
Copy link

sbbbv commented Apr 8, 2022

Fresh install Debian 11.3 and Cacti Release 1.2.20.
Everything installed from Debian packages except Cacti.

PHP 7.4.28
MariaDB 10.5.15

Templates are not installed correctly with errors in the logs like:
"2022-04-08 13:41:58 - CMDPHP Import Error: Import found an invalid dependency hash of :24146b2a8b037c29d8c5d7f1f06a6ce9. Please open bug on GitHub.
2022-04-08 13:41:58 - 4 Import Error: inserting into snmp_query_graph_rrd"
Clipboard02
Clipboard04
cacti.log
install-complete.log
install-general.log

@sbbbv sbbbv added bug Undesired behaviour unverified Some days we don't have a clue labels Apr 8, 2022
@TheWitness
Copy link
Member

This is a bit of a nasty bug. Looking into it now.

@TheWitness TheWitness changed the title Templates are not installed correctly with " Import found an invalid dependency hash" in logs. Cacti Packages corrupted with release of Cacti 1.2.20 Apr 10, 2022
@paulgevers
Copy link
Contributor

I think I'm seeing the result of this too in my attempt to package 1.2.20. For me, the package fails to install because during install ir run

        su --shell /bin/sh www-data -c "/usr/share/cacti/cli/import_package.php \
            --filename=/usr/share/cacti/site/install/templates/Local_Linux_Machine.xml.gz" > /dev/null

which fails with

PHP Fatal error:  Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given in /usr/share/cacti/site/lib/import.php:2217
Stack trace:
#0 /usr/share/cacti/site/lib/import.php(2217): array_search()
#1 /usr/share/cacti/cli/import_package.php(144): import_display_results()
#2 {main}
  thrown in /usr/share/cacti/site/lib/import.php on line 2217

@netniV
Copy link
Member

netniV commented Apr 12, 2022

That has been patched already as of today. See #4695

@sbbbv
Copy link
Author

sbbbv commented Apr 12, 2022

That has been patched already as of today. See #4695

I just downloaded the latest Cacti-1.2.x. Same thing as in the first post

"2022-04-12 09:38:12 - CMDPHP Import Error: Import found an invalid dependency hash of :24146b2a8b037c29d8c5d7f1f06a6ce9. Please open bug on GitHub."

@TheWitness
Copy link
Member

Yea, the other fix does not address the corruption. I created a pull request to fix, but need to redo it since the repo was not properly rebased prior to commit. Should be done later today.

TheWitness added a commit that referenced this issue Apr 12, 2022
The packages included in this commit should fix all the issues encountered from the release.
It also reverted #4695 that reserved the order of array_search() by accident.
@TheWitness
Copy link
Member

This has been resolved now. I would simply pull a fresh version of the 1.2.x branch and hit the reset button.

@TheWitness TheWitness added this to the v1.2.21 milestone Apr 12, 2022
@TheWitness TheWitness added resolved A fixed issue confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Apr 12, 2022
@TheWitness
Copy link
Member

We are going to rework the packages one more time this weekend.

@TheWitness TheWitness added resolved A fixed issue and removed resolved A fixed issue labels Apr 29, 2022
@TheWitness
Copy link
Member

This is officially resolved, and for users impacted, there is a publish way to resolve any corruptions on installs that were new with 1.2.20.

@netniV netniV changed the title Cacti Packages corrupted with release of Cacti 1.2.20 Correct issues with corrupted Cacti Packages May 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants