Recent update to 4.015 fails when using mysql/mariadb as a backend.
Post-install either hangs at 56% of "Applying packages.0007_alter_package_epoch_alter_package_release_and_more..." with no further progress or continues a little further then fails with error trace. Log extract below.
Upgrade issue only seems to occur when using mysql as backend.
I am operational with 4.0.15 but its been a faff to get there. If I can give you any more logs please shout
Upgrading:
patchman-client python3-patchman
Summary:
Upgrading: 2, Installing: 0, Removing: 0, Not Upgrading: 0
Download size: 164 kB
Space needed: 31.7 kB / 13.8 GB available
Continue? [Y/n] y
Get:1 https://repo.openbytes.ie/patchman/debian trixie/main amd64 patchman-client all 4.0.15-1 [19.8 kB]
Get:2 https://repo.openbytes.ie/patchman/debian trixie/main amd64 python3-patchman all 4.0.15-1 [144 kB]
Fetched 164 kB in 0s (554 kB/s)
(Reading database ... 62422 files and directories currently installed.)
Preparing to unpack .../patchman-client_4.0.15-1_all.deb ...
Unpacking patchman-client (4.0.15-1) over (4.0.13-dev1-1) ...
Preparing to unpack .../python3-patchman_4.0.15-1_all.deb ...
Unpacking python3-patchman (4.0.15-1) over (4.0.13-dev1-1) ...
Setting up python3-patchman (4.0.15-1) ...
apache2_invoke patchman.conf: already enabled
3 static files copied to '/var/lib/patchman/static', 228 unmodified.
Operations to perform:
Synchronize unmigrated apps: admindocs, bootstrap3, celery, django_extensions, django_filters, django_select2, django_tables2, humanize, messages, rest_framework, staticfiles, util
Apply all migrations: admin, arch, auth, contenttypes, django_celery_beat, domains, errata, hosts, modules, operatingsystems, packages, reports, repos, rest_framework_api_key, security, sessions, sites, taggit
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Running migrations:
Applying modules.0006_alter_module_context_alter_module_name_and_more... OK
Applying operatingsystems.0011_alter_osrelease_codename_alter_osrelease_cpe_name_and_more... OK
Applying packages.0007_alter_package_epoch_alter_package_release_and_more... OK
Applying security.0009_alter_cvss_severity_alter_cvss_vector_string_and_more...Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 209, in execute
res = self._query(query)
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 315, in _query
db.query(q)
~~~~~~~~^^^
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 239, in query
_mysql.connection.query(self, query)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
MySQLdb._exceptions.DataError: (1265, "Data truncated for column 'vector_string' at row 30")
The above exception was the direct cause of the following exception:
Recent update to 4.015 fails when using mysql/mariadb as a backend.
Post-install either hangs at 56% of "Applying packages.0007_alter_package_epoch_alter_package_release_and_more..." with no further progress or continues a little further then fails with error trace. Log extract below.
Upgrade issue only seems to occur when using mysql as backend.
My workaround is to
clear all data first from the GUI sadly including CVEs which is the LONG process to obtain in the first place!). Starting with effectively empty tables seems to work,yeah this didnt work.My actual workaround was to drop and recreate database, with empty database upgrade completes with no error but something is askew.
(Side note on clearing data, ticking all repos in one go and selecting delete returns an error 500, ticking all but one and deleting works, sorry to confuse but wanted to note it)
I am operational with 4.0.15 but its been a faff to get there. If I can give you any more logs please shout
Thank you for patchman!