Bug 848684 - [engine-setup] setup shouldn't fail in case it didn't succeed configuring shared ISO domain (or start NFS service)
Summary: [engine-setup] setup shouldn't fail in case it didn't succeed configuring sha...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.1.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: 3.3.0
Assignee: Yedidyah Bar David
QA Contact: sefi litmanovich
URL:
Whiteboard: integration
Depends On:
Blocks: 1019461
TreeView+ depends on / blocked
 
Reported: 2012-08-16 08:21 UTC by Haim
Modified: 2015-09-22 13:09 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-23 09:19:35 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Haim 2012-08-16 08:21:36 UTC
Description of problem:

I don't think that its fair to fail rhevm-setup if shared ISO domain configuration was not successful.

we can just alert it as [WARN] and use may configure it later.


 [root@hateya-rhevm ~]# rhevm-setup 
Welcome to RHEV Manager setup utility

In order to proceed the installer must stop the JBoss service
Would you like to stop the JBoss service? (yes|no): yes
Stopping JBoss... RHEV Manager uses httpd to proxy requests to the application server.
It looks like the httpd installed locally is being actively used.
The installer can override current configuration .
Alternatively you can use JBoss directly (on ports higher than 1024)
Do you wish to override current httpd configuration and restart the service? ['yes'| 'no']  [yes] : 
HTTP Port  [80] : 
HTTPS Port  [443] : 
Host fully qualified domain name. Note: this name should be fully resolvable  [hateya-rhevm.qa.lab.tlv.redhat.com] : 
Password for Administrator (admin@internal) :
Warning: Weak Password.
Confirm password :
Organization Name for the Certificate  [qa.lab.tlv.redhat.com] : 
The default storage type you will be using  ['NFS'| 'FC'| 'ISCSI']  [NFS] : 
Enter DB type for installation ['remote'| 'local']  [local] : 
Local database password :
Warning: Weak Password.
Confirm password :
Configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no']  [yes] : 
Local ISO domain path  [/usr/local/exports/iso] : 
Firewall ports need to be opened.
The installer can configure iptables automatically overriding the current configuration. The old configuration will be backed up.
Alternately you can configure the firewall later using an example iptables file found under /usr/share/ovirt-engine/conf/iptables.example
Configure iptables ? ['yes'| 'no']: yes

RHEV Manager will be installed using the following configuration:
=================================================================
override-httpd-config:         yes
http-port:                     80
https-port:                    443
host-fqdn:                     hateya-rhevm.qa.lab.tlv.redhat.com
auth-pass:                     ********
org-name:                      qa.lab.tlv.redhat.com
default-dc-type:               NFS
db-remote-install:             local
db-local-pass:                 ********
nfs-mp:                        /usr/local/exports/iso
config-nfs:                    yes
override-iptables:             yes
Proceed with the configuration listed above? (yes|no): yes

Installing:
Configuring RHEV Manager...                              [ DONE ]
Creating CA...                                           [ DONE ]
Editing JBoss Configuration...                           [ DONE ]
Setting Database Configuration...                        [ DONE ]
Setting Database Security...                             [ DONE ]
Creating Database...                                     [ DONE ]
Updating the Default Data Center Storage Type...         [ DONE ]
Editing RHEV Manager Configuration...                    [ DONE ]
Editing Postgresql Configuration...                      [ DONE ]
Configuring the Default ISO Domain...                 [ ERROR ]
Failed to configure NFS share on this host
Please check log file /var/log/ovirt-engine/engine-setup_2012_08_16_13_38_59.log for more information
[root@hateya-rhevm ~]# less /var/log/ovirt-engine/engine-setup_2012_08_16_13_38_59.log

logs:
012-08-16 13:41:14::DEBUG::common_utils::319::root:: output = Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS mountd: [  OK  ]
Stopping RPC idmapd: [  OK  ]
Starting RPC idmapd: [  OK  ]
Starting NFS daemon: [FAILED]

2012-08-16 13:41:14::DEBUG::common_utils::320::root:: stderr = 
2012-08-16 13:41:14::DEBUG::common_utils::321::root:: retcode = 1
2012-08-16 13:41:14::ERROR::rhevm-setup::1685::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 1683, in _startNfsServices
    srv.start(True)
  File "/usr/share/ovirt-engine/scripts/common_utils.py", line 940, in start
    raise Exception(output_messages.ERR_FAILED_START_SERVICE % self.name)
Exception: Error: Can't start the nfs service

2012-08-16 13:41:14::ERROR::rhevm-setup::1642::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 1628, in _configNfsShare
    _startNfsServices()
  File "/usr/bin/rhevm-setup", line 1686, in _startNfsServices
    raise Exception(output_messages.ERR_FAILED_TO_START_NFS_SERVICE)
Exception: Failed to start the NFS services

2012-08-16 13:41:14::DEBUG::setup_sequences::62::root:: Traceback (most recent call last):
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/bin/rhevm-setup", line 1643, in _configNfsShare
    raise Exception(output_messages.ERR_FAILED_CFG_NFS_SHARE)
Exception: Failed to configure NFS share on this host

2012-08-16 13:41:14::DEBUG::rhevm-setup::1811::root:: *** The following params were used as user input:
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: override-httpd-config: yes
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: http-port: 80
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: https-port: 443
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: mac-range: 00:1A:4A:23:61:00-00:1A:4A:23:61:FF
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: host-fqdn: hateya-rhevm.qa.lab.tlv.redhat.com
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: auth-pass: ********
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: org-name: qa.lab.tlv.redhat.com
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: default-dc-type: NFS
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: db-remote-install: local
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: db-host: localhost
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: db-local-pass: ********
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: nfs-mp: /usr/local/exports/iso
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: iso-domain-name: ISO_DOMAIN
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: config-nfs: yes
2012-08-16 13:41:14::DEBUG::rhevm-setup::1816::root:: override-iptables: yes
2012-08-16 13:41:14::ERROR::rhevm-setup::2224::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 2218, in <module>
    main(confFile)
  File "/usr/bin/rhevm-setup", line 2004, in main
    runSequences()
  File "/usr/bin/rhevm-setup", line 1950, in runSequences
    controller.runAllSequences()
  File "/usr/share/ovirt-engine/scripts/setup_controller.py", line 54, in runAllSequences
    sequence.run()
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 154, in run
    step.run()
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/bin/rhevm-setup", line 1643, in _configNfsShare
    raise Exception(output_messages.ERR_FAILED_CFG_NFS_SHARE)
Exception: Failed to configure NFS share on this host

Comment 2 Alon Bar-Lev 2013-08-28 14:18:23 UTC
(In reply to Haim from comment #0)
> Description of problem:
> 
> I don't think that its fair to fail rhevm-setup if shared ISO domain
> configuration was not successful.
> 
> we can just alert it as [WARN] and use may configure it later.

Any failure from expected result should fail setup. Worse case: run setup again with correct parameters.

Comment 5 Alon Bar-Lev 2013-08-28 14:38:04 UTC
(In reply to Yedidyah Bar David)
> I tried looking at this today. The root cause, at least in Haim's case, was
> failure of service nfs start. I did not manage to fail it whatever I did,
> except for one thing: it fails if rpcbind is not up. The code (both 3.2 and
> master) first starts rpcbind then nfs. So I guess Forrest's comment about
> "this race condition" refers to rpcbind not really finishing starting before
> nfs tries to connect to it. Not sure how to reproduce this, but we can add
> a loop of checks e.g. running 'rpcinfo -p' before starting nfs, to make sure
> rpcbind is working.

Well, in this case it is not our bug but rhel bug.
As we start a service and we expect it to be active.
I do not mind to add something that retry communicate with nfs...
I mean:

# service nfs start
# <check nfs up in loop>

but if the following fails:
# service rpmbind start
# service nfs start

then it is rhel bug, as same happens at boot.

Comment 6 Yedidyah Bar David 2013-08-29 13:30:56 UTC
(In reply to Alon Bar-Lev from comment #5)
> (In reply to Yedidyah Bar David)
> > I tried looking at this today. The root cause, at least in Haim's case, was
> > failure of service nfs start. I did not manage to fail it whatever I did,
> > except for one thing: it fails if rpcbind is not up. The code (both 3.2 and
> > master) first starts rpcbind then nfs. So I guess Forrest's comment about
> > "this race condition" refers to rpcbind not really finishing starting before
> > nfs tries to connect to it. Not sure how to reproduce this, but we can add
> > a loop of checks e.g. running 'rpcinfo -p' before starting nfs, to make sure
> > rpcbind is working.
> 
> Well, in this case it is not our bug but rhel bug.

I agree, but am not sure that this was the original problem.
If someone can reproduce, it will help.

Do remember that the setup code was completely rewritten for 3.3.

Comment 7 Ofer Schreiber 2013-09-16 07:17:44 UTC
Haim, can we reproduce this issue?
As Didi noted, this code was completely changed in 3.3

Comment 9 sefi litmanovich 2013-09-23 08:50:47 UTC
the new engine-setup is working fine on 3.3.
wasn't able to reproduce the bug.

Comment 10 Yedidyah Bar David 2013-09-23 09:19:35 UTC
Very well. I am closing this for now. Thanks.


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