Upgrade vspheredb from 1.5.0 to 1.7.1 error

Hello everybody,
i upgrade the module vspheredb from 1.5.0 to 1.7.1. After that I had a Problem whit the database for vspheredb. The message is:

Die Datenbank hat ausstehende DB-Migrationen. Bitte den Hintergrunddienst neu starten, um diese anzuwenden

The daemon I had restart more than one time.

systemctl status icinga-vspheredb
● icinga-vspheredb.service - Icinga vSphereDB Daemon
     Loaded: loaded (/etc/systemd/system/icinga-vspheredb.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-07-03 11:06:43 CEST; 7min ago
       Docs: https://icinga.com/docs/icinga-module-for-vsphere/latest/
   Main PID: 902641 (icingacli)
     Status: "idle, db: idle, localdb: stopped, api: stopped"
      Tasks: 2 (limit: 9507)
     Memory: 23.6M
     CGroup: /system.slice/icinga-vspheredb.service
             ├─902641 Icinga::vSphereDB: idle, db: idle, localdb: stopped, api: stopped
             └─902642 Icinga::vSphereDB::DB::migration

Jul 03 11:06:43 esn-svm011 systemd[1]: Starting Icinga vSphereDB Daemon...
Jul 03 11:06:43 esn-svm011 systemd[1]: Started Icinga vSphereDB Daemon.
Jul 03 11:06:43 esn-svm011 icinga-vspheredb[902641]: [configwatch] DB configuration loaded
Jul 03 11:06:43 esn-svm011 icinga-vspheredb[902641]: [db] sending DB config to child process
Jul 03 11:06:43 esn-svm011 icinga-vspheredb[902641]: [db] Applying schema migrations

My environment

icinga2 - The Icinga 2 network monitoring daemon (version: r2.14.0-1)

Copyright (c) 2012-2024 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Ubuntu
  Platform version: 20.04.6 LTS (Focal Fossa)
  Kernel: Linux
  Kernel version: 5.15.0-82-generic
  Architecture: x86_64

Icinga Web 2 Version 	2.11.1
Git Commit 	eecf8d9934cbf30ec063cea4a525b26bfd2bf99a
PHP-Version 	7.4.3-4ubuntu2.22
Git Commit Datum 	2022-07-06
icinga/icinga-php-thirdparty 	0.12.0
icinga/icinga-php-library 	0.13.1

How can I resolve this Problem? Which Daemon should I restart?
Or should I create a new Database?

Thank you for your help in advance
Best regards Rico

Hi !

You should restart the
“icinga-vspheredb.service” it should then try to apply the outstanding migrations on the database itself … if this doesn’t work then stop the service.

And apply the following schema upgrades

Suggested that you use Mysql / Postgres is available as well…

The VsphereDB has a table with the Schema Value …
you can select the value by
“select * from vspheredb_schema_migration;” and see which updates need to be applied … , the updates need to be updated sequential … 49,50,51 etc.

The other option would be to create the database new, then you would need to set the connections again but it will create the Database with the latest Schema.

Regards

David

1 Like

Hello David,
sorry for the reply, I have a lot of work.
I tried to migrate the database. But there were a lot of errors. So I created a new one.
Thank you for the Help

1 Like