Commit graph

10572 commits

Author SHA1 Message Date
Steven Hiscocks 3ce2cc25bb systemd-python: MESSAGE_ID as UUID for Journal 2013-02-22 16:57:43 +01:00
Steven Hiscocks 2d0603bd97 systemd-python: moved PyRun_String to journal.py code 2013-02-22 16:57:43 +01:00
Steven Hiscocks c4e9b5b557 systemd-python: add Journal class for reading journal 2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 9015fa646e python: build html docs using sphinx
Build instructions:
   make
   make DESTIDIR=/tmp/... install
   make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek d489071fb3 journalct: also print Python code in --new-id 2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek afcd68c149 python: utilize uuid.UUID in logging 2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 927e96326c python: add systemd.id128 module
uuid.UUIDs are utilized to hold UUID values.
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 89f603f5d8 TODO: drop two items 2013-02-22 16:55:14 +01:00
Michal Schmidt 47a0eaa60c systemctl: generalize action table to be usable in more action<->verb mappings
Should be no functional change.
2013-02-22 16:06:18 +01:00
Michal Schmidt b85bdddafb systemctl: make shutdown operations use irreversible jobs
Occasionally people report problem with reboot/poweroff operations hanging in
the middle. One known cause is when a new transaction to start a unit is
enqueued while the shutdown is going on. The start of the unit conflicts with
the shutdown jobs, so they get cancelled. The failure case can be quite unpleasant,
becase getty and sshd may already be stopped.

Fix it by using irreversible jobs for shutdown (reboot/poweroff/...) actions.
This applies to commands like "reboot", "telinit 6", "systemctl reboot". Should
someone desire to use reversible jobs, they can say "systemctl start reboot.target".`
2013-02-22 16:06:17 +01:00
Michal Schmidt 23ade460e5 core, systemctl: add support for irreversible jobs
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode
cannot be implicitly canceled by later enqueued conflicting jobs.
They can however still be canceled with an explicit "systemctl cancel"
call.
2013-02-22 16:06:17 +01:00
Michal Schmidt b7cf6049a3 systemctl: make "systemctl default" use "isolate" job mode
"systemctl default" should behave identically to "telinit N" (where N is the
corresponding runlevel target number), therefore it should use isolate job mode
too.
2013-02-22 16:06:17 +01:00
Zbigniew Jędrzejewski-Szmek 6f47ad3025 journal: sd_journal_get_cursor should return 0 on success
Documentation states that 0 is correct, and all other
similar functions return 0 on success.

Pointed-out-by: Steven Hiscocks <steven-systemd@hiscocks.me.uk>
2013-02-22 11:19:00 +01:00
Harald Hoyer 2792bd6fef TODO: removed ratelimit 2013-02-21 10:30:14 +01:00
Harald Hoyer 696164cb5b fstab-generator: change kernel command line mount path for root
Use /sysroot instead of /new_root to mount the real root in the
initramfs.
2013-02-21 10:27:38 +01:00
Max F. Albrecht 22382c3f57 man: be even more clear about ExecStart's first argument. 2013-02-20 13:49:57 -08:00
Thomas Hindoe Paaboel Andersen 8d99e5f530 tests: more tests for util.c
tests for:
  test_parse_pid
  test_parse_uid
  test_safe_atolli
  test_safe_atod
2013-02-20 22:36:43 +01:00
Zbigniew Jędrzejewski-Szmek 599391d88b man: document %% 2013-02-20 11:17:43 +01:00
Daniel Buch 9f31636648 test-strv.c: ported test_specifier_printf() to _cleanup_free_ + assert_se + cleanup 2013-02-18 23:57:56 +01:00
Daniel Buch 04045d8426 test-strv.c: added OOM check for current tests
New OOM check patch:

I do assert_se() before variable is used to do correct check.
2013-02-18 23:57:48 +01:00
Daniel Buch 2f213f7493 test-strv.c: added strv_split_nulstr() test 2013-02-18 23:57:43 +01:00
Thomas Hindoe Paaboel Andersen 0d585d8291 tests: add test of memdup_multiply 2013-02-18 23:57:36 +01:00
William Giokas 1e447e0a3c man: Add reason for disk model info not working
In systemd-bootchart, the disk model information will not be found
unless the root device is specified using `root=/dev/sdxY` on the kernel
line. Just add a note as to why this doesn't happen.
2013-02-17 14:46:22 -08:00
Kay Sievers 71bf4f6f6c bootctl: show "n/a" for empty boot option labels 2013-02-17 22:28:21 +01:00
Kay Sievers 7962afbba9 udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer 2013-02-17 21:16:56 +01:00
Kay Sievers a2cbfd5916 udev: usb_id - ignore non-ASCII serial numbers
On Thu, Feb 7, 2013 at 3:52 PM, Robert Milasan <rmilasan@suse.com> wrote:
> Hi, seems that using some strange usb devices with really bogus serial
> numbers usb_id creates links with junk strings in it:
>
> /dev/disk/by-id/usb-TSSTcorp_BDDVDW_SE-506AB_㡒䍌䜶䉗ぁㄴ㌴†ँ-0:0
>
> Initially was believed that usb_id is to blame, then the kernel, but it
> turns out that really the usb cd/dvd drive has this bogus serial number:
>
> output from dmesg:
> [  538.200160] usb 1-2: new high-speed USB device number 5 using
> ehci_hcd [  538.335067] usb 1-2: New USB device found, idVendor=0e8d,
> idProduct=1956 [  538.335080] usb 1-2: New USB device strings: Mfr=1,
> Product=2, SerialNumber=3 [  538.335089] usb 1-2: Product: MT1956
> [  538.335097] usb 1-2: Manufacturer: MediaTek Inc
> [  538.335105] usb 1-2: SerialNumber:
> \xffffffe3\xffffffa1\xffffff92\xffffffe4\xffffff8d\xffffff8c ...
> [  538.337540] scsi6 : usb-storage 1-2:1.0 [  539.341385] scsi 6:0:0:0:
> CD-ROM            TSSTcorp BDDVDW SE-506AB  TS00 PQ: 0 ANSI: 0
> [  539.354240] sr0: scsi3-mmc drive: 0x/24x writer dvd-ram cd/rw
> xa/form2 cdda tray [  539.354777] sr 6:0:0:0: Attached scsi CD-ROM sr0
> [  539.355122] sr 6:0:0:0: Attached scsi generic sg2 type 5
2013-02-17 21:16:08 +01:00
Kay Sievers 02a6fc3ea6 efi: compare by substraction 2013-02-17 19:54:29 +01:00
Zeeshan Ali (Khattak) ddb5bee15a udev: expose new ISO9660 properties from libblkid 2013-02-17 02:47:17 +01:00
Auke Kok 486bdbded8 TODO 2013-02-16 16:40:02 -08:00
Zbigniew Jędrzejewski-Szmek 033a842c36 systemctl: allow comma sepearted property lists 2013-02-16 17:36:00 -05:00
Zbigniew Jędrzejewski-Szmek 4a6022f01c man: prettify systemctl(1)
- reindent with two spaces, otherwise everything is squeezed near
  the right margin,
- mark only optional arguments as optional,
- some typos, etc.
2013-02-16 17:35:54 -05:00
Zbigniew Jędrzejewski-Szmek 6d26799179 bootchart: rename --filter to --no-filter
Turning off filtering with --filter is just too confusing.
Config option "Filter" doesn't have to be changed, here
"Filter=yes" already meant to filter.
2013-02-16 15:16:24 -05:00
Zbigniew Jędrzejewski-Szmek 547ba5a9e8 bootchart: provide better error messages 2013-02-16 15:10:58 -05:00
Zbigniew Jędrzejewski-Szmek f1c24fea94 man: move bootchart README to manpage, docbooksify 2013-02-16 15:10:40 -05:00
Jan Janssen d0a5cdb280 systemctl: Don't give re-activation warning if unit is masked 2013-02-16 09:53:49 -05:00
Zbigniew Jędrzejewski-Szmek 265a7a2a60 systemctl: allow status with no units
This makes 'status' behave like 'list-units':
systemctl status -> status of all units
systemctl -t error status -> status of error units
systemctl -t mount status -> etc.
2013-02-16 09:53:49 -05:00
Michal Schmidt 9d246da3c6 unit: don't Require systemd-journald.socket from units
It is not really necessary to have a hard requirement dependency on
systemd-journald.socket in almost every unit. The socket gets pulled
into boot via at least two ways:
 sockets.target -> systemd-journald.socket
 sysinit.target -> systemd-journald.service -> systemd-journald.socket

So just assume something pulled the socket in and drop the automatic
requirement dependencies on it.

"systemctl stop systemd-journald.socket" will now not take the whole
system down with it.
2013-02-16 01:18:09 +01:00
Michal Schmidt 80cbda3558 execute: increase severity of journal connect failure message
journald is supposed to work. Failure to connect to its socket implies
losing messages. It should be a very unusual event. Log the failure with
LOG_CRIT.

Just because this unit's stdout/stderr failed to connect to the journal
does not necessarily mean that we shouldn't try to log the failure using
a structured entry, so let's use log_struct_unit.
2013-02-16 01:18:08 +01:00
Michal Schmidt eb17e93598 execute: unify setup_{output,error}
The functions are quite similar. Unify them into one.

The source gets shorter, the binary gets slightly smaller.
2013-02-16 01:18:08 +01:00
Michal Schmidt 47c1d80d84 execute: robustness against journald failures
Almost every unit logs to the journal. If journald gets a permanent
failure, units would not be able to start (exit code 209/STDOUT).

Add a fallback to /dev/null to avoid making the system entirely
unusable in such a case.
2013-02-16 01:18:02 +01:00
Michal Schmidt 4a01181e46 log: fix fallbacks to kmsg
write_to_journal() returns 0 if journal_fd is closed and nothing is
written. We need to make sure we'll try log_open_kmsg() then to make the
fallback work for "journal-or-kmsg".
2013-02-16 01:16:32 +01:00
William Giokas e57b477183 man: Update bootchart.conf(5)
Recent changes in config options makes almost eveny variable in the man
page obsolete.
2013-02-14 16:18:46 -08:00
Harald Hoyer 8846199d20 bootchart: if "root=/dev" is not matched, don't try to read /sys 2013-02-14 13:49:48 -08:00
Thomas Hindoe Paaboel Andersen 39ccc87c8a update TODO 2013-02-14 22:16:58 +01:00
Thomas Hindoe Paaboel Andersen 0e4ffbff01 bootchart: stricter checks of cli input 2013-02-14 22:04:17 +01:00
Thomas Hindoe Paaboel Andersen f7900e258d bootchart: use conf-parser & CamelCase names in .conf 2013-02-14 21:36:45 +01:00
Umut Tezduyar 47a81ba2e1 core: do not overwrite existing units source
Only set source for freshly created .mounts coming from
mountinfo file.
2013-02-14 15:26:34 -05:00
Zbigniew Jędrzejewski-Szmek f6bb13ab8d systemctl: print wall message only if successful
systemctl would write to the wall even if unsuccessful.

https://bugs.freedesktop.org/show_bug.cgi?id=60393
2013-02-14 15:26:34 -05:00
Zbigniew Jędrzejewski-Szmek cec7eda533 systemctl: use automatic cleanup 2013-02-14 15:26:34 -05:00
Zbigniew Jędrzejewski-Szmek 5659774c57 nspawn: fail if unable to close pipe 2013-02-14 15:26:33 -05:00