Error in Znuny 7.0.5 migration script with ITSM 6.5.x installed

Moderator: crythias

Post Reply
markdiss
Znuny newbie
Posts: 14
Joined: 05 Oct 2021, 17:15
Znuny Version: 6.4.2
Real Name: Mark Dissington

Error in Znuny 7.0.5 migration script with ITSM 6.5.x installed

Post by markdiss »

Hi,

We're trying to migrate from Znuny 6.5.2 to 7.0.5 using the rpm on CentOS7.

The first steps go fine, RPM upgrades, checkModules only has an issue with PDF::API2 which isn't a problem for us.

We su to the new znuny user and update Config.pm with the old otrs DB name/user/password so it can connect to the local MariaDB DB

We then try and run scripts/MigrateToZnuny7.0.pl and get the following:
--
[znuny@otrs ~]$ scripts/MigrateToZnuny7_0.pl

Migration started ...

Checking requirements ...

Requirement check for: Check required Perl version ...
Requirement check for: Check required database version ...
Requirement check for: Check database charset ...
Requirement check for: Check required Perl modules ...
Requirement check for: Check if database has been backed up ...

Did you backup the database? [Y]es/[N]o: y

Requirement check for: Upgrade database structure ...
Requirement check for: Migrate SysConfig settings ...

Should the SysConfig be migrated? [Y]es/[N]o: y


Executing tasks ...

Step 1 of 19: Check required Perl version ...
Step 2 of 19: Check required database version ...
Step 3 of 19: Check database charset ...
Step 4 of 19: Check required Perl modules ...
Step 5 of 19: Check if database has been backed up ...
Step 6 of 19: Upgrade database structure ...
Step 7 of 19: Rebuild configuration ...
Step 8 of 19: Migrate SysConfig settings ...
ERROR: Znuny-znuny.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed May 24 13:18:37 2023

Message: Setting ITSMChange::NumberGenerator Effective value is not correct: Kernel::System::ITSMChange::Number::DateChecksum doesn't satisfy ValueFilter(Kernel/System/ITSMChange/Number/*.pm)!

Traceback (1465):
Module: Kernel::System::SysConfig::ConfigurationDeploy Line: 3474
Module: Kernel::System::SysConfig::SettingsSet Line: 4673
Module: Kernel::System::SysConfig::Migration::MigrateSysConfigSettings Line: 367
Module: scripts::Migration::Znuny::MigrateSysConfigSettings::Run Line: 224
Module: scripts::Migration::_ExecuteComponent Line: 167
Module: scripts::Migration::Run Line: 77
Module: scripts/MigrateToZnuny7_0.pl Line: 82

Step 9 of 19: Migrate DBCRUD UUID columns ...
Activity: Column dbcrud_uuid in table activity...
Column successfully created
Calendar::Plugin: Column dbcrud_uuid in table calendar_appointment_plugin...
Column already exists
OAuth2Token: Column dbcrud_uuid in table oauth2_token...
Column already exists
OAuth2TokenConfig: Column dbcrud_uuid in table oauth2_token_config...
Column already exists
Step 10 of 19: Migrate dynamic fields ...
Step 11 of 19: Migrate notification events ...
Step 12 of 19: Integrate Znuny-NoteToLinkedTicket ...
ERROR: Znuny-znuny.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed May 24 13:18:38 2023

Message: Setting ITSMChange::NumberGenerator Effective value is not correct: Kernel::System::ITSMChange::Number::DateChecksum doesn't satisfy ValueFilter(Kernel/System/ITSMChange/Number/*.pm)!

Traceback (1465):
Module: Kernel::System::SysConfig::ConfigurationDeploy Line: 3474
Module: Kernel::System::SysConfig::SettingsSet Line: 4673
Module: scripts::Migration::Znuny::IntegrateZnunyNoteToLinkedTicket::_ArticleActionConfigAdd Line: 60
Module: scripts::Migration::Znuny::IntegrateZnunyNoteToLinkedTicket::Run Line: 33
Module: scripts::Migration::_ExecuteComponent Line: 167
Module: scripts::Migration::Run Line: 77
Module: scripts/MigrateToZnuny7_0.pl Line: 82




Not possible to complete migration. Check previous messages for more information.
--

All the ITSM modules are up-to-date with the latest versions in the repositories, and that value is the the default (I don't believe we've changed any ITSM config from the defaults):
--
[root@otrs otrs]# su -c "bin/otrs.Console.pl Admin::Package::List" -s /bin/bash otrs
Listing all installed packages...
+----------------------------------------------------------------------------+
| Name: FAQ
| Version: 6.5.1
| Vendor: Znuny GmbH
| URL: https://www.znuny.org/
| License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, November 2007
| Description: FAQ/knowledge base.
+----------------------------------------------------------------------------+
| Name: GeneralCatalog
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The General Catalog package.
+----------------------------------------------------------------------------+
| Name: ImportExport
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The ImportExport package.
+----------------------------------------------------------------------------+
| Name: ITSM
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The ITSM bundle package.
+----------------------------------------------------------------------------+
| Name: ITSMChangeManagement
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The OTRS::ITSM Change Management package.
+----------------------------------------------------------------------------+
| Name: ITSMConfigurationManagement
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The Znuny::ITSM Configuration Management package.
+----------------------------------------------------------------------------+
| Name: ITSMCore
| Version: 6.5.2
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The Znuny::ITSM Core package.
+----------------------------------------------------------------------------+
| Name: ITSMIncidentProblemManagement
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The OTRS::ITSM Incident and Problem Management package.
+----------------------------------------------------------------------------+
| Name: ITSMServiceLevelManagement
| Version: 6.5.1
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The OTRS::ITSM Service Level Management package.
+----------------------------------------------------------------------------+
--

I'm sure it's something very simple put I've been trying various ways of fixing this all day and have now run out of ideas.

TIA,
Mark.
subascha
Znuny newbie
Posts: 14
Joined: 21 Apr 2015, 11:24
Znuny Version: 6.4.5
Real Name: Sascha Anders

Re: Error in Znuny 7.0.5 migration script with ITSM 6.5.x installed

Post by subascha »

Please check system configuration for parameter in ITSMChange::NumberGenerator. Try to use dropdown or change option.
Another option for me would be to check local folder Kernel/System/ITSMChange/Number/ for presence of DateChecksum.pm.
markdiss
Znuny newbie
Posts: 14
Joined: 05 Oct 2021, 17:15
Znuny Version: 6.4.2
Real Name: Mark Dissington

Re: Error in Znuny 7.0.5 migration script with ITSM 6.5.x installed

Post by markdiss »

Hi,

Thanks for the quick response. DateChecksum.pm exists under Kernel/System/ITSMChange/Number/

We'll have a go at changing the config param to one of the other options when we can next schedule a platform maintenance window.

Mark.
markdiss
Znuny newbie
Posts: 14
Joined: 05 Oct 2021, 17:15
Znuny Version: 6.4.2
Real Name: Mark Dissington

Re: Error in Znuny 7.0.5 migration script with ITSM 6.5.x installed

Post by markdiss »

Eureka!

Had to manually copy the old ITSM folder from under the old otrs install to the new znuny/Kernel/... locations to complete the script running

Then had to use the Console.pl command to remove all unavailable packages as well as fix all of the following which seems to be missed during the upgrade/migration scripts:
- db name/user/password in Default.pm
- All LDAP configuration lost
- Leftover Dynamic field from uninstalled MasterSlave package - had to manually edit the dynamic field table in the DB to set it to valid 2 to stop a repeated "Backend MasterSlave is invalid!" error in the logs when SchedulerTaskWorker ran

All-in-all it was less than smooth, but I think we've gotten there in the end.

Mark.
Post Reply