From: "Martin Perina" <mperina(a)redhat.com>
To: "Marcelo Leandro" <marceloltmm(a)gmail.com>
Cc: "Darrell Budic" <budic(a)onholyground.com>, "Eli Mesika"
<emesika(a)redhat.com>, "users" <users(a)ovirt.org>
Sent: Thursday, February 4, 2016 6:12:34 PM
Subject: Re: [ovirt-users] Problem update ovirt 3.5.6.2-1.el7 to 6.2.6-1.el7
Hi,
so it seems, that for some strange reason, user 'engine' cannot create
schema in 'engine' database although it should be an owner of this db.
I double checked that on all our testing databases this works fine and
also if you created engine db according to doc (either automatically
by engine-setup or manually in case of remote db) this should work.
So you can try to execute following command which adds proper
permissions to 'engine' db user (please adapt according to you setup):
su - postgres -c "psql --command=\"GRANT ALL ON DATABASE
@ENGINE_DB_DATABASE@ TO @ENGINE_DB_USER@;\""
The correct output should be:
GRANT
If it's successful, please execute engine-setup again to verify that
above step fixed the issue.
Thanks
Martin Perina
----- Original Message -----
> From: "Marcelo Leandro" <marceloltmm(a)gmail.com>
> To: "Martin Perina" <mperina(a)redhat.com>
> Sent: Thursday, February 4, 2016 1:40:36 PM
> Subject: Re: [ovirt-users] Problem update ovirt 3.5.6.2-1.el7 to
> 6.2.6-1.el7
>
> Hello Martin,
>
> Indeed thereĀ“s an issue here. Runnig your command, I got this error:
> ERROR: permission denied for database engine , I'm investigating
> deeper
>
> Thanks
>
> 2016-02-04 6:18 GMT-03:00 Martin Perina <mperina(a)redhat.com>:
> > Hi,
> >
> > I just verified that upgrades on both Centos 6.7 and Centos 7.2 works
> > fine,
> > so there's something bad with psql on you machines :-(
> >
> > Could you please execute following steps and send me result?
> >
> > 1. Please take a look at your engine db configuration in
> > /etc/ovirt-engine/engine.conf.d/10-setup-database.conf
> >
> > 2. Please replace variables (@VAR@) with real values according to your
> > db setup and execute following command on engine host (or VM in
> > case of hosted engine):
> >
> > LC_ALL="C" PGPASSWORD="@ENGINE_DB_PASSWORD@" psql -w
> > --pset=tuples_only=on --host="@ENGINE_DB_HOST@"
> > --port="@ENGINE_DB_PORT@" --username="@ENGINE_DB_USER@"
> > --dbname="@ENGINE_DB_DATABASE@" --set ON_ERROR_STOP=1 --no-psqlrc
> > --command="CREATE SCHEMA aaa_jdbc_x AUTHORIZATION
@ENGINE_DB_USER@;"
> > ||
> > die "Cannot execute sql command"
> >
> > Correct output should be:
> >
> > CREATE SCHEMA
> >
> >
> > Thanks a lot
> >
> > Martin Perina
> >
> > ----- Original Message -----
> >> From: "Darrell Budic" <budic(a)onholyground.com>
> >> To: "Marcelo Leandro" <marceloltmm(a)gmail.com>
> >> Cc: "Martin Perina" <mperina(a)redhat.com>, "users"
<users(a)ovirt.org>
> >> Sent: Thursday, February 4, 2016 6:17:21 AM
> >> Subject: Re: [ovirt-users] Problem update ovirt 3.5.6.2-1.el7 to
> >> 6.2.6-1.el7
> >>
> >> I just hit a similar problem, but on Centos 6.7, postgres (PostgreSQL)
> >> 8.4.20. Looks like a permission error for me?
> >>
> >> 2016-02-03 22:52:42 DEBUG otopi.context context._executeMethod:142 Stage
> >> misc
> >> ME
> >> THOD
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._misc
> >> 2016-02-03 22:52:42 INFO
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aa
> >> ajdbc aaajdbc._setupSchema:97 Creating/refreshing Engine
'internal'
> >> domain
> >> datab
> >> ase schema
> >> 2016-02-03 22:52:42 DEBUG
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.a
> >> aajdbc plugin.executeRaw:828 execute:
> >> ['/usr/share/ovirt-engine-extension-aaa-jd
> >> bc/dbscripts/schema.sh', '-s', 'localhost',
'-p', '5432', '-u',
> >> 'engine',
> >> '-d',
> >> 'engine', '-e', 'aaa_jdbc', '-l',
> >> '/var/log/ovirt-engine/setup/ovirt-engine-setu
> >> p-20160203224629-uy91s0.log', '-c', 'apply'],
executable='None',
> >> cwd='None',
> >> env
> >> ={'LESSOPEN': '||/usr/bin/lesspipe.sh %s',
'LOGNAME': 'root', 'USER':
> >> 'root',
> >> 'P
> >> ATH': '/sbin:/bin:/usr/sbin:/usr/bin', 'HOME':
'/root', 'LANG':
> >> 'en_US.UTF-8', '
> >> TERM': 'xterm-color', 'SHELL': '/bin/bash',
'SHLVL': '1',
> >> 'G_BROKEN_FILENAMES':
> >> '1', 'HISTSIZE': '1000', 'SUDO_USER':
'telsin', 'USERNAME': 'root',
> >> 'PYTHONPATH'
> >> : '/usr/share/ovirt-engine/setup/bin/..::', 'SUDO_UID':
'699600001',
> >> 'KRB5CCNAME
> >> ': 'FILE:/tmp/krb5cc_699600001_5oRWEw', 'MAIL':
> >> '/var/spool/mail/telsin',
> >> 'DBFUN
> >> C_DB_PGPASSFILE': '/tmp/tmpqzrQIw', 'SUDO_COMMAND':
'/bin/bash',
> >> 'SUDO_GID':
> >> '69
> >> 9600001', 'HOSTNAME': 'ovirt.int.ohgnetworks.com',
'PWD':
> >> '/home/telsin',
> >> 'OTOPI
> >> _LOGFILE':
> >> '/var/log/ovirt-engine/setup/ovirt-engine-setup-20160203224629-uy91s0
> >> .log', '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:*.arj=01;31:*.taz=01;31:*
> >>
.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:
> >>
*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31
> >>
:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;
> >>
31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=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=0
> >>
1;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.
> >>
ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;3
> >>
5:*.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:*.cg
> >>
m=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=0
> >>
1;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xs
> >> pf=01;36:', 'OTOPI_EXECDIR': '/home/telsin'}
> >> ********* QUERY **********
> >> select 1;
> >> **************************
> >>
> >> 1
> >>
> >> ********* QUERY **********
> >> copy (
> >> SELECT COUNT(schema_name)
> >> FROM information_schema.schemata
> >> WHERE schema_name = 'aaa_jdbc'
> >> ) to stdout with delimiter as '|';
> >> **************************
> >>
> >> ********* QUERY **********
> >> CREATE SCHEMA aaa_jdbc AUTHORIZATION engine;
> >> **************************
> >>
> >> 2016-02-03 22:52:43 DEBUG
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.a
> >> aajdbc plugin.executeRaw:878 execute-result:
> >> ['/usr/share/ovirt-engine-extension
> >> -aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost',
'-p', '5432', '-u',
> >> 'engine',
> >> '-d', 'engine', '-e', 'aaa_jdbc',
'-l',
> >> '/var/log/ovirt-engine/setup/ovirt-engi
> >> ne-setup-20160203224629-uy91s0.log', '-c', 'apply'],
rc=1
> >> 2016-02-03 22:52:43 DEBUG
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.a
> >> aajdbc plugin.execute:936 execute-output:
> >> ['/usr/share/ovirt-engine-extension-aa
> >> a-jdbc/dbscripts/schema.sh', '-s', 'localhost',
'-p', '5432', '-u',
> >> 'engine',
> >> '-
> >> d', 'engine', '-e', 'aaa_jdbc', '-l',
> >> '/var/log/ovirt-engine/setup/ovirt-engine-
> >> setup-20160203224629-uy91s0.log', '-c', 'apply']
stdout:
> >> Creating custom schema aaa_jdbc ...
> >>
> >> 2016-02-03 22:52:43 DEBUG
> >> otopi.plugins.ovirt_engine_setup.ovirt_engine.config.a
> >> aajdbc plugin.execute:941 execute-output:
> >> ['/usr/share/ovirt-engine-extension-aa
> >> a-jdbc/dbscripts/schema.sh', '-s', 'localhost',
'-p', '5432', '-u',
> >> 'engine',
> >> '-
> >> d', 'engine', '-e', 'aaa_jdbc', '-l',
> >> '/var/log/ovirt-engine/setup/ovirt-engine-
> >> setup-20160203224629-uy91s0.log', '-c', 'apply']
stderr:
> >> ERROR: permission denied for database engine
> >> FATAL: Cannot execute sql command: --no-psqlrc --command=CREATE SCHEMA
> >> aaa_jdbc
> >> AUTHORIZATION engine;
> >>
> >> 2016-02-03 22:52:43 DEBUG otopi.context context._executeMethod:156
> >> method
> >> except
> >> ion
> >> Traceback (most recent call last):
> >> File "/usr/lib/python2.6/site-packages/otopi/context.py", line
146, in
> >> _execut
> >> eMethod
> >> method['method']()
> >> File
> >>
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-en
> >> gine/config/aaajdbc.py", line 379, in _misc
> >> self._setupSchema()
> >> File
> >>
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-en
> >> gine/config/aaajdbc.py", line 138, in _setupSchema
> >> oenginecons.EngineDBEnv.PGPASS_FILE
> >> File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line
946, in
> >> execute
> >> command=args[0],
> >> RuntimeError: Command
> >> '/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/sche
> >> ma.sh' failed to execute
> >> 2016-02-03 22:52:43 ERROR otopi.context context._executeMethod:165
> >> Failed
> >> to
> >> exe
> >> cute stage 'Misc configuration': Command
> >> '/usr/share/ovirt-engine-extension-aaa-
> >> jdbc/dbscripts/schema.sh' failed to execute
> >>
> >> This hosted engine has been through several upgrades if it makes a
> >> difference. Any workarounds available?
> >>
> >> Thanks,
> >>
> >> -Darrell
> >>
> >>
> >> > On Feb 3, 2016, at 4:17 AM, Marcelo Leandro
<marceloltmm(a)gmail.com>
> >> > wrote:
> >> >
> >> > Hello Martin,
> >> >
> >> > SO version:
> >> > CentOS Linux release 7.2.1511 (Core)
> >> >
> >> >
> >> > Postgresql version:
> >> > postgres=# SELECT version();
> >> >
> >> > version
> >> >
> >> >
--------------------------------------------------------------------------------------------------------------
> >> >
> >> > PostgreSQL 9.2.14 on x86_64-redhat-linux-gnu, compiled by gcc (GCC)
> >> > 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit
> >> >
> >> >
> >> > Thanks.
> >> >
> >> > 2016-02-03 4:40 GMT-03:00 Martin Perina <mperina(a)redhat.com>:
> >> >> Hi,
> >> >>
> >> >> what distribution are you using? What is postgresql version?
> >> >>
> >> >> Thanks
> >> >>
> >> >> Martin Perina
> >> >>
> >> >> ----- Original Message -----
> >> >>> From: "Marcelo Leandro"
<marceloltmm(a)gmail.com>
> >> >>> To: "users" <users(a)ovirt.org>
> >> >>> Sent: Wednesday, February 3, 2016 3:39:58 AM
> >> >>> Subject: [ovirt-users] Problem update ovirt 3.5.6.2-1.el7 to
> >> >>> 6.2.6-1.el7
> >> >>>
> >> >>> hello,
> >> >>> i have problem for update with ovirt.
> >> >>> erro msg:
> >> >>>
> >> >>> [ ERROR ] Failed to execute stage 'Misc
configuration': Command
> >> >>>
'/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh'
> >> >>> failed to execute
> >> >>>
> >> >>>
> >> >>> setup.log:
> >> >>>
https://copy.com/nOhoxwI8kPzm6fO0
> >> >>>
> >> >>> anybody can help me ?
> >> >>>
> >> >>> Thanks.
> >> >>> _______________________________________________
> >> >>> Users mailing list
> >> >>> Users(a)ovirt.org
> >> >>>
http://lists.ovirt.org/mailman/listinfo/users
> >> >>>
> >> > _______________________________________________
> >> > Users mailing list
> >> > Users(a)ovirt.org
> >> >
http://lists.ovirt.org/mailman/listinfo/users
> >>
> >>
>