You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the upgrade_database.php script, a single line may be seen showing that an upgrade of the database from version x.x.x is ,underway. No further updates are seen and the database version is updated in the database to y.y.y (the updated version).
However, aside from the database version, zero updates are performed. This may be related to #2780 when a change was made to set the database version at the end of the script regardless of whether an update has been performed.
It turns out that the reason for this failure to update the database was highlighted in #2931, specifically this post where the include locations were diagnosed as being under the cli folder, not the cacti web root.
Expected behavior
Use $config['base_path'] rather than a relative include due to packaging method.
Additional context
Tagging @mortenstevens here so that he is aware of the situation and will be notified when a forth coming patch is applied to 1.2.7 correcting the situation. This may also apply to ubuntu (@paulgevers) but that hasn't been tested at this time.
The text was updated successfully, but these errors were encountered:
For reference, any upgrade that is applied will list the current DB version plus the new version being upgraded to. The following is the patch I will apply tomorrow that should correct things:
diff --git a/cli/upgrade_database.php b/cli/upgrade_database2.php
index be021dc..a95723d 100644
--- a/cli/upgrade_database.php+++ b/cli/upgrade_database2.php@@ -115,7 +115,7 @@ foreach ($cacti_version_codes as $cacti_upgrade_version => $hash_code) {
}
// construct version upgrade include path
- $upgrade_file = dirname(__FILE__) . '/../install/upgrades/' . str_replace('.', '_', $cacti_upgrade_version)+ $upgrade_file = $config['base_path'] . '/install/upgrades/' . str_replace('.', '_', $cacti_upgrade_version)
$upgrade_function = 'upgrade_to_' . str_replace('.', '_', $cacti_upgrade_version);
// check for upgrade version file, then include, check for function and execute
@netniV
Thank you for the report. But I'm not able to reproduce this? I have upgraded some cacti installations (RHEL 8, Fedora 30, Fedora 31) from 1.2.5 to 1.2.6 without any issue.
Describe the bug
When using the upgrade_database.php script, a single line may be seen showing that an upgrade of the database from version x.x.x is ,underway. No further updates are seen and the database version is updated in the database to y.y.y (the updated version).
However, aside from the database version, zero updates are performed. This may be related to #2780 when a change was made to set the database version at the end of the script regardless of whether an update has been performed.
It turns out that the reason for this failure to update the database was highlighted in #2931, specifically this post where the include locations were diagnosed as being under the cli folder, not the cacti web root.
Expected behavior
Use $config['base_path'] rather than a relative include due to packaging method.
Additional context
Tagging @mortenstevens here so that he is aware of the situation and will be notified when a forth coming patch is applied to 1.2.7 correcting the situation. This may also apply to ubuntu (@paulgevers) but that hasn't been tested at this time.
The text was updated successfully, but these errors were encountered: