1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00
Commit Graph

12060 Commits

Author SHA1 Message Date
Umut Tezduyar
97d0e5f83b manager: add DefaultEnvironment option
This complements existing functionality of setting variables
through 'systemctl set-environment', the kernel command line,
and through normal environment variables for systemd in session
mode.
2013-06-20 16:27:45 -04:00
Zbigniew Jędrzejewski-Szmek
8c1396b1c2 journalctl: show lines in full with --all
In 31f7bf1 "logs-show: print multiline messages", I forgot
to take into account the fact that --all implies --full for
journalctl.
2013-06-20 16:15:04 -04:00
Harald Hoyer
6c10d39970 kernel-install: filter out "initrd=" from /proc/cmdline 2013-06-20 15:47:19 +02:00
Zbigniew Jędrzejewski-Szmek
b3629c7da0 logind: uninitialized variable 2013-06-20 00:51:10 -04:00
Zbigniew Jędrzejewski-Szmek
ac34b3af13 build-sys: make intltool and distcheck happy 2013-06-20 00:50:22 -04:00
Zbigniew Jędrzejewski-Szmek
bd5a54582a nspawn: '-C' option has been removed
Fixup for 9444b1f "logind: add infrastructure to keep track of
machines, and move to slices."
2013-06-20 00:05:52 -04:00
Lennart Poettering
ba73ed858f sd-login: update machine enumeration/notifications APIs for new /run/systemd/machines/ 2013-06-20 04:03:38 +02:00
Lennart Poettering
5caef0fc19 logind: make ListMachines bus call public 2013-06-20 04:00:28 +02:00
Lennart Poettering
9444b1f20e logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
  than fixed croup locations.

- logind can now collect minimal information about running
  VMs/containers. As fixed cgroup locations can no longer be used we
  need an entity that keeps track of machine cgroups in whatever slice
  they might be located. Since logind already keeps track of users,
  sessions and seats this is a trivial addition.

- nspawn will now register with logind and pass various bits of metadata
  along. A new option "--slice=" has been added to place the container
  in a specific slice.

- loginctl gained commands to list, introspect and terminate machines.

- user.slice and machine.slice will now be pulled in by logind.service,
  since only logind.service requires this slice.
2013-06-20 03:49:59 +02:00
Łukasz Stelmach
77f40f165c Describe handling of an AF_UNIX socket
Describe how to handle an AF_UNIX socket, with Accept set to false,
received from systemd, upon exit.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2013-06-19 15:24:05 -07:00
Zbigniew Jędrzejewski-Szmek
c25b1ee6cd core/dbus: properly export cgroup properties on sockets
https://bugs.freedesktop.org/show_bug.cgi?id=65945
2013-06-19 18:09:54 -04:00
Zbigniew Jędrzejewski-Szmek
422fa6500a cgls,loginctl,systemctl: fix -l
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l
as alias for --full".
2013-06-19 18:08:14 -04:00
Lennart Poettering
fe004b7c3a journal: add references to SSKG paper FSS is based on 2013-06-18 16:25:11 +02:00
Lennart Poettering
55d32caf94 update TODO 2013-06-18 16:06:36 +02:00
Zbigniew Jędrzejewski-Szmek
718fe4b1d5 journalctl: properly print headers of empty journals 2013-06-18 08:50:08 -04:00
Sean McGovern
214daa72cb udev: handle network controllers in nonstandard domains
Onboard network controllers are not always on PCI domain 0.

[Kay: use int instead of long, add [P] to slot naming, remove sysname var]
2013-06-18 13:18:27 +02:00
Lennart Poettering
702a2d8f6a core: unref slice ref after use 2013-06-18 02:07:35 +02:00
Lennart Poettering
4ec9a8a48d core: expose a "Slice" property on Unit objects on the bus 2013-06-18 01:00:13 +02:00
Lennart Poettering
f2561e8598 units: add default units for system.slice, user.slice, machine.slice 2013-06-18 00:59:54 +02:00
Lennart Poettering
a016b9228f core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.

Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.

Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree.
2013-06-17 21:36:51 +02:00
Ross Lagerwall
c647f10918 rules: only run systemd-sysctl when a network device is added
Otherwise, when a network device is renamed, systemd-sysctl is run twice
with the same network device name: once for ACTION="add" and once for
ACTION="move".
2013-06-17 21:17:59 +02:00
Lennart Poettering
602c0e740f mount: when learning about the root mount from mountinfo, don't add conflicting dep for umount.target
That way systemd won't try to umount it at shutdown.
2013-06-17 21:12:53 +02:00
Lennart Poettering
ed8086d119 rpm: define a %_userunitdir macro 2013-06-17 18:37:25 +02:00
Daniel Albers
98a6e132b5 journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full
https://bugs.freedesktop.org/show_bug.cgi?id=65850
2013-06-17 10:33:34 -04:00
Zbigniew Jędrzejewski-Szmek
fa3868c6d3 man: update systemd-analyze invocation 2013-06-14 16:25:38 -04:00
Gabriel de Perthuis
805bf39ce7 systemd-analyze: Show critical chains for listed units 2013-06-14 16:21:41 -04:00
Jason St. John
3ae83f9896 man: improve readability of "_TRANSPORT=" section in systemd.journal-fields(7)
The list and descriptions of valid transports was difficult to read, so
break the long sentence up into discrete man page list items to improve
readability.
2013-06-14 16:21:41 -04:00
Zbigniew Jędrzejewski-Szmek
5e9dfd2ef9 man: add sd_j_open_files to return values section 2013-06-13 23:36:08 -04:00
Zbigniew Jędrzejewski-Szmek
e40ec7aec5 journald: do not calculate free space too early
Since the system journal wasn't open yet, available_space() returned 0.

Before:
systemd-journal[22170]: Allowing system journal files to grow to 4.0G.
systemd-journal[22170]: Journal size currently limited to 0B due to SystemKeepFree.

After:
systemd-journal[22178]: Allowing system journal files to grow to 4.0G.
systemd-journal[22178]: Journal size currently limited to 3.0G due to SystemKeepFree.

Also, when failing to write a message, show how much space was needed:
"Failed to write entry (26 items, 260123456 bytes) despite vacuuming, ignoring: ...".
2013-06-13 23:35:12 -04:00
Zbigniew Jędrzejewski-Szmek
6e5abe1564 journal: use initialization instead of zeroing 2013-06-13 23:32:14 -04:00
Zbigniew Jędrzejewski-Szmek
330fe879ba build-sys: add 'man' target
Useful when working just on the documentation.
2013-06-12 13:41:08 -04:00
Jan Janssen
3a0e7bf541 gitignore: Add test-journal-interleaving 2013-06-12 09:25:21 -04:00
Ross Burton
622004565e build-sys: don't install quotaon.service twice
quotaon.service is already installed through dist_systemunit_DATA, so it doesn't
need to be added to nodist_systemunit_DATA.  Installing the same file twice
results in a race condition where the install process can fail.

https://bugs.freedesktop.org/show_bug.cgi?id=65659

[zj: actually remove quotaon.service from the other list.]
2013-06-12 01:40:02 -04:00
Jason St. John
3c527fd195 bootchart: fix typos in copyright notices
"Corporation" was misspelled as "Coproration"
2013-06-12 01:40:02 -04:00
Lennart Poettering
1f263d4dc2 update TODO 2013-06-11 08:55:42 +02:00
Zbigniew Jędrzejewski-Szmek
49998b3832 journald: do not overwrite syslog facility when parsing priority
https://bugs.freedesktop.org/show_bug.cgi?id=65610
2013-06-10 18:10:12 -04:00
Zbigniew Jędrzejewski-Szmek
d783cd0423 build-sys: remove SD_JOURNAL_SYSTEM_ONLY(3) from Makefile 2013-06-10 15:08:11 -04:00
Zbigniew Jędrzejewski-Szmek
7699b6eb98 man: add note that sd_journal_open_files is racy 2013-06-10 10:22:08 -04:00
Zbigniew Jędrzejewski-Szmek
cbd671772c journal: letting (interleaved) seqnums go
In the following scenario:
  server creates system.journal
  server creates user-1000.journal
both journals share the same seqnum_id.
Then
  server writes to user-1000.journal first,
  and server writes to system.journal a bit later,
and everything is fine.
The server then terminates (crash, reboot, rsyslog testing,
whatever), and user-1000.journal has entries which end with
a lower seqnum than system.journal. Now
  server is restarted
  server opens user-1000.journal and writes entries to it...
BAM! duplicate seqnums for the same seqnum_id.

Now, we usually don't see that happen, because system.journal
is closed last, and opened first. Since usually at least one
message is written during boot and lands in the system.journal,
the seqnum is initialized from it, and is set to a number higher
than than anything found in user journals. Nevertheless, if
system.journal is corrupted and is rotated, it can happen that
an entry is written to the user journal with a seqnum that is
a duplicate with an entry found in the corrupted system.journal~.
When browsing the journal, journalctl can fall into a loop
where it tries to follow the seqnums, and tries to go the
next location by seqnum, and is transported back in time to
to the older duplicate seqnum. There is not way to find
out the maximum seqnum used in a multiple files, without
actually looking at all of them. But we don't want to do
that because it would be slow, and actually it isn't really
possible, because a file might e.g. be temporarily unaccessible.

Fix the problem by using different seqnum series for user
journals. Using the same seqnum series for rotated journals
is still fine, because we know that nothing will write
to the rotated journal anymore.

Likely related:
https://bugs.freedesktop.org/show_bug.cgi?id=64566
https://bugs.freedesktop.org/show_bug.cgi?id=59856
https://bugs.freedesktop.org/show_bug.cgi?id=64296
https://bugs.archlinux.org/task/35581
https://bugzilla.novell.com/show_bug.cgi?id=817778

Possibly related:
https://bugs.freedesktop.org/show_bug.cgi?id=64293
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
5cb24cd32b tests: add testcase for duplicate seqnums 2013-06-10 10:10:07 -04:00
Marius Vollmer
7a050b54b7 tests: add testcase for skipping-entries-on-direction-change-bug
This test case failed until a3e6f050de.

Taken from https://bugs.freedesktop.org/show_bug.cgi?id=65255.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
bc3029268c journal: change direction tests to use the same convention (cp </> np)
The order was different in various places, which makes it harder to
read to code. Also consistently use ternany for all direction checks.

Remove one free(NULL).
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
87011c25d9 journal: remember last direction of search and keep offset cache
The fields in JournalFile are moved around to avoid wasting
7 bytes because of alignment.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
8d98da3f11 journalctl: allow the user to specify the file(s) to use
This is useful for debugging and feels pretty natural. For example
answering the question "is this big .journal file worth keeping?"
is made easier.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
5302ebe15f journal: add sd_journal_open_files
This allows the caller to explicitly specify which journal files
should be opened. The same functionality could be achieved before
by creating a directory and playing around with symlinks. It
is useful to debug stuff and explore the journal, and has been
requested before.

Waiting is supported, the journal will notice modifications on
the files supplied when opening the journal, but will not add
any new files.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
6eb7a9a001 tests: add test for empty journal files
The headers are currently not printed properly: some "(null)"s appear.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
ed375bebf4 journalctl: print monotonic timestamp in --header 2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
2765b7bb69 journalctl: print proper IDs with --header
The same buffer was used for two different IDs, messing up
the output.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
507f22bd01 Use stdint.h macros instead of casts to print uint64_t values
Casts are visually heavy, and can obscure unwanted truncations.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek
b32ff51219 Properly check for overflow in offsets 2013-06-10 10:10:06 -04:00