Public bug reported:

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-database-mysql,
 default-mysql-server | virtual-mysql-server,

---- SCRIPT

#!/bin/sh

set -e

# reinstall database in case mysql wasn't started early enough

service mysql start

echo 'bareos-database-common bareos-database-common/database-type string mysql' 
| debconf-set-selections
echo 'bareos-database-common bareos-database-common/database-type seen true' | 
debconf-set-selections
echo 'bareos-database-common bareos-database-common/dbconfig-reinstall boolean 
true' | debconf-set-selections
echo 'bareos-database-common bareos-database-common/dbconfig-reinstall seen 
true' | debconf-set-selections

dpkg-reconfigure bareos-database-common    <---- HERE the database-type
is reset

service bareos-dir restart

test/all

---- REPRODUCER

(c)root@tests:~$ echo 'bareos-database-common bareos-database-common
/database-type string mysql' | debconf-set-selections

--

(c)root@tests:~$ echo 'bareos-database-common bareos-database-common
/database-type seen true' | debconf-set-selections

--

(c)root@tests:~$ debconf-show bareos-database-common | grep database-type
* bareos-database-common/database-type: mysql

--

(c)root@tests:~$ DEBIAN_FRONTEND=noninteractive dpkg-reconfigure 
bareos-database-common
(config) dbc_go() bareos-database-common reconfigure 2171.
dbc_config() bareos-database-common reconfigure 2171.
dbc_set_dbtype_defaults() .
dbc_detect_installed_dbtype() pgsql.
_dbc_detect_installed_dbtype() pgsql.
dbc_detect_installed_dbtype() mysql.
_dbc_detect_installed_dbtype() mysql.
dbc_register_debconf() .
dbc_read_package_config() .
dbc_preseed_package_debconf() .
dbc_config() bareos-database-common reconfigure 2171.
dbc_set_dbtype_defaults() pgsql.
dbc_detect_installed_dbtype() pgsql.
_dbc_detect_installed_dbtype() pgsql.
dbc_detect_installed_dbtype() mysql.
_dbc_detect_installed_dbtype() mysql.
dbc_register_debconf() .
dbc_get_app_pass() .
dbconfig-common: writing config to 
/etc/dbconfig-common/bareos-database-common.conf
Replacing config file /etc/dbconfig-common/bareos-database-common.conf with new 
version
chown: invalid user: ‘postgres’
unable to connect to postgresql server.
error encountered creating user:
runuser: user postgres does not exist
dbconfig-common: bareos-database-common configure: noninteractive fail.
dbconfig-common: bareos-database-common configure: ignoring errors from here 
forwards
dbconfig-common: dumping pgsql database bareos to 
/var/tmp/bareos-database-common.bareos.2019-08-16-16.11.pgsql.pL2gNl.
dbconfig-common: dropping old pgsql database bareos.
populating database via sql...  done.
dbconfig-common: flushing administrative password

-- ERROR

(c)root@tests:~$ debconf-show bareos-database-common | grep database-type
* bareos-database-common/database-type: pgsql

** Affects: bareos (Ubuntu)
     Importance: Medium
     Assignee: Rafael David Tinoco (rafaeldtinoco)
         Status: In Progress

** Changed in: bareos (Ubuntu)
       Status: New => In Progress

** Changed in: bareos (Ubuntu)
   Importance: Undecided => Medium

** Changed in: bareos (Ubuntu)
     Assignee: (unassigned) => Rafael David Tinoco (rafaeldtinoco)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1840485

Title:
  Eoan autopkgtest regressions - Migration Excuses

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bareos/+bug/1840485/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to