Bug 768746 - [ovirt] [vdsm] Fedora-based host installation fails in case vdsm.conf is empty as tsDir default value is /var/run and not /etc/vdsm/
Summary: [ovirt] [vdsm] Fedora-based host installation fails in case vdsm.conf is empt...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Douglas Schilling Landgraf
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-18 15:10 UTC by Haim
Modified: 2016-04-18 06:43 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-19 16:51:49 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Haim 2011-12-18 15:10:52 UTC
Description of problem:


Fedora host installation fails in case vdsm.conf contains no config or miss trust_store_path; 

the problem is in vds_bootstrap.py; 

    def setCertificates(self, subject, random_num, orgName='Red Hat, Inc.'):
        """
            Makes sure that vdsmd has its Certificate in place
            NOTE: setCertificates must be created AFTER rpms are installed, so
            that vdsm.conf already exists.
        """
        config = ConfigParser.ConfigParser()
        config.read(VDSM_CONF)
        try:
            tsDir = config.get('vars', 'trust_store_path')
        except:
            tsDir = '/var/vdsm/ts

it enters the tries, fail, except catch the exception, but set wrong default which suits rhel5.x and not fedora.



Sun, 18 Dec 2011 09:02:41 DEBUG    <BSTRAP component='SET_SYSTEM_TIME' status='OK' message='setSystemTime ended successfully'/>
Sun, 18 Dec 2011 09:02:41 DEBUG    ### print in line 1187 /var/vdsm/ts
Sun, 18 Dec 2011 09:02:41 ERROR    Traceback (most recent call last):
  File "/tmp/vds_bootstrap_8fe1dc8b-3b3d-4f90-bfd8-5e9b5b6970ea.py", line 924, in main
    orgName, systime, usevdcrepo, firewallRulesFile)
  File "/tmp/vds_bootstrap_8fe1dc8b-3b3d-4f90-bfd8-5e9b5b6970ea.py", line 871, in VdsValidation
    oDeploy.setCertificates(subject, random_num, orgName)
  File "/tmp/vds_bootstrap_8fe1dc8b-3b3d-4f90-bfd8-5e9b5b6970ea.py", line 804, in setCertificates
    deployUtil.createCSR(orgName, subject, random_num, tsDir, vdsmKey, dhKey)
  File "/tmp/deployUtil.py", line 1187, in createCSR
    os.mkdir(tsDir + "/keys")
OSError: [Errno 2] No such file or directory: '/var/vdsm/ts/keys'

git log: 82969b3b5ca2f9487ea56485fafd843b21d4f447

Comment 1 Douglas Schilling Landgraf 2012-01-03 15:47:33 UTC
git commit bb22c7dab4baf5356a3934755e615698d508f8e3 should resolve this issue.


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