Update from 1.8.2 to WAPT 2.4

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
flo777
Messages: 11
Registration: February 23, 2022 - 9:35 PM

August 6, 2023 - 6:19 PM

Good morning,
I was on WAPT 1.8.2.7393-75a5de09-debian-10-amd64, so a Debian 10 server. I'm looking to migrate to version 2.4.0.14080
I updated Debian to version 11, so PostgreSQL 13 (database migrated using pg_upgradecluster, everything went well...)

I then followed the upgrade procedure https://www.wapt.fr/en/doc/wapt-server-upgrade.html

During the post-installation step, I get:

Code: Select all

root@host:~# sudo -u wapt /opt/wapt/bin/python -I /opt/wapt/waptserver/model.py upgrade-db -l info
initializing missing wapt tables without dropping data.
2023-08-06 17:21:57,559 INFO Connecting to waptdb explicitely. Count: 0
Unable to create tables, will try to upgrade step by step instead... : ProgrammingError('column "host_networking" does not exist\n')
2023-08-06 17:21:57,640 INFO Current DB: {'host': None, 'port': 5432, 'user': 'wapt', 'password': None} version: 1.9.0.4
2023-08-06 17:21:57,656 INFO Migrating from 1.9.0.4 to 1.9.0.12
Traceback (most recent call last):
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 3144, in execute_sql
    cursor.execute(sql, params or ())
psycopg2.errors.UndefinedColumn: column t1.changelog does not exist
LINE 1: ...age", "t1"."icon_sha256sum", "t1"."is_available", "t1"."chan...
                                                             ^


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/wapt/waptserver/model.py", line 2784, in <module>
    init_db(False,server_config=conf)
  File "/opt/wapt/waptserver/model.py", line 2156, in init_db
    upgrade_db_structure(server_config=server_config)
  File "/opt/wapt/waptserver/model.py", line 2245, in upgrade_db_structure
    Packages.update_from_repo(r)
  File "/opt/wapt/waptserver/model.py", line 585, in update_from_repo
    (rec, _isnew) = cls.update_from_control(pe,is_available=True)
  File "/opt/wapt/waptserver/model.py", line 539, in update_from_control
    (rec, _isnew) = Packages.get_or_create(**key)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 6471, in get_or_create
    return query.get(), False
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 6884, in get
    return clone.execute(database)[0]
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 1907, in inner
    return method(self, database, *args, **kwargs)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 1978, in execute
    return self._execute(database)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 2150, in _execute
    cursor = database.execute(self)
  File "/opt/wapt/lib/python3.8/site-packages/playhouse/postgres_ext.py", line 490, in execute
    cursor = self.execute_sql(sql, params, commit=commit)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 3151, in execute_sql
    self.commit()
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 2917, in __exit__
    reraise(new_type, new_type(exc_value, *exc_args), traceback)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 190, in reraise
    raise value.with_traceback(tb)
  File "/opt/wapt/lib/python3.8/site-packages/peewee.py", line 3144, in execute_sql
    cursor.execute(sql, params or ())
peewee.ProgrammingError: column t1.changelog does not exist
LINE 1: ...age", "t1"."icon_sha256sum", "t1"."is_available", "t1"."chan...
I also tried restoring a dump (pg_dumpall) of the old database (in case the upgrade to PostgreSQL 13 was a problem), but I get the same error

(Note: I reverted to WAPT 1.8.2 (without downgrading Debian, so still Debian 11) and everything works under this version (I did have to restore the database from a backup, the database migration due to the post-installation must have stopped halfway...)

Any ideas?

Sincerely
User avatar
kguerineau
Messages: 26
Registration: March 6, 2018 - 4:28 PM

August 8, 2023 - 12:00

Hello,

We have just released a new version (2.4.0.14143) which contains a bug fix for migration from a 1.8.2 server https://www.wapt.fr/fr/doc/wapt-changelog.html

Have a good day.
flo777
Messages: 11
Registration: February 23, 2022 - 9:35 PM

August 8, 2023 - 7:32 PM

Thank you. I won't have time to test it right away (no drastic changes before the holidays!). I'll keep you posted in September.
Best regards,
Florian
Locked