[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cobbler
Subject:    Re: [cobbler] django error at cobbler_web execution
From:       nicholas geovanis <nickgeovanis () gmail ! com>
Date:       2013-07-24 20:49:47
Message-ID: CAJmb-YnX=6goSL5FbfcR7Ajsgcb0cDTMKHUfqtt87DiJTtoY0g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


James -
Thanks for your help with this. I decided to just re-install the cobbler
and cobbler-web RPMs and redo my minor edits (same version, 2.2.3). I
tried-out  the two paths to view the kickstart script, one way failed as
before. Then substituted the 2.4 cobbler-web settings.py, removed the older
.pyc and .pyo. And that fixed my problem viewing kickstart scripts.

Apparently I had made one-too-many mistakes in swapping the settings.py
files around earlier. Again thanks for your help.....Nick Geo




On Wed, Jul 10, 2013 at 5:17 PM, James Cammarata <jimi@sngx.net> wrote:

> On Wed, Jul 10, 2013 at 5:10 PM, nicholas geovanis <nickgeovanis@gmail.com
> > wrote:
>
>> On Tue, Jul 9, 2013 at 4:55 PM, James Cammarata <jimi@sngx.net> wrote:
>>
>>>
>>> On Jul 9, 2013 4:18 PM, "nicholas geovanis" <nickgeovanis@gmail.com>
>>> wrote:
>>> >
>>> > James wrote:
>>> > > Grab the most recent settings.py from the release24 branch on github
>>> and replace the one on your
>>> > > system. The issue is related to Django deprecating and removing some
>>> modules in their 1.4.x
>>> > > releases while cobbler 2.2.3 was written to support Django <= 1.3.x.
>>> >
>>> >
>>> > Thanks James. I replaced
>>> /usr/lib/python2.6/site-packages/cobbler/settings.py with the 2.4 version
>>> from github. Unfortunately I receive the same error. Do I also need to
>>> replaced the corresponding .pyc and/or .pyo files too? Is that the correct
>>> file?
>>> >  Thanks......Nick Geo
>>>
>>> Delete the pyc and pyo files and restart httpd.
>>>
>>  My mistake was actually worse: The settings.py I pulled down was for
>> cobbler rather than cobbler-web. But that was taken care of and I moved to
>> the next issue.
>>
>> Which was Django's need for mod_python (unfortunately not expressed in
>> the RPM), which is deprecated in RH 6.x but available through EPEL. And
>> then to my current difficulty:
>>
>
> As far as I know, there is no requirement for mod_python like that, and in
> fact I have seen conflicts where both mod_python and mod_wsgi are
> installed. I always tell people to remove mod_python if it is installed.
>
>
>
>> I can view and edit my "migrated" kickstart templates just fine through
>> the "Edit" button in the "Kickstart Templates" page.  But when I try to
>> view the very same kickstart script through the "View Kickstart"  button on
>> the "Systems" page, Apache throws a "500 Internal Server Error". This may
>> be related to Bugzilla 828632, I'm not sure, but I find this in
>> ssl_error_log:
>>
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] mod_wsgi
>> (pid=14566): Target WSGI script '/var/www/cobbler/svc/services.py' cannot
>> be loaded as Python module.
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] mod_wsgi
>> (pid=14566): Exception occurred processing WSGI script
>> '/var/www/cobbler/svc/services.py'.
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] Traceback (most
>> recent call last):
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]   File
>> "/var/www/cobbler/svc/services.py", line 15, in <module>
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]     from
>> mod_python import apache
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]   File
>> "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 30, in
>> <module>
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]     import
>> _apache
>> [Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] ImportError: No
>> module named _apache
>>
>
> Can you verify the services.py file matches that of the one found in the
> release22 branch on github? That should not be requiring mod_python (that
> has been the case since 2.2.0).
>
> https://github.com/cobbler/cobbler/blob/release22/cobbler/services.py
>
>
> _______________________________________________
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div>James -<br></div>Thanks for your help with this. I decided \
to just re-install the cobbler and cobbler-web RPMs and redo my minor edits (same \
version, 2.2.3). I tried-out  the two paths to view the kickstart script, one way \
failed as before. Then substituted the 2.4 cobbler-web settings.py, removed the older \
.pyc and .pyo. And that fixed my problem viewing kickstart scripts.<br> \
<br></div>Apparently I had made one-too-many mistakes in swapping the settings.py \
files around earlier. Again thanks for your help.....Nick \
Geo<br><div><br><br></div></div><div class="gmail_extra"><br><br><div \
class="gmail_quote"> On Wed, Jul 10, 2013 at 5:17 PM, James Cammarata <span \
dir="ltr">&lt;<a href="mailto:jimi@sngx.net" \
target="_blank">jimi@sngx.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div class="im">On Wed, Jul 10, 2013 at 5:10 PM, nicholas \
geovanis <span dir="ltr">&lt;<a href="mailto:nickgeovanis@gmail.com" \
target="_blank">nickgeovanis@gmail.com</a>&gt;</span> wrote:<br></div><div \
class="gmail_quote"> <div class="im"><blockquote class="gmail_quote" style="margin:0 \
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr"><div \
class="gmail_extra"><div class="gmail_quote">On Tue, Jul 9, 2013 at 4:55 PM, James \
Cammarata <span dir="ltr">&lt;<a href="mailto:jimi@sngx.net" \
target="_blank">jimi@sngx.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">


<div><p dir="ltr"><br>
On Jul 9, 2013 4:18 PM, &quot;nicholas geovanis&quot; &lt;<a \
href="mailto:nickgeovanis@gmail.com" target="_blank">nickgeovanis@gmail.com</a>&gt; \
wrote:<br> &gt;<br>
&gt; James wrote:<br>
&gt; &gt; Grab the most recent settings.py from the release24 branch on github and \
replace the one on your <br> &gt; &gt; system. The issue is related to Django \
deprecating and removing some modules in their 1.4.x <br> &gt; &gt; releases while \
cobbler 2.2.3 was written to support Django &lt;= 1.3.x. <br> &gt;<br>
&gt;<br>
&gt; Thanks James. I replaced /usr/lib/python2.6/site-packages/cobbler/settings.py \
with the 2.4 version from github. Unfortunately I receive the same error. Do I also \
need to replaced the corresponding .pyc and/or .pyo files too? Is that the correct \
file?<br>




&gt;  Thanks......Nick Geo</p>
</div><p dir="ltr">Delete the pyc and pyo files and restart \
httpd.</p></blockquote><div> My mistake was actually worse: The settings.py I pulled \
down was for cobbler rather than cobbler-web. But that was taken care of and I moved \
to the next issue.<br>


<br></div><div>Which was Django&#39;s need for mod_python (unfortunately not \
expressed in the RPM), which is deprecated in RH 6.x but available through EPEL. And \
then to my current difficulty:<br></div></div></div></div>

</blockquote><div><br></div></div><div>As far as I know, there is no requirement for \
mod_python like that, and in fact I have seen conflicts where both mod_python and \
mod_wsgi are installed. I always tell people to remove mod_python if it is \
installed.</div> <div class="im">
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div \
class="gmail_extra"><div class="gmail_quote"><div>I can view and edit my \
&quot;migrated&quot; kickstart templates just fine through the &quot;Edit&quot; \
button in the &quot;Kickstart Templates&quot; page.  But when I try to view the very \
same kickstart script through the &quot;View Kickstart&quot;  button on the \
&quot;Systems&quot; page, Apache throws a &quot;500 Internal Server Error&quot;. This \
may be related to Bugzilla 828632, I&#39;m not sure, but I find this in \
ssl_error_log:</div>

<div>
<br>[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] mod_wsgi (pid=14566): \
Target WSGI script &#39;/var/www/cobbler/svc/services.py&#39; cannot be loaded as \
Python module.<br>[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] mod_wsgi \
(pid=14566): Exception occurred processing WSGI script \
&#39;/var/www/cobbler/svc/services.py&#39;.<br>


[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171] Traceback (most recent call \
last):<br>[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]   File \
&quot;/var/www/cobbler/svc/services.py&quot;, line 15, in &lt;module&gt;<br>


[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]     from mod_python import \
apache<br>[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]   File \
&quot;/usr/lib64/python2.6/site-packages/mod_python/apache.py&quot;, line 30, in \
&lt;module&gt;<br>


[Wed Jul 10 17:01:11 2013] [error] [client 10.15.15.171]     import _apache<br>[Wed \
Jul 10 17:01:11 2013] [error] [client 10.15.15.171] ImportError: No module named \
_apache<br></div></div></div></div></blockquote></div></div> <br>
<div>Can you verify the services.py file matches that of the one found in the \
release22 branch on github? That should not be requiring mod_python (that has been \
the case since 2.2.0).</div><div><br></div><div><a \
href="https://github.com/cobbler/cobbler/blob/release22/cobbler/services.py" \
target="_blank">https://github.com/cobbler/cobbler/blob/release22/cobbler/services.py</a></div>


<div><br></div>
<br>_______________________________________________<br>
cobbler mailing list<br>
<a href="mailto:cobbler@lists.fedorahosted.org">cobbler@lists.fedorahosted.org</a><br>
 <a href="https://lists.fedorahosted.org/mailman/listinfo/cobbler" \
target="_blank">https://lists.fedorahosted.org/mailman/listinfo/cobbler</a><br> \
<br></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic