Bug 1290528 - [upgrade] async_tasks_map is out of sync
Summary: [upgrade] async_tasks_map is out of sync
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-3.6.3
: 3.6.3
Assignee: Yedidyah Bar David
QA Contact: Gonza
URL:
Whiteboard:
: 1295178 (view as bug list)
Depends On:
Blocks: RHEV3.6Upgrade 1294361 1295178
TreeView+ depends on / blocked
 
Reported: 2015-12-10 17:42 UTC by Simone Tiraboschi
Modified: 2016-02-18 11:07 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:07:04 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: blocker+
ylavi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1240940 0 unspecified CLOSED [RFE] Make VdcActionType enum available to engine-setup 2022-07-13 08:23:26 UTC
Red Hat Bugzilla 1295178 0 unspecified CLOSED Engine setup fails due to pending RestoreAllSnapshots tasks (type 224) 2021-02-22 00:41:40 UTC
oVirt gerrit 51230 0 master MERGED packaging: setup: Handle unknown task types 2016-01-11 07:28:46 UTC
oVirt gerrit 51617 0 ovirt-engine-3.6 MERGED packaging: setup: Handle unknown task types 2016-01-11 08:32:14 UTC

Internal Links: 1240940 1295178

Description Simone Tiraboschi 2015-12-10 17:42:12 UTC
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:

Comment 1 Red Hat Bugzilla Rules Engine 2016-01-11 07:28:54 UTC
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.

Comment 2 Yedidyah Bar David 2016-01-13 13:00:24 UTC
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

Comment 3 Yedidyah Bar David 2016-01-13 13:26:42 UTC
*** Bug 1295178 has been marked as a duplicate of this bug. ***

Comment 4 Gonza 2016-02-03 10:23:49 UTC
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.


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