Created attachment 742627 [details] upgrade logs Description of problem: I ran #./taskcleaner.sh -s localhost -p 5432 -d engine -u postgres -A -R on my setup. when I tried to upgrade I got this error: 2013-05-02 12:32:36::DEBUG::common_utils::492::root:: stderr = psql:./taskcleaner_sp.sql:19: ERROR: must be owner of function getasynctaskszombies looking at the log, we execute the taskcleaner script with user engine: /usr/share/ovirt-engine/scripts/taskcleaner/taskcleaner.sh -u engine -s localhost -p 5432 -d engine -z I ran the script manually again using user engine: ./taskcleaner.sh -s localhost -p 5432 -d engine -u engine -A -R and upgraded again this time the upgrade succeeded. just to add that Eli and I ran a test on 3.1.4 for BZ949682 and also failed the upgrade on permission issues so we should consider backporting of the fix. Version-Release number of selected component (if applicable): sf14 -> sf15 How reproducible: 100% Steps to Reproduce: 1. cd /usr/share/ovirt-engine/scripts/taskcleaner 2. run the following: ./taskcleaner.sh -s localhost -p 5432 -d engine -u postgres -A -R 3. try to upgrade rhevm Actual results: we fail to upgrade since running the taskcleaner script with user postgres will cause the table permissions to change and when upgrade will run user engine will not be able to run on the table Expected results: if running the script with other users aside from engine we should not allow running it with any other user to avoide issues during upgrade. Additional info: full logs 2013-05-02 12:32:36::DEBUG::common_utils::453::root:: Executing command --> '/usr/share/ovirt-engine/scripts/taskcleaner/taskcleaner.sh -u engine -s localhost -p 5432 -d engine -z' in working directory '/' 2013-05-02 12:32:36::DEBUG::common_utils::491::root:: output = (No rows) 2013-05-02 12:32:36::DEBUG::common_utils::492::root:: stderr = psql:./taskcleaner_sp.sql:19: ERROR: must be owner of function getasynctaskszombies psql:./taskcleaner_sp.sql:28: ERROR: must be owner of function deleteasynctaskzombiesbytaskid psql:./taskcleaner_sp.sql:37: ERROR: must be owner of function deleteasynctaskzombiesbycommandid psql:./taskcleaner_sp.sql:44: ERROR: must be owner of function deleteasynctaskbycommandid psql:./taskcleaner_sp.sql:51: ERROR: must be owner of function deleteasynctaskszombies psql:./taskcleaner_sp.sql:58: ERROR: must be owner of function deletejobstepsbytaskid psql:./taskcleaner_sp.sql:68: ERROR: must be owner of function deleteentitysnapshotbyzombietaskid psql:./taskcleaner_sp.sql:78: ERROR: must be owner of function deleteentitysnapshotbytaskid psql:./taskcleaner_sp.sql:85: ERROR: must be owner of function deleteentitysnapshotzombies psql:./taskcleaner_sp.sql:92: ERROR: must be owner of function deletejobstepsbyzombiecommandid psql:./taskcleaner_sp.sql:99: ERROR: must be owner of function deletejobstepsbycommandid psql:./taskcleaner_sp.sql:106: ERROR: must be owner of function deletejobstepszombies psql:./taskcleaner_sp.sql:113: ERROR: must be owner of function deletealljobs psql:./taskcleaner_sp.sql:120: ERROR: must be owner of function deleteallentitysnapshot
Eli, Since the DB utilities are mostly used by GSS in production environments, in order to prevent future upgrade issues I think we need to force the right user for production environment by default, and enable an override for development environment. It goes for all the utilities.
fixed in commit: cc61e7f
verified on sf17 - no user was specifically added and we ran with user engine: 2013-May-20, 17:17 System user root run unlock_entity script on disk 1435f7f9-6b33-4710-afa8-c6aea4563792 with db user engine
3.2 has been released