Bug 1033258

Summary: Validation of rhevm-setup fails on No such file or directory error
Product: Red Hat Enterprise Virtualization Manager Reporter: Lukas Svaty <lsvaty>
Component: ovirt-engine-setupAssignee: Alex Lourie <alourie>
Status: CLOSED NOTABUG QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.3.0CC: acathrow, alonbl, alourie, bazulay, didi, iheim, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-25 08:58:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lukas Svaty 2013-11-21 19:15:42 UTC
Description of problem:
rhevm-setup fails on OSError: [Errno 2] No such file or directory error
tried clean installation of rhevm

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

How reproducible:
100%4

Steps to Reproduce:
1. have working setup
2. rhevm-cleanup
3. yum remove rhevm ovirt-engine-jbossas jbos*
4. rm -rf /etc/ovirt-engine
5. rm -rf /usr/share/ovirt-engine
6. rm -rf /usr/share/jboss-*
7. rm -rf /var/log/ovirt-engine
8. rm -rf /usr/share/jbossas/modules/org/postgresql
9. rm -rf /etc/pki/ovirt-engine
10. yum install rhevm
11. rhevm-setup


Actual results:
Validation fail on no such file directory (see additional info)
rhevm-setup should create all the necessary files, folders

Expected results:
Should succeed. 

Additional info:
2013-11-21 19:57:08 DEBUG otopi.context context._executeMethod:123 Stage validation METHOD otopi.plugins.ovirt_engine_setup.apache.ssl.Plugin._validate_ssl
2013-11-21 19:57:08 DEBUG otopi.context context._executeMethod:123 Stage validation METHOD otopi.plugins.ovirt_engine_setup.config.java.Plugin._validation
2013-11-21 19:57:08 DEBUG otopi.context context._executeMethod:137 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 127, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/java.py", line 61, in _validation
    ] = java.Java().getJavaHome()
  File "/usr/lib/python2.6/site-packages/ovirt_engine/java.py", line 44, in getJavaHome
    close_fds=True,
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2013-11-21 19:57:08 ERROR otopi.context context._executeMethod:146 Failed to execute stage 'Setup validation': [Errno 2] No such file or directory
2013-11-21 19:57:08 DEBUG otopi.context context.dumpEnvironment:441 ENVIRONMENT DUMP - BEGIN

Comment 1 Alon Bar-Lev 2013-11-25 08:58:43 UTC
You should:

# yum remove rhevm*

and not:

# yum remove rhevm

as there are leftover installed packages that exists in system that you manually removed their files.

Please consider using VM for testing so you can take snapshots and revert to snapshot instead of performing the above magic.

I also unsure why you remove jboss files and packages.

Please reopen of persists.

Thanks.