Bug 1265084

Summary: cobbler20-setup Error - No such file or directory: '/usr/share/cobbler/installer_templates/defaults'
Product: [Community] Spacewalk Reporter: vikas027 <vikas027>
Component: InstallationAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.3CC: jdobes
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-27 13:57:21 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: 1564160    

Description vikas027 2015-09-22 05:43:28 UTC
Description of problem:
Python script /bin/cobbler20-setup fails while trying to look for files under /usr/share/cobbler/installer_templates/

It expects these files. This output is from CentOS 6.6. 
# ls -l /usr/share/cobbler/installer_templates/
total 28
-rwxr--r-- 1 root root   358 Apr 20  2011 defaults
-rwxr--r-- 1 root root  2886 Apr 20  2011 modules.conf.template
-rwxr--r-- 1 root root 17067 Apr 20  2011 settings.template

If I manually create these files, I do not get any error while running the script /bin/cobbler20-setup but I am not too sure if I am missing anything else on the cobbler part.

This script belongs to spacewalk-setup rpm.
# rpm -qf `which cobbler20-setup`
spacewalk-setup-2.3.14-1.el7.noarch
#


Version-Release number of selected component (if applicable):
Spacewalk v2.3
CentOS/RedHat 7.1
cobbler v2.6.9  (cobbler-2.6.9-1)


Steps to Reproduce:
Run command "cobbler20-setup" after installing Spacewalk v2.3 on CentOS/RHEL 7.1

Actual results:
Failed while trying to look for file /usr/share/cobbler/installer_templates/defaults  

# cobbler20-setup
Traceback (most recent call last):
  File "/bin/cobbler20-setup", line 78, in <module>
    main()
  File "/bin/cobbler20-setup", line 55, in main
    answers = dict(loadFile(DEFAULTS))
  File "/bin/cobbler20-setup", line 26, in loadFile
    return load(open(fl).read())
IOError: [Errno 2] No such file or directory: '/usr/share/cobbler/installer_templates/defaults'
#


Expected results:
Command should have succeeded and setup cobbler as desired.

Additional info:

Comment 1 vikas027 2015-10-01 19:29:37 UTC
I have found the cause of the error. The problem is that if we install spacewalk-oracle and cobbler-loaders in one yum command i.e. yum install spacewalk-oracle cobbler-loaders, it installs cobbler-2.6.9-1 which does not gels up with spacewalk RPMs.

If we install the packages separately, i.e. yum install spacewalk-oracle && yum install cobbler-loaders, cobbler-2.6.9-1 does not gets installed. Spacewalk RPMs require cobbler2-2.0.11 and cobbler20-2.0.11 which gets installed as a dependency of spacewalk-oracle.

Hope this helps someone. I think this should be handled in the spec files of RPMs.

Comment 2 Jan Dobes 2017-10-27 13:57:21 UTC
Closing this bug as CURRENT_RELEASE as it should not be currently possible to install cobbler > 2.0 because of dependencies (since SW 2.4). Also, there is a different command similar to cobbler20-setup - spacewalk-setup-cobbler, which could possibly configure newer cobbler (anyway, new cobbler is disabled currently).