1. 12 7月, 2016 2 次提交
  2. 28 6月, 2016 1 次提交
  3. 20 5月, 2016 1 次提交
  4. 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
  5. 25 4月, 2016 2 次提交
    • A
      man: Fix SYNOPSIS section · 92b2c047
      Andrea Bolognani 提交于
      Format the text properly.
      92b2c047
    • A
      build: Standardize on .pod -> .x.in -> .x · 5b479f3b
      Andrea Bolognani 提交于
      After this commit, all man pages are generated using the same two
      steps:
      
        1. Process a source $command.pod file with pod2man(1) to obtain
           a valid man page in $command.$section.in
      
        2. Process $command.$section.in with sed(1) to obtain the final
           man page in $command.$section
      5b479f3b
  6. 15 4月, 2016 1 次提交
  7. 11 3月, 2016 2 次提交
  8. 08 3月, 2016 1 次提交
  9. 17 2月, 2016 2 次提交
    • E
      virnetdaemon: Store servers in a hash table · 252610f7
      Erik Skultety 提交于
      Since the daemon can manage and add (at fresh start) multiple servers,
      we also should be able to add them from a JSON state file in case of a
      daemon restart, so post exec restart support for multiple servers is also
      provided. Patch also updates virnetdaemontest accordingly.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      252610f7
    • E
      util: Add a return value to void hash iterators · cc48d3a1
      Erik Skultety 提交于
      Our existing virHashForEach method iterates through all items disregarding the
      fact, that some of the iterators might have actually failed. Errors are usually
      dispatched through an error element in opaque data which then causes the
      original caller of virHashForEach to return -1. In that case, virHashForEach
      could return as soon as one of the iterators fail. This patch changes the
      iterator return type and adjusts all of its instances accordingly, so the
      actual refactor of virHashForEach method can be dealt with later.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      cc48d3a1
  10. 18 1月, 2016 1 次提交
    • M
      Fix make check with gcc version 5 · 4b47f9b8
      Martin Kletzander 提交于
      When building with gcc-5 (particularly gcc-5.3.0 now) and having pdwtags
      installed (package dwarves) make check fails with the following error:
      
        $ make lock_protocol-struct
        GEN      lock_protocol-struct
        --- lock_protocol-structs	2016-01-13 15:04:59.318809607 +0100
        +++ lock_protocol-struct-t3	2016-01-13 15:05:17.703501234 +0100
        @@ -26,10 +26,6 @@
                 virLockSpaceProtocolNonNullString name;
                 u_int                      flags;
         };
        -enum virLockSpaceProtocolAcquireResourceFlags {
        -        VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1,
        -        VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2,
        -};
         struct virLockSpaceProtocolAcquireResourceArgs {
                 virLockSpaceProtocolNonNullString path;
                 virLockSpaceProtocolNonNullString name;
        Makefile:10415: recipe for target 'lock_protocol-struct' failed
        make: *** [lock_protocol-struct] Error 1
      
      That happens because without any specific options gcc doesn't keep enum
      information in the resulting binary object.  I managed to isolate the
      parameters of gcc that caused this issue to disappear, however I
      remember that they influenced the resulting binaries quite a bit and
      were definitely not something we would want to add as mandatory to the
      build process.
      
      So to deal with this cleanly, let's take that enum and separate it out
      to its own header file.  Since it is only used in the lockd driver and
      the protocol, lock_driver_lockd.h feels like a suitable name.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      4b47f9b8
  11. 11 1月, 2016 1 次提交
  12. 26 11月, 2015 1 次提交
  13. 18 11月, 2015 1 次提交
  14. 27 10月, 2015 1 次提交
  15. 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
  16. 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
  17. 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
  18. 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
  19. 16 6月, 2015 1 次提交
  20. 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
  21. 15 4月, 2015 1 次提交
  22. 02 4月, 2015 1 次提交
    • J
      Remove unused macros · a0482396
      Ján Tomko 提交于
      In the order of appearance:
      
      * MAX_LISTEN - never used
        added by 23ad665c (qemud) and addec57 (lock daemon)
      
      * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5
      
      * virLockError - never used, added by eb8268a4
      
      * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN
        unused since the removal of ADD_ARG_LIT in d8b31306
      
      * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7
      
      * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b
      
      * TEST_MODEL_WORDSIZE - unused since c25c18f7
      
      * TEMPDIR - never used, added by 714bef5b
      
      * NSIG - workaround around old headers
        added by commit 60ed1d2a
        unused since virExec was moved by commit 02e86910
      
      * DO_TEST_PARSE - never used, added by 9afa0060
      
      * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
      a0482396
  23. 25 3月, 2015 1 次提交
  24. 09 3月, 2015 2 次提交
    • J
      sanlock: Don't spam logs with "target pid not found" · 54972be8
      Jiri Denemark 提交于
      Commit v1.2.4-52-gda879e59 fixed issues with domains started before
      sanlock driver was enabled by checking whether a running domain is
      registered with sanlock and if it's not, sanlock driver is basically
      ignored for the domain.
      
      However, it was checking this even for domain which has just been
      started and no sanlock_* API was called for them yet. This results in
      
          cmd 9 target pid 2135544 not found
      
      error messages to appear in sanlock.log whenever we start a new domain.
      
      This patch avoids this useless check for freshly started domains.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      54972be8
    • J
      locking: Fix flags in virLockManagerLockDaemonNew · 6beb75d9
      Jiri Denemark 提交于
      virLockManager*New APIs are never called with
      VIR_LOCK_MANAGER_USES_STATE. Moreover, lockd driver does not maintain
      any state that would need to be transferred during migration and thus it
      should not mention VIR_LOCK_MANAGER_USES_STATE at all.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      6beb75d9
  25. 19 2月, 2015 1 次提交
    • J
      Search for schemas and cpu_map.xml in source tree · bc6e2063
      Jiri Denemark 提交于
      Not all files we want to find using virFileFindResource{,Full} are
      generated when libvirt is built, some of them (such as RNG schemas) are
      distributed with sources. The current API was not able to find source
      files if libvirt was built in VPATH.
      
      Both RNG schemas and cpu_map.xml are distributed in source tarball.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      bc6e2063
  26. 09 1月, 2015 1 次提交
    • J
      safezero: fall back to writing zeroes even when resizing · 1390c268
      Ján Tomko 提交于
      Remove the resize flag and use the same code path for all callers.
      This flag was added by commit 18f03166 to allow virStorageFileResize
      use 'safezero' while preserving the behavior.
      
      Explicitly return -2 when a fallback to a different method should
      be done, to make the code path more obvious.
      
      Fail immediately when ftruncate fails in the mmap method,
      as we did before commit 18f03166.
      1390c268
  27. 17 12月, 2014 1 次提交
    • J
      virstoragefile: Have virStorageFileResize use safezero · 18f03166
      John Ferlan 提交于
      Currently virStorageFileResize() function uses build conditionals to
      choose either the posix_fallocate() or syscall(SYS_fallocate) with no
      fallback in order to preallocate the space in the newly resized file.
      
      Since the safezero code has a similar set of conditionals modify the
      resize and safezero code in order to allow the resize logic to make use
      of safezero to unify the look/feel of the code paths.
      
      Add a new boolean (resize) to safezero() to make the optional decision
      whether to try syscall(SYS_fallocate) if the posix_fallocate fails because
      HAVE_POSIX_FALLOCATE is not defined (eg, return -1 and errno == 0).
      
      Create a local safezero_sys_fallocate in order to handle the resize
      code paths that support that.  If not present, the set errno = ENOSYS
      in order to allow the caller to handle the failure scenarios.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      18f03166
  28. 15 12月, 2014 3 次提交
  29. 03 12月, 2014 1 次提交
    • J
      Replace virDomainFree with virObjectUnref · 8fb3aee2
      John Ferlan 提交于
      Since virDomainFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      8fb3aee2
  30. 15 11月, 2014 1 次提交
  31. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in helpers · ff99c791
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/conf/nwfilter_conf.c: Fix initialization.
      * src/cpu/cpu_x86.c: Likewise.
      * src/interface/interface_backend_netcf.c: Likewise.
      * src/locking/lock_daemon.c: Likewise.
      * src/locking/lock_driver_lockd.c: Likewise.
      * src/locking/lock_driver_sanlock.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c: Likewise.
      * src/rpc/virnetserver.c: Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxGenSecurityLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ff99c791
  32. 15 9月, 2014 1 次提交
  33. 03 9月, 2014 1 次提交