Skip to content

Under CentOS packages, upgrade_database.php script uses incorrect location for DB upgrade scripts #2938

@netniV

Description

@netniV

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions