1. 17 Apr, 2013 19 commits
    • Harald Hoyer's avatar
      journal: add one more level on top with AND · cd34b3c6
      Harald Hoyer authored
      When using "-p" and "-b" in combination with "-u", the output is not
      what you would expect. The reason is the sd_journal_add_disjunction()
      call in add_matches_for_unit() and add_matches_for_user_unit(), which
      adds two ORs without taking the other conditions to every OR.
      
      Adding another level on top with AND and sd_journal_add_conjunction()
      solves the problem.
      
      Output before:
      
      $ journalctl -o short-monotonic -ab -p 0 -u sshd.service
      
      -- Reboot --
      [    3.216305] lenovo systemd[1]: Starting OpenSSH server daemon...
      -- Reboot --
      [    3.168666] lenovo systemd[1]: Starting OpenSSH server daemon...
      [    3.169639] lenovo systemd[1]: Started OpenSSH server daemon.
      [36285.635389] lenovo systemd[1]: Stopped OpenSSH server daemon.
      -- Reboot --
      [   10.838657] lenovo systemd[1]: Starting OpenSSH server daemon...
      [   10.913698] lenovo systemd[1]: Started OpenSSH server daemon.
      [ 6881.035183] lenovo systemd[1]: Stopped OpenSSH server daemon.
      -- Reboot --
      [    6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
      [    6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
      [    6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
      [    6.681379] lenovo sshd[397]: Server listening on :: port 22.
      
      As we see, the output is from _every_ boot and priority 0 is not taken
      into account.
      
      Output after patch:
      
      $ journalctl -o short-monotonic -ab -p 0 -u sshd.service
      -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:58:21 CET. --
      
      Increasing the priority:
      
      $ journalctl -o short-monotonic -ab -p 6 -u sshd.service
      -- Logs begin at Sun 2013-02-24 20:54:44 CET, end at Tue 2013-03-19 14:59:12 CET. --
      [    6.636228] lenovo systemd[1]: Starting OpenSSH server daemon...
      [    6.662573] lenovo systemd[1]: Started OpenSSH server daemon.
      [    6.681148] lenovo sshd[397]: Server listening on 0.0.0.0 port 22.
      [    6.681379] lenovo sshd[397]: Server listening on :: port 22.
      cd34b3c6
    • Harald Hoyer's avatar
      core/device.c: fix possible segfault · 003ac9d0
      Harald Hoyer authored
      https://bugs.freedesktop.org/show_bug.cgi?id=63189
      
      better fail than segfault
      
      systemd[1]: Failed to load device unit: Invalid argument
      systemd[1]: Failed to process udev device event: Invalid argument
      003ac9d0
    • Harald Hoyer's avatar
      TODO: remove fixed systemctl property bug · aa21e2bf
      Harald Hoyer authored
      aa21e2bf
    • Harald Hoyer's avatar
      timedated: fixed NTP enabled: n/a · 7e7d4da2
      Harald Hoyer authored
      7e7d4da2
    • Martin Jansa's avatar
      configure: use AC_CHECK_TOOL for objcopy, strings and gperf · ac714a78
      Martin Jansa authored
      * using AC_PATH_TOOL does not allow to override it from shell environment
        which is useful when cross-compiling
      * with external toolchain I have different HOST_PREFIX and HOST_SYS
        AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
        which is available only as ${TARGET_PREFIX}-objcopy then it tries
        objcopy without prefix which is found on host, but that objcopy
        does not work for !host (e.g. arm when building on x86) libs
      ac714a78
    • Mantas Mikulėnas's avatar
      fileio: also escape $ and ` when writing out env vars · ced2d10a
      Mantas Mikulėnas authored
      These are also considered special by sh and bash.
      ced2d10a
    • Zbigniew Jędrzejewski-Szmek's avatar
      build-sys: make sure kdbus.h is part of tarball · a1c65062
      Zbigniew Jędrzejewski-Szmek authored
      Also fix 'update-man-list' rule and add rules for new man pages.
      a1c65062
    • Zbigniew Jędrzejewski-Szmek's avatar
      journalctl: show fields requested with --field in full · 21ae4593
      Zbigniew Jędrzejewski-Szmek authored
      I see little point in silently truncating fields when
      they are explictly requested. With this change e.g.
        journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART
      works as expected.
      21ae4593
    • Zbigniew Jędrzejewski-Szmek's avatar
      systemd: ignore hw timestamps in containers · 44df3e63
      Zbigniew Jędrzejewski-Szmek authored
      They are irrelevant and misleading.
      
      E.g. systemd-analyze:
      
        Startup finished in 6d 4h 15min 32.330s (kernel) + 49ms 914us (userspace) = 6d 4h 15min 32.380s
      
      becomes
      
      Startup finished in 53.735ms (userspace) = 53.735ms
      
      which looks much better :)
      44df3e63
    • Zbigniew Jędrzejewski-Szmek's avatar
      bash-completion: --property support · caffaf58
      Zbigniew Jędrzejewski-Szmek authored
      Just bash.
      caffaf58
    • Zbigniew Jędrzejewski-Szmek's avatar
      man: fix syntax in nsenter example · f03dc7c0
      Zbigniew Jędrzejewski-Szmek authored
      Apparently nsenter doesn't handle options concatenated together.
      I'm pretty sure it worked at one point, but it seems like magic,
      since each of those options can take arguments.
      f03dc7c0
    • Zbigniew Jędrzejewski-Szmek's avatar
    • Zbigniew Jędrzejewski-Szmek's avatar
      core/main: use _cleanup_ · 543295ad
      Zbigniew Jędrzejewski-Szmek authored
      543295ad
    • Zbigniew Jędrzejewski-Szmek's avatar
      Report about syntax errors with metadata · e8e581bf
      Zbigniew Jędrzejewski-Szmek authored
      The information about the unit for which files are being parsed
      is passed all the way down. This way messages land in the journal
      with proper UNIT=... or USER_UNIT=... attribution.
      
      'systemctl status' and 'journalctl -u' not displaying those messages
      has been a source of confusion for users, since the journal entry for
      a misspelt setting was often logged quite a bit earlier than the
      failure to start a unit.
      Based-on-a-patch-by: default avatarOleksii Shevchuk <alxchk@gmail.com>
      e8e581bf
    • Zbigniew Jędrzejewski-Szmek's avatar
    • Zbigniew Jędrzejewski-Szmek's avatar
    • Zbigniew Jędrzejewski-Szmek's avatar
      conf-parser: generate 7 parsing functions from a macro · eb3491d9
      Zbigniew Jędrzejewski-Szmek authored
      Those functions were identical, apart from typos. Log message
      is modified to contain the type of destination var (int, double,
      ...). I think this might make it easier to understand why a value
      was rejected (e.g. a minus from an unsigned type).
      eb3491d9
    • Steven Hiscocks's avatar
      python-systemd: Reader return special fields and _Reader changes · 6a58bf41
      Steven Hiscocks authored
      Changes to _Reader make it match closer to C API, by removing `get_next`
      and `get_previous`. A `get_all` method added, which returns dictionary
      of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used
      in conjunction with `next`.
      
      _Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new
      `previous` methods are made private. This is so the traversal and
      getting of journal fields can be made transparent in the python
      interface.
      
      Reader now solely implements `get_next` and `get_previous`, returning a
      standard dictionary (future: other mapping types?) with all standard and
      special fields through the converters. This makes the output the same as
      journalctl json/export format output.
      
      Iterator methods also moved to Reader, as they do not function as intend
      with changes to _Reader.
      
      These changes also mean that more optimised journal interfaces can be
      made more easily from _Reader, by avoiding getting of unrequired fields
      by using the `_get` method, and avoiding field conversions.
      6a58bf41
    • Zbigniew Jędrzejewski-Szmek's avatar
      systemd-python: export new sd_journal_{process,get_events,get_timeout} · 76a80d93
      Zbigniew Jędrzejewski-Szmek authored
      get_timeout_ms is added as a convenience function, since
      it is abysmally hard to call clock_gettime() in Python
      versions lower than 3.3. And even for Python 3.3 users
      it saves a few lines.
      76a80d93
  2. 16 Apr, 2013 13 commits
  3. 15 Apr, 2013 8 commits
    • Kay Sievers's avatar
      hwdb: update · c225e767
      Kay Sievers authored
      c225e767
    • Kay Sievers's avatar
      bus: catch up with kernel changes · 68cfd331
      Kay Sievers authored
      68cfd331
    • Auke Kok's avatar
      bootchart: put the bootchart into the journal. · c4d58b0b
      Auke Kok authored
      This bit of code is mostly stolen from coredump.c. We construct
      a simple journal message and append the bootchart file in the
      journal automatically.
      
      You can extract the latest bootchart from the current boot with
      something like:
      
      $ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART
      
      which prints it to stdout.
      
      None of the other logic is touched. The journal entry is created
      even if bootchart was run manually, which is probably wrong.
      c4d58b0b
    • Kay Sievers's avatar
      bus: fix missing macro argument renaming · 8ad802ec
      Kay Sievers authored
      <fdo-vcs> systemd kay master * b1454bf0 src/libsystemd-bus/ bus-kernel.c kdbus.h
      <fdo-vcs> systemd bus: catch up with kernel changes
      <kmacleod> kay: randomly looked at your commit, it looks like in KDBUS_FOREACH_ITEM
        you missed changing a (d) to an (i) in (uint8_t*) (d) < (uint8_t*) (k) + (k)->size;  ?
      <kay> kmacleod: hah, so there *is* a reason for using _foo in macros :)
      <kay> kmacleod: thanks!
      8ad802ec
    • Kay Sievers's avatar
      bus: catch up with kernel changes · b1454bf0
      Kay Sievers authored
      b1454bf0
    • Lennart Poettering's avatar
      audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user... · 9a3ef988
      Lennart Poettering authored
      audit: since nspawn now sets CAP_AUDIT_CONTROL for containers we cannot user this anymore to skip audit session ID retrieval
      
      As audit is still broken in containers we need a reliable way how we can
      determine whether the audit data we read from 7proc is actually useful.
      Previously we used CAP_AUDIT_CONTROL for this, since nspawn removed that
      from the nspawn container. This has changed a while back however, which
      means we used audit data of host system in the container.
      
      This adds an explicit container check to the audit calls, so that all
      audit data is turned off in containers.
      
      This should fix session creation with pam_systemd/logind in nspawn containers.
      9a3ef988
    • Lennart Poettering's avatar
    • Lennart Poettering's avatar
      core: always create /user and /machine top-level cgroup dirs · a32360f1
      Lennart Poettering authored
      This allows clients to put inotify watches on these trees to watch for
      state changes, without having to wait until these dirs are created.
      
      This introduces the new top-level /machine cgroup dir as canonical
      location where OS containers and VMs shall be located (as discussed with
      the libvirt folks).
      a32360f1