Description of problem: engine upgrade failed cause a task of unknown type was running. 2015-12-10 12:48:20 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:214 Result: [{'started_at': datetime.datetime(2015, 12, 10, 11, 24, 20, 316000, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=60, name=None)), 'task_id': 'fd62d708-8e9c-4209-956c-3bfc627b3117', 'action_type': 36, 'name': 'Default'}] 2015-12-10 12:48:20 DEBUG otopi.context context._executeMethod:152 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 142, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 448, in _validateAsyncTasks ) = self._checkRunningTasks() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 341, in _checkRunningTasks self._getRunningTasks(dbstatement), File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 202, in _getRunningTasks for entry in tasks KeyError: '36' 2015-12-10 12:48:20 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Setup validation': '36' Version-Release number of selected component (if applicable): How reproducible: Just trying to upgrade when a task with action_type = 36 is active. Steps to Reproduce: 1. Understand what task 36 is, start it 2. try to upgrade while the task 36 is running 3. Actual results: it fails with: 2015-12-10 12:48:20 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Setup validation': '36' Expected results: It should know about tasks with action_type = 36 and also if not for newer task it should fail but just decode as 'Unknown type' Additional info:
Fixed bug tickets must have target milestone set prior to fixing them. Please set the correct milestone and move the bugs back to the previous status after this is corrected.
Note to QE: See the comment having 'Verified+1' in [1] for how I tested this. You are of course welcome to try other more real scenarios for the first part instead of manually inserting a line. [1] https://gerrit.ovirt.org/51230
*** Bug 1295178 has been marked as a duplicate of this bug. ***
verified with upgrade to: rhevm-3.6.3-0.1.el6.noarch insert into async_tasks (task_id, action_type, status, storage_pool_id, result, command_id) values ('00000001-0001-0001-0001-0000000002e6', 224, 0, '00000001-0001-0001-0001-0000000002e5', 0, '00000001-0001-0001-0001-0000000002e7'); Upgrade completed successfully.