From Fedora Project Wiki
No edit summary
No edit summary
Line 38: Line 38:
Notare che nel lungo termine, systemd permetterà un boot (avvio) più rapido, ma ciò richiederà del lavoro, in quanto occorre effettuare ulteriori modifiche al processo di boot, come la separazione di rc.sysinit. Ad ogni modo l'obiettivo di systemd è innanzitutto far funzionare bene le ''cose'', e non soltanto più velocemente.   
Notare che nel lungo termine, systemd permetterà un boot (avvio) più rapido, ma ciò richiederà del lavoro, in quanto occorre effettuare ulteriori modifiche al processo di boot, come la separazione di rc.sysinit. Ad ogni modo l'obiettivo di systemd è innanzitutto far funzionare bene le ''cose'', e non soltanto più velocemente.   


== Piano di Test ==


== Scope ==
# Avviare il sistema, verificando l'avvio di tutti i servizi.
# Spegnere il sistema, verificando che tutto si interrompa regolarmente. 
# Controllare i vari strumenti di amministrazione come '''systemctl''', '''systemd-cgls''', '''systemadm''', ps e così via.
# Verificare che i servizi siano propriamente disposti in ''control group'' distinti ('''systemd-cgls''' è il tuo compagno fedele)
# Verificare con il comando '''systemctl list-units''' che tutte le unità siano in uno stato ragionevole dopo il boot-up (ossia, non ci siano colori rossi nell'output!) 
# Sperimentare le opzioni kernel ''systemd.unit=emergency.target'', ''systemd.unit=rescue.target'', ''systemd.unit=multi-user.target'' e similari, e spostarsi tra i vari target via '''systemctl isolate'''. 
# Provare le seguenti opzioni kernel:
## systemd.unit=emergency.target  (opzione che da un risultato simile al passaggio di init=/bin/sh, con la differenza di poter avviare il sistema completo a partire da questo stato)
## systemd.unit=rescue.target      (opzione simile al precedente, ma più equivalente al boot in modalità ''single user'' su SysV)
## systemd.unit=multi-user.target  (per l'avvio senza supporto grafico)
## systemd.unit=graphical.target  (per il normale avvio con supporto grafico, pedefinito)


Requires building packages for systemd (DONE:  https://bugzilla.redhat.com/show_bug.cgi?id=598299 ), and taking advantage of it in a dozen or so desktop daemons that will benefit from systemd the most at present and make it default for Fedora 14.


== Test Plan ==
== Esperienza Utente ==


# Boot the system, make sure all services come up
L'utente dovrebbe notare un boot-up più rapido, particolarmente su unità SSD.  
# Shutdown and ensure that everything is shut down properly.
# Check the various admin tools such as systemctl, systemd-cgls, systemadm, ps and so on.
# Verify that all services are properly put in seperate control groups (systemd-cgls is your friend)
# Verify that "systemctl list-units" shows that all units are in a reasonable state after bootup. (i.e. no red color in the output!)
# Play around with "systemd.unit=emergency.target", "systemd.unit=rescue.target", "systemd.unit=multi-user.target" and suchlike on the kernel command like and switching between the targets via "systemctl isolate".
# Try the following kernel command line options:
## systemd.unit=emergency.target  (which gives you something very similar to passing init=/bin/sh but with the option to boot the full system from there)
## systemd.unit=rescue.target      (similar, but is mostly equivalent to booting into single user mode on sysv)
## systemd.unit=multi-user.target  (to boot only non-graphical stuff)
## systemd.unit=graphical.target  (to boot the normal graphical stuff, the default)


== User Experience ==
Le funzionalità di amministrazione del sistema di init sono notevolmente estese (per maggiori dettagli vedere il link citato [http://0pointer.de/blog/projects/systemd.html blog post], in particolare la parte ''A short list of other features''.


The user should notice a slightly faster bootup, particularly on SSD.
I file di configurazione dei servizi sono più semplici da capire e configurare rispetto agli script di SysV.
 
The administrative features of the init system are considerably extended. (for more details see the aforementioned [http://0pointer.de/blog/projects/systemd.html blog post], in particular the "A short list of other features:" part.
 
Native systemd service configuration files are much easier to understand and configure compared to sysvinit scripts


== Dependencies ==
== Dependencies ==

Revision as of 18:18, 27 November 2010

systemd Gestore di sistema e di sessione

Sommario

systemd è un rimpiazzo per SysVinit e Upstart ed agisce come un gestore di sistema e di sessione.

Manutentore

Stato corrente

  • Targeted release: Fedora 15
  • Ultimo aggiornamento: 2010-10-19
  • Percentuale di completamento: 100%
  • Systemd attualmente è in Rawhide, e per impostazione predefinita
  • Patch a vari pacchetti sono state applicate in upstream già nella F14 (dbus, udev, avahi, rtkit). Supporto all'attivazione dei socket che sarebbe interessante avere, è tuttora mancante per rsyslog (stato merged), rcpbind (stato trasmesso in upstream, merge parziale), e cups(non ancora trasmesso in upstream).

Descrizione dettagliata

  • Cos'è systemd? Per citare dalla homepage: "systemd è un gestore di sistema e di sessione per Linux, compatibile con gli scrpit di initi di SysV e di LSB. systemd offre grintose capacità di parallelizazione, usa l'attivazione di socket e D-Bus per l'avvio dei servizi, offre avvio su richiesta di daemoni, tiene traccia dei processi tramite Linux cgroups, supporta snapshotting e ripristino dello stato di sistema, gestisce i punti di mount e di automount ed implementa una elaborata logica di controllo sulla transazione dei servizi e loro dipendenze".
  • Il programma prevede di testare appieno il sistema e di renderlo predefinito in Fedora 15, in sostituzione del sistema attuale, upstart. Maggiori demoni si riuscirà ad aggiornare ai nuovi file di servizio tanto meglio. Per il software rimanente si continuerà ad includere gli script init di SysV essendo systemd compatibile con essi.
  • In alternativa agli script bash, systemd usa file .service.
  • systemd ordina tutti i demoni nei propri cgroups di Linux, esplorabili all'interno della directory /cgroup/systemd del file system.
  • l'obiettivo di systemd è di rendere il miglior Linux e di rendere fruibile le sue caratteristiche nel migiore possibile. systemd non è progettato per essere portabile. Ciò apre nuove possibilità.

Vantaggi per Fedora

Fedora <=14 usa Upstart in modalità compatibile con SysV. systemd è un progetto complessivamente migliore come descritto in http://0pointer.de/blog/projects/systemd.html. Si spera di raccogliere i suoi benefici aprendo l'integrazione nella distribuzione e includendola per impostazione.

Notare che nel lungo termine, systemd permetterà un boot (avvio) più rapido, ma ciò richiederà del lavoro, in quanto occorre effettuare ulteriori modifiche al processo di boot, come la separazione di rc.sysinit. Ad ogni modo l'obiettivo di systemd è innanzitutto far funzionare bene le cose, e non soltanto più velocemente.

Piano di Test

  1. Avviare il sistema, verificando l'avvio di tutti i servizi.
  2. Spegnere il sistema, verificando che tutto si interrompa regolarmente.
  3. Controllare i vari strumenti di amministrazione come systemctl, systemd-cgls, systemadm, ps e così via.
  4. Verificare che i servizi siano propriamente disposti in control group distinti (systemd-cgls è il tuo compagno fedele)
  5. Verificare con il comando systemctl list-units che tutte le unità siano in uno stato ragionevole dopo il boot-up (ossia, non ci siano colori rossi nell'output!)
  6. Sperimentare le opzioni kernel systemd.unit=emergency.target, systemd.unit=rescue.target, systemd.unit=multi-user.target e similari, e spostarsi tra i vari target via systemctl isolate.
  7. Provare le seguenti opzioni kernel:
    1. systemd.unit=emergency.target (opzione che da un risultato simile al passaggio di init=/bin/sh, con la differenza di poter avviare il sistema completo a partire da questo stato)
    2. systemd.unit=rescue.target (opzione simile al precedente, ma più equivalente al boot in modalità single user su SysV)
    3. systemd.unit=multi-user.target (per l'avvio senza supporto grafico)
    4. systemd.unit=graphical.target (per il normale avvio con supporto grafico, pedefinito)


Esperienza Utente

L'utente dovrebbe notare un boot-up più rapido, particolarmente su unità SSD.

Le funzionalità di amministrazione del sistema di init sono notevolmente estese (per maggiori dettagli vedere il link citato blog post, in particolare la parte A short list of other features.

I file di configurazione dei servizi sono più semplici da capire e configurare rispetto agli script di SysV.

Dependencies

  • Successful Fedora Package review and addition to rawhide: DONE
  • systemd upstream currently lacks three features that we need before Fedora 15:
    • proper support for selinux (needs policy changes, and we want to move the policy setup in systemd, not in the initrd). DONE: Latest selinux policy update include changes for systemd.
    • We need sysv compatible implementations for /bin/reboot, /bin/shutdown and friends. We currently simply use the implementations upstart provides which work fine, but of course are suboptimal as soon as we want to replace upstart completely. DONE
    • complete set of man pages (parts are already documented, this is far from complete however). DONE
  • The readahead packages need to be adapted for systemd. readahead is currently one of the very few packages using upstart specific features and hence is not activated when booting with systemd. However, due to the more aggressive parallelization, disk access is much more random when systemd is used and hence the effect of readahead considerable. Or to put it the other way round: unless we have readahead systemd won't perform any better than upstart/sysv during bootup on rotating media. On SSD systemd is considerably faster though in every case as readahead is not necessary there. DONE: systemd now includes its own minimal readahead implementation
  • A number of daemons should provide native systemd .service files in addition to sysv init scripts. I have service files for almost all standard F14 services ready, which just need to be added to the rpms. (MOSTLY DONE)
  • A number of daemons should be patched for socket activation: rsyslog (UPSTREAM MERGED), dbus (DONE), portmap (PENDING), avahi (DONE), cups. These patches exist (and are public) and should have upstreamable quality, but they need to be reviewed and added to the rpms.
  • A number of daemons should ship changed bus activation files to hook them up to systemd for activation (single-line change per package)

Contingency Plan

  • Revert back to ship the current Upstart package, and offer systemd just as an alternative.

Documentation

Release Notes

Fedora 15 has replaced Upstart with systemd. systemd uses services files located in /lib/systemd/system for services, and /etc/systemd/system for configuration. A dozen desktop daemons [list them] have been initially converted to use systemd service files and small number of programs have been patched to take advantage of it. systemd is compatible with legacy SysV init scripts and rest of the migration will happen incrementally over time.