1. 25 Jul, 2011 1 commit
  2. 24 May, 2011 1 commit
  3. 04 Apr, 2011 1 commit
    • Iustin Pop's avatar
      daemon.py: move startup log message before prep_fn · fe295df3
      Iustin Pop authored
      
      
      Before this, the output in the rapi daemon log was:
      2011-04-04 03:09:51,026: ganeti-rapi pid=17447 INFO Reading users file
      at /var/lib/ganeti/rapi/users
      2011-04-04 03:09:51,027: ganeti-rapi pid=17447 INFO ganeti-rapi daemon
      startup
      
      Which is confusing, as it might look like the read of the users file
      is part of the previous run. This is because we log the 'daemon
      startup' message after the prepare_fn, which can log things on its
      own.
      
      The patch simply moves the 'daemon startup' message just before
      prepare_fn call.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      fe295df3
  4. 02 Feb, 2011 2 commits
  5. 11 Jan, 2011 3 commits
  6. 07 Oct, 2010 5 commits
    • Iustin Pop's avatar
      Fix a rare bug in StartDaemonChild and GenericMain · ed3920e3
      Iustin Pop authored
      
      
      I've seen cases where the result from str(sys.exc_info()[1]) is ""; this
      breaks the error reporting as the parent relies on non-empty error
      messages to properly detect child status (otherwise it will try to read
      the pid and fail, so on).
      
      While this was always in case of asserts, we need to ensure this doesn't
      happen. Therefore we abstract this functionality (writing the error
      message) and ensure we write a non-empty string in the new function.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      ed3920e3
    • Iustin Pop's avatar
      Enhance the error reporting · 3e87c1bf
      Iustin Pop authored
      
      
      Since daemon startup error will be often related to socket errors, so it
      makes sense to change the original reporting:
      
        Error when starting daemon process: "(98, 'Address already in use')"
      
      Into:
      
        Error when starting daemon process: 'Socket-related error: Address
        already in use (errno=98)'
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      3e87c1bf
    • Iustin Pop's avatar
      Change daemon.GenericMain/utils.Daemonize workflow · b78aa8c2
      Iustin Pop authored
      
      
      This patch copies the pipe-based error reporting functionality from
      utils.StartDaemon (I gave up for now on tryin to merge the two).
      
      This patch will fix two longstanding bugs:
      
      - if we fork, we lose all error reporting from the child to the original
        parent
      - if we fork, the original parent exits before the child is ready to
        "work" (whatever the work might be)
      
      Both these are fixed once the users of daemon.GenericMain are converted
      to the three-state setup, as we'll get error reporting via the pipe and
      also not exit until the PrepFn is done.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b78aa8c2
    • Iustin Pop's avatar
      Change utils.GenericMain protocol · b42ea9ed
      Iustin Pop authored
      
      
      Currently, GenericMain does a two-staged workflow:
      
      - Check, before forking
      - then Exec, after forking
      
      This means we don't have any possibility to treat preparation work
      (before the daemon is ready for work) different from the actual work.
      
      The patch adds another PreExec function that is run just before Exec,
      and which should ensure that the daemon is ready for serving client
      before it returns. Its result is then sent as the third argument to
      Exec.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b42ea9ed
    • Iustin Pop's avatar
      Use only one version of WritePidFile · 5c4d37f9
      Iustin Pop authored
      
      
      This patch merges the pid file handling used for ganeti-* daemons and
      impexp daemons. The latter version is used, since it's more reliable:
      uses locked pid files as opposed to checking 'live' processes.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      5c4d37f9
  7. 16 Sep, 2010 1 commit
  8. 07 Sep, 2010 2 commits
  9. 27 Aug, 2010 1 commit
    • Manuel Franceschini's avatar
      Handle ENOENT case in ssconf.GetPrimaryIPFamily · 7dd999fc
      Manuel Franceschini authored
      
      
      This patch adds an optional default parameter to SimpleStore._ReadFile. This
      can be used to default the return value of this method in case the ssconf file
      is not present.
      
      In this particular case it is used to return AF_INET in case
      ssconf_primary_ip_familiy is absent. This is the case when upgrading
      from 2.2 -> 2.3. This is intended behaviour as it is suboptimal to copy
      the ssconf file manually to the nodes during an upgrade using
      cfgupgrade.
      
      In the concrete case of an upgrade from 2.2 -> 2.3 cfgupgrade will just
      add the primary_ip_family parameter to the cluster configuration and the
      daemons will start with default family AF_INET. This is perfectly fine,
      since there is no AF_INET6 2.2 clusters. After that, the admin is
      required (as in an major upgrade) to run 'gnt-cluster redist-conf' which
      will write ssconf_primary_ip_family on all nodes.
      Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7dd999fc
  10. 23 Aug, 2010 1 commit
  11. 19 Aug, 2010 1 commit
  12. 18 Aug, 2010 1 commit
  13. 12 Jul, 2010 1 commit
    • Manuel Franceschini's avatar
      Confd IPv6 support · d8bcfe21
      Manuel Franceschini authored
      
      
      This patch series basically adds a new parameter 'family' to the constructors
      of daemon.AsyncUDPSocket and confd.client.ConfdUDPClient. This enables the
      users of these two classes to support IPv6.
      
      In ganeti-confd.ConfdAsyncUDPClient a method to check the address families of
      all peers is added.
      
      Furthermore it adds unittests for the added functionality.
      Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      d8bcfe21
  14. 09 Jul, 2010 1 commit
  15. 30 Jun, 2010 1 commit
  16. 29 Jun, 2010 2 commits
  17. 17 Jun, 2010 1 commit
  18. 04 Jun, 2010 1 commit
  19. 03 Jun, 2010 3 commits
  20. 01 Jun, 2010 1 commit
  21. 25 May, 2010 1 commit
  22. 22 May, 2010 1 commit
  23. 14 May, 2010 4 commits
  24. 13 May, 2010 1 commit
  25. 07 May, 2010 1 commit
  26. 07 Apr, 2010 1 commit