Bug 1179797

Summary: ose_installer fails with No such file or directory - /root/.openshift/oo-install-cfg.yml
Product: Red Hat CloudForms Management Engine Reporter: Josh Carter <jocarter>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.3.0CC: jhardy, mfalesni, mfeifer, obarenbo, xlecauch
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.4.0.0.11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1179958 (view as bug list) Environment:
Last Closed: 2015-06-16 12:47:03 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:    
Bug Blocks: 1179958, 1179959    

Description Josh Carter 2015-01-07 15:08:51 UTC
Description of problem:

OSE_Installer is attempting to write to /root/.openshift/oo-install-cfg.yml but fails. 

[----] I, [2015-01-07T14:51:47.660904 #18554:3d83a08]  INFO -- : Q-task_id([service_template_provision_task_1000000000015]) <AEMethod ose_installer> OSE_Installer: Writing - /root/.openshift/oo-install-cfg.yml
[----] E, [2015-01-07T14:51:47.662173 #18554:3d83a08] ERROR -- : Q-task_id([service_template_provision_task_1000000000015]) <AEMethod ose_installer> The following error occurred during method evaluation:
[----] E, [2015-01-07T14:51:47.663308 #18554:3d83a08] ERROR -- : Q-task_id([service_template_provision_task_1000000000015]) <AEMethod ose_installer>   Errno::ENOENT: No such file or directory - /root/.openshift/oo-install-cfg.yml
[----] E, [2015-01-07T14:51:47.665625 #18554:3d83a08] ERROR -- : Q-task_id([service_template_provision_task_1000000000015]) <AEMethod ose_installer>   <code: file = File.open("#{@oseTemplatePath}oo-install-cfg.yml", 'w')>:277:in `initialize'
<code: file = File.open("#{@oseTemplatePath}oo-install-cfg.yml", 'w')>:277:in `open'
[----] E, [2015-01-07T14:51:47.681586 #18554:f4d094] ERROR -- : Q-task_id([service_template_provision_task_1000000000015]) Method STDERR: <code: file = File.open("#{@oseTemplatePath}oo-install-cfg.yml", 'w')>:277:in `initialize': No such file or directory - /root/.openshift/oo-install-cfg.yml (Errno::ENOENT)


The method appears to locate the directory and if its not found it should create it. 

Original Version 
#write out the config

dirname = File.dirname(@oseTemplatePath)
unless File.directory?(dirname)
  FileUtils.mkdir_p(dirname)
end

Work-around version

#dirname = File.dirname(@oseTemplatePath)
dirname = @oseTemplatePath
unless File.directory?(dirname)
  FileUtils.mkdir_p(dirname)
end

Version-Release number of selected component (if applicable):
5.3.2.5.20141218144833_50406a5 

How reproducible:
very

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Milan Falešník 2015-06-02 09:37:50 UTC
5.4.0.4 - it now goes past the line that makes the error according to the logs. And prints out the yaml file.

Comment 5 errata-xmlrpc 2015-06-16 12:47:03 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-1100.html