Bug 1265072 - Invalid kickstart template file location in CentOS/RedHat 7
Invalid kickstart template file location in CentOS/RedHat 7
Status: NEW
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
2.3
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Tomáš Kašpárek
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-22 01:26 EDT by vikas027
Modified: 2015-10-29 18:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Internal Server Error in Kickstart Profile (124.62 KB, image/png)
2015-09-22 01:26 EDT, vikas027
no flags Details
Kickstart Profile not managed by Spacewalk (206.94 KB, image/png)
2015-09-22 01:32 EDT, vikas027
no flags Details

  None (edit)
Description vikas027 2015-09-22 01:26:22 EDT
Created attachment 1075639 [details]
Internal Server Error in Kickstart Profile

Description of problem:
While creating a kickstart profile on the web interface, I get "Internal Server Error".

I believe the error is that cobbler is trying to find it on a different location i.e. /var/lib/cobbler/kickstarts/ instead of /var/lib/rhn/kickstarts/wizard/

Tue Sep 22 01:19:13 2015 - INFO | Exception value: 'Invalid kickstart template file location /var/lib/rhn/kickstarts/wizard/CentOS-66-KS-Profile--1.cfg, it is not inside /var/lib/cobbler/kickstarts/'
Tue Sep 22 01:19:13 2015 - INFO | Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
    raise CX(msg)

Tue Sep 22 01:19:13 2015 - INFO | Exception occured: <class 'cobbler.cexceptions.CX'>
Tue Sep 22 01:19:13 2015 - INFO | Exception value: 'Invalid kickstart template file location /var/lib/rhn/kickstarts/wizard/CentOS-66-KS-Profile--1.cfg, it is not inside /var/lib/cobbler/kickstarts/'
Tue Sep 22 01:19:13 2015 - INFO | Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 2080, in _dispatch
    return method_handle(*params)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 848, in modify_profile
    return self.modify_item("profile",object_id,attribute,arg,token)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 836, in modify_item
    self._validate_ks_template_path(arg)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 820, in _validate_ks_template_path
    utils.die(self.logger, "Invalid kickstart template file location %s, it is not inside /var/lib/cobbler/kickstarts/" % path)
   File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
    raise CX(msg)



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:
1. Create a Kickstart Distribution
2. Create a corresponding Kickstart Profile. You will encounter the same error after assigning the password.


Actual results:
"Internal Server Error" on the web page. Screenshot attached hereby.

Expected results:
A 'Spacewalk Managed' Kickstart profile should be listed under Systems -> Kickstart -> Profiles

Additional info:
Spacewalk v2.3 works absolutely fine on CentOS 6.X.
Comment 1 vikas027 2015-09-22 01:32 EDT
Created attachment 1075640 [details]
Kickstart Profile not managed by Spacewalk

Screenshot of the kickstart profile which is created, but is not clickable as it is not managed by Spacewalk.
Comment 2 keyz182@gmail.com 2015-09-29 17:01:55 EDT
I am also being affected by this issue, with the same log output, and "Internal Server Error" page. The code in question appears to come from this Cobbler commit: https://github.com/cobbler/cobbler/commit/19611b4a742902254500051c01f71824b1a9d5d5

It seems to have hardcoded paths, forcing the kickstart to be inside "/var/lib/cobbler/kickstarts/".

As a messy/temporary workaround, I commented out lines 819/820 in /usr/lib/python2.7/site-packages/cobbler/remote.py. This is just a box for testing, so the workaround is fine for me for now, but a package update/upgrade could wipe it out.


>        #if not path.startswith("/var/lib/cobbler/kickstarts"):
>            #utils.die(self.logger, "Invalid kickstart template file location %s, it is not inside /var/lib/cobbler/kickstarts/" % path)


I'm not sure if this is of any help to anyone else, figured I should post it anyway.

Kieran
Comment 3 vikas027 2015-10-29 18:30:50 EDT
Looks like this has been fixed in Spacewalk v2.4 https://fedorahosted.org/spacewalk/wiki/ReleaseNotes24

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