Bug 1255393 - dbscripts/schema.sh is executed even when upgrading setup
dbscripts/schema.sh is executed even when upgrading setup
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-extension-aaa-jdbc (Show other bugs)
3.6.0
Unspecified Unspecified
unspecified Severity high
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Martin Perina
Ondra Machacek
:
Depends On:
Blocks: 917035 1254639
  Show dependency treegraph
 
Reported: 2015-08-20 09:07 EDT by Ondra Machacek
Modified: 2016-04-19 21:10 EDT (History)
2 users (show)

See Also:
Fixed In Version: ovirt-engine-extension-aaa-jdbc-0.0.0-5.el6ev
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-19 21:10:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45157 master MERGED setup: Check if custom schema exists before creation Never

  None (edit)
Description Ondra Machacek 2015-08-20 09:07:53 EDT
Description of problem:


Version-Release number of selected component (if applicable):
3.6.0-10

How reproducible:
always

Steps to Reproduce:
1. install 3.6.0-9
2. upgrade to 3.6.0-10

Actual results:
upgrade fails

Expected results:
upgrade succeed

Additional info:
2015-08-20 15:03:58 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:221 Result: []
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.options.Plugin._miscNewDatabase
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:147 condition False
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.public_glance_repository.Plugin._misc
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:147 condition False
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.storage.Plugin._updateSANWipeAfterDelete
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:147 condition False
2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc.Plugin._misc
2015-08-20 15:03:58 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc aaajdbc._setupSchema:94 Creating/refreshing Engine AAA database schema
2015-08-20 15:03:58 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:827 execute: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p', '
5432', '-u', 'engine_20150813155241', '-d', 'engine_20150813155241', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820145833-l3b49s.log', '-c', 'apply'], executable='None', cwd='No
ne', env={'HISTTIMEFORMAT': '%F %T ', 'LESSOPEN': '||/usr/bin/lesspipe.sh %s', 'SSH_CLIENT': '10.34.131.225 49524 22', 'SELINUX_USE_CURRENT_RANGE': '', 'LOGNAME': 'root', 'USER': 'root', 'HOME': '/root', 'PATH':
 '/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'SHLVL': '1', 'G_BROKEN_FILENAMES': '1', 'HISTSIZE': '1000', 'XMO
DIFIERS': '@im=ibus', 'PYTHONPATH': '/usr/share/ovirt-engine/setup/bin/..::', 'SELINUX_ROLE_REQUESTED': '', 'MAIL': '/var/spool/mail/root', 'DBFUNC_DB_PGPASSFILE': '/tmp/tmpUXPad2', 'LS_COLORS': 'rs=0:di=38;5;27
:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;1
0;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:
*.gz=38;5;9:*.lz=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.bz=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.rar=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38
;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=3
8;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=3
8;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5
;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;
45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:', 'SSH_TTY': '/dev/pts/0', 'HOSTNAME': 'om-ovirt36.rhev.lab.eng.brq.redhat.com', 'SELINUX_LEVEL_REQUESTED': '', 'HISTCONTROL': 'ignoredups', 'PWD': '/usr/share/ovir
t-engine/setup/dbutils', 'OTOPI_LOGFILE': '/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820145833-l3b49s.log', 'SSH_CONNECTION': '10.34.131.225 49524 10.34.63.70 22', 'OTOPI_EXECDIR': '/usr/share/ovirt-en
gine/setup/dbutils'}


********* QUERY **********
select 1;
**************************

        1

********* QUERY **********
CREATE SCHEMA aaa_jdbc AUTHORIZATION engine_20150813155241;
**************************

2015-08-20 15:03:58 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.executeRaw:877 execute-result: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', 
'-p', '5432', '-u', 'engine_20150813155241', '-d', 'engine_20150813155241', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820145833-l3b49s.log', '-c', 'apply'], rc=1
2015-08-20 15:03:58 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:935 execute-output: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p
', '5432', '-u', 'engine_20150813155241', '-d', 'engine_20150813155241', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820145833-l3b49s.log', '-c', 'apply'] stdout:
Creating custom schema aaa_jdbc ...

2015-08-20 15:03:58 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc plugin.execute:940 execute-output: ['/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh', '-s', 'localhost', '-p
', '5432', '-u', 'engine_20150813155241', '-d', 'engine_20150813155241', '-e', 'aaa_jdbc', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820145833-l3b49s.log', '-c', 'apply'] stderr:
ERROR:  schema "aaa_jdbc" already exists
FATAL: Cannot execute sql command: --no-psqlrc --command=CREATE SCHEMA aaa_jdbc AUTHORIZATION engine_20150813155241;

2015-08-20 15:03:58 DEBUG otopi.context context._executeMethod:155 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 145, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/config/aaajdbc.py", line 331, in _misc
    self._setupSchema()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/config/aaajdbc.py", line 135, in _setupSchema
    oenginecons.EngineDBEnv.PGPASS_FILE
  File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 945, in execute
    command=args[0],
RuntimeError: Command '/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh' failed to execute
2015-08-20 15:03:58 ERROR otopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine-extension-aaa-jdbc/dbscripts/schema.sh' failed to execute
2015-08-20 15:03:58 DEBUG otopi.transaction transaction.abort:134 aborting 'Yum Transaction'
2015-08-20 15:03:58 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:95 Yum Performing yum transaction rollback
Comment 1 Martin Perina 2015-08-21 21:52:35 EDT
Fix included in ovirt-engine-extension-aaa-jdbc-0.0.0-5.el6ev
Comment 2 Ondra Machacek 2015-09-08 07:31:15 EDT
ok in ovirt-engine-extension-aaa-jdbc-0.0.0-6.el6ev.noarch

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