Bug 1265072 - Invalid kickstart template file location in CentOS/RedHat 7
Summary: Invalid kickstart template file location in CentOS/RedHat 7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 2.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-22 05:26 UTC by vikas027
Modified: 2019-07-12 09:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-12 09:07:47 UTC
Embargoed:


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

Description vikas027 2015-09-22 05:26:22 UTC
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 05:32:07 UTC
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 21:01:55 UTC
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 22:30:50 UTC
Looks like this has been fixed in Spacewalk v2.4 https://fedorahosted.org/spacewalk/wiki/ReleaseNotes24

Comment 4 Michael Mráka 2019-07-12 09:07:47 UTC
As per comment #3 this issue has been fixed in Spacewalk 2.4.

If you're still able to reproduce in current Spacewalk 2.9 please  reopen the bug.


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