On Tue, Jul 31, 2018 at 9:44 AM Sven Achtelik
<Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>> wrote:
Attached the log
OK, according to the logs we got SQL_ASCII from the server querying the encoding of
postgres database on your 9.2 instance.
2018-07-31 01:59:12,591-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:247 Creating own connection
2018-07-31 01:59:12,595-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:292 Result: [{'?column?': 1}]
2018-07-31 01:59:12,595-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.tryDatabaseConnect:399 Connection succeeded
2018-07-31 01:59:12,595-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:242 Database: 'None', Statement: 'SHOW lc_collate', args:
{}
2018-07-31 01:59:12,596-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:247 Creating own connection
2018-07-31 01:59:12,599-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:292 Result: [{'lc_collate': 'C'}]
2018-07-31 01:59:12,599-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:242 Database: 'None', Statement: 'SHOW server_encoding',
args: {}
2018-07-31 01:59:12,600-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:247 Creating own connection
2018-07-31 01:59:12,603-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:292 Result: [{'server_encoding': 'SQL_ASCII'}]
2018-07-31 01:59:12,603-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:242 Database: 'None', Statement: 'SHOW lc_ctype', args:
{}
2018-07-31 01:59:12,604-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:247 Creating own connection
2018-07-31 01:59:12,607-0500 DEBUG otopi.ovirt_engine_setup.engine_common.database
database.execute:292 Result: [{'lc_ctype': 'C'}]
2018-07-31 01:59:12,607-0500 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130
stopping service postgresql
but according to postgresql-setup logs, template1 is instead in UTF-8.
That’s true, I’m having the upgrading issue for some time now
and already asked for advice, which lead me to change the encoding of the template1 from
SQL_ASCII to UTF8. I also managed to change the encoding of the template 0 to UTF8, but
the setup seems to check the server_encoding variable which is still SQL_ASCII. The
initial settings after restoring my engine DB where SQL_ASCII for all DBs and just the
ovirt DBs had UTF8. Now If found a lot of different ways to get around this and the
situation now is:
[root@ovirt-engine pgsql]# sudo -u postgres psql --list
List of databases
Name | Owner | Encoding |
Collate | Ctype | Access privileges
---------------------- +----------------------
+-----------+-------------+-------------+-------------------
engine | engine | UTF8 |
en_US.UTF-8 | en_US.UTF-8 |
ovirt_engine_history | ovirt_engine_history | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | SQL_ASCII | C
| C |
template0 | postgres | UTF8 | en_US.utf8
| en_US.utf8 |
template1 | postgres | UTF8 | en_US.utf8
| en_US.utf8 |
But this is check by setup:
[root@ovirt-engine pgsql]# sudo -u postgres psql -c "show server_encoding;"
server_encoding
-----------------
SQL_ASCII
(1 row)
Would it be enough to just set (if possible) server_encoding to utf8 and go ahead ? If
things are messed up I could go an restore again through additional hardware, but I feel
that I’ll be ending up again with all SQL_ASCII.
Can you please double check it attaching the output of:
sudo -u postgres psql --list
Von: Simone Tiraboschi [mailto:stirabos@redhat.com<mailto:stirabos@redhat.com>]
Gesendet: Dienstag, 31. Juli 2018 09:33
An: Sven Achtelik <Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>>
Cc: users <users@ovirt.org<mailto:users@ovirt.org>>
Betreff: Re: [ovirt-users] Re: Upgrade from 4.1 to 4.2 failing - SQL Issues
On Tue, Jul 31, 2018 at 9:20 AM Sven Achtelik
<Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>> wrote:
Hi Simone,
the data dir for the upgrade seems to be only created during the upgrade and removed on
failure. I can see it being generated during the process and disappear once it fails. Is
/var/opt/rh/rh-postgresql95/lib/pgsql/data the correct path to look at ?
Yes, just that one.
Looking through the logs I found this “'PGSETUP_INITDB_OPTIONS':
'--lc-collate=C --encoding=SQL_ASCII --lc-ctype=C'” and whatever is generating
that command is taking SQL_ASCII as the encoding. Do you know where this is coming from
?
This function:
https://github.com/oVirt/ovirt-engine/blob/master/packaging/setup/ovirt_e...
it should take them from your 9.2 DB
Can you please attach the whole engine-setup log file?
Thanks, Sven
Von: Sven Achtelik [mailto:Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>]
Gesendet: Montag, 30. Juli 2018 14:00
An: Simone Tiraboschi <stirabos@redhat.com<mailto:stirabos@redhat.com>>
Cc: users <users@ovirt.org<mailto:users@ovirt.org>>
Betreff: [ovirt-users] Re: Upgrade from 4.1 to 4.2 failing - SQL Issues
Von: Simone Tiraboschi [mailto:stirabos@redhat.com<mailto:stirabos@redhat.com>]
Gesendet: Montag, 30. Juli 2018 09:19
An: Sven Achtelik <Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>>
Cc: Yedidyah Bar David <didi@redhat.com<mailto:didi@redhat.com>>; users
<users@ovirt.org<mailto:users@ovirt.org>>; Gobinda Das
<godas@redhat.com<mailto:godas@redhat.com>>
Betreff: Re: [ovirt-users] Re: Upgrade from 4.1 to 4.2 failing - SQL Issues
On Fri, Jul 27, 2018 at 9:27 AM Sven Achtelik
<Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>> wrote:
Is this what you’re looking for ?
HOSTNAME=ovirt-engine
SELINUX_ROLE_REQUESTED=
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=10.1.50.14 50688 22
SELINUX_USE_CURRENT_RANGE=
SSH_TTY=/dev/pts/1
USER=root
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
SSH_AUTH_SOCK=/tmp/ssh-FoWxJtonlt/agent.14076
MAIL=/var/spool/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
PWD=/root
LANG=en_US
I think that your issue comes from here.
On a clean system you have LANG=en_US.UTF-8 and you probably initially deployed oVirt 4.1
with postgres 9.2 with that but now you set just LANG=en_US and so postgres initdb is
trying to honor that creating 9.5 template0 and template1 without utf-8 support and so the
upgrade from 9.2 utf-8 to 9.5 without utf-8 is failing.
I'd suggest to set LANG=en_US.UTF-8 and then try again the upgrade procedure from
engine-setup.
Just tried this and it’s still failing. Language seems to be set properly:
[root@ovirt-engine ~]# localectl status
System Locale: LANG=en_US.utf8
VC Keymap: us
X11 Layout: n/a
[root@ovirt-engine ~]# env
XDG_SESSION_ID=2625
SELINUX_ROLE_REQUESTED=
TERM=xterm
SHELL=/bin/bash
MAIL=/var/spool/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
PWD=/root
LANG=en_US.utf8
Here’s a snippet from the failing log:
2018-07-30 02:50:41,981-0500 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade plugin.executeRaw:813
execute: ('/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup',
'--upgrade', '--upgrade-from=postgresql'),
executable='None', cwd='None', env={'LESSOPEN':
'||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': '10.1.50.14 52013 22',
'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root',
'USER': 'root', 'HOME': '/root', 'PATH':
'/opt/rh/rh-postgresq
l95/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin',
'LD_LIBRARY_PATH': '/opt/rh/rh-postgresql95/root/usr/lib64',
'LANG': 'en_US.utf8', 'TERM': 'xterm', 'SHELL':
'/bin/bash', 'LIBRARY_PATH': '/opt/rh/rh
-postgresql95/root/usr/lib64', 'SHLVL': '4', 'HISTSIZE':
'1000', 'POSTGRESQLENV':
'COMMAND/pg_dump=str:/opt/rh/rh-postgresql95/root/usr/bin/pg_dump
COMMAND/psql=str:/opt/rh/rh-postgresql95/root/usr/bin/psql COM
MAND/pg_restore=str:/opt/rh/rh-postgresql95/root/usr/bin/pg_restore
COMMAND/postgresql-setup=str:/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup
OVESETUP_PROVISIONING/postgresService=str:rh-postgresql95-p
ostgresql
OVESETUP_PROVISIONING/postgresConf=str:/var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf
OVESETUP_PROVISIONING/postgresPgHba=str:/var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf
OVESETUP_PROVISIONING/postgresPgVersion=str:/var/opt/rh/rh-postgresql95/lib/pgsql/data/PG_VERSION',
'MANPATH': '/opt/rh/rh-postgresql95/root/usr/share/man:',
'X_SCLS': 'rh-postgresql95 ', 'XDG_RUNTIME_DIR':
'/run/user/0', 'PGS
ETUP_INITDB_OPTIONS': '--lc-collate=C --encoding=SQL_ASCII --lc-ctype=C',
'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::',
'SSH_AUTH_SOCK': '/tmp/ssh-mioJ2JGE3R/agent.25618',
'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/sp
ool/mail/root', 'PKG_CONFIG_PATH':
'/opt/rh/rh-postgresql95/root/usr/lib64/pkgconfig', 'XDG_SESSION_ID':
'2625', 'sclenv': 'rh-postgresql95', 'LS_COLORS':
'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=4
0;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;
31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=
01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=
01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*
.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.an
x=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:',
'XDG_CONFIG_
DIRS': '/etc/opt/rh/rh-postgresql95/xdg:/etc/xdg', 'SSH_TTY':
'/dev/pts/0', 'HOSTNAME':
'ovirt-engine.mgmt.lan.eps.aero<http://ovirt-engine.mgmt.lan.eps.aero>',
'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql95/java:/etc/java',
'SELINUX_LEVEL_REQUESTED': '', 'HISTCONTROL'
: 'ignoredups', 'XDG_DATA_DIRS':
'/opt/rh/rh-postgresql95/root/usr/share', 'PWD': '/root',
'CPATH': '/opt/rh/rh-postgresql95/root/usr/include',
'OTOPI_LOGFILE':
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180730024906-agvn
o2.log', 'SSH_CONNECTION': '10.1.50.14 52013 172.16.1.9 22',
'OTOPI_EXECDIR': '/root'}
2018-07-30 02:50:51,498-0500 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade plugin.executeRaw:863
execute-result: ('/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup',
'--upgrade', '--upgrade-from=postgre
sql'), rc=1
2018-07-30 02:50:51,499-0500 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade plugin.execute:921
execute-output: ('/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup',
'--upgrade', '--upgrade-from=postgresql
') stdout:
2018-07-30 02:50:51,499-0500 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade plugin.execute:926
execute-output: ('/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup',
'--upgrade', '--upgrade-from=postgresql
') stderr:
* upgrading from 'postgresql.service' to
'rh-postgresql95-postgresql.service'
* Upgrading database.
ERROR: pg_upgrade tool failed
ERROR: Upgrade failed.
* See /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log for details.
Did you checked /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log now
Yes, still the same issue:
[root@ovirt-engine ~]# more /var/lib/pgsql/upgrade_rh-postgresql95-postgresql.log
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "line" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
engine
ovirt_engine_history
postgres
template1
ok
encodings for database "template1" do not match: old "UTF8", new
"SQL_ASCII"
Failure, exiting
did you cleaned up the 9.5 data directory after previous upgrade attempt?
No I didn’t do that, where would I find those ?
2018-07-30 02:50:51,500-0500 DEBUG otopi.transaction transaction._prepare:66 exception
during prepare phase
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 62, in
_prepare
element.prepare()
File
"/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py",
line 825, in prepare
raiseOnError=True,
File "/usr/lib/python2.7/site-packages/otopi/plugin.py", line 931, in
execute
command=args[0],
RuntimeError: Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup'
failed to execute
2018-07-30 02:50:51,501-0500 DEBUG otopi.context context._executeMethod:143 method
exception
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in
_executeMethod
method['method']()
File
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/dbmsupgrade.py",
line 89, in _updateDBMS
oengcommcons.ProvisioningEnv.OLD_POSTGRES_SERVICE
File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 106, in
append
self._prepare(element=element)
File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 62, in
_prepare
element.prepare()
File
"/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py",
line 825, in prepare
raiseOnError=True,
File "/usr/lib/python2.7/site-packages/otopi/plugin.py", line 931, in
execute
command=args[0],
RuntimeError: Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup'
failed to execute
2018-07-30 02:50:51,502-0500 ERROR otopi.context context._executeMethod:152 Failed to
execute stage 'Misc configuration': Command
'/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup' failed to execute
2018-07-30 02:50:51,503-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'Yum Transaction'
Loaded plugins: fastestmirror, versionlock
2018-07-30 02:50:51,579-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'DWH Engine database Transaction'
2018-07-30 02:50:51,580-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'Database Transaction'
2018-07-30 02:50:51,580-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'Version Lock Transaction'
2018-07-30 02:50:51,581-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'DWH database Transaction'
2018-07-30 02:50:51,581-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'Firewalld Transaction'
2018-07-30 02:50:51,582-0500 DEBUG otopi.transaction transaction.abort:119 aborting
'DBMS Upgrade Transaction'
2018-07-30 02:50:51,582-0500 INFO
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.dbmsupgrade postgres.abort:859 Rolling
back to the previous PostgreSQL instance (postgresql).
2018-07-30 02:50:51,583-0500 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130
stopping service rh-postgresql95-postgresql
2018-07-30 02:50:51,583-0500 DEBUG otopi.plugins.otopi.services.systemd
plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop',
'rh-postgresql95-postgresql.service'), executable='None',
cwd='None', env=None
2018-07-30 02:50:51,595-0500 DEBUG otopi.plugins.otopi.services.systemd
plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop',
'rh-postgresql95-postgresql.service'), rc=0
2018-07-30 02:50:51,596-0500 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921
execute-output: ('/usr/bin/systemctl', 'stop',
'rh-postgresql95-postgresql.service') stdout:
2018-07-30 02:50:51,596-0500 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926
execute-output: ('/usr/bin/systemctl', 'stop',
'rh-postgresql95-postgresql.service') stderr:
2018-07-30 02:50:51,596-0500 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130
starting service postgresql
2018-07-30 02:50:51,597-0500 DEBUG otopi.plugins.otopi.services.systemd
plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'start',
'postgresql.service'), executable='None', cwd='None', env=None
2018-07-30 02:50:52,640-0500 DEBUG otopi.plugins.otopi.services.systemd
plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'start',
'postgresql.service'), rc=0
2018-07-30 02:50:52,641-0500 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921
execute-output: ('/usr/bin/systemctl', 'start',
'postgresql.service') stdout:
2018-07-30 02:50:52,641-0500 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926
execute-output: ('/usr/bin/systemctl', 'start',
'postgresql.service') stderr:
2018-07-30 02:50:52,643-0500 DEBUG otopi.context context.dumpEnvironment:859 ENVIRONMENT
DUMP - BEGIN
2018-07-30 02:50:52,643-0500 DEBUG otopi.context context.dumpEnvironment:869 ENV
BASE/error=bool:'True'
2018-07-30 02:50:52,643-0500 DEBUG otopi.context context.dumpEnvironment:869 ENV
BASE/exceptionInfo=list:'[(<type 'exceptions.RuntimeError'>,
RuntimeError("Command '/opt/rh/rh-postgresql95/root/usr/bin/postgresql-setup'
failed t
o execute",), <traceback object at 0x534e710>)]'
2018-07-30 02:50:52,646-0500 DEBUG otopi.context context.dumpEnvironment:873 ENVIRONMENT
DUMP - END
2018-07-30 02:50:52,646-0500 INFO otopi.context context.runSequence:741 Stage: Clean up
2018-07-30 02:50:52,647-0500 DEBUG otopi.context context.runSequence:745 STAGE cleanup
2018-07-30 02:50:52,649-0500 DEBUG otopi.context context._executeMethod:128 Stage cleanup
METHOD otopi.plugins.otopi.dialog.answer_file.Plugin._generate_answer_file
2018-07-30 02:50:52,649-0500 DEBUG otopi.context context.dumpEnvironment:859 ENVIRONMENT
DUMP - BEGIN
2018-07-30 02:50:52,650-0500 DEBUG otopi.context context.dumpEnvironment:869 ENV
DIALOG/answerFileContent=str:'# OTOPI answer file, generated by human dialog
[environment:default]
SELINUX_LEVEL_REQUESTED=
HISTCONTROL=ignoredups
SHLVL=1
HOME=/root
LOGNAME=root
SSH_CONNECTION=
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/0
_=/usr/bin/env
Von: Simone Tiraboschi [mailto:stirabos@redhat.com<mailto:stirabos@redhat.com>]
Gesendet: Donnerstag, 26. Juli 2018 12:42
An: Sven Achtelik <Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>>
Cc: Yedidyah Bar David <didi@redhat.com<mailto:didi@redhat.com>>; users
<users@ovirt.org<mailto:users@ovirt.org>>; Gobinda Das
<godas@redhat.com<mailto:godas@redhat.com>>
Betreff: Re: [ovirt-users] Re: Upgrade from 4.1 to 4.2 failing - SQL Issues
On Wed, Jul 25, 2018 at 1:23 PM Sven Achtelik
<Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>> wrote:
Hi Simone,
if I use the same command as you did I get the following information:
[root@ovirt-engine ~]# sudo -u postgres scl enable rh-postgresql95 -- psql --list
could not change directory to "/root": Permission denied
List of databases
Name | Owner | Encoding | Collate | Ctype |
Access privileges
----------------------+----------------------+-----------+-------------+-------------+-----------------------
engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ovirt_engine_history | ovirt_engine_history | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C |
=c/postgres +
| | | | |
postgres=CTc/postgres
The issue is just there on postgres and template0.
According to inidb documentation:
https://www.postgresql.org/docs/9.5/static/app-initdb.html
-E encoding
--encoding=encoding
Selects the encoding of the template database. This will also be the default encoding of
any database you create later, unless you override it there. The default is derived from
the locale, or SQL_ASCII if that does not work.
It will fall back to SQL_ASCII if there was an error getting the locale.
Can you please share the output of env on the shell there you executed engine-setup?
template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
(5 rows)
As I’m not a DB admin, I don’t really know how go about these encodings. I restored the
current system from a 4.1.7 Backup to a 4.1.9 image and all went well.
Do you need any other values ?
Thanks,
Sven
Von: Simone Tiraboschi [mailto:stirabos@redhat.com<mailto:stirabos@redhat.com>]
Gesendet: Dienstag, 24. Juli 2018 15:47
An: Sven Achtelik <Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>>;
Yedidyah Bar David <didi@redhat.com<mailto:didi@redhat.com>>
Cc: users <users@ovirt.org<mailto:users@ovirt.org>>; Gobinda Das
<godas@redhat.com<mailto:godas@redhat.com>>
Betreff: Re: [ovirt-users] Re: Upgrade from 4.1 to 4.2 failing - SQL Issues
Hi,
it seams still pretty close to
https://bugzilla.redhat.com/show_bug.cgi?id=1528371
although that one was on lc_collate and this on encoding.
Adding also Didi.
I just double check on a system of mine upgrade from 4.1 to 4.2 and template1 is still on
UTF8.
[root@enginevm tmp]# sudo -u postgres scl enable rh-postgresql95 -- psql --list
List of databases
Name | Owner | Encoding | Collate | Ctype |
Access privileges
----------------------+----------------------+----------+-------------+-------------+-----------------------
engine | engine | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
ovirt_engine_history | ovirt_engine_history | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres=CTc/postgres+
| | | | |
=c/postgres
(5 rows)
So the point is why the upgrade process is trying to force SQL_ASCII.
Can you please share your env variable values?
On Tue, Jul 24, 2018 at 2:57 PM Gobinda Das
<godas@redhat.com<mailto:godas@redhat.com>> wrote:
Hi Sven,
I think you need to use same encoding.The error clearly says your dump encoding is
"UTF8" and the new database encoding is "SQL_ASCII"
As per I know PostgreSQL does not convert encoding from one type to another during
restore.
Can you please check what's the current encoding configured?
On Tue, Jul 24, 2018 at 5:00 PM, Sven Achtelik
<Sven.Achtelik@eps.aero<mailto:Sven.Achtelik@eps.aero>> wrote:
Hi All,
I’m still struggling to upgrade from 4.1 to 4.2 and the root cause seems to be the SQL
upgrade. I installed my 4.1.9 with the engine appliance image and restored a DB to it. My
Upgrade to 4.2 is failing with the errors below:
--------------------------------
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "line" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
engine
ovirt_engine_history
postgres
template1
ok
encodings for database "template1" do not match: old "UTF8", new
"SQL_ASCII"
Failure, exiting
I tried everything that could do and I also tried to find a solution on google to make
this work. Could someone with DB knowhow please advise on the next steps to resolve this ?
I really would like to upgrade somehow.
Thank you,
Sven
_______________________________________________
Users mailing list -- users@ovirt.org<mailto:users@ovirt.org>
To unsubscribe send an email to
users-leave@ovirt.org<mailto:users-leave@ovirt.org>
Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:
https://lists.ovirt.org/archives/list/users@ovirt.org/message/H7KQJ4VDGVD...
--
Thanks,
Gobinda
_______________________________________________
Users mailing list -- users@ovirt.org<mailto:users@ovirt.org>
To unsubscribe send an email to
users-leave@ovirt.org<mailto:users-leave@ovirt.org>
Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:
https://lists.ovirt.org/archives/list/users@ovirt.org/message/T7AE7KYVIB2...