Commit Graph

20370 Commits

Author SHA1 Message Date
Lennart Poettering e885c2084a update TODO 2015-05-19 19:54:39 +02:00
Lennart Poettering 45d383a3b8 units: make sure systemd-nspawn@.slice instances are actually located in machine.slice
https://plus.google.com/112206451048767236518/posts/SYAueyXHeEX
2015-05-19 19:49:01 +02:00
Lennart Poettering aad1976ffa core: don't consider boot-up finished if we are still reloading
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032025.html
2015-05-19 19:26:53 +02:00
Thomas Hindoe Paaboel Andersen 6d9bad91d7 pull-dkr: fix memleak 2015-05-19 19:24:47 +02:00
Pavel Odvody 2c4fb0eab8 import/pull-dkr: V2 image specification and manifest support
The maximum number of layers changed to 127, as in Dkr.
2015-05-19 18:21:56 +02:00
Pavel Odvody 7037d506b3 import/pull: Tag replaced with reference
Default pull version set to V2
2015-05-19 18:21:53 +02:00
Pavel Odvody d4fc45afa9 test/test-json: Tests for the tokenizer bugfix and the DOM parser
The DOM parser tests are accompanied with structure and element analysis
2015-05-19 18:21:51 +02:00
Pavel Odvody ed967b12be shared/json: Added DOM-like JSON parser
This makes working with complexly structured documents easy
and more reliable as the parser is not susceptible to
element re-ordering.

Also fixes a bug when the tokenizer would choke after reading
a number.
2015-05-19 18:21:48 +02:00
Pavel Odvody 74eff91e5f shared/import-util: Tag renamed to reference
Added (sha256) digest validation function
2015-05-19 18:21:46 +02:00
Lennart Poettering c6497ccb71 core: when propagating restart requests due to deps, downgrade restart to try-restart
Previously, if a service A depended on a service B via Requires=, and A
was not running and B restarted this would trigger a start of A as well,
since the restart was propagated as restart independently of the state
of A.

This patch ensures that a restart of B would be propagated as a
try-restart to A, thus not changing its state if it isn't up.

http://lists.freedesktop.org/archives/systemd-devel/2015-May/032061.html
2015-05-19 18:21:19 +02:00
Tom Gundersen 9ee18af3a0 dhcp-identifier: fix for unaligned write
Reported by Michael Olbrich.
2015-05-19 18:00:26 +02:00
Lennart Poettering 69301c1743 core: sd_bus_error() already checks for NULL, no need to duplicate check 2015-05-19 17:56:44 +02:00
Lennart Poettering ce74e76920 core: reinstate propagation of stop/restart jobs via RequsiteOf dependencies
This reverts the primary effect of be7d9ff730.

After all Requisite= should be close to Requires=, without the one
exception that it doesn't pull in dependencies on start. However,
reverse deps on stop/restart should be treated the same way as for
Restart=, and this is already documented in the man page, hence stick to
it.

http://lists.freedesktop.org/archives/systemd-devel/2015-May/032049.html
2015-05-19 17:48:12 +02:00
Jan Synacek 55ede093a5 util: fix typo 2015-05-19 17:28:16 +02:00
Lennart Poettering 394763f63c mount: properly check for mounts currently in /proc/self/mountinfo
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032059.html
2015-05-19 17:19:27 +02:00
Lennart Poettering 711e02cb47 Update TODO 2015-05-19 16:57:33 +02:00
Lennart Poettering ed10fa8ce2 unit: drop support for pre-v44 job serialization
No distro ships that old systemd versions anyway, hence let's drop
support for live-upgrades for them. Offline updates are still supported.
And live-upgrades will only lose the job queue, hence basically still
work...
2015-05-19 16:41:14 +02:00
Lennart Poettering 67bfdc9771 core: also enforce ratelimiter if we stop a unit due to BindsTo=
This extends on bea355dac9, and extends
the ratelimiter to not only be used for StopWhenUnneeded=1 units but
also for units that have BindsTo= on a unit that is dead.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19 16:23:14 +02:00
Lennart Poettering f8a30ce524 core: use bitfield where possible 2015-05-19 16:03:01 +02:00
Lennart Poettering 6b83b5e8d4 update TODO 2015-05-19 16:02:51 +02:00
Lennart Poettering bea355dac9 core: enforce a ratelimiter when stopping units due to StopWhenUnneeded=1
Otherwise we might end up in an endless stop loop.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
2015-05-19 16:00:24 +02:00
Lennart Poettering f3b85044c8 unit: fix unit_check_unneeded() dependency iteration
Fixes a regression introduced in be7d9ff730.
2015-05-19 15:42:42 +02:00
Lennart Poettering fcd8b266ed mount: don't claim a device is gone from /proc/self/mountinfo before it is gone from *all* lines
Devices might be referenced by multiple mount points in
/proc/self/mountinfo, hence we should consider them unmounted only after
they disappeared from all lines, not just from one.

http://lists.freedesktop.org/archives/systemd-devel/2015-May/032026.html
2015-05-19 13:50:36 +02:00
Martin Pitt 2005219f83 device: create units with intended "found" value
Change device_found_node() to also create a .device unit if a device is not
known by udev; this is the case for "tentative" devices picked up by mountinfo
(DEVICE_FOUND_MOUNT).  With that we can record the "found" attribute on the
unit.

Change device_setup_unit() to also accept a NULL udev_device, and don't
add the extra udev information in that case.

Previously device_found_node() would not create a .device unit, and
unit_add_node_link() would then create a "dead" stub one via
manager_load_unit(), so we lost the "found" attribute and unmounted everything
from that device.

https://launchpad.net/bugs/1444402
http://lists.freedesktop.org/archives/systemd-devel/2015-May/031658.html
2015-05-19 13:02:05 +02:00
Martin Pitt 139e533628 hostname: Allow comments in /etc/hostname
The hostname(1) tool allows comments in /etc/hostname. Introduce a new
read_hostname_config() in hostname-util which reads a hostname configuration
file like /etc/hostname, strips out comments, whitespace, and cleans the
hostname. Use it in hostname-setup.c and hostnamed and remove duplicated code.

Update hostname manpage. Add tests.

https://launchpad.net/bugs/1053048
2015-05-19 12:18:08 +02:00
Thomas Hindoe Paaboel Andersen e861098bf2 core: fix OOM checks in dbus-unit
CID#1299014
2015-05-19 06:46:59 +02:00
Thomas Hindoe Paaboel Andersen b669934fae test-hashmap: fix an assert
CID#1299016
2015-05-19 06:35:44 +02:00
Zbigniew Jędrzejewski-Szmek e88d8021ba man: explain UseDomains a bit more
https://bugs.freedesktop.org/show_bug.cgi?id=85397
2015-05-18 22:35:42 -04:00
Lennart Poettering 41bc22f3a0 update TODO 2015-05-19 01:32:40 +02:00
Lennart Poettering fd6c2363af update TODO 2015-05-19 01:27:33 +02:00
Lennart Poettering be7d9ff730 core: introduce seperate reverse dependencies for Requires= and Requisite=
This allows us to ensure that Requisite= dependencies never cause
propagation between units, while Requires= dependencies might.

http://lists.freedesktop.org/archives/systemd-devel/2015-May/031742.html
2015-05-19 01:24:28 +02:00
Lennart Poettering 9530e0d023 journalctl: unify how we free boot id lists a bit
Instead of use LIST_FOREACH_SAFE, just use the same, seperate destructor
everywhere.
2015-05-19 00:35:02 +02:00
Lennart Poettering b56d608e69 journalctl: clean up how we log errors
All functions should either log the errors they run into, or only return
them in which case the caller should log them.

Make sure this rule is followed, so that each error is logged precisely
once, and neither never, nor more than once.
2015-05-19 00:26:48 +02:00
Lennart Poettering 45bc27b621 journalctl: rename boot_id_t to BootId
So far we tried to reserve the _t suffix to types we use like a value in
contrast to types we use as objects, hence let's do this in journalctl
too.
2015-05-19 00:26:48 +02:00
Lennart Poettering 26b9f165c3 journalctl: lstat() should suffice if we call canonicalize_file_name() first 2015-05-19 00:26:48 +02:00
Lennart Poettering d52da2057f journalctl: free all command line argument objects
let's try to be valgrind clean
2015-05-19 00:26:48 +02:00
Lennart Poettering 909dea0c7c journalctl: only have a single exit path from main()
That way we can be sure we execute the destructors properly, and can be
valgrind-clean.
2015-05-19 00:26:48 +02:00
Jan Janssen 596a23293d journalctl: Improve boot ID lookup
This method should greatly improve offset based lookup, by simply jumping
from one boot to the next boot. It starts at the journal head to get the
a boot ID, makes a _BOOT_ID match and then comes from the opposite
journal direction (tail) to get to the end that boot. After flushing the matches
and advancing the journal from that exact position, we arrive at the start
of next boot. Rinse and repeat.

This is faster than the old method of aggregating the full boot listing just
so we can jump to a specific boot, which can be a real pain on big journals
just for a mere "-b -1" case.

As an additional benefit --list-boots should improve slightly too, because
it does less seeking.

Note that there can be a change in boot order with this lookup method
because it will use the order of boots in the journal, not the realtime stamp
stored in them. That's arguably better, though.
Another deficiency is that it will get confused with boots interleaving in the
journal, therefore, it will refuse operation in --merge, --file and --directory mode.

https://bugs.freedesktop.org/show_bug.cgi?id=72601
2015-05-19 00:26:48 +02:00
Tom Gundersen f53d1fcdb3 udevd: main - use _exit() when daemonizing
Makes it a bit clearer what is going on, rather than jumping to the end of main().

No functional change.
2015-05-18 23:49:35 +02:00
Tom Gundersen 712cebf146 udevd: main - reshuffle
First parse config, then sanitize environment before donig any further setup.

No functional change.
2015-05-18 23:49:35 +02:00
Tom Gundersen 0561329d1f udevd: rename on_reque_{exit,reload} to on_sig{term,chld}
No functional change.
2015-05-18 23:49:35 +02:00
Tom Gundersen 4fa4d88555 udevd: introduce on_event_timeout{,_warning}
This uses kill_and_sigcont() instead of kill(), otherwise no functional change.
2015-05-18 23:49:35 +02:00
Tom Gundersen f29328d655 udevd: process all SIGCHLD events every time the handler is invoked
We were returning rather than continuing in some cases. The intention
was always to fully process all pending events before returning
from the SIGCHLD handler. Restore this behaviour.
2015-05-18 23:49:35 +02:00
Tom Gundersen b2d21d9318 udevd: init/exit the builtins in manager_new/free
No functional change.
2015-05-18 23:49:35 +02:00
Tom Gundersen e237d8cb0e udevd: move file descriptors to Manager
No functional change.
2015-05-18 23:49:35 +02:00
Lennart Poettering 084cea6cee resolved: allow DnsAnswer objects with no space for RRs
They might be created as result of merged answer sets, hence accept
them.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030834.html
2015-05-18 23:38:47 +02:00
Lennart Poettering cab5b05903 resolved: fix crash when shutting down
Reported by Cristian Rodríguez

http://lists.freedesktop.org/archives/systemd-devel/2015-May/031626.html
2015-05-18 23:23:17 +02:00
Alban Crequy 6b7d2e9ea4 nspawn: close extra fds before execing init
When systemd-nspawn gets exec*()ed, it inherits the followings file
descriptors:
- 0, 1, 2: stdin, stdout, stderr
- SD_LISTEN_FDS_START, ... SD_LISTEN_FDS_START+LISTEN_FDS: file
  descriptors passed by the system manager (useful for socket
  activation). They are passed to the child process (process leader).
- extra lock fd: rkt passes a locked directory as an extra fd, so the
  directory remains locked as long as the container is alive.

systemd-nspawn used to close all open fds except 0, 1, 2 and the
SD_LISTEN_FDS_START..SD_LISTEN_FDS_START+LISTEN_FDS. This patch delays
the close just before the exec so the nspawn process (parent) keeps the
extra fds open.

This patch supersedes the previous attempt ("cloexec extraneous fds"):
http://lists.freedesktop.org/archives/systemd-devel/2015-May/031608.html
2015-05-18 22:24:15 +02:00
Lennart Poettering 8dc26de6da ata_id: drop spurious space 2015-05-18 21:52:26 +02:00
Lennart Poettering 8cb1cc8dc3 CODING_STYLE: document that we should avoid kernel types like u32 2015-05-18 18:47:52 +02:00