summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2013-06-25systemctl: conform to LSB with the "status" return codeHarald Hoyer
check for pid file existance before returning 1
2013-06-25systemctl: conform to LSB with the "status" return codeHarald Hoyer
http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action https://bugzilla.redhat.com/show_bug.cgi?id=975016
2013-06-24journald: always vacuum empty offline filesZbigniew Jędrzejewski-Szmek
Corrupted empty files are relatively common. I think they are created when a coredump for a user who never logged anything before is attempted to be written, but the write does not succeed because the coredump is too big, but there are probably other ways to create those, especially if the machine crashes at the right time. Non-corrupted empty files can also happen, e.g. if a journal file is opened, but nothing is ever successfully written to it and it is rotated because of MaxFileSec=. Either way, each "empty" journal file costs around 3 MB, and there's little point in keeping them around.
2013-06-24journald: fix space limits reportingZbigniew Jędrzejewski-Szmek
Reporting of the free space was bogus, since the remaining space was compared with the maximum allowed, instead of the current use being compared with the maximum allowed. Simplify and fix by reporting limits directly at the point where they are calculated. Also, assign a UUID to the message.
2013-06-24journal/vacuum: cleanupZbigniew Jędrzejewski-Szmek
2013-06-24libudev: Use correct type for sizeofJan Janssen
2013-06-22journal-verify: allow unlinked data entriesZbigniew Jędrzejewski-Szmek
Sometimes an entry is not successfully written, and we end up with data items which are "unlinked", not connected to, and not used by any entry. This will usually happen when we write to write a core dump, and the initial small data fields are written successfully, but the huge COREDUMP= field is not written. This situation is hard to avoid, but the results are mostly harmless. Thus only warn about unused data items. Also, be more verbose about why journal files failed verification. This should help diagnose journal failure modes without resorting to a hexadecimal editor. https://bugs.freedesktop.org/show_bug.cgi?id=65235 (esp. see system.journal attached to the bug report).
2013-06-21tmpfiles: fix error checkLennart Poettering
2013-06-21journald: bump the journal per-unit ratelimit defaultsLennart Poettering
Too many people kept hitting them, so let's increase the limits a bit. https://bugzilla.redhat.com/show_bug.cgi?id=965803
2013-06-21keymap: Apply to all Latitude and Precision modelsMartin Pitt
https://launchpad.net/bugs/1193147
2013-06-20journalctl,systemctl: show messages tagged with OBJECT_SYSTEMD_[USER_]_UNITZbigniew Jędrzejewski-Szmek
Replace mallocs with alloca while at it.
2013-06-20Make sure we only show authentic coredump messagesZbigniew Jędrzejewski-Szmek
Before we only checked the MESSAGE_ID and COREDUMP_UNIT. Those are both user-controlled fields. For COREDUMP_USER_UNIT, relax the rules a bit, and also allow messages from _UID=0.
2013-06-20journal: allow callers to specify OBJECT_PID=Zbigniew Jędrzejewski-Szmek
When journald encounters a message with OBJECT_PID= set coming from a priviledged process (UID==0), additional fields will be added to the message: OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=, OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=, OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=, OBJECT_SYSTEMD_UNIT= or OBJECT_SYSTEMD_USER_UNIT=. This is for other logging daemons, like setroubleshoot, to be able to augment their logs with data about the process. https://bugzilla.redhat.com/show_bug.cgi?id=951627
2013-06-20Add hasprefix macro to check prefixes of fixed lengthZbigniew Jędrzejewski-Szmek
2013-06-21login: add an api to determine the slice a PID is located in to libsystemd-loginLennart Poettering
2013-06-20core: only attempt to connect to a session bus if one likely exists.Auke Kok
2013-06-20manager: add DefaultEnvironment optionUmut Tezduyar
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-20journalctl: show lines in full with --allZbigniew Jędrzejewski-Szmek
In 31f7bf1 "logs-show: print multiline messages", I forgot to take into account the fact that --all implies --full for journalctl.
2013-06-20kernel-install: filter out "initrd=" from /proc/cmdlineHarald Hoyer
2013-06-20logind: uninitialized variableZbigniew Jędrzejewski-Szmek
2013-06-20nspawn: '-C' option has been removedZbigniew Jędrzejewski-Szmek
Fixup for 9444b1f "logind: add infrastructure to keep track of machines, and move to slices."
2013-06-20sd-login: update machine enumeration/notifications APIs for new ↵Lennart Poettering
/run/systemd/machines/
2013-06-20logind: make ListMachines bus call publicLennart Poettering
2013-06-20logind: add infrastructure to keep track of machines, and move to slicesLennart Poettering
- 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-19core/dbus: properly export cgroup properties on socketsZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=65945
2013-06-19cgls,loginctl,systemctl: fix -lZbigniew Jędrzejewski-Szmek
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full".
2013-06-18journal: add references to SSKG paper FSS is based onLennart Poettering
2013-06-18journalctl: properly print headers of empty journalsZbigniew Jędrzejewski-Szmek
2013-06-18udev: handle network controllers in nonstandard domainsSean McGovern
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-18core: unref slice ref after useLennart Poettering
2013-06-18core: expose a "Slice" property on Unit objects on the busLennart Poettering
2013-06-17core: add new .slice unit type for partitioning systemsLennart Poettering
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-17mount: when learning about the root mount from mountinfo, don't add ↵Lennart Poettering
conflicting dep for umount.target That way systemd won't try to umount it at shutdown.
2013-06-17rpm: define a %_userunitdir macroLennart Poettering
2013-06-17journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --fullDaniel Albers
https://bugs.freedesktop.org/show_bug.cgi?id=65850
2013-06-14systemd-analyze: Show critical chains for listed unitsGabriel de Perthuis
2013-06-13journald: do not calculate free space too earlyZbigniew Jędrzejewski-Szmek
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-13journal: use initialization instead of zeroingZbigniew Jędrzejewski-Szmek
2013-06-12bootchart: fix typos in copyright noticesJason St. John
"Corporation" was misspelled as "Coproration"
2013-06-10journald: do not overwrite syslog facility when parsing priorityZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=65610
2013-06-10journal: letting (interleaved) seqnums goZbigniew Jędrzejewski-Szmek
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-10tests: add testcase for duplicate seqnumsZbigniew Jędrzejewski-Szmek
2013-06-10tests: add testcase for skipping-entries-on-direction-change-bugMarius Vollmer
This test case failed until a3e6f050de8. Taken from https://bugs.freedesktop.org/show_bug.cgi?id=65255.
2013-06-10journal: change direction tests to use the same convention (cp </> np)Zbigniew Jędrzejewski-Szmek
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-10journal: remember last direction of search and keep offset cacheZbigniew Jędrzejewski-Szmek
The fields in JournalFile are moved around to avoid wasting 7 bytes because of alignment.
2013-06-10journalctl: allow the user to specify the file(s) to useZbigniew Jędrzejewski-Szmek
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-10journal: add sd_journal_open_filesZbigniew Jędrzejewski-Szmek
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-10tests: add test for empty journal filesZbigniew Jędrzejewski-Szmek
The headers are currently not printed properly: some "(null)"s appear.
2013-06-10journalctl: print monotonic timestamp in --headerZbigniew Jędrzejewski-Szmek
2013-06-10journalctl: print proper IDs with --headerZbigniew Jędrzejewski-Szmek
The same buffer was used for two different IDs, messing up the output.