Bug 1318881

Summary: [docs][Hosted-engine] NetworkManager service should be disabled before running hosted-engine setup
Product: Red Hat Enterprise Virtualization Manager Reporter: Marina Kalinin <mkalinin>
Component: DocumentationAssignee: rhev-docs <rhev-docs>
Status: CLOSED WONTFIX QA Contact: rhev-docs <rhev-docs>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.3CC: gklein, lsurette, rbalakri, stirabos, yeylon, ykaul, ylavi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-23 15:53:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
hosted-engine-setup log none

Description Marina Kalinin 2016-03-18 03:10:32 UTC
Description of problem:
Hosted-engine setup fails if NetworkManager is running and exits without clear message.
The message presented to the user is :
~~~
[ ERROR ] Hosted Engine deployment failed: this system is not reliable, please check the issue, fix and redeploy
~~~

Going into installation logs, can find the following:
~~~
2016-03-17 23:47:01 DEBUG otopi.plugins.ovirt_hosted_engine_setup.network.bridge bridge._check_NM:92 NetworkManager: True
2016-03-17 23:47:01 DEBUG otopi.context context._executeMethod:156 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 146, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/network/bridge.py", line 96, in _check_NM
    'hosted-engine cannot be deployed while NetworkManager is '
RuntimeError: hosted-engine cannot be deployed while NetworkManager is running, please stop and disable it before proceeding
2016-03-17 23:47:01 ERROR otopi.context context._executeMethod:165 Failed to execute stage 'Programs detection': hosted-engine cannot be deployed while NetworkManager is running, please stop and disable it before proceeding
~~~

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.3.3.4-1.el7ev.noarch


How reproducible:
100% on this host

Steps to Reproduce:
1. Install RHEL 7 x64 on a host.
2. Configure following the instructions on here:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Self-Hosted_Engine_Guide/Configuring_the_Self-Hosted_Engine.html 
3. Run :
# hosted-engine --deploy

Actual results:
Setup fails right away.

Expected results:
Setup should continue.
Or,
documentation should say need to reconfigure the box not to use Network Manager.

Additional info:
Logs are coming.

Comment 1 Marina Kalinin 2016-03-18 03:12:31 UTC
Created attachment 1137650 [details]
hosted-engine-setup log

Comment 2 Marina Kalinin 2016-03-18 03:14:31 UTC
Sorry, it actually prints to the screen this message as well:
~~~
[ ERROR ] Failed to execute stage 'Programs detection': hosted-engine cannot be deployed while NetworkManager is running, please stop and disable it before proceeding
~~~

The only problem when you run hosted-engine using `screen`, it closes the screen right away, so it is not obvious that this was printed out.


Documentation does not say a word about NetworkManager.

Comment 3 Marina Kalinin 2016-03-18 03:20:58 UTC
Probably this should be a documentation bug.
Changing it.

Comment 4 Marina Kalinin 2016-03-18 03:28:32 UTC
If it is a prerequisite for hosted-engine, we should specify this in the installation guide. The NetworkManager needs to be disabled.

Comment 5 Yaniv Lavi 2016-03-22 12:27:34 UTC
Should the setup disable the service? Or the VDSM should do that?

Comment 6 Simone Tiraboschi 2016-03-22 12:54:32 UTC
Currently host-deploy will stop and disable it for sure but in order to run host-deploy we already need a running engine.

The issue was that the user in the past could start hosted-engine-setup with NetworkManager running and it will be stopped only by host-deploy in the middle if the deployment while the engine VM is already running with the management bridge and this could lead to network connectivity loss for the engine VM.

Now we are simply asking to the user to stop and disable NetworkManager
~~~
[ ERROR ] Failed to execute stage 'Programs detection': hosted-engine cannot be deployed while NetworkManager is running, please stop and disable it before proceeding
~~~
before running hosted-engine-setup as a prerequisite.

Comment 7 Yaniv Lavi 2016-03-23 14:20:13 UTC
At this point we already have a VM right? 
So it will require a clean up. 
Can we do this test in the setup in a earlier stage of the setup?

Comment 8 Simone Tiraboschi 2016-03-23 14:57:42 UTC
(In reply to Yaniv Dary from comment #7)
> At this point we already have a VM right? 
> So it will require a clean up. 
> Can we do this test in the setup in a earlier stage of the setup?

The check is already at STAGE_PROGRAMS so basically also before the first question.

Comment 9 Yaniv Lavi 2016-03-23 15:02:31 UTC
So why did Marina not get this error then?

Comment 10 Simone Tiraboschi 2016-03-23 15:45:55 UTC
(In reply to Yaniv Dary from comment #9)
> So why did Marina not get this error then?

She got:
https://bugzilla.redhat.com/show_bug.cgi?id=1318881#c2

what looks strange is this:

'The only problem when you run hosted-engine using `screen`, it closes the screen right away, so it is not obvious that this was printed out.'

Comment 11 Yaniv Lavi 2016-03-23 15:53:40 UTC
Since the setup clearly states what to do and I think we should not make the list of prerequisites in install guide too extensive, I'm closing this won't fix. If a customer complains we will re-consider.