Commit Graph

21276 Commits

Author SHA1 Message Date
David Herrmann 8cd4eb791a Merge pull request #537 from poettering/nss-mymachines-userns
Hook up container userns with nss-mymachines
2015-07-23 09:53:47 +02:00
Daniel Mack e25aa3453b Merge pull request #663 from poettering/tmpfiles-chattr-enotty
tmpfiles: downgrade errors when a file system does not support file a…
2015-07-23 09:12:43 +02:00
Daniel Mack 33b63dd732 Merge pull request #673 from poettering/dns-packet-append-type-window
resolved: make sure we alway initialize *start in dns_packet_append_t…
2015-07-23 08:53:36 +02:00
Daniel Mack 2d3102cc40 Merge pull request #672 from poettering/bitmap-isclear
bitmap: bitmap_clear()
2015-07-23 08:49:14 +02:00
Lennart Poettering 6fa919016a resolved: make sure we alway initialize *start in dns_packet_append_type_window() 2015-07-23 04:54:35 +02:00
Lennart Poettering 05fb03beee bitmap: bitmap_clear()
No need to actually reset the bitmap, we can just truncate it back zero
size. That not only makes bitmap_clear() quicker, but also subsequent
bitmap_isclear().
2015-07-23 04:51:57 +02:00
Tom Gundersen f7d51e1c19 Merge pull request #667 from poettering/dns-rr-memleak
resolve: fix two minor memory leaks
2015-07-23 03:58:47 +02:00
Tom Gundersen ef9132b77e Merge pull request #666 from poettering/drop-good-dns-server
resolve: drop dns_scope_good_dns_server()
2015-07-23 03:57:10 +02:00
Lennart Poettering 2c1fb4f712 resolve: fix two minor memory leaks
strv_extend() already strdup()s internally, no need to to this twice.
(Also, was missing OOM check...).

Use strv_consume() when we already have a string allocated whose
ownership we want to pass to the strv.

This fixes 50f1e641a9.
2015-07-23 03:26:01 +02:00
Lennart Poettering 3ea1453c42 resolve: drop dns_scope_good_dns_server()
It's not used anymore since 29815b6c60,
hence let's remove it from the sources.
2015-07-23 03:10:42 +02:00
Daniel Mack 6aafa9483d Merge pull request #665 from poettering/reword-journal-size-msg
journal: reword msg about enforced size limits a bit
2015-07-23 02:32:29 +02:00
Lennart Poettering da2e288bbc journal: reword msg about enforced size limits a bit
http://lists.freedesktop.org/archives/systemd-devel/2015-July/033574.html
2015-07-23 02:04:19 +02:00
Daniel Mack ebbc7bc91d Merge pull request #632 from Stebalien/cgls-nspawn
Machines can also be services
2015-07-23 00:43:00 +02:00
Steven Allen 065d629611 cgls: machines can also be services
This makes `systemd-cgls -M <machine name>` work with nspawn containers in
systemd 222.
2015-07-22 17:53:14 -04:00
Lennart Poettering ad75a97f7d tmpfiles: downgrade errors when a file system does not support file attributes
This downgrades errors from setting file attributes via tmpfiles to
warnings and makes them non-fatal.

Also, as a special case, if a file system does not support file
attributes at all, then the message is downgraded to debug, so that it
is not seen at all.

With this change reiserfs should not see any messages at all anymore
(since it apparently does not implement file attributes at all), but XFS
will still get a warning but no failure. The warning is something the
XFS kernel folks should fix though, by adjusting their file attributes
behaviour to be identical to ext234's.

Fixes #560.
2015-07-22 22:02:14 +02:00
Michal Schmidt 42328446f4 Merge pull request #660 from michich/in-set
improve IN_SET macro
2015-07-22 19:57:03 +02:00
Michal Schmidt 77247cba3e basic: more optimizable IN_SET macro
Making the array static allows gcc -O2 to generate smaller code:

"size systemd" before:
   text    data     bss     dec     hex filename
1377286  128608    2632 1508526  1704ae systemd

After:
   text    data     bss     dec     hex filename
1374326  128572    2664 1505562  16f91a systemd

(IN_SET still results in worse generated code than using
 "x == FOO || x == BAR || ...". I don't think we'll be able to match
 that with the C preprocessor.)

This change limits the use of IN_SET to sets with constant elements. All
present callers use constants. The compiler would report an "initializer
element is not constant" error otherwise.
2015-07-22 19:31:17 +02:00
Michal Schmidt 249a2737ba basic: better readable IN_SET macro
Putting the set elements in an array variable and using ELEMENTSOF makes
it clearer what's going on.

Incidentally, it also makes gcc -O2 generate slightly smaller code:
"size systemd", before:
   text    data     bss     dec     hex filename
1378318  128608    2632 1509558  1708b6 systemd

After:
   text    data     bss     dec     hex filename
1377286  128608    2632 1508526  1704ae systemd
2015-07-22 19:29:05 +02:00
Lennart Poettering d21f001496 Merge pull request #654 from ssahani/nl
network: Add tunnel params
2015-07-22 19:06:36 +02:00
Tom Gundersen bd37a92297 Merge pull request #647 from michich/job-logging
Job logging fixes and improvements
2015-07-22 14:17:12 +02:00
Michal Schmidt 75cb22f1bf Merge pull request #651 from keszybz/ata_id-wwn-ordering
ata_id: unreverse WWN identifier
2015-07-22 13:41:33 +02:00
Susant Sahani 8aee0f1ff3 sd-netlink: add tunnel params 2015-07-22 15:01:58 +05:30
Susant Sahani 66f4bc7795 Tunnel NL params: Add to missing.h 2015-07-22 15:01:58 +05:30
Daniel Mack 3ddcc19509 Merge pull request #652 from whot/hwdb-updates
hwdb: add Logitech MX Master DPI settings
2015-07-22 10:21:46 +02:00
Zbigniew Jędrzejewski-Szmek 01f61d331b ata_id: unreverse WWN identifier
An endianness conversion was lost in 6024a6e302.
Restore it. Now ata_id and scsi_id output match.

https://bugzilla.redhat.com/show_bug.cgi?id=1227503
2015-07-22 00:24:15 -04:00
Peter Hutterer cc00a2d191 hwdb: add Logitech MX Master DPI settings 2015-07-22 10:27:12 +10:00
Tom Gundersen 899c4195c6 Merge pull request #648 from michich/udev-log-priority
udev.log-priority crash fix and cleanup
2015-07-21 20:17:21 +02:00
Michal Schmidt 3567afa5b4 udev: unify reporting of invalid cmdline keys
This way it does not need distinct string literals and it also preserves
the "rd." prefix.
2015-07-21 20:07:34 +02:00
Michal Schmidt e00f5bddde udev: fix crash with invalid udev.log-priority
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1245293
2015-07-21 20:07:34 +02:00
Michal Schmidt 64f575d2ab core: adjust job completion message log levels
We do not print all non-OK job completion status messages to the console
in red, because not all of them are plain errors. We do however log the
same messages as LOG_ERR.

Differentiate the log levels by deducing them from the job result in a
way that more or less matches the color of the console message.
2015-07-21 19:28:17 +02:00
Michal Schmidt b81bbe5355 core: small refactor of job completion logging
Joins three log_struct() calls into one.
2015-07-21 19:24:20 +02:00
Michal Schmidt 4f29c6fea6 core: log completion of remaining job types
JOB_RESTART and failed JOB_VERIFY_ACTIVE completions were printed to
console but not to the log.
2015-07-21 19:24:20 +02:00
Michal Schmidt 30961fa300 core: do not log done failed-condition jobs as if unit started
It is misleading to see "Started foo." in the log when the unit's
condition was false.
2015-07-21 19:24:20 +02:00
Michal Schmidt c382d69e3d core: remove generic job completion messages from unit vtables
These units' message format strings are identical to the generic
strings. Since we can always rely on the fallback, these are now
redundant.
2015-07-21 19:24:20 +02:00
Michal Schmidt aa49ab5f22 core: try harder to get job completion messages too
This is similar to "core: always try harder to get unit status
message format string", but for job completion status messages.
It makes generic status messages applicable for printing to the console.
And it rewrites the functions in a more table-based style.
2015-07-21 19:24:04 +02:00
Michal Schmidt b5bf308ba5 core: unit_get_status_message_format() never returns NULL
unit_get_status_message_format() is used only with one of JOB_START,
JOB_STOP, JOB_RELOAD, all of which have fallback message strings
defined, so the function may never return NULL.
2015-07-21 18:48:45 +02:00
Daniel Mack 0a327854f8 bootchart: fix negative 'timeleft' condition
Fix the overrun case in sample acquistion and negative number calculations.

Reported by Stefan Sauer.

Fixes #642
2015-07-21 18:37:06 +02:00
Daniel Mack 81fc63daa4 Merge pull request #643 from zonque/fileio
basic/fileio: fix write_string_file() fallout
2015-07-21 17:20:55 +02:00
Daniel Mack 81b72a962f user-sessions: fix write_string_file() fallout
WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also
given. IOW, an atomic file write operation is only possible when creating a
file is also being asked for.

This is a regression from the recent write_string_file() rework.
2015-07-21 15:59:02 +02:00
Daniel Mack 6f566391a4 logind: fix write_string_file() fallout
WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also
given. IOW, an atomic file write operation is only possible when creating a
file is also being asked for.

This is a regression from the recent write_string_file() rework.
2015-07-21 15:58:59 +02:00
Michal Schmidt a85ca902c9 core: always try harder to get unit status message format string
The starting/stopping messages are printed to the console only if the
corresponding format string is defined in the unit's vtable. To avoid
excessive messages on the console, the unit types whose start/stop
jobs are instantaneous had the format strings intentionally undefined.
When logging the same event to the journal, a fallback to generic
Starting/Stopping/Reloading messages is used.

The problem of excessive console messages with instantaneous jobs
is already resolved in a nicer way ("core: fix confusing logging of
instantaneous jobs"), so there's no longer a need to have two ways of
getting the format strings. Let's fold them into one function with
the fallback to generic message strings.
2015-07-21 15:09:12 +02:00
Michal Schmidt 2d018ae23b core: correct return value from reload methods
Return 1 from *_reload() methods to signify "we did something", just
like in *_start(). This causes "Reloading foo..." messages to be logged.
"Reloaded foo." messages are already logged.
2015-07-21 15:09:12 +02:00
Michal Schmidt d1a34ae9c2 core: fix confusing logging of instantaneous jobs
For instantaneous jobs (e.g. starting of targets, sockets, slices, or
Type=simple services) the log shows the job completion
before starting:

        systemd[1]: Created slice -.slice.
        systemd[1]: Starting -.slice.
        systemd[1]: Created slice System Slice.
        systemd[1]: Starting System Slice.
        systemd[1]: Listening on Journal Audit Socket.
        systemd[1]: Starting Journal Audit Socket.
        systemd[1]: Reached target Timers.
        systemd[1]: Starting Timers.
        ...

The reason is that the job completes before the ->start() method returns
and only then does unit_start() print the "Starting ..." message.
The same thing happens when stopping units.

Rather than fixing the order of the messages, let's just not emit the
Starting/Stopping message at all when the job completes instantaneously.
The job completion message is sufficient in this case.
2015-07-21 15:09:12 +02:00
Tom Gundersen bd37a199c9 Merge pull request #636 from ssahani/tunnel
networkd: ip6 tunnel add support for flowlabel
2015-07-21 11:19:00 +02:00
Susant Sahani 276de52699 man: add man ipv6 flowlabel support for ip6 tunnels 2015-07-21 10:07:10 +05:30
Susant Sahani 407af9dd89 networkd: ip6 tunnel add support for flowlabel
Add Pv6 Flow Label support. The 20-bit Flow Label field in the IPv6
header[RFC2460] is used by a  node to label packets of a flow.
2015-07-21 10:06:44 +05:30
Tom Gundersen e89f2a98e6 Merge pull request #625 from ssahani/tun2
sd-netlink: add tunnel parameters
2015-07-20 22:30:18 +02:00
Tom Gundersen 3083663e5d Merge pull request #630 from namhyung/use-isempty
sd-bus: use isempty() consistently
2015-07-20 18:08:13 +02:00
Tom Gundersen 31053e929e Merge pull request #549 from ssahani/dhcp
networkd: allow hostname override
2015-07-20 17:58:45 +02:00
Namhyung Kim d41eee127a sd-bus: use isempty() consistently
Instead of open-coding, use isempty() to check NULL or empty string
for consistency.
2015-07-20 23:41:18 +09:00