Eoan autopkgtest regressions - Migration Excuses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bareos (Debian) |
Fix Released
|
Unknown
|
|||
bareos (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
bareos mysql-all test is failing. This happens because the way the mysql test has been written. It looks like that, during reconfiguration, the database-type is reset to pgsql, instead of sticking to mysql like it should:
---- SCRIPT
Tests: mysql-all
Restrictions: needs-root allow-stderr
Depends:
bareos,
bareos-
default-
---- SCRIPT
#!/bin/sh
set -e
# reinstall database in case mysql wasn't started early enough
service mysql start
echo 'bareos-
echo 'bareos-
echo 'bareos-
echo 'bareos-
dpkg-reconfigure bareos-
service bareos-dir restart
test/all
---- REPRODUCER
(c)root@tests:~$ echo 'bareos-
--
(c)root@tests:~$ echo 'bareos-
--
(c)root@tests:~$ debconf-show bareos-
* bareos-
--
(c)root@tests:~$ DEBIAN_
(config) dbc_go() bareos-
dbc_config() bareos-
dbc_set_
dbc_detect_
_dbc_detect_
dbc_detect_
_dbc_detect_
dbc_register_
dbc_read_
dbc_preseed_
dbc_config() bareos-
dbc_set_
dbc_detect_
_dbc_detect_
dbc_detect_
_dbc_detect_
dbc_register_
dbc_get_app_pass() .
dbconfig-common: writing config to /etc/dbconfig-
Replacing config file /etc/dbconfig-
chown: invalid user: ‘postgres’
unable to connect to postgresql server.
error encountered creating user:
runuser: user postgres does not exist
dbconfig-common: bareos-
dbconfig-common: bareos-
dbconfig-common: dumping pgsql database bareos to /var/tmp/
dbconfig-common: dropping old pgsql database bareos.
populating database via sql... done.
dbconfig-common: flushing administrative password
-- ERROR
(c)root@tests:~$ debconf-show bareos-
* bareos-
Changed in bareos (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Changed in bareos (Ubuntu): | |
status: | In Progress → Triaged |
Changed in bareos (Debian): | |
status: | Unknown → New |
Changed in bareos (Debian): | |
status: | New → Fix Released |
(c)root@tests:~$ echo 'bareos- database- common bareos- database- common/ database- type select mysql' | debconf- set-selections
(c)root@tests:~$ echo 'bareos- database- common bareos- database- common/ database- type seen true' | debconf- set-selections
(c)root@tests:~$ DEBIAN_ FRONTEND= noninteractive dpkg-reconfigure -u bareos- database- common database- common reconfigure 2171. database- common reconfigure 2171. dbtype_ defaults( ) . installed_ dbtype( ) pgsql. installed_ dbtype( ) pgsql. installed_ dbtype( ) mysql. installed_ dbtype( ) mysql. debconf( ) . package_ config( ) . package_ debconf( ) . database- common reconfigure 2171. dbtype_ defaults( ) pgsql.
(config) dbc_go() bareos-
dbc_config() bareos-
dbc_set_
dbc_detect_
_dbc_detect_
dbc_detect_
_dbc_detect_
dbc_register_
dbc_read_
dbc_preseed_
dbc_config() bareos-
dbc_set_
The function responsible for setting the "default_dbtype" is:
dbc_set_ dbtype_ defaults( )
like when there is only one supported database installed:
# Only one installed supported dbtype found, let's use it.
dbc_ dbtype= $dbc_default_ dbtype
if ! echo "$dbc_dbtypes" | grep -q "," ; then
fi
but it should NOT define another default database if the dbconf option "database-type" has been "seen" already.
So.. dbconfig-common has this bug and should NOT redefine database-type if it has been already changed (seen) since the package has been installed and configured.