Bug 1290528 - [upgrade] async_tasks_map is out of sync
[upgrade] async_tasks_map is out of sync
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent (vote)
: ovirt-3.6.3
: 3.6.3
Assigned To: Yedidyah Bar David
: 1295178 (view as bug list)
Depends On:
Blocks: RHEV3.6Upgrade 1294361 1295178
  Show dependency treegraph
Reported: 2015-12-10 12:42 EST by Simone Tiraboschi
Modified: 2016-02-18 06:07 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-18 06:07:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
rule-engine: blocker+
ylavi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 51230 master MERGED packaging: setup: Handle unknown task types 2016-01-11 02:28 EST
oVirt gerrit 51617 ovirt-engine-3.6 MERGED packaging: setup: Handle unknown task types 2016-01-11 03:32 EST

  None (edit)
Description Simone Tiraboschi 2015-12-10 12:42:12 EST
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
  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
  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

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 02:28:54 EST
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 08:00:24 EST
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 08:26:42 EST
*** Bug 1295178 has been marked as a duplicate of this bug. ***
Comment 4 Gonza 2016-02-03 05:23:49 EST
verified with upgrade to:

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.