Bug 1318986

Summary: [SETUP] engine-setup fails if the user install engine rpms but he wants to configure just other product options
Product: [oVirt] ovirt-engine Reporter: Simone Tiraboschi <stirabos>
Component: Setup.EngineAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kubica <pkubica>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.4CC: bkorren, bmcclain, bugs, lsvaty, sbonazzo, ylavi
Target Milestone: ovirt-4.0.2Keywords: ZStream
Target Release: 4.0.2.1Flags: rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rule-engine: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
engine-setup was failing if the user installed engine rpms but he wanted to configure just other product options. Fixing it.
Story Points: ---
Clone Of:
: 1359832 (view as bug list) Environment:
Last Closed: 2016-08-12 14:25:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Simone Tiraboschi 2016-03-18 10:31:26 UTC
Description of problem:
engine-setup fails if the user install engine rpms but he wants to configure just other product options and so he respond no to:

          Configure Engine on this host (Yes, No) [Yes]: no

And yes to another product option (DWH, reports, websocketproxy)

Running
   yum remove ovirt-engine-setup-plugin-ovirt-engine
Before trying again is enough to avoid it.

Version-Release number of selected component (if applicable):
3.6.4

How reproducible:
100%

Steps to Reproduce:
1. Install engine rpms
2. Respond no to 'Configure Engine on this host' and yes to for another product option
3.

Actual results:
engine setup fails with:
    [ INFO  ] Stage: Package installation
    [ INFO  ] Stage: Misc configuration
    [ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'execute'

Expected results:
engine-setup completes successfully configuring just the selected product options.

Additional info:
It happens only if the user installed also engine rpms on the additional host where he wants to avoid engine setup.
Removing ovirt-engine-setup-plugin-ovirt-engine rpm is enough to avoid it.

Comment 1 Sandro Bonazzola 2016-03-18 11:06:26 UTC
Probably related to bug #1295212 as well

Comment 2 Mike McCune 2016-03-28 23:37:25 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 3 Simone Tiraboschi 2016-04-29 16:01:37 UTC
*** Bug 1295212 has been marked as a duplicate of this bug. ***

Comment 4 Karolína Hajná 2016-05-04 11:30:07 UTC
This bug still occurs in rhevm-3.6.6-0.1.el6.noarch (build 3.6.6-1).

Comment 5 Yaniv Kaul 2016-05-04 18:23:34 UTC
Moving to 3.6.7.

Comment 7 Simone Tiraboschi 2016-07-21 12:21:04 UTC
Unable to reproduce again with ovirt-engine-setup-plugin-ovirt-engine.noarch 4.0.1.1-1.el7.centos           @ovirt-4.0

Comment 8 Petr Kubica 2016-07-25 12:34:47 UTC
Still failing in rhevm 4.0.2-1

[ INFO  ] Configuring PostgreSQL
[ INFO  ] Creating/refreshing DWH database schema
[ ERROR ] Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'execute'
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Rolling back DWH database schema

- Installing engine without DWH works
- Installing only DWH (after engine-setup of engine) on separate machine doesn't work

in log:
2016-07-25 12:15:04 DEBUG otopi.context context.dumpEnvironment:774 ENVIRONMENT DUMP - END
2016-07-25 12:15:04 DEBUG otopi.context context._executeMethod:128 Stage misc METHOD otopi.plugins.ovirt_engine_setup.rhevm_setup_plugins.distro-rhel.config.Plugin._network
2016-07-25 12:15:04 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/rhevm-setup-plugins/distro-rhel/config.py", line 170, in _network
    'version': '3.1',
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line 117, in updateVdcOptions
    res = self._statement.execute(
AttributeError: 'NoneType' object has no attribute 'execute'
2016-07-25 12:15:04 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Misc configuration': 'NoneType' object has no attribute 'execute'

Comment 9 Red Hat Bugzilla Rules Engine 2016-07-25 12:34:52 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 10 Simone Tiraboschi 2016-07-25 12:46:02 UTC
(In reply to Petr Kubica from comment #8)
> - Installing engine without DWH works
> - Installing only DWH (after engine-setup of engine) on separate machine
> doesn't work

Can you please provide the list of rhev related rpms on the failing hosts? 

> in log:
> 2016-07-25 12:15:04 DEBUG otopi.context context.dumpEnvironment:774
> ENVIRONMENT DUMP - END
> 2016-07-25 12:15:04 DEBUG otopi.context context._executeMethod:128 Stage
> misc METHOD
> otopi.plugins.ovirt_engine_setup.rhevm_setup_plugins.distro-rhel.config.
> Plugin._network
> 2016-07-25 12:15:04 DEBUG otopi.context context._executeMethod:142 method
> exception
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in
> _executeMethod
>     method['method']()
>   File
> "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/rhevm-setup-
> plugins/distro-rhel/config.py", line 170, in _network
>     'version': '3.1',
>   File
> "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line
> 117, in updateVdcOptions
>     res = self._statement.execute(
> AttributeError: 'NoneType' object has no attribute 'execute'
> 2016-07-25 12:15:04 ERROR otopi.context context._executeMethod:151 Failed to
> execute stage 'Misc configuration': 'NoneType' object has no attribute
> 'execute'

Comment 11 Simone Tiraboschi 2016-07-25 14:06:33 UTC
Ok, we have an issue with the downstream plugin.
Cloning the bug there.

Comment 12 Petr Kubica 2016-07-26 06:22:18 UTC
ovirt-engine-sdk-python-3.6.7.0-1.el7ev.noarch
ovirt-engine-extensions-api-impl-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-websocket-proxy-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.0.2-0.1.rc.el7ev.noarch
ovirt-host-deploy-1.5.1-1.el7ev.noarch
ovirt-log-collector-4.0.0-1.el7ev.noarch
ovirt-engine-cli-3.6.7.0-1.el7ev.noarch
ovirt-engine-dwh-4.0.1-1.el7ev.noarch
ovirt-engine-tools-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-webadmin-portal-4.0.2-0.1.rc.el7ev.noarch
ovirt-image-uploader-4.0.0-1.el7ev.noarch
ovirt-engine-setup-base-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-dwh-setup-4.0.1-1.el7ev.noarch
ovirt-vmconsole-1.0.4-1.el7ev.noarch
ovirt-engine-userportal-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-setup-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-restapi-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-4.0.2-0.1.rc.el7ev.noarch
ovirt-setup-lib-1.0.2-1.el7ev.noarch
ovirt-iso-uploader-4.0.0-1.el7ev.noarch
ovirt-host-deploy-java-1.5.1-1.el7ev.noarch
ovirt-engine-setup-plugin-websocket-proxy-4.0.2-0.1.rc.el7ev.noarch
ovirt-vmconsole-proxy-1.0.4-1.el7ev.noarch
ovirt-engine-vmconsole-proxy-helper-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-setup-plugin-ovirt-engine-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-dbscripts-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-lib-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-setup-plugin-ovirt-engine-common-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-backend-4.0.2-0.1.rc.el7ev.noarch
ovirt-engine-dashboard-1.0.1-0.el7ev.x86_64
ovirt-engine-extension-aaa-jdbc-1.1.0-1.el7ev.noarch
ovirt-engine-tools-backup-4.0.2-0.1.rc.el7ev.noarch
python-ovirt-engine-sdk4-4.0.0-0.5.a5.el7ev.x86_64
otopi-1.5.1-3.el7ev.noarch

Comment 13 Petr Kubica 2016-08-11 13:29:31 UTC
Verified in 4.0.2-5
ovirt-engine-setup-base-4.0.2.3-0.1.el7ev.noarch
ovirt-engine-setup-plugin-ovirt-engine-4.0.2.3-0.1.el7ev.noarch
ovirt-engine-setup-4.0.2.3-0.1.el7ev.noarch