Bug 1240940 - [RFE] Make VdcActionType enum available to engine-setup
Summary: [RFE] Make VdcActionType enum available to engine-setup
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Oved Ourfali
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 08:18 UTC by Sandro Bonazzola
Modified: 2022-07-13 08:13 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-01-20 12:17:07 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1238795 0 medium CLOSED Upgrade from 3.5.2 to 3.5.3 experiencing database execution error 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1290528 0 unspecified CLOSED [upgrade] async_tasks_map is out of sync 2021-02-22 00:41:40 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
Red Hat Issue Tracker RHV-47661 0 None None None 2022-07-13 08:13:58 UTC

Internal Links: 1238795 1290528 1295178

Description Sandro Bonazzola 2015-07-08 08:18:17 UTC
Currently engine-setup need to map some of the values listed in the enum provided by VdcActionType in a python dict manually synchronized with that enum for handling async tasks on upgrade.

We should have those values either in the DB or in a text file (json, conf, whatever) that may be used by both java and python avoding to duplicate code and require manual synchronization.

Comment 1 Oved Ourfali 2015-07-12 12:15:15 UTC
Can you describe first what's the problem you're trying to solve?
Perhaps exposing VdcActionType isn't the right approach to solve it.

Comment 2 Sandro Bonazzola 2015-07-13 11:02:36 UTC
The problem I'm trying to solve is to have the list of the async tasks with its descriptive text available in a single place, accessible from the engine for its internal use and from engine-setup for its async task handling.

Currently if you add an async task to the engine you need to align the setup code manually.
I'm pretty sure that in 3.6 some new async tasks has been added to the engine and they're not handled in the setup just because it has been forgotten to sync the python code with that and the aim is to avoid that this could happen.
(guess based on having more than 400 values in VdcActionType while the python code counts less than 50 values and python code being updated last time on Fri Oct 18 2013 before my change last week)

Comment 3 Oved Ourfali 2015-07-13 11:19:24 UTC
I really think that this functionality isn't required.
And, exposing the enum is not a good practice.
Please check whether we can remove this error-prone functionality in the first place, only telling the administrator that there are running tasks, and to look at the UI for further details.

Comment 4 Sandro Bonazzola 2015-07-16 06:28:15 UTC
Still discussing if we can remove this functionality

Comment 5 Moran Goldboim 2015-08-17 11:19:26 UTC
(In reply to Oved Ourfali from comment #3)
> I really think that this functionality isn't required.
> And, exposing the enum is not a good practice.
> Please check whether we can remove this error-prone functionality in the
> first place, only telling the administrator that there are running tasks,
> and to look at the UI for further details.

Sandro, do we have the engine service running and UI available during this stage (async tasks review) and does it applies to zombie tasks as well?

Comment 6 Red Hat Bugzilla Rules Engine 2015-10-19 11:03:40 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Yedidyah Bar David 2015-11-23 07:33:20 UTC
(In reply to Moran Goldboim from comment #5)
> (In reply to Oved Ourfali from comment #3)
> > I really think that this functionality isn't required.
> > And, exposing the enum is not a good practice.
> > Please check whether we can remove this error-prone functionality in the
> > first place, only telling the administrator that there are running tasks,
> > and to look at the UI for further details.
> 
> Sandro, do we have the engine service running and UI available during this
> stage (async tasks review) and does it applies to zombie tasks as well?

The engine is still running at that point, yes.

Not sure about the details, but even for checking if we need to alert the user, we need something to query about. Obviously this can be handled differently, e.g.:

1. Have a single PG function saying whether there is stuff that requires the user's attention prior to upgrade, which engine-setup can query and then prompt/abort if needed

2. Handle all the rest in the engine.

Comment 8 Sandro Bonazzola 2015-11-23 12:49:48 UTC
dropping needinfo supposing it was for question at comment #5 answered by didi at comment #7.

Comment 9 Oved Ourfali 2016-01-20 12:17:07 UTC
Closing, as we're not gonna expose that in the engine.


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