FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Laptop

 
 
LinkBack Thread Tools
 
Old 04-06-2011, 08:10 PM
Chris Lumens
 
Default move from our own init to systemd

The attached patch set gets rid of anaconda's init.c and moves us to being
started up as a service by systemd. This required work in both anaconda and
lorax. I have tested this as a regular install, kickstart install, with
nokill, and as a serial install.

Plenty of stuff works. Plenty of other stuff likely does not work. In
particular, restart-anaconda needs work. There may also be some logging
and console printing stuff that can be cleaned up. However, I consider
all of that to be polish that can wait until after this big patch set
is in and we're building images with it. There may also be more stuff
that can come out. We do a lot of miscellaneous mounting and program
running.

The patches should be fairly straightforward to follow. Basically, I got
rid of init.c, simplified all the reboot/shutdown/halt logic, and added
some support files to start up anaconda from systemd.

Here's the anaconda patch statistics:

anaconda | 34 +-
anaconda.spec.in | 1 +
configure.ac | 1 +
data/Makefile.am | 2 +-
data/bootdisk/i386/syslinux.cfg | 6 +-
data/bootdisk/x86_64/syslinux.cfg | 6 +-
data/systemd/Makefile.am | 32 ++
data/systemd/anaconda-shell.service | 12 +
data/systemd/anaconda.target | 2 +
data/systemd/loader.service | 13 +
data/systemd/tmp.mount | 9 +
loader/Makefile.am | 13 +-
loader/devices.h | 103 ----
loader/init.c | 932 -----------------------------------
loader/init.h | 31 --
loader/kickstart.c | 25 -
loader/loader.c | 468 +++++++++---------
loader/loader.h | 6 +-
loader/serial.c | 220 ++++++++
loader/serial.h | 9 +
loader/shutdown.c | 217 --------
loader/undomounts.c | 235 ---------
pyanaconda/iw/language_gui.py | 1 +
pyanaconda/kickstart.py | 1 +
pyanaconda/language.py | 20 +-
pyanaconda/textw/language_text.py | 1 +
scripts/restart-anaconda | 29 +-
27 files changed, 601 insertions(+), 1828 deletions(-)

Any questions?

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-06-2011, 08:14 PM
 
Default move from our own init to systemd

> Plenty of other stuff likely does not work.

Oh, I should also point out that some of the debugging and printing
niceties from the old init/loader interaction probably don't work, and I
have not tested s390 at all. That's going to take some dedicated
effort.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-06-2011, 10:10 PM
"Brian C. Lane"
 
Default move from our own init to systemd

On Wed, Apr 06, 2011 at 04:10:44PM -0400, Chris Lumens wrote:
>
> Any questions?

Looks pretty good to me. Patch #8 is going to need an exception for
livecd which needs anaconda to exit. You can check flags.livecdInstall

--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 12:53 PM
Ales Kozumplik
 
Default move from our own init to systemd

On 04/06/2011 10:10 PM, Chris Lumens wrote:

Plenty of stuff works. Plenty of other stuff likely does not work. In
particular, restart-anaconda needs work.


How bad is it? I see a patch for restart-anaconda below: you just didn't
test it or is it broken totally?


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 01:55 PM
Chris Lumens
 
Default move from our own init to systemd

> >Plenty of stuff works. Plenty of other stuff likely does not work. In
> >particular, restart-anaconda needs work.
>
> How bad is it? I see a patch for restart-anaconda below: you just
> didn't test it or is it broken totally?

The patch doesn't really work. I think it's the right direction to go
in, but the systemctl call never returns and noting ever dies. If you
try forcibly killing the loader service and starting it from scratch, it
restarts loader but it's lost any arguments passed to it (like, that
it's a DVD and should skip over lang/keyboard).

In short, I thought it was better to move ahead with the patches I've
got and put more eyes on the problems.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 02:28 PM
Ales Kozumplik
 
Default move from our own init to systemd

The patch doesn't really work. I think it's the right direction to go
in, but the systemctl call never returns and noting ever dies. If you
try forcibly killing the loader service and starting it from scratch, it
restarts loader but it's lost any arguments passed to it (like, that
it's a DVD and should skip over lang/keyboard).

In short, I thought it was better to move ahead with the patches I've
got and put more eyes on the problems.


I don't know much about systemd yet and since I rebase my threaded-ui
patches regularly and depend on this feature I'd prefer if you figured
this out before pushing the set.


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 06:54 PM
Chris Lumens
 
Default move from our own init to systemd

> I don't know much about systemd yet and since I rebase my
> threaded-ui patches regularly and depend on this feature I'd prefer
> if you figured this out before pushing the set.

Okay, changing the systemctl commands up a little bit has helped, though
there are some problems:

* Booting off the DVD, loader does not detect that we're on a DVD
because /mnt/source is never unmounted. This shows off a larger
problem - because you have no idea where anaconda is going to get
interrupted, you can't possibly hope to clean up everything with some
code somewhere. So, you'll likely just have to live with this
problem.

* NM doesn't want to bring up the network the second time through.

* Sometimes, stdin appears to be getting scrambled. Don't know what
that's about yet.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 07:09 PM
Chris Lumens
 
Default move from our own init to systemd

> Looks pretty good to me. Patch #8 is going to need an exception for
> livecd which needs anaconda to exit. You can check flags.livecdInstall

Okay, I can just change the very end of anaconda to look like this:

elif not flags.livecdInstall:
os.system("systemctl --force --no-wall reboot")

Then in the livecd case, we just fall off the bottom, anaconda exits,
and whatever started anaconda (the livecd script) takes back over.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 07:23 PM
David Lehman
 
Default move from our own init to systemd

On Thu, 2011-04-07 at 15:09 -0400, Chris Lumens wrote:
> > Looks pretty good to me. Patch #8 is going to need an exception for
> > livecd which needs anaconda to exit. You can check flags.livecdInstall
>
> Okay, I can just change the very end of anaconda to look like this:
>
> elif not flags.livecdInstall:
> os.system("systemctl --force --no-wall reboot")
>
> Then in the livecd case, we just fall off the bottom, anaconda exits,
> and whatever started anaconda (the livecd script) takes back over.

Also if flags.imageInstall.

>
> - Chris
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-07-2011, 07:30 PM
David Cantrell
 
Default move from our own init to systemd

Chris Lumens <clumens@redhat.com> wrote:

> The attached patch set gets rid of anaconda's init.c and moves us to being
> started up as a service by systemd. This required work in both anaconda and
> lorax. I have tested this as a regular install, kickstart install, with
> nokill, and as a serial install.
>
> Plenty of stuff works. Plenty of other stuff likely does not work. In
> particular, restart-anaconda needs work. There may also be some logging
> and console printing stuff that can be cleaned up. However, I consider
> all of that to be polish that can wait until after this big patch set
> is in and we're building images with it. There may also be more stuff
> that can come out. We do a lot of miscellaneous mounting and program
> running.
>
> The patches should be fairly straightforward to follow. Basically, I got
> rid of init.c, simplified all the reboot/shutdown/halt logic, and added
> some support files to start up anaconda from systemd.

I really like what this patch set changes up. The fact that we can really
move to the standard system init is very appealing.

I do not think we should hold up this patch set for s390 changes, but
there will be a fair amount of work to hack up and dismantle linuxrc.s390.
I would like systemd to start up as init on s390 just like it does on the
non-s390 platforms, and then use the unit file dependency capability to
have it run either one or multiple interactive device configuration
programs. The whole point of linuxrc.s390 is to bring up system devices
and set up networking so we can lauch loader when the user logs in via
ssh. Because that needs to happen before loader runs and we have
historically had our init.c launch loader, linuxrc.s390 became init on
that platform.

The parts of linuxrc.s390 we'll need to salvage are the prompts and
validation code for different device types. The parts that make the
script work enough like init so it can be init can be trashed. I would
very much like to have these parts rewritten in Python since we have that
now in initrd.img, or at the very least multiple smaller shell scripts
divided in to logical tasks.

At any rate, we can keep linuxrc.s390 around for now.

> Here's the anaconda patch statistics:
>
> anaconda | 34 +-
> anaconda.spec.in | 1 +
> configure.ac | 1 +
> data/Makefile.am | 2 +-
> data/bootdisk/i386/syslinux.cfg | 6 +-
> data/bootdisk/x86_64/syslinux.cfg | 6 +-
> data/systemd/Makefile.am | 32 ++
> data/systemd/anaconda-shell.service | 12 +
> data/systemd/anaconda.target | 2 +
> data/systemd/loader.service | 13 +
> data/systemd/tmp.mount | 9 +
> loader/Makefile.am | 13 +-
> loader/devices.h | 103 ----
> loader/init.c | 932 -----------------------------------

Nice!

> loader/init.h | 31 --
> loader/kickstart.c | 25 -
> loader/loader.c | 468 +++++++++---------
> loader/loader.h | 6 +-
> loader/serial.c | 220 ++++++++
> loader/serial.h | 9 +
> loader/shutdown.c | 217 --------
> loader/undomounts.c | 235 ---------

Also nice!

> pyanaconda/iw/language_gui.py | 1 +
> pyanaconda/kickstart.py | 1 +
> pyanaconda/language.py | 20 +-
> pyanaconda/textw/language_text.py | 1 +
> scripts/restart-anaconda | 29 +-
> 27 files changed, 601 insertions(+), 1828 deletions(-)
>
> Any questions?

Only comments, see above.

--
David Cantrell <dcantrell@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org