Bug 919173 - Failed install DB during rhevm-setup not on “clean server”
Summary: Failed install DB during rhevm-setup not on “clean server”
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.1.3
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: 3.2.0
Assignee: Eli Mesika
QA Contact: vvyazmin@redhat.com
URL:
Whiteboard: infra
Depends On:
Blocks: 920565 948448 1223957
TreeView+ depends on / blocked
 
Reported: 2013-03-07 18:56 UTC by vvyazmin@redhat.com
Modified: 2016-02-10 19:23 UTC (History)
11 users (show)

Fixed In Version: sf11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1223957 (view as bug list)
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
## Logs (9.78 KB, application/x-gzip)
2013-03-07 18:56 UTC, vvyazmin@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 12966 0 None None None Never

Description vvyazmin@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

Comment 2 Yair Zaslavsky 2013-03-10 09:21:49 UTC
Hi,
What version did you try to upgrade from?
Can you please enter psql and type "\list" and show the results here?

Comment 3 Eli Mesika 2013-03-10 11:04:03 UTC
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)

Comment 6 Eli Mesika 2013-03-12 11:14:59 UTC
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.

Comment 7 Eli Mesika 2013-03-14 12:25:15 UTC
fixed in commit: 915976a

Comment 9 Leonid Natapov 2013-04-10 15:16:38 UTC
sf13

Comment 10 Itamar Heim 2013-06-11 08:44:18 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 08:44:31 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 08:44:49 UTC
3.2 has been released

Comment 13 Itamar Heim 2013-06-11 08:50:54 UTC
3.2 has been released

Comment 14 Itamar Heim 2013-06-11 09:21:55 UTC
3.2 has been released


Note You need to log in before you can comment on or make changes to this bug.