<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 2, 2016 at 9:58 AM, Simone Tiraboschi wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><br>
<br>
</div></div>hosted-engine-setup creates a fresh VM and inject a cloud-init script<br>
to configure it and execute there engine-setup to configure the engine<br>
as needed.<br>
Since engine-setup is running on the engine VM triggered by<br>
cloud-init, hosted-engine-setup has no way to really control its<br>
process status so we simply gather its output with a timeout of 10<br>
minutes between each single output line.<br>
In nothing happens within 10 minutes (the value is easily<br>
customizable), hosted-engine-setup thinks that engine-setup is stuck.<br></blockquote><div><br></div><div><br></div><div>How can one customize the pre-set timeout? </div><div>Could it be better to ask the user at the end of timeout if he/she wants to wait again, instead of directly fail?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
So the issue we have to understood is why this simple command took<br>
more than 10 minutes in your env:<br>
<span class="">2016-04-30 17:56:57 DEBUG<br>
otopi.plugins.ovirt_engine_setup.ovirt_engine.config.aaajdbc<br>
plugin.executeRaw:828 execute: (&#39;/usr/bin/ovirt-aaa-jdbc-tool&#39;,<br>
&#39;--db-config=/etc/ovirt-engine/aaa/internal.properties&#39;, &#39;user&#39;,<br>
&#39;password-reset&#39;, &#39;admin&#39;, &#39;--password=env:pass&#39;, &#39;--force&#39;,<br>
&#39;--password-valid-to=2216-03-13 17:56:57Z&#39;), executable=&#39;None&#39;,<br>
cwd=&#39;None&#39;, env={&#39;LANG&#39;: &#39;en_US.UTF-8&#39;, &#39;SHLVL&#39;: &#39;1&#39;, &#39;PYTHONPATH&#39;:<br>
&#39;/usr/share/ovirt-engine/setup/bin/..::&#39;, &#39;pass&#39;: &#39;**FILTERED**&#39;,<br>
&#39;OVIRT_ENGINE_JAVA_HOME_FORCE&#39;: &#39;1&#39;, &#39;PWD&#39;: &#39;/&#39;,<br>
&#39;OVIRT_ENGINE_JAVA_HOME&#39;: u&#39;/usr/lib/jvm/jre&#39;, &#39;PATH&#39;:<br>
&#39;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin&#39;, &#39;OTOPI_LOGFILE&#39;:<br>
&#39;/var/log/ovirt-engine/setup/ovirt-engine-setup-20160430175551-dttt2p.log&#39;,<br>
&#39;OVIRT_JBOSS_HOME&#39;: &#39;/usr/share/ovirt-engine-wildfly&#39;,<br>
&#39;OTOPI_EXECDIR&#39;: &#39;/&#39;}<br></span></blockquote><div><br></div><div><br></div><div><br></div><div>It seemed quite strange to me too (see below further info on this) </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">
<br>
</span>Can you please check the entropy value on your host?<br>
 cat /proc/sys/kernel/random/entropy_avail<br>
<span class=""><br></span></blockquote><div><br></div><div>I have not at hand now the server. I&#39;ll check soon and report</div><div>Do you mean entropy of the physical server that will operate as hypervisor?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">
&gt; As a last question how to clean up things in case I have to start from<br>
&gt; scratch.<br>
<br>
</span>I&#39;d recommend to redeploy from scratch instead of trying fixing it<br>
but, before that, we need to understand the root issue.<br>
<span class=""><br></span></blockquote><div><br></div><div>So, trying restart the setup with generated answer file I got:</div><div>1) if VM still powered on, an error about this condition</div><div>2) if VM powered down, an error abut storage domain already in place and restart not supported in this condition.</div><div><br></div><div>I was able to continue with these steps:</div><div><br></div><div>a) remove what inside the partially setup self hosted engine storage domain</div><div>rm -rf /SHE_DOMAIN/* <br></div><div>cd SHE_DOMAIN</div><div>mklost+found<br></div><div><br></div><div>b) reboot the hypervisor</div><div><br></div><div>c) stop vdsmd</div><div><br></div><div>d) start the setup again with the answer file </div><div>It seems all went well and this time strangely the step that took more than 10 minutes before lasted less than 2 seconds....</div><div><br></div><div>I was then able to deploy storage and iso domains without problems and self hosted engine domain correctly detected and imported too.</div><div>Created two CentOS VMs without problems (6.7 and 7.2).</div><div><br></div><div>See below the full output of deploy command</div><div><br></div><div><br></div><div><div>[root@ovirt01 ~]# hosted-engine --deploy --config-append=/var/lib/ovirt-hosted-engine-setup/answers/answers-20160430200654.conf </div><div>[ INFO  ] Stage: Initializing</div><div>[ INFO  ] Generating a temporary VNC password.</div><div>[ INFO  ] Stage: Environment setup</div><div>          Configuration files: [&#39;/var/lib/ovirt-hosted-engine-setup/answers/answers-20160430200654.conf&#39;]</div><div>          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160501014326-8frbxk.log</div><div>          Version: otopi-1.4.1 (otopi-1.4.1-1.el7.centos)</div><div>[ INFO  ] Hardware supports virtualization</div><div>[ INFO  ] Bridge ovirtmgmt already created</div><div>[ INFO  ] Stage: Environment packages setup</div><div>[ INFO  ] Stage: Programs detection</div><div>[ INFO  ] Stage: Environment setup</div><div>[ INFO  ] Stage: Environment customization</div><div>         </div><div>          --== STORAGE CONFIGURATION ==--</div><div>         </div><div>          During customization use CTRL-D to abort.</div><div>[ INFO  ] Installing on first host</div><div>         </div><div>          --== SYSTEM CONFIGURATION ==--</div><div>         </div><div>         </div><div>          --== NETWORK CONFIGURATION ==--</div><div>         </div><div>         </div><div>          --== VM CONFIGURATION ==--</div><div>         </div><div>[ INFO  ] Checking OVF archive content (could take a few minutes depending on archive size)</div><div>[ INFO  ] Checking OVF XML content (could take a few minutes depending on archive size)</div><div>[WARNING] OVF does not contain a valid image description, using default.</div><div>          Enter root password that will be used for the engine appliance (leave it empty to skip): </div><div>          Confirm appliance root password: </div><div>[ INFO  ] The engine VM will be configured to use <a href="http://192.168.1.212/24">192.168.1.212/24</a></div><div>          The following CPU types are supported by this host:</div><div>          <span class="" style="white-space:pre">        </span> - model_Broadwell-noTSX: Intel Broadwell-noTSX Family</div><div>          <span class="" style="white-space:pre">        </span> - model_Haswell-noTSX: Intel Haswell-noTSX Family</div><div>          <span class="" style="white-space:pre">        </span> - model_SandyBridge: Intel SandyBridge Family</div><div>          <span class="" style="white-space:pre">        </span> - model_Westmere: Intel Westmere Family</div><div>          <span class="" style="white-space:pre">        </span> - model_Nehalem: Intel Nehalem Family</div><div>          <span class="" style="white-space:pre">        </span> - model_Penryn: Intel Penryn Family</div><div>          <span class="" style="white-space:pre">        </span> - model_Conroe: Intel Conroe Family</div><div>[WARNING] Minimum requirements for CPUs not met</div><div>[WARNING] Minimum requirements for disk size not met</div><div>         </div><div>          --== HOSTED ENGINE CONFIGURATION ==--</div><div>         </div><div>          Enter the name which will be used to identify this host inside the Administrator Portal [hosted_engine_1]: </div><div>          Enter &#39;admin@internal&#39; user password that will be used for accessing the Administrator Portal: </div><div>          Confirm &#39;admin@internal&#39; user password: </div><div>[ INFO  ] Stage: Setup validation</div><div>         </div><div>          --== CONFIGURATION PREVIEW ==--</div><div>         </div><div>          Bridge interface                   : eth0</div><div>          Engine FQDN                        : <a href="http://ovirt.lutwyn.org">ovirt.lutwyn.org</a></div><div>          Bridge name                        : ovirtmgmt</div><div>          Host address                       : <a href="http://ovirt01.lutwyn.org">ovirt01.lutwyn.org</a></div><div>          SSH daemon port                    : 22</div><div>          Firewall manager                   : iptables</div><div>          Gateway address                    : 192.168.1.1</div><div>          Host name for web application      : hosted_engine_1</div><div>          Host ID                            : 1</div><div>          Image size GB                      : 10</div><div>          GlusterFS Share Name               : hosted_engine_glusterfs</div><div>          GlusterFS Brick Provisioning       : False</div><div>          Storage connection                 : ovirt01.lutwyn.org:/SHE_DOMAIN</div><div>          Console type                       : vnc</div><div>          Memory size MB                     : 8192</div><div>          MAC address                        : 00:16:3e:2e:93:15</div><div>          Boot type                          : disk</div><div>          Number of CPUs                     : 1</div><div>          OVF archive (for disk boot)        : /usr/share/ovirt-engine-appliance/ovirt-engine-appliance-3.6-20160420.1.el7.centos.ova</div><div>          Restart engine VM after engine-setup: True</div><div>          CPU Type                           : model_Broadwell-noTSX</div><div>[ INFO  ] Stage: Transaction setup</div><div>[ INFO  ] Stage: Misc configuration</div><div>[ INFO  ] Stage: Package installation</div><div>[ INFO  ] Stage: Misc configuration</div><div>[ INFO  ] Configuring libvirt</div><div>[ INFO  ] Configuring VDSM</div><div>[ INFO  ] Starting vdsmd</div><div>[ INFO  ] Waiting for VDSM hardware info</div><div>[ INFO  ] Creating Storage Domain</div><div>[ INFO  ] Creating Storage Pool</div><div>[ INFO  ] Connecting Storage Pool</div><div>[ INFO  ] Verifying sanlock lockspace initialization</div><div>[ INFO  ] Creating Image for &#39;hosted-engine.lockspace&#39; ...</div><div>[ INFO  ] Image for &#39;hosted-engine.lockspace&#39; created successfully</div><div>[ INFO  ] Creating Image for &#39;hosted-engine.metadata&#39; ...</div><div>[ INFO  ] Image for &#39;hosted-engine.metadata&#39; created successfully</div><div>[ INFO  ] Creating VM Image</div><div>[ INFO  ] Extracting disk image from OVF archive (could take a few minutes depending on archive size)</div><div>[ INFO  ] Validating pre-allocated volume size</div><div>[ INFO  ] Uploading volume to data domain (could take a few minutes depending on archive size)</div><div>[ INFO  ] Image successfully imported from OVF</div><div>[ INFO  ] Destroying Storage Pool</div><div>[ INFO  ] Start monitoring domain</div><div>[ INFO  ] Configuring VM</div><div>[ INFO  ] Updating hosted-engine configuration</div><div>[ INFO  ] Stage: Transaction commit</div><div>[ INFO  ] Stage: Closing up</div><div>[ INFO  ] Creating VM</div><div>          You can now connect to the VM with the following command:</div><div>          <span class="" style="white-space:pre">        </span>/bin/remote-viewer vnc://localhost:5900</div><div>          Use temporary password &quot;4699ouyH&quot; to connect to vnc console.</div><div>          Please note that in order to use remote-viewer you need to be able to run graphical applications.</div><div>          This means that if you are using ssh you have to supply the -Y flag (enables trusted X11 forwarding).</div><div>          Otherwise you can run the command from a terminal in your preferred desktop environment.</div><div>          If you cannot run graphical applications you can connect to the graphic console from another host or connect to the serial console using the following command:</div><div>          socat UNIX-CONNECT:/var/run/ovirt-vmconsole-console/4dae6016-ff01-4a1f-87ea-09f049d0e58c.sock,user=ovirt-vmconsole STDIO,raw,echo=0,escape=1</div><div>          Please ensure that your Guest OS is properly configured to support serial console according to your distro documentation.</div><div>          Follow <a href="http://www.ovirt.org/Serial_Console_Setup#I_need_to_access_the_console_the_old_way">http://www.ovirt.org/Serial_Console_Setup#I_need_to_access_the_console_the_old_way</a> for more info.</div><div>          If you need to reboot the VM you will need to start it manually using the command:</div><div>          hosted-engine --vm-start</div><div>          You can then set a temporary password using the command:</div><div>          hosted-engine --add-console-password</div><div>[ INFO  ] Running engine-setup on the appliance</div><div>          |- [ INFO  ] Stage: Initializing</div><div>          |- [ INFO  ] Stage: Environment setup</div><div>          |-           Configuration files: [&#39;/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf&#39;, &#39;/etc/ovirt-engine-setup.conf.d/10-packaging.conf&#39;, &#39;/root/ovirt-engine-answers&#39;, &#39;/root/heanswers.conf&#39;]</div><div>          |-           Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160430234733-h0rns4.log</div><div>          |-           Version: otopi-1.4.1 (otopi-1.4.1-1.el7.centos)</div><div>          |- [ INFO  ] Stage: Environment packages setup</div><div>          |- [ INFO  ] Stage: Programs detection</div><div>          |- [ INFO  ] Stage: Environment setup</div><div>          |- [ INFO  ] Stage: Environment customization</div><div>          |-          </div><div>          |-           --== PRODUCT OPTIONS ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== PACKAGES ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== ALL IN ONE CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== NETWORK CONFIGURATION ==--</div><div>          |-          </div><div>          |- [ INFO  ] firewalld will be configured as firewall manager.</div><div>          |-          </div><div>          |-           --== DATABASE CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== OVIRT ENGINE CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== STORAGE CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== PKI CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== APACHE CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== SYSTEM CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== MISC CONFIGURATION ==--</div><div>          |-          </div><div>          |-          </div><div>          |-           --== END OF CONFIGURATION ==--</div><div>          |-          </div><div>          |- [ INFO  ] Stage: Setup validation</div><div>          |- [WARNING] Cannot validate host name settings, reason: resolved host does not match any of the local addresses</div><div>          |- [WARNING] Less than 16384MB of memory is available</div><div>          |-          </div><div>          |-           --== CONFIGURATION PREVIEW ==--</div><div>          |-          </div><div>          |-           Application mode                        : virt</div><div>          |-           Default SAN wipe after delete           : False</div><div>          |-           Firewall manager                        : firewalld</div><div>          |-           Update Firewall                         : True</div><div>          |-           Host FQDN                               : <a href="http://ovirt.lutwyn.org">ovirt.lutwyn.org</a></div><div>          |-           Engine database secured connection      : False</div><div>          |-           Engine database host                    : localhost</div><div>          |-           Engine database user name               : engine</div><div>          |-           Engine database name                    : engine</div><div>          |-           Engine database port                    : 5432</div><div>          |-           Engine database host name validation    : False</div><div>          |-           Engine installation                     : True</div><div>          |-           PKI organization                        : <a href="http://lutwyn.org">lutwyn.org</a></div><div>          |-           Configure local Engine database         : True</div><div>          |-           Set application as default page         : True</div><div>          |-           Configure Apache SSL                    : True</div><div>          |-           Configure VMConsole Proxy               : True</div><div>          |-           Engine Host FQDN                        : <a href="http://ovirt.lutwyn.org">ovirt.lutwyn.org</a></div><div>          |-           Configure WebSocket Proxy               : True</div><div>          |- [ INFO  ] Stage: Transaction setup</div><div>          |- [ INFO  ] Stopping engine service</div><div>          |- [ INFO  ] Stopping ovirt-fence-kdump-listener service</div><div>          |- [ INFO  ] Stopping websocket-proxy service</div><div>          |- [ INFO  ] Stage: Misc configuration</div><div>          |- [ INFO  ] Stage: Package installation</div><div>          |- [ INFO  ] Stage: Misc configuration</div><div>          |- [ INFO  ] Initializing PostgreSQL</div><div>          |- [ INFO  ] Creating PostgreSQL &#39;engine&#39; database</div><div>          |- [ INFO  ] Configuring PostgreSQL</div><div>          |- [ INFO  ] Creating/refreshing Engine database schema</div><div>          |- [ INFO  ] Creating/refreshing Engine &#39;internal&#39; domain database schema</div><div>          |- [ INFO  ] Upgrading CA</div><div>          |- [ INFO  ] Creating CA</div><div>          |- [ INFO  ] Setting up ovirt-vmconsole proxy helper PKI artifacts</div><div>          |- [ INFO  ] Setting up ovirt-vmconsole SSH PKI artifacts</div><div>          |- [ INFO  ] Configuring WebSocket Proxy</div><div>          |- [ INFO  ] Generating post install configuration file &#39;/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf&#39;</div><div>          |- [ INFO  ] Stage: Transaction commit</div><div>          |- [ INFO  ] Stage: Closing up</div><div>          |-          </div><div>          |-           --== SUMMARY ==--</div><div>          |-          </div><div>          |- [WARNING] Less than 16384MB of memory is available</div><div>          |-           SSH fingerprint: 13:dc:47:b9:38:66:15:eb:83:e8:ed:6f:71:cb:d4:ea</div><div>          |-           Internal CA D8:4B:4C:74:45:EB:87:C4:8F:FE:DE:02:DF:99:5E:CB:AA:1B:D84</div><div>          |-           Note! If you want to gather statistical information you can install Reports and/or DWH:</div><div>          |-               <a href="http://www.ovirt.org/Ovirt_DWH">http://www.ovirt.org/Ovirt_DWH</a></div><div>          |-               <a href="http://www.ovirt.org/Ovirt_Reports">http://www.ovirt.org/Ovirt_Reports</a></div><div>          |-           Web access is enabled at:</div><div>          |-               <a href="http://ovirt.lutwyn.org:80/ovirt-engine">http://ovirt.lutwyn.org:80/ovirt-engine</a></div><div>          |-               <a href="https://ovirt.lutwyn.org:443/ovirt-engine">https://ovirt.lutwyn.org:443/ovirt-engine</a></div><div>          |-           Please use the user &#39;admin@internal&#39; and password specified in order to login</div><div>          |-          </div><div>          |-           --== END OF SUMMARY ==--</div><div>          |-          </div><div>          |- [ INFO  ] Starting engine service</div><div>          |- [ INFO  ] Restarting httpd</div><div>          |- [ INFO  ] Restarting ovirt-vmconsole proxy service</div><div>          |- [ INFO  ] Stage: Clean up</div><div>          |-           Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160430234733-h0rns4.log</div><div>          |- [ INFO  ] Generating answer file &#39;/var/lib/ovirt-engine/setup/answers/20160430234907-setup.conf&#39;</div><div>          |- [ INFO  ] Stage: Pre-termination</div><div>          |- [ INFO  ] Stage: Termination</div><div>          |- [ INFO  ] Execution of setup completed successfully</div><div>          |- HE_APPLIANCE_ENGINE_SETUP_SUCCESS</div><div>[ INFO  ] Engine-setup successfully completed </div><div>[ INFO  ] Engine is still unreachable</div><div>[ INFO  ] Engine is still not reachable, waiting...</div><div>[ INFO  ] Engine is still unreachable</div><div>[ INFO  ] Engine is still not reachable, waiting...</div><div>[ INFO  ] Engine replied: DB Up!Welcome to Health Status!</div><div>[ INFO  ] Acquiring internal CA cert from the engine</div><div>[ INFO  ] The following CA certificate is going to be used, please immediately interrupt if not correct:</div><div>[ INFO  ] Issuer: C=US, O=<a href="http://lutwyn.org">lutwyn.org</a>, CN=ovirt.lutwyn.org.36587, Subject: C=US, O=<a href="http://lutwyn.org">lutwyn.org</a>, CN=ovirt.lutwyn.org.36587, Fingerprint (SHA-1): D84B4C7445EB87C48FFEDE02DF995ECBAA1BD84</div><div>[ INFO  ] Connecting to the Engine</div><div>[ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes...</div><div>[ INFO  ] The VDSM Host is now operational</div><div>[ INFO  ] Saving hosted-engine configuration on the shared storage domain</div><div>[ INFO  ] Shutting down the engine VM</div><div>[ INFO  ] Enabling and starting HA services</div><div>[ INFO  ] Stage: Clean up</div><div>[ INFO  ] Generating answer file &#39;/var/lib/ovirt-hosted-engine-setup/answers/answers-20160501015145.conf&#39;</div><div>[ INFO  ] Generating answer file &#39;/etc/ovirt-hosted-engine/answers.conf&#39;</div><div>[ INFO  ] Stage: Pre-termination</div><div>[ INFO  ] Stage: Termination</div><div>[ INFO  ] Hosted Engine successfully set up</div><div>[root@ovirt01 ~]# </div></div><div><br></div></div></div></div>