Bug#921128: mailman3-web fails to initialize mysql: Specified key was too long

2019-02-01 Thread Antoine Beaupre
Package: mailman3-web
Followup-For: Bug #921128

I have tried to reproduce this in buster and at first I seem to recall
I did reproduce it, but now I somewhat managed to get through and have
it installed correctly.

Also note this might be a bug specific to MySQL: running the dbconfig
stuff with a sqlite3 backend doesn't trigger the same bug, even in
backports.

That said, the bug doesn't occur within dbconfig itself. It's the
django migration that raises the backtrace (which is logical
considering dbconfig is written in shell and not
Python). Specifically, this command reproduces the problem outside of
dpkg:

su --shell /bin/sh --command "python3 /usr/bin/django-admin migrate --no-input 
--verbosity 3 --pythonpath /usr/share/mailman3-web --settings settings" www-data

And, for what it's worth, I tried backporting the 0+20180916-4 release
of mailman-suite, to no effect: the same error still occurs.

A.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mailman3-web depends on:
ii  dbconfig-sqlite3   2.0.11
ii  debconf [debconf-2.0]  1.5.70
ii  lsb-base   10.2018112800
ii  node-less  1.6.3~dfsg-3
ii  python33.7.2-1
ii  python3-django-hyperkitty  1.2.1-4
ii  python3-django-postorius   1.2.2-4
ii  python3-psycopg2   2.7.7-1
ii  python3-pymysql0.9.3-1
ii  python3-whoosh 2.7.4+git6-g9134ad92-1
ii  ruby-sass  3.5.6-1
ii  ucf3.0038+nmu1
ii  uwsgi  2.0.17.1-11
ii  uwsgi-plugin-python3   2.0.17.1-11

Versions of packages mailman3-web recommends:
ii  libapache2-mod-proxy-uwsgi  2.4.37-1

Versions of packages mailman3-web suggests:
ii  mariadb-server-10.3 [virtual-mysql-server]  1:10.3.12-2

-- debconf-show failed



Bug#921128: mailman3-web fails to initialize mysql: Specified key was too long

2019-02-01 Thread Antoine Beaupre
Package: mailman3-web
Version: 0+20180916-2~bpo9+1
Severity: grave

I can't seem to install mailman3-web, at least from backports:

Paramétrage de mailman3-web (0+20180916-2~bpo9+1) ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/mailman3-web.conf
mailman3web already exists and has privileges on mailman3web.
creating database mailman3web: already exists.
dbconfig-common: flushing administrative password
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, 
in execute
return self.cursor.execute(sql, params)
  File "/usr/lib/python3/dist-packages/django/db/backends/mysql/base.py", line 
101, in execute
return self.cursor.execute(query, args)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
  File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 36, in 
defaulterrorhandler
raise errorvalue
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 217, in execute
res = self._query(query)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 378, in _query
rowcount = self._do_query(q)
  File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 341, in 
_do_query
db.query(q)
  File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 280, in 
query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key 
length is 767 bytes')

That's after stumbling upon bug #919145, so I just had installed mysqldb and
pymysql. I tried purging (deleting databases and creds) the package and
reinstalling, with a similar result.

That's a rather strange error - a 767 bytes key does seem very long. ;) I
suspect something might be going on in dbconfig-common - the mailman postinst
doesn't seem to have anything specific to this, for example. Note that
dbconfig-common was upgraded to backports as a dependency, so this might be
where the trouble lies as well.

Unfortunately, I have about zero clue how to debug dbconfig, which has always
been a horrible black box to me, so I am sorry I cannot help further. 

-- System Information:
Debian Release: 9.7
  APT prefers stable
  APT policy: (500, 'stable'), (1, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mailman3-web depends on:
ii  dbconfig-sqlite3   2.0.11~bpo9+1
ii  debconf [debconf-2.0]  1.5.61
ii  lsb-base   9.20161125
ii  node-less  1.6.3~dfsg-2
ii  python33.5.3-1
ii  python3-django-hyperkitty  1.2.1-4~bpo9+1
ii  python3-django-postorius   1.2.2-4~bpo9+2
ii  python3-psycopg2   2.6.2-1
ii  python3-pymysql0.7.10-1
ii  python3-whoosh 2.7.0-2
ii  ruby-sass  3.5.3-1~bpo9+1
ii  ucf3.0036
ii  uwsgi  2.0.14+20161117-3+deb9u2
ii  uwsgi-plugin-python3   2.0.14+20161117-3+deb9u2

Versions of packages mailman3-web recommends:
ii  libapache2-mod-proxy-uwsgi  2.0.14+20161117-3+deb9u2
ii  nginx   1.10.3-1+deb9u2
ii  nginx-full [nginx]  1.10.3-1+deb9u2

Versions of packages mailman3-web suggests:
ii  mariadb-server-10.1 [virtual-mysql-server]  10.1.37-0+deb9u1

-- debconf information:
  mailman3-web/db/basepath: /var/lib/mailman3/web
  mailman3-web/django-site: anarc.at
  mailman3-web/dbconfig-reinstall: false
  mailman3-web/nginx-choice:
  mailman3-web/upgrade-error: abort
  mailman3-web/remove-error: abort
  mailman3-web/mysql/method: Unix socket
  mailman3-web/db/app-user: mailman3web@localhost
  mailman3-web/configure-webserver: none
  mailman3-web/dbconfig-upgrade: true
  mailman3-web/dbconfig-remove: true
  mailman3-web/internal/skip-preseed: false
  mailman3-web/passwords-do-not-match:
  mailman3-web/remote/port:
  mailman3-web/pgsql/authmethod-user: password
  mailman3-web/pgsql/manualconf:
  mailman3-web/superuser-name: admin
* mailman3-web/database-type: mysql
  mailman3-web/purge: false
  mailman3-web/missing-db-package-error: abort
  mailman3-web/internal/reconfiguring: false
  mailman3-web/pgsql/method: TCP/IP
  mailman3-web/install-error: abort
  mailman3-web/superuser-mail: root@localhost
  mailman3-web/emailname: localhost.local
  mailman3-web/restart-webserver: true
  mailman3-web/pgsql/changeconf: false
  mailman3-web/db/dbname: mailman3web
  mailman3-web/pgsql/authmethod-admin: ident
  mailman3-web/upgrade-backup: true
* mailman3-web/mysql/admin-user: debian-sys-maint
  mailman3-web/remote/newhost:
  mailman3-web/pgsql/no-empty-passwords:
  mailman3-web/pgsql/admin-user: postgres
*