1. 24 8月, 2015 3 次提交
  2. 22 8月, 2015 4 次提交
  3. 21 8月, 2015 2 次提交
  4. 20 8月, 2015 7 次提交
  5. 19 8月, 2015 11 次提交
  6. 18 8月, 2015 7 次提交
    • L
      virsh: Reset global error after successfull domain lookup · 70f56dd7
      Luyao Huang 提交于
      When looking up a domain, we try to look up by ID, UUID and NAME
      consequently while not really caring which of those lookups succeeds.
      The problem is that if any of them fails, we dispatch the error from the
      driver and that means setting both threadlocal and global error. Let's
      say the last lookup (by NAME) succeeds and resets the threadlocal error as any
      other API does, however leaving the global error unchanged. If the underlying
      virsh command does not succeed afterwards, our cleanup routine in
      vshCommandRun ensures that no libvirt error will be forgotten and that's
      exactly where this global error comes in incorrectly.
      
       # virsh domif-setlink 123 vnet1 up
       error: interface (target: vnet1) not found
       error: Domain not found: no domain with matching id 123
      
      This patch also resets the global error which would otherwise cause some
      minor confusion in reported error messages.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1254152Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      70f56dd7
    • E
      build: fix mingw build · 0a617b53
      Eric Blake 提交于
      Ever since commit e44b0269, 64-bit mingw compilation fails with:
      
      ../../src/util/virprocess.c: In function 'virProcessGetPids':
      ../../src/util/virprocess.c:628:50: error: passing argument 4 of 'virStrToLong_i' from incompatible pointer type [-Werror=incompatible-pointer-types]
               if (virStrToLong_i(ent->d_name, NULL, 10, &tmp_pid) < 0)
                                                        ^
      In file included from ../../src/util/virprocess.c:59:0:
      ../../src/util/virstring.h:53:5: note: expected 'int *' but argument is of type 'pid_t * {aka long long int *}'
       int virStrToLong_i(char const *s,
           ^
      cc1: all warnings being treated as errors
      
      Although mingw won't be using this function, it does compile the
      file, and the fix is relatively simple.
      
      * src/util/virprocess.c (virProcessGetPids): Don't assume pid_t
      fits in int.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0a617b53
    • M
      qemuDomainRename: Explicitly check if domain is renaming to itself · 0ace4d98
      Michal Privoznik 提交于
      It may happen that user (mistakenly) wants to rename a domain to
      itself. Which is no renaming at all. We should reject that with
      some meaningful error message.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0ace4d98
    • M
      virHashAddEntry: Report error on duplicate key · 1dc25872
      Michal Privoznik 提交于
      If this function fails, the error message is reported only in
      some cases (e.g. OOM), but in some it's not (e.g. duplicate key).
      This fact is painful and we should either not report error at all
      or report the error in all possible cases. I vote for the latter.
      Unfortunately, since the key may be an arbitrary value (not
      necessarily a string) we can't report it in the error message.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1dc25872
    • M
      virHashAddOrUpdateEntry: Turn @new_name into void * · 890676d2
      Michal Privoznik 提交于
      In 9190f0b0 we've tried to fix an OOM. And boy, was that fix
      successful. But back then, the hash table implementation worked
      strictly over string keys, which is not the case anymore. Hash
      table have this function keyCopy() which returns void *.
      Therefore a local variable that is temporarily holding the
      intermediate return value from that function should be void *
      too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      890676d2
    • L
      libvirt-domain: forbid use virDomainRename in readonly connection · 2b3fb38f
      Luyao Huang 提交于
      This function will change the guest name, we shouldn't
      allow the readonly user do this.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      2b3fb38f
    • L
      virsh: fix always return false in domrename · b2da1d45
      Luyao Huang 提交于
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      b2da1d45
  7. 16 8月, 2015 1 次提交
    • J
      qemu: Resolve Coverity UNINIT · c4cfc0d0
      John Ferlan 提交于
      Coverity complained that 'vm' wasn't initialized before jumping to
      cleanup: and calling virDomainObjEndAPI if the VIR_STRDUP fails.
      So I initialized vm = NULL and also moved the VIR_STRDUP closer to
      usage and used endjob for goto. Lots of other reasons for failures.
      c4cfc0d0
  8. 15 8月, 2015 2 次提交
  9. 14 8月, 2015 3 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
    • T
      qemu: Implement virDomainRename · b5d63e99
      Tomas Meszaros 提交于
      Currently supports only renaming inactive domains without snapshots.
      Signed-off-by: NTomas Meszaros <exo@tty.sk>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b5d63e99
    • T
      Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event · 9877d840
      Tomas Meszaros 提交于
      This should be emitted whenever a domain is renamed.
      Signed-off-by: NTomas Meszaros <exo@tty.sk>
      9877d840