Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1139020

Summary: Failed to execute stage 'Environment setup': [Errno 2] No such file or directory: '/etc/pki/vdsm/certs/cacert.pem'
Product: Red Hat Enterprise Virtualization Manager Reporter: Nikolai Sednev <nsednev>
Component: ovirt-hosted-engine-setupAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Nikolai Sednev <nsednev>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: aberezin, danken, dfediuck, didi, ecohen, gklein, iheim, jbelka, lveyde, mtayer, nsednev, oblaut, pkubica, sbonazzo, stirabos
Target Milestone: ---Keywords: Regression, Triaged
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 20:40:59 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:
Embargoed:
Bug Depends On: 1142696    
Bug Blocks: 1002454, 1059435, 1124207, 1125812, 1125909, 1250199    
Attachments:
Description Flags
answersfilefromhost none

Description Nikolai Sednev 2014-09-07 14:12:23 UTC
Created attachment 935151 [details]
answersfilefromhost

Description of problem:
[ INFO  ] Stage: Initializing
          Continuing will configure this host for serving as hypervisor and create a VM where you have to install oVirt Engine afterwards.
          Are you sure you want to continue? (Yes, No)[Yes]:
          It has been detected that this program is executed through an SSH connection without using screen.
          Continuing with the installation may lead to broken installation if the network connection fails.
          It is highly recommended to abort the installation and run it inside a screen session using command "screen".
          Do you want to continue anyway? (Yes, No)[No]: yes
[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          Configuration files: []
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20140907165759-gc5fkg.log
          Version: otopi-1.3.0_master (otopi-1.3.0-0.0.master.el6_5)
[ INFO  ] Hardware supports virtualization
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Generating VDSM certificates
[ ERROR ] Failed to execute stage 'Environment setup': [Errno 2] No such file or directory: '/etc/pki/vdsm/certs/cacert.pem'
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Answer file '/etc/ovirt-hosted-engine/answers.conf' has been updated
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination


Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.2.0-0.2.master.el6_5.noarch
vdsm-4.16.3-2.el6.x86_64
sanlock-2.8-1.el6.x86_64
libvirt-0.10.2-29.el6_5.12.x86_64
qemu-kvm-rhev-0.12.1.2-2.415.el6_5.14.x86_64
Linux version 2.6.32-431.23.3.el6.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Wed Jul 16 06:12:23 EDT 2014

How reproducible:
100%

Steps to Reproduce:
1.Use latest repos and install RJEL6.5 on your host.
2.Install ovirt-hosted-engine-setup.
3.hosted-engine --deploy

Actual results:
[ ERROR ] Failed to execute stage 'Environment setup': [Errno 2] No such file or directory: '/etc/pki/vdsm/certs/cacert.pem'

cacert.pem does not exists there as not created at all.

Expected results:
Setup should proceed without any errors at all.

Additional info:
Its possible to proceed with the setup using this workaround:
"vdsm-tool configure --force" and then manually starting vdsm.

Logs attached.

Comment 1 Doron Fediuck 2014-09-08 06:02:33 UTC
Which host did you use?
RHEL? RHEV-H? Centos? el6? el7?

Comment 2 Sandro Bonazzola 2014-09-08 06:22:06 UTC
Dan looks like an additional vdsm-tool configure is needed before running hosted-engine --deploy.
Is this an intentional change within VDSM? Or is it a regression?

Comment 7 Sandro Bonazzola 2014-09-08 08:29:45 UTC
Dropping needinfo on Dan, looks like it's a stage ordering issue.

Comment 8 Sandro Bonazzola 2014-09-08 12:41:23 UTC
*** Bug 1139220 has been marked as a duplicate of this bug. ***

Comment 9 Mooli Tayer 2014-09-09 15:58:02 UTC
Was this bug not solved by the patch for
https://bugzilla.redhat.com/show_bug.cgi?id=1127877
?

I'm not sure about usage of certificates at ovirt-hosted-engine
(does it deploy certificates using ovirt-host-deploy
or it relays on vdsm to create self signed certificates?)

but at a normal flow where:
vdsm-tool configure --force
is run and then vdsm is started it should work for both cases.

Comment 10 Sandro Bonazzola 2014-09-11 11:40:36 UTC
(In reply to Mooli Tayer from comment #9)
> Was this bug not solved by the patch for
> https://bugzilla.redhat.com/show_bug.cgi?id=1127877
> ?
> 
> I'm not sure about usage of certificates at ovirt-hosted-engine
> (does it deploy certificates using ovirt-host-deploy
> or it relays on vdsm to create self signed certificates?)
> 
> but at a normal flow where:
> vdsm-tool configure --force
> is run and then vdsm is started it should work for both cases.

Ok, so according to the above comment, http://gerrit.ovirt.org/32592 should fix this without reopening the virsh certificate issue we had in Bug #1073446 .
Going to test the patch accordingly.

Comment 12 Jiri Belka 2014-09-23 11:43:02 UTC
hosted-engine --deploy on EL7 works for me, see https://bugzilla.redhat.com/show_bug.cgi?id=1125812#c4

Comment 13 Nikolai Sednev 2014-10-13 09:47:04 UTC
(In reply to Jiri Belka from comment #12)
> hosted-engine --deploy on EL7 works for me, see
> https://bugzilla.redhat.com/show_bug.cgi?id=1125812#c4

H Jiri,
Have you checked this scenarion on RHEL6.5?
Bug was originally reported on RHEL6.5.

Comment 14 Nikolai Sednev 2014-10-13 12:30:12 UTC
Blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1148712 ,setting to assigned until fixed.

Comment 15 Jiri Belka 2014-10-20 13:31:14 UTC
doesn't work with RHEL6.6 (yes, it's been released) and latest d/s 3.5 build (ovirt-hosted-engine-setup-1.2.1-1.el6ev.noarch).

BZ1154672 opened

...
[ INFO  ] Creating VM
[ ERROR ] Failed to execute stage 'Closing up': Cannot set temporary password for console connection. The VM may not have been created: please check VDSM logs
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Answer file '/etc/ovirt-hosted-engine/answers.conf' has been updated
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

...
Thread-90::DEBUG::2014-10-20 15:06:09,183::BindingXMLRPC::1132::vds::(wrapper) client [127.0.0.1]::call vmSetTicket with ('b438d986-e670-4c00-ae7c-5b5a10aefd94', '1346ChDi', '10800', 'disconnect', {}) {}
Thread-90::ERROR::2014-10-20 15:06:09,183::BindingXMLRPC::1151::vds::(wrapper) unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/rpc/BindingXMLRPC.py", line 1135, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/rpc/BindingXMLRPC.py", line 383, in vmSetTicket
    return vm.setTicket(password, ttl, existingConnAction, params)
  File "/usr/share/vdsm/API.py", line 634, in setTicket
    return v.setTicket(password, ttl, existingConnAction, params)
  File "/usr/share/vdsm/virt/vm.py", line 4721, in setTicket
    graphics = _domParseStr(self._dom.XMLDesc(0)).childNodes[0]. \
AttributeError: 'NoneType' object has no attribute 'XMLDesc'

Comment 16 Sandro Bonazzola 2014-10-20 15:07:41 UTC
error reported on comment #15 is unrelated to the error reported on description.
Bug #1154672 is due to libvirt error and should be investigated as well, but shouldn't block QE from testing this bug on a system where libvirt is not crashing.

Comment 17 Nikolai Sednev 2014-10-20 15:56:54 UTC
Works for me on these components:
Components on host:
ovirt-hosted-engine-setup-1.2.1-1.el6ev.noarch
libvirt-0.10.2-46.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.448.el6.x86_64
vdsm-4.16.7-1.el6ev.x86_64
sanlock-2.8-1.el6.x86_64

Tested hosted-engine deployment over NFS only.

Comment 19 errata-xmlrpc 2015-02-11 20:40:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0161.html