Bug 1197616

Summary: Template creation stuck after upgrade
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Petr Kubica <pkubica>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: amureini, bazulay, dfediuck, didi, ecohen, eedri, gklein, juwu, lsurette, lveyde, michal.skrivanek, oourfali, pkubica, pnovotny, pstehlik, rbalakri, Rhev-m-bugs, rnori, sbonazzo, stirabos, yeylon, ylavi
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.1Flags: ylavi: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: org.ovirt.engine-root-3.5.1-4 Doc Type: Bug Fix
Doc Text:
Previously, when creating a template and then running an upgrade command, an implementation that was supposed to only clear zombie tasks and commands also killed pending tasks for template creation. This caused the template creation to be stuck. With this update, only zombie tasks and commands are cleared as normal.
Story Points: ---
Clone Of: 1119639 Environment:
Last Closed: 2015-04-28 18:49:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1202334    
Bug Blocks: 1186161, 1193058    
Attachments:
Description Flags
engine-logs
none
screenshot none

Comment 1 Yaniv Lavi 2015-03-02 08:56:17 UTC
This was probably fixed as part of BZ #1196136. It needs to be tested.

Comment 2 Petr Kubica 2015-03-16 12:41:32 UTC
It cannot be verified in vt14. I'll wait for next 3.5.1 vt build to verified this.

Comment 3 Petr Kubica 2015-03-26 10:03:03 UTC
Got error while upgrading vt13.15 to vt14.1:
[ ERROR ] Failed to execute stage 'Setup validation': 201

details -> the same problem in bug: https://bugzilla.redhat.com/show_bug.cgi?id=1196136

It has already been addressed by https://gerrit.ovirt.org/#/c/38895/

Comment 4 Eyal Edri 2015-04-01 15:32:13 UTC
if this bug failed qe, it should move to ASSIGNED/FAILED_QA and not MODIFIED.
please update bug accordingly.

Comment 6 Pavel Novotny 2015-04-03 18:48:11 UTC
Verified in rhevm-3.5.1-0.3.el6ev.noarch (vt14.2). Upgraded from rhevm-3.5.0-0.32.el6ev.noarch (vt13.11).

Verification steps followed steps to reproduce from comment 0: 
1. Install RHEVM 3.5.0 (vt13.11).
2. Start creating a template.
3. Stop ovirt-engine service
4. Run engine-setup to upgrade to 3.5.1 (vt14.2).

Result:

          Please confirm installation settings (OK, Cancel) [OK]: ok
[ INFO  ] Cleaning async tasks and compensations
          The following system tasks have been found running in the system:
          Task ID:           9e2f4bd5-2f6e-414c-9c4c-a0f6e0e4d239
          Task Name:         AddVmTemplateCommand          
          Task Description:  Adding a template             
          Started at:        30
          DC Name:           dc34                          
          The following commands have been found running in the system:
          The following compensations have been found running in the system:
          Would you like to try to wait for that?
          (Answering "no" will stop the upgrade (Yes, No) yes
          Waiting for the completion of 1 running tasks during the next 20 seconds.
          Press Ctrl+C to interrupt. 
          Waiting for the completion of 1 running tasks during the next 20 seconds.
          Press Ctrl+C to interrupt. 
[ INFO  ] Checking the Engine database consistency
[ INFO  ] Stage: Transaction setup
...
...
[ INFO  ] Execution of setup completed successfully

Comment 7 Petr Kubica 2015-04-07 11:08:04 UTC
I found an issue with upgrading from latest_av:

          Please confirm installation settings (OK, Cancel) [OK]: 
[ INFO  ] Cleaning async tasks and compensations
          The following system tasks have been found running in the system:
          Task ID:           aa197e14-a2ec-476e-9930-94ddb64a1a27
          Task Name:         AddVmTemplateCommand          
          Task Description:  Adding a template             
          Started at:        30
          DC Name:           Default                       
          Task ID:           70bc0a87-8faf-4fbe-ad84-b348baf39ee6
          Task Name:         AddVmTemplateCommand          
          Task Description:  Adding a template             
          Started at:        30
          DC Name:           Default                       
[ ERROR ] Failed to execute stage 'Setup validation': 
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20150407124637-s1qm17.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20150407124658-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

Setup failed after confirm installation settings
I used these steps:
1. Install latest_av
2. Start creating a template.
3. Run engine-setup to upgrade to 3.5.1 (vt14.2).

2015-04-07 12:46:58 DEBUG otopi.context context._executeMethod:152 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/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 454, in _validateAsyncTasks
    compensations,
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/asynctasks.py", line 305, in _askUserToWaitForTasks
    commands='\n'.join(runningCommands),
TypeError
2015-04-07 12:46:58 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Setup validation'

attached logs

I tested vt13.11 too and there isn't any issue

Comment 8 Petr Kubica 2015-04-07 11:08:34 UTC
Created attachment 1011693 [details]
engine-logs

Comment 9 Petr Kubica 2015-04-14 15:09:01 UTC
When I tested upgrading from latest_av >> vt14.3
I tried to interrupt (with ctrl + c) waiting for task completion. Execution of setup failed as I expected but after that, rhevm webadmin was turned into ovirt webadmin (It looks like oVirt)

I suppose it's not the expected behavior. I noticed that the turning of webadmin theme happens before executing the configuration preview.

--additional info--
Attached screenshot

Comment 10 Petr Kubica 2015-04-14 15:11:07 UTC
Created attachment 1014383 [details]
screenshot

Comment 11 Sandro Bonazzola 2015-04-14 15:18:12 UTC
(In reply to Petr Kubica from comment #9)
> When I tested upgrading from latest_av >> vt14.3
> I tried to interrupt (with ctrl + c) waiting for task completion. Execution
> of setup failed as I expected but after that, rhevm webadmin was turned into
> ovirt webadmin (It looks like oVirt)
> 
> I suppose it's not the expected behavior. I noticed that the turning of
> webadmin theme happens before executing the configuration preview.
> 
> --additional info--
> Attached screenshot

Please track this issue in a separate bug. I guess that the rhevm-branding got upgraded from 3.4 to 3.5 and not rolled back when interrupting the setup.

Comment 12 Petr Kubica 2015-04-15 09:00:28 UTC
Verified in rhevm 3.5.1-0.4.el6ev (vt14.3)

Comment 13 errata-xmlrpc 2015-04-28 18:49:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0888.html