Created attachment 670817 [details] dbdump Description of problem: I am trying to unlock a template which UI is showing as locked (see screen shot). running a query using unlock_entity.sh is howing no results: [root@rhevm-3 dbscripts]# ./unlock_entity.sh -t template -q -s localhost -p 5432 -d engine -u postgres template_name --------------- (0 rows) template_name | disk_id ---------------+--------- (0 rows) [root@rhevm-3 dbscripts]# Version-Release number of selected component (if applicable): si25.2 How reproducible: 100% Steps to Reproduce: 1. lock a template 2. /unlock_entity.sh -t template -q -s localhost -p 5432 -d engine -u postgres 3. Actual results: query is not finding the locked template Expected results: we should find the locked template Additional info: dbdump
Created attachment 670818 [details] screen shot
Created attachment 670833 [details] unlock -l
I managed to unlock the template using the template name from UI: [root@rhevm-3 dbscripts]# ./unlock_entity.sh -t template -i Clean_RHEL6.3_Openstack -l /tmp/unlock_entity.sh.log -s localhost -p 5432 -d engine -u postgres Caution, this operation may lead to data corruption and should be used with care. Please contact support prior to running this command Are you sure you want to proceed? [y/n] y select fn_db_unlock_entity('template', 'Clean_RHEL6.3_Openstack', false); INSERT 566028575 1 unlock template Clean_RHEL6.3_Openstack completed successfully.[root@rhevm-3 dbscripts]#
here is the output from the log: ********* QUERY ********** select fn_db_unlock_disk('e2a78678-ef6d-4786-9f12-4d4d09c3c657'); ************************** ********* QUERY ********** insert into audit_log(log_time,log_type_name,log_type,severity,message) values(now(), 'USER_RUN_UNLOCK_ENTITY_SCRIPT', 2024, 10, 'System user root run unlock_entity script on disk e2a78678-ef6d-4786-9f12-4d4d09c3c657 with db user postgres') ************************** INSERT 546444066 1 ********* QUERY ********** select fn_db_unlock_disk('fb07a54b-e53f-4413-9190-ba6787edbd0e'); ************************** ********* QUERY ********** insert into audit_log(log_time,log_type_name,log_type,severity,message) values(now(), 'USER_RUN_UNLOCK_ENTITY_SCRIPT', 2024, 10, 'System user root run unlock_entity script on disk fb07a54b-e53f-4413-9190-ba6787edbd0e with db user postgres') ************************** INSERT 559345627 1 (END)
http://gerrit.ovirt.org/#/c/11251/
fixed in commit: 76dcd32
3.2 has been released