1. 03 Mar, 2016 6 commits
  2. 02 Mar, 2016 3 commits
    • Adrian Likins's avatar
    • Beniamino Galvani's avatar
      manager: use logging helpers · 8f706197
      Beniamino Galvani authored
    • Dan Williams's avatar
      libnm-glib/libnm/vpn: fix handling of ConnectInteractive() failure (rh #1298732) · abc700c5
      Dan Williams authored
      If the plugin supports interactive mode, but the VPN binary (like vpnc
      or openvpn) doesn't support it, then the plugin should return
      NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED from its connect_interactive()
      hook.  This lets NetworkManager know to fall back to plain Connect().
      Since this notification is done through an error return, the VPN service
      plugin code sees the failure and moves the plugin state back to
      STOPPED.  NetworkManager sees that state change, and terminates the
      connection attempt while waiting for a reply to the Connect() method.
      (VPN service plugins that don't support interactive mode at all don't
      have this problem because that error is returned before the plugin's
      state is moved to STARTING.)
      To fix this, do two things:
      1) if the connect_interactive() hook fails and returns the error
      state change for a few seconds to allow NM time to fall back to
      plain Connect().  We still want to move the plugin state back to
      STOPPED eventually, because otherwise it could stay in STARTING
      2) change state to STARTING only if the connect/connect_interactive
      plugin hooks were successful.  Otherwise the plugin would still be
      in STARTING state, and it's not valid to call Connect()/ConnectInteractive()
      during the STARTING state.
  3. 01 Mar, 2016 13 commits
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      logging: change logging format to drop "[file:line] func():" part · 24582b65
      Thomas Haller authored
      Choose a new logging format.
      - the logging format must not be configurable and it must be the
        same for all backends. It is neat that journal supports additional
        fields, but an average user still posts the output of plain
        journalctl, without "--output verbose" (which would also be hard
        to read).
        Also, we get used to a certain logging format, so having different
        formats is confusing. If one format is better then another, it should
        be used for all backends: syslog, journal and debug.
        The only question is, what is the best format.
      - the timestamp: I find it useful to see how much time between two
        events passed. The timestamp printed by syslog doesn't have sufficient
        granularity, and the internal journal fields are not readily available.
        We used to print the timestamps for <error>, <debug> and <trace>,
        but ommited them for <info> and <warn> levels. We now print them for
        all levels, which has a uniform alignment.
      - the location: the "[file:line] func():" part is mostly redundant
        and results in wide lines. It also causes a misalignment of the
        logging lines, or -- as I recently added alignment of the location --
        it results in awkward whitespace and truncation.
        But the location is really just necessary because our logging messages
        are bad:
          "<debug> [1456397604.038226] (9) 11-dhclient succeeded"
        The solution to this is not
          "<debug> [1456397604.038226] [nm-dispatcher.c:358] dispatcher_results_process(): (9) 11-dhclient succeeded"
        but a properly worded message:
          "<debug> [1456397604.038226] dispatcher: request #9, script 11-dhclient succeeded"
      - logging-message: we need to write better logging messages.
        I like some form of "tags" that are easy to grep:
          "platform: signal: link changed: 4: ..."
        Downside is, that this is not nice to read as a full sentence.
        So, especially for <info> and <warn> logging, more human readable
        messages are better.
        We should find a compromise, where the log message explains what
        happens, but is still concise and contains patterns that are easy
        to grep and identify visually.
    • Thomas Haller's avatar
      platform: add flags argument to nm_platform_ip4_address_add() · 684e80b5
      Thomas Haller authored
      The argument is still always unset. We will need it later to set
    • Thomas Haller's avatar
      platform: track ifa_flags for cached IPv4 addresses · cc78e063
      Thomas Haller authored
      It's useful to track the flags for IPv4 addresses too.
      - we might want to sort IPv4 addresses according to whether they
        are permanent or dynamic.
      - later we want to set IFA_F_NOPREFIXROUTE also for IPv4 addresses.
        While the ability to "set" a flag doesn't necessarily require that we
        also keep the flags present in NMPlatformIP4Address, it is more consistent.
    • Thomas Haller's avatar
      platform: call ethtool functions via platform · be4472bd
      Thomas Haller authored
      When adding namespace support later, we must call ethtool
      from the proper namespace, i.e. via a NMPlatform instance.
      Avoid calling ethtool directly.
    • Thomas Haller's avatar
      systemd/tests: add test_lldp_create() test · 98d14b0c
      Thomas Haller authored
      This test makes sense because "test-systemd" is not
      linked against any other systemd library. So this test
      verifies that our libsystemd clone is self contained.
    • Beniamino Galvani's avatar
    • Thomas Haller's avatar
      core: merge branch 'th/build-core' · 67134e71
      Thomas Haller authored
      Add a test "test-systemd" which links against our copy
      of systemd code and a minimal core library. For that,
      cleanup and split NetworkManagerUtils.h.
    • Thomas Haller's avatar
      systemd/tests: add test util for systemd · 51e29288
      Thomas Haller authored
      Most interestingly is also, whether we can link libsystemd.a without
      having undefined references (which might be wrongly satisfied by an
      externally loaded libsystem shared library.
    • Thomas Haller's avatar
      core: split "nm-core-utils.h" out of "NetworkManagerUtils.h" · adb56d13
      Thomas Haller authored
      "NetworkManagerUtils.h" contains a bunch of helper tools for core
      daemon ("src/").
      Unfortunately, it has dependencies to other parts of core,
      such as "nm-device.h" and "nm-platform.h". Split out a part
      of tools that are independent so that they can be used without
      dragging in other dependencies.
      "nm-core-utils.h" should only use libnm-core, "nm-logging.h"
      and shared.
      "NetworkManagerUtils.h" should provide all "nm-core-utils.h" and
      possibly other utilities that have larger dependencies.
    • Thomas Haller's avatar
      logging: make logging independent of platform · e4a7502a
      Thomas Haller authored
      "nm-logging.h" is a basic core module that should have few other
      dependencies. Instead of letting nm-logging.c directly call a function
      from "nm-linux-platform.c", let platform register a handler as needed.
      This way, you can build a core library containing nm-logging but no
    • Thomas Haller's avatar
      lldp/tests: fix memleaks in test · 60ca6e02
      Thomas Haller authored
      valgrind complains since commit ae9cc891.
    • Beniamino Galvani's avatar
      release: update NEWS · 24e3306b
      Beniamino Galvani authored
  4. 29 Feb, 2016 18 commits