|
List Info
Thread: Anaconda Traceback when using %pre scripts
|
|
| Anaconda Traceback when using %pre
scripts |
  Sweden |
2008-04-29 11:51:27 |
Suddenly, the Anaconda installer gives me tracebacks when
using %pre
scripts. I can see the last part of the traceback:
File "/usr/lib/anaconda/kickstart.py", line 90,
os.chmod("%s" % messages, 0600)
OSError: [Errno 2] No such file or directory: 'False'
From looking at the code, I believe that the problem is that
"self.logfile" is False rather than None:
if self.logfile is not None:
messages = self.logfile
elif serial:
messages = "%s.log" % path
else:
messages = "/dev/tty3"
Any ideas?
Best regards,
---
Peter Ã…strand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
| Re: Anaconda Traceback when using %pre
scripts |
  United States |
2008-04-29 13:00:16 |
|
May I know which interpreter are you using..?Curios about "Is that interpreter actually supported..?" Thanks, Prasad. Peter Åstrand <astrand cendio.se> wrote: Suddenly, the Anaconda installer gives me tracebacks when using %pre scripts. I can see the last part of the traceback:
File "/usr/lib/anaconda/kickstart.py", line 90, os.chmod("%s" % messages, 0600)
OSError: [Errno 2] No such file or directory: 'False'
From looking at the code, I believe that the problem is that "self.logfile" is False rather than None:
if self.logfile is not None: messages = self.logfile elif serial: messages = "%s.log" % path else: messages = "/dev/tty3"
Any ideas?
Best regards, --- Peter Åstrand ThinLinc Chief Developer Cendio AB
http://www.cendio.se Wallenbergs gata 4 583 30 Linköping Phone: +46-13-21 46 00_______________________________________________ Kickstart-list mailing list Kickstart-list redhat.com https://www.redhat.com/mailman/listinfo/kickstart-list
|
| Re: Anaconda Traceback when using %pre
scripts |

|
2008-04-29 15:51:16 |
> Suddenly, the Anaconda installer gives me tracebacks
when using %pre
> scripts. I can see the last part of the traceback:
>
> File "/usr/lib/anaconda/kickstart.py", line
90,
> os.chmod("%s" % messages, 0600)
>
> OSError: [Errno 2] No such file or directory: 'False'
What does your kickstart file look like?
- Chris
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
| Re: Anaconda Traceback when using %pre
scripts |
  Sweden |
2008-05-01 13:58:52 |
On Tue, 29 Apr 2008, Chris Lumens wrote:
> > Suddenly, the Anaconda installer gives me
tracebacks when using %pre
> > scripts. I can see the last part of the
traceback:
> >
> > File "/usr/lib/anaconda/kickstart.py",
line 90,
> > os.chmod("%s" % messages, 0600)
> >
> > OSError: [Errno 2] No such file or directory:
'False'
>
> What does your kickstart file look like?
It's somewhat "odd": We have a base ks.cfg that is
"customer configurable"
and stable between upgrades. This file includes several
other files which
are more "internal". I'm attaching the files.
Regards,
---
Peter Ã…strand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
|
|
|
|
| Re: Anaconda Traceback when using %pre
scripts |
  Sweden |
2008-05-03 01:39:28 |
On Thu, 1 May 2008, Peter Ã…strand wrote:
> > > Suddenly, the Anaconda installer gives me
tracebacks when using %pre
> > > scripts. I can see the last part of the
traceback:
> > >
> > > File
"/usr/lib/anaconda/kickstart.py", line 90,
> > > os.chmod("%s" % messages,
0600)
> > >
> > > OSError: [Errno 2] No such file or directory:
'False'
I've now been able to reproduce the problem with a ks.cfg as
small as:
url --url http://ourserver/PATH
%pre
uname -a > /tmp/myuname
%end
Clearly, it's something wrong with our build of the our
custom
distribution. Any ideas of where to start debugging?
Rgds,
---
Peter Ã…strand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
| Re: Anaconda Traceback when using %pre
scripts |
  Sweden |
2008-05-04 01:20:10 |
On Sat, 3 May 2008, Peter Ã…strand wrote:
> > > > Suddenly, the Anaconda installer gives
me tracebacks when using %pre
> > > > scripts. I can see the last part of the
traceback:
> > > >
> > > > File
"/usr/lib/anaconda/kickstart.py", line 90,
> > > > os.chmod("%s" % messages,
0600)
> > > >
> > > > OSError: [Errno 2] No such file or
directory: 'False'
>
> I've now been able to reproduce the problem with a
ks.cfg as small as:
>
> url --url http://ourserver/PATH
> %pre
> uname -a > /tmp/myuname
> %end
The regression is in pykickstart. If I build:
1) Without updates at all
2) With all updates except pykickstart
...%pre scripts works.
My conclusion is that %pre scripts in the latest pykickstart
is broken. It
remains the find which patch is causing this.
Regards,
---
Peter Ã…strand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
| Re: Anaconda Traceback when using %pre
scripts |
  Sweden |
2008-05-04 01:54:35 |
On Sun, 4 May 2008, Peter Ã…strand wrote:
> My conclusion is that %pre scripts in the latest
pykickstart is broken. It
> remains the find which patch is causing this.
Looking at the differences between 1.18 and 1.29, I see:
 -151,7
+152,8 
script. Instances of Script are held in a list by
the Version object.
"""
def __init__(self, script, interp =
"/bin/sh", inChroot = False,
- logfile = None, errorOnFail = False, type
= KS_SCRIPT_PRE):
+ lineno = None, logfile = None, errorOnFail
= False,
+ type = KS_SCRIPT_PRE):
"""Create a new Script instance.
Instance attributes:
That is, the lineno argument has been introduced, which
shifts the order
of all following arguments. The Script usage in pykickstart
has been
updated to reflect this. BUT: Anaconda also uses this
class:
In /usr/lib/anaconda/kickstart.py:
class AnacondaKSScript(Script):
...
s = AnacondaKSScript
(self._script["body"],
self._script["interp"],
self._script["chroot"],
self._script["log"],
self._script["errorOnFail"])
...
s = AnacondaKSScript
(self._script["body"],
self._script["interp"],
self._script["chroot"],
self._script["log"],
self._script["errorOnFail"],
self._script["type"])
Since we are not using keyword arguments, the logfile is
assigned the
value of self._script["errorOnFail"], which is
False.
Changing APIs in this way is not very nice. I suggest that
the patch is
changed, so that lineno is added to the end of the list.
Regards,
---
Peter Ã…strand ThinLinc Chief Developer
Cendio AB http://www.cendio.se
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
_______________________________________________
Kickstart-list mailing list
Kickstart-list redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list
|
|
[1-7]
|
|