Descriptionvvyazmin@redhat.com
2013-03-07 18:56:33 UTC
Created attachment 706767[details]
## Logs
Description of problem: Failed install DB during rhevm-setup not on “clean server”
Version-Release number of selected component (if applicable):
RHEVM 3.1.3 - SI27.3 environment:
RHEVM: rhevm-3.1.0-50.el6ev.noarch
VDSM: vdsm-4.10.2-1.6.el6.x86_64
LIBVIRT: libvirt-0.10.2-18.el6.x86_64
QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.355.el6_4.1.x86_64
SANLOCK: sanlock-2.6-2.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Installation RHEVM 3.1.3 not on “clean server”.
Actual results:
During rhevm-setup, I failed on DB installation
Expected results:
Successfully install RHEVM
Additional info:
Before installation a new RHEVM version, clean servers with following commands:
rhevm-cleanup -u
yum -y remove rhevm* vdsm-bootstrap
rm -rf /var/log/ovirt-engine/*; rm -rf /tmp/*; rm -rf /usr/share/pgsql/*; rm -rf /usr/share/ovirt-engine/*
yum -y remove jboss*
yum -y remove postgres*
yum clean all
engine-setup_2013_03_05_20_09_00.log
2013-03-05 20:09:15::DEBUG::setup_sequences::59::root:: running _createDB
2013-03-05 20:09:15::DEBUG::rhevm-setup::906::root:: installing postgres db
2013-03-05 20:09:15::DEBUG::rhevm-setup::909::root:: engine db creation is logged at /var/log/ovirt-engine//engine-db-install-2013_03_05_20_09_15.log
2013-03-05 20:09:15::DEBUG::common_utils::339::root:: Executing command --> '/usr/share/ovirt-engine/dbscripts/engine-db-install.sh -l engine-db-install-2013_03_05_20_09_15.log -w ******** -u postgres -s localhost -p 5432 -r local'
2013-03-05 20:09:19::DEBUG::common_utils::377::root:: output = Running local installation
adding uuid-ossp.sql from contrib...
error, failed creating enginedb
2013-03-05 20:09:19::DEBUG::common_utils::378::root:: stderr =
2013-03-05 20:09:19::DEBUG::common_utils::379::root:: retcode = 1
2013-03-05 20:09:19::DEBUG::setup_sequences::62::root:: Traceback (most recent call last):
File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
function()
File "/usr/bin/rhevm-setup", line 925, in _createDB
output, rc = utils.execCmd(cmdList=cmd, failOnError=True, msg=output_messages.ERR_DB_CREATE_FAILED, maskList=masked_value_set)
File "/usr/share/ovirt-engine/scripts/common_utils.py", line 382, in execCmd
raise Exception(msg)
Exception: Database creation failed
engine-db-install-2013_03_05_20_09_15.log
[engine-db-install] creating engine db on postgres.
/usr/share/ovirt-engine/dbscripts ~
Creating the database: engine
dropdb: database removal failed: ERROR: database "engine" does not exist
createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
Failed to create database engine
It seems that PostgreSQL was installed with a default encoding of SQL_ASCII. SQL_ASCII basically means “I don’t care about the encoding of my data; just store garbage.”
The solution would be to have a utility that will fix template1 to have the correct encoding (actually , drop and create template1 correctly)
Since we were not able to reproduce the BZ, it was agreed that supplying
this utility and calling it from the installer in the
pre-install/upgrade step is sufficient to resolve this problem.
Created attachment 706767 [details] ## Logs Description of problem: Failed install DB during rhevm-setup not on “clean server” Version-Release number of selected component (if applicable): RHEVM 3.1.3 - SI27.3 environment: RHEVM: rhevm-3.1.0-50.el6ev.noarch VDSM: vdsm-4.10.2-1.6.el6.x86_64 LIBVIRT: libvirt-0.10.2-18.el6.x86_64 QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.355.el6_4.1.x86_64 SANLOCK: sanlock-2.6-2.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. Installation RHEVM 3.1.3 not on “clean server”. Actual results: During rhevm-setup, I failed on DB installation Expected results: Successfully install RHEVM Additional info: Before installation a new RHEVM version, clean servers with following commands: rhevm-cleanup -u yum -y remove rhevm* vdsm-bootstrap rm -rf /var/log/ovirt-engine/*; rm -rf /tmp/*; rm -rf /usr/share/pgsql/*; rm -rf /usr/share/ovirt-engine/* yum -y remove jboss* yum -y remove postgres* yum clean all engine-setup_2013_03_05_20_09_00.log 2013-03-05 20:09:15::DEBUG::setup_sequences::59::root:: running _createDB 2013-03-05 20:09:15::DEBUG::rhevm-setup::906::root:: installing postgres db 2013-03-05 20:09:15::DEBUG::rhevm-setup::909::root:: engine db creation is logged at /var/log/ovirt-engine//engine-db-install-2013_03_05_20_09_15.log 2013-03-05 20:09:15::DEBUG::common_utils::339::root:: Executing command --> '/usr/share/ovirt-engine/dbscripts/engine-db-install.sh -l engine-db-install-2013_03_05_20_09_15.log -w ******** -u postgres -s localhost -p 5432 -r local' 2013-03-05 20:09:19::DEBUG::common_utils::377::root:: output = Running local installation adding uuid-ossp.sql from contrib... error, failed creating enginedb 2013-03-05 20:09:19::DEBUG::common_utils::378::root:: stderr = 2013-03-05 20:09:19::DEBUG::common_utils::379::root:: retcode = 1 2013-03-05 20:09:19::DEBUG::setup_sequences::62::root:: Traceback (most recent call last): File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run function() File "/usr/bin/rhevm-setup", line 925, in _createDB output, rc = utils.execCmd(cmdList=cmd, failOnError=True, msg=output_messages.ERR_DB_CREATE_FAILED, maskList=masked_value_set) File "/usr/share/ovirt-engine/scripts/common_utils.py", line 382, in execCmd raise Exception(msg) Exception: Database creation failed engine-db-install-2013_03_05_20_09_15.log [engine-db-install] creating engine db on postgres. /usr/share/ovirt-engine/dbscripts ~ Creating the database: engine dropdb: database removal failed: ERROR: database "engine" does not exist createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template. Failed to create database engine