1. 21 6月, 2019 1 次提交
    • D
      remote: delete the avahi mDNS support · 5a148ce8
      Daniel P. Berrangé 提交于
      Libvirtd has long had integration with avahi for advertising libvirtd
      using mDNS when TCP/TLS listening is enabled. For a long time the
      virt-manager application had support for auto-detecting libvirtds
      on the local network using mDNS, but this was removed last year
      
        commit fc8f8d5d7e3ba80a0771df19cf20e84a05ed2422
        Author: Cole Robinson <crobinso@redhat.com>
        Date:   Sat Oct 6 20:55:31 2018 -0400
      
          connect: Drop avahi support
      
          Libvirtd can advertise itself over avahi. The feature is disabled by
          default though and in practice I hear of no one actually using it
          and frankly I don't think it's all that useful
      
          The 'Open Connection' wizard has a disproportionate amount of code
          devoted to this feature, but I don't think it's useful or worth
          maintaining, so let's drop it
      
      I've never heard of any other applications having support for using
      mDNS to detect libvirtd instances. Though it is theoretically possible
      something exists out there, it is clearly going to be a niche use case
      in the virt ecosystem as a whole.
      
      By removing avahi integration we can cut down the dependency chain for
      the basic libvirtd install and reduce our code maint burden.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      5a148ce8
  2. 12 4月, 2019 1 次提交
  3. 10 4月, 2019 1 次提交
  4. 04 2月, 2019 2 次提交
  5. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  6. 20 9月, 2018 1 次提交
  7. 05 6月, 2018 1 次提交
  8. 26 4月, 2018 1 次提交
  9. 08 3月, 2018 1 次提交
  10. 31 1月, 2018 2 次提交
  11. 15 11月, 2017 1 次提交
  12. 28 8月, 2017 1 次提交
    • E
      daemon: logging: Fix --verbose option being ignored by the daemon · b988f794
      Erik Skultety 提交于
      Commit 94c465d0 refactored the logging setup phase but introduced an
      issue, where the daemon ignores verbose mode when there are no outputs
      defined and the default must be used. The problem is that the default
      output was determined too early, thus ignoring the potential '--verbose'
      option taking effect. This patch postpones the creation of the default
      output to the very last moment when nothing else can change. Since the
      default output is only created during the init phase, it's safe to leave
      the pointer as NULL for a while, but it will be set eventually, thus not
      affecting runtime.
      Patch also adjusts both the other daemons.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b988f794
  13. 18 3月, 2017 1 次提交
    • P
      (log|lock)daemon: Don't spam logs with IO error messages after client disconnects · f0803dae
      Peter Krempa 提交于
      The log and lock protocol don't have an extra handshake to close the
      connection. Instead they just close the socket. Unfortunately that
      resulted into a lot of spurious garbage logged to the system log files:
      
      2017-03-17 14:00:09.730+0000: 4714: error : virNetSocketReadWire:1800 : End of file while reading data: Input/output error
      
      or in the journal as:
      
      Mar 13 16:19:33 xxxx virtlogd[32360]: End of file while reading data: Input/output error
      
      Use the new facility in the netserverclient to suppress the IO error
      report from the virNetSocket layer.
      f0803dae
  14. 15 12月, 2016 2 次提交
  15. 10 10月, 2016 3 次提交
  16. 07 7月, 2016 1 次提交
  17. 28 6月, 2016 1 次提交
  18. 20 5月, 2016 1 次提交
  19. 03 5月, 2016 1 次提交
    • E
      rpc: virnetserverclient: Identify clients by an integer ID · 5841d64d
      Erik Skultety 提交于
      Admin API needs a way of addressing specific clients. Unlike servers, which we
      are happy to address by names both because its name reflects its purpose (to
      some extent) and we only have two of them (so far), naming clients doesn't make
      any sense, since a) each client is an anonymous, i.e. not recognized after a
      disconnect followed by a reconnect, b) we can't predict what kind of requests
      it's going to send to daemon, and c) the are loads of them comming and going,
      so the only viable option is to use an ID which is of a reasonably wide data
      type.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      5841d64d
  20. 15 4月, 2016 1 次提交
  21. 11 4月, 2016 1 次提交
  22. 11 3月, 2016 2 次提交
  23. 17 2月, 2016 1 次提交
  24. 27 11月, 2015 1 次提交
  25. 26 11月, 2015 3 次提交
    • D
      logging: inhibit virtlogd shutdown while log files are open · df34363d
      Daniel P. Berrange 提交于
      The virtlogd daemon is launched with a 30 second timeout for
      unprivileged users. Unfortunately the timeout is only inhibited
      while RPC clients are connected, and they only connect for a
      short while to open the log file descriptor. We need to hold
      an inhibition for as long as the log file descriptor itself
      is open.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      df34363d
    • D
      logging: introduce log handling protocol · 19e5db4a
      Daniel P. Berrange 提交于
      Define a new RPC protocol for the virtlogd daemon that provides
      for handling of logs. The initial RPC method defined allows a
      client to obtain a file handle to use for writing to a log
      file for a guest domain. The file handle passed back will not
      actually refer to the log file, but rather an anonymous pipe.
      The virtlogd daemon will forward I/O between them, ensuring
      file rotation happens when required.
      
      Initially the log setup is hardcoded to cap log files at
      128 KB, and keep 3 backups when rolling over, which gives
      a max usage of 512 KB per guest.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      19e5db4a
    • D
      Import stripped down virtlockd code as basis of virtlogd · 323a329b
      Daniel P. Berrange 提交于
      Copy the virtlockd codebase across to form the initial virlogd
      code. Simple search & replace of s/lock/log/ and gut the remote
      protocol & dispatcher. This gives us a daemon that starts up
      and listens for connections, but does nothing with them.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      323a329b
  26. 27 10月, 2015 1 次提交
  27. 16 10月, 2015 1 次提交
    • M
      virtlockd: Don't SIGSEGV on SIGUSR1 · 499e302f
      Michal Privoznik 提交于
      So we have this mechanism that on SIGUSR1 the virtlockd dumps its
      internal state into a JSON file, reexec itself and the reloads
      the internal state back. However, there's a bug in our
      implementation:
      
        (gdb) signal SIGUSR1
        Continuing with signal SIGUSR1.
        [Thread 0x7fd094f7b700 (LWP 10602) exited]
        process 10600 is executing new program: /home/zippy/work/libvirt/libvirt.git/src/virtlockd
        warning: Could not load shared library symbols for linux-vdso.so.1.
        Do you need "set solib-search-path" or "set sysroot"?
        [Thread debugging using libthread_db enabled]
        Using host libthread_db library "/lib64/libthread_db.so.1".
        [New Thread 0x7fb28bc3c700 (LWP 14501)]
      
        Program received signal SIGSEGV, Segmentation fault.
        0x00007fb29133d530 in virExpandN (ptrptr=0x70, size=8, countptr=0x68, add=1, report=true, domcode=7, filename=0x7fb29138aeab "rpc/virnetserver.c", funcname=0x7fb29138b680 <__FUNCTION__.15821> "virNetServerAddProgram", linenr=661) at util/viralloc.c:288
        288         if (*countptr + add < *countptr) {
        (gdb) bt
        #0  0x00007fb29133d530 in virExpandN (ptrptr=0x70, size=8, countptr=0x68, add=1, report=true, domcode=7, filename=0x7fb29138aeab "rpc/virnetserver.c", funcname=0x7fb29138b680 <__FUNCTION__.15821> "virNetServerAddProgram", linenr=661) at util/viralloc.c:288
        #1  0x00007fb29132a267 in virNetServerAddProgram (srv=0x0, prog=0x7fb2915d08b0) at rpc/virnetserver.c:661
        #2  0x00007fb29131f27f in main (argc=1, argv=0x7fff8f771298) at locking/lock_daemon.c:1445
      
      Notice the NULL @srv passed to frame 2? Usually, the @srv
      variable is initialized on fresh start. However, in case of
      daemon reload, the code path that is responsible for initializing
      the value was not triggered and therefore we crashed immediately.
      Fix this by always setting the variable.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      499e302f
  28. 09 10月, 2015 1 次提交
    • M
      virJSONValueArraySize: return ssize_t · 4f77c48c
      Michal Privoznik 提交于
      The internal representation of a JSON array counts the items in
      size_t. However, for some reason, when asking for the count it's
      reported as int. Firstly, we need the function to return a signed
      type as it's returning -1 on an error. But, not every system has
      integer the same size as size_t. Therefore, lets return ssize_t.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      4f77c48c
  29. 24 8月, 2015 1 次提交
    • E
      locking: Remove redundant 'srv' element from virLockDaemon · f08b1c58
      Erik Skultety 提交于
      Now that we have virNetDaemon object holding all the data and being
      capable of referencing multiple servers, having a duplicate reference to
      a single server stored in virLockDaemon isn't necessary anymore. This
      patch removes the above described element.
      f08b1c58
  30. 10 8月, 2015 1 次提交
    • M
      rpc: Remove keepalive_required option · a8743c39
      Martin Kletzander 提交于
      Since its introduction in 2011 (particularly in commit f4324e32),
      the option doesn't work.  It just effectively disables all incoming
      connections.  That's because the client private data that contain the
      'keepalive_supported' boolean, are initialized to zeroes so the bool is
      false and the only other place where the bool is used is when checking
      whether the client supports keepalive.  Thus, according to the server,
      no client supports keepalive.
      
      Removing this instead of fixing it is better because a) apparently
      nobody ever tried it since 2011 (4 years without one month) and b) we
      cannot know whether the client supports keepalive until we get a ping or
      pong keepalive packet.  And that won't happen until after we dispatched
      the ConnectOpen call.
      
      Another two reasons would be c) the keepalive_required was tracked on
      the server level, but keepalive_supported was in private data of the
      client as well as the check that was made in the remote layer, thus
      making all other instances of virNetServer miss this feature unless they
      all implemented it for themselves and d) we can always add it back in
      case there is a request and a use-case for it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a8743c39
  31. 16 6月, 2015 1 次提交
  32. 23 4月, 2015 1 次提交
    • J
      locking: relax PID requirement · ee3eddb3
      Jim Fehlig 提交于
      Some hypervisors like Xen do not have PIDs associated with domains.
      Relax the requirement for PID != 0 in the locking code so it can
      be used by hypervisors that do not represent domains as a process
      running on the host.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      ee3eddb3