Upgrading to 1.2.17 - Does this look right?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mchorsley
Posts: 3
Joined: Thu May 27, 2021 5:15 am

Upgrading to 1.2.17 - Does this look right?

Post by mchorsley »

Hi,

I'm in the process of upgrading Cacti from 1.2.16 to 1.2.17. The upgrade has so far been running for 2 hours and it's still at 3%. I know it can take some time to complete, but the install seems to be looping:

Code: Select all

[2021-05-27 11:14:45] [          global always  ] Spawning background process: /bin/php '/usr/share/cacti/install/background.php' 1622110485.0356
[2021-05-27 11:14:45] [          global always  ] Setting PHP Option max_execution_time = 0
[2021-05-27 11:14:45] [          global always  ] Setting PHP Option memory_limit = -1
[2021-05-27 11:14:45] [          global always  ] Starting UPGRADE Process for v1.2.17
[2021-05-27 11:14:45] [          global always  ] No tables where found or selected for conversion
[2021-05-27 11:14:45] [          global always  ] Switched from /tmp/cdu0kdGin to /tmp/cdu7wDIVx
[2021-05-27 11:14:45] [          global always  ] NOTE: Using temporary file for db cache: /tmp/cdu7wDIVx
[2021-05-27 11:14:45] [          global always  ] Upgrading from v1.2.16 (DB 1.2.17 (DB: 1.2.16)) to v1.2.17
Screenshot 2021-05-27 at 11.31.11.png
Screenshot 2021-05-27 at 11.31.11.png (734.02 KiB) Viewed 4418 times
Should I be more patient?

Thanks
mchorsley
Posts: 3
Joined: Thu May 27, 2021 5:15 am

Re: Upgrading to 1.2.17 - Does this look right?

Post by mchorsley »

OK, so I think I've found the issue:

Code: Select all

+++PHP Fatal error:  Uncaught ArgumentCountError: array_key_exists() expects exactly 2 arguments, 3 given in /usr/share/cacti/install/upgrades/1_2_17.php:176
Stack trace:
#0 /usr/share/cacti/install/upgrades/1_2_17.php(176): array_key_exists('aggregate_graph...', Array, true)
#1 /usr/share/cacti/install/upgrades/1_2_17.php(54): database_fix_mediumint_columns()
#2 /var/lib/cacti/cli/upgrade_database.php(129): upgrade_to_1_2_17()
#3 {main}
  thrown in /usr/share/cacti/install/upgrades/1_2_17.php on line 176
Changing cacti/install/upgrades/1_2_17.php:176

Code: Select all

if (!array_key_exists($table, $tables, true)) {
to

Code: Select all

if (!array_key_exists($table, $tables)) {
and cacti/install/upgrades/1_2_17.php:183

Code: Select all

if (array_key_exists($field, $known_columns, true)) {
to

Code: Select all

if (array_key_exists($field, $known_columns)) {
Then running

Code: Select all

$ php upgrade_database.php --debug
Results in a successful DB upgrade
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Upgrading to 1.2.17 - Does this look right?

Post by netniV »

I am not sure if this was you, but someone posted a pull request for fixing this on our GitHub Repo recently. It's now a known issue.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mchorsley
Posts: 3
Joined: Thu May 27, 2021 5:15 am

Re: Upgrading to 1.2.17 - Does this look right?

Post by mchorsley »

Yes, that was me. Issue #4284 (fixed in the 1.2.x branch)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests