1. 21 7月, 2015 6 次提交
  2. 15 7月, 2015 1 次提交
    • M
      cmdVcpuPin: Remove dead code · 416d0e94
      Michal Privoznik 提交于
      There's this condition:
      
      flags & VIR_DOMAIN_AFFECT_CURRENT && virDomainIsActive(dom)
      
      which can never be true since VIR_DOMAIN_AFFECT_CURRENT has hardcoded
      value of zero. Therefore virDomainIsActive() is a dead code. However,
      the condition could make sense if it is rewritten as the following:
      
      !(flags & VIR_DOMAIN_AFFECT_CONFIG) && virDomainIsActive(dom)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      416d0e94
  3. 02 7月, 2015 1 次提交
    • L
      virsh: report error if vcpu number exceed the guest maxvcpu number · 848ab685
      Luyao Huang 提交于
      Commit id '81dd81e4' caused a regression when attempting to print a
      specific vcpuid that is out of the range of the maximum vcpus for
      the guest, such as:
      
       $ virsh vcpupin $dom 1000
       VCPU: CPU Affinity
       ----------------------------------
      
       $
      
      Rather than just recover the old message, let's adjust the message based
      on what would be displayed for a similar failure in the set path, such as:
      
       $ virsh vcpupin $dom 1000
       error: vcpu 1000 is out of range of persistent cpu count 2
      
       $ virsh vcpupin $dom 1000 --live
       error: vcpu 1000 is out of range of live cpu count 2
      
       $
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      848ab685
  4. 24 6月, 2015 1 次提交
  5. 23 6月, 2015 3 次提交
  6. 22 6月, 2015 1 次提交
    • P
      virsh: blockcopy: Report error if the copy job fails · e7d3ff84
      Peter Krempa 提交于
      When the block job would fail while watching it using the "--wait"
      option for blockcopy, virsh would rather unhelpfully report:
      
      $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait
      
      Now in mirroring phase
      
      Add a special case when the block job vanishes while waiting for it to
      finish to improve the message:
      
      $ virsh blockcopy vm hdc /tmp/raw.img --granularity 8192 --verbose --wait
      error: Block Copy unexpectedly failed
      e7d3ff84
  7. 18 6月, 2015 1 次提交
  8. 09 6月, 2015 1 次提交
  9. 03 6月, 2015 1 次提交
    • J
      virsh: Fix Ctrl-C behavior when watching a job · e9507fd4
      Jiri Denemark 提交于
      When watching a job (save, managedsave, dump, migrate) virsh spawns a
      thread to call the appropriate API and waits for the result while
      watching for interruption signals (SIGINT, Ctrl-C on the terminal).
      Whenever such signal is caught, virsh calls virDomainAbortJob, stops
      waiting for the job, and returns the result of virDomainAbortJob.
      
      This is wrong because the job might have finished in the meantime or it
      might have been cancelled by someone else and virsh would just report
      the failure to abort the job. However, we are not interested in the
      virDomainAbortJob's result at all, we need to keep waiting for the main
      job to finish and report its result instead.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1131755Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e9507fd4
  10. 02 6月, 2015 2 次提交
  11. 28 5月, 2015 1 次提交
  12. 21 5月, 2015 1 次提交
  13. 18 5月, 2015 2 次提交
  14. 14 5月, 2015 1 次提交
    • L
      virsh: Report an error when cpulist parsing fails · 60107346
      Luyao Huang 提交于
      When parsing a cpulist, the virBitmapParse is used. On an invalid
      bitmap an error is reported, but the error gets cleared
      immediately by subsequent public APIs call, e.g. virDomainFree().
      Moreover, we don't check whether bitmap fits into maximal CPU ID
      on the host. Therefore the following examples failed without any
      error:
      
       # virsh vcpupin test3 1 aaa
      
       # virsh vcpupin test3 1 1000
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      60107346
  15. 04 5月, 2015 2 次提交
  16. 28 4月, 2015 1 次提交
    • J
      virsh: Add iothreadadd and iothreaddel commands · 1f7e8112
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1161617
      
      Add command to allow adding and removing IOThreads from the domain including
      the configuration and live domain.
      
      $ virsh iothreadadd --help
        NAME
          iothreadadd - add an IOThread to the guest domain
      
        SYNOPSIS
          iothreadadd <domain> <id> [--config] [--live] [--current]
      
        DESCRIPTION
          Add an IOThread to the guest domain.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          [--id] <number>  iothread for the new IOThread
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      $ virsh iothreaddel --help
        NAME
          iothreaddel - delete an IOThread from the guest domain
      
        SYNOPSIS
          iothreaddel <domain> <id> [--config] [--live] [--current]
      
        DESCRIPTION
          Delete an IOThread from the guest domain.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          [--id] <number>  iothread_id for the IOThread to delete
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      Assuming a running $dom with multiple IOThreads assigned and that
      that the $dom has disks assigned to IOThread 1 and IOThread 2:
      
      $ virsh iothreadinfo $dom
       IOThread ID     CPU Affinity
       ---------------------------------------------------
        1               2
        2               3
        3               0-1
      
      $ virsh iothreadadd $dom 1
      error: invalid argument: an IOThread is already using iothread_id '1' in iothreadpids
      
      $ virsh iothreadadd $dom 1 --config
      error: invalid argument: an IOThread is already using iothread_id '1' in persistent iothreadids
      
      $ virsh iothreadadd $dom 4
      $ virsh iothreadinfo $dom
       IOThread ID     CPU Affinity
       ---------------------------------------------------
        1               2
        2               3
        3               0-1
        4               0-3
      
      $ virsh iothreadinfo $dom --config
       IOThread ID     CPU Affinity
       ---------------------------------------------------
        1               2
        2               3
        3               0-1
      
      $ virsh iothreadadd $dom 4 --config
      $ virsh iothreadinfo $dom --config
       IOThread ID     CPU Affinity
        ---------------------------------------------------
          1               2
          2               3
          3               0-1
          4               0-3
      
      Assuming the same original configuration
      
      $ virsh iothreaddel $dom 1
      error: invalid argument: cannot remove IOThread 1 since it is being used by disk 'vde'
      
      $ virsh iothreaddel $dom 3
      
      $ virsh iothreadinfo $dom
       IOThread ID     CPU Affinity
       ---------------------------------------------------
        1               2
        2               3
      
      $ virsh iothreadinfo $dom --config
       IOThread ID     CPU Affinity
       ---------------------------------------------------
        1               2
        2               3
        3               0-1
      1f7e8112
  17. 24 4月, 2015 1 次提交
    • J
      migration: Usable time statistics without requiring NTP · aa9f1395
      Jiri Denemark 提交于
      virDomainGetJobStats is able to report statistics of a completed
      migration, however to get usable downtime and total time statistics both
      hosts have to keep synchronized time. To provide at least some
      estimation of the times even when NTP daemons are not running on both
      hosts we can just ignore the time needed to transfer a migration cookie
      to the destination host. The result will be also inaccurate but a bit
      more predictable. The total/down time will just be at least what we
      report.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1213434
      aa9f1395
  18. 15 4月, 2015 2 次提交
    • J
      Add VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event · 1882c0bd
      Ján Tomko 提交于
      The counterpart to VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1206114
      1882c0bd
    • E
      virsh: fix regression in 'virsh event' by domain · 31ef0836
      Eric Blake 提交于
      Commit a0670aef caused a regression in 'virsh event' and
      'virsh qemu-monitor-event' - if a user tries to filter the
      command to a specific domain, an error message is printed:
      
      $ virsh event dom --loop
      error: internal error: virsh qemu-monitor-event: no domain VSH_OT_DATA option
      
      and then the command continues as though no domain had been
      supplied (giving events for ALL domains, instead of the
      requested one).  This is because the code was incorrectly
      assuming that all "domain" options would be supplied via a
      mandatory VSH_OT_DATA, even though "domain" is optional for
      these two commands, so we had changed them to VSH_OT_STRING
      to quit failing for other reasons (ever since it was decided
      that VSH_OT_DATA and VSH_OT_STRING should no longer be
      synonyms).
      
      In looking at the situation, though, the code for looking up
      a domain was making a pointless check for whether the option
      exists prior to finding the option's string value, as
      vshCommandOptStringReq does just fine at reporting any errors
      when looking up a string whether or not the option was present.
      
      So this is a case of regression fixing by pure code deletion :)
      
      * tools/virsh-domain.c (vshCommandOptDomainBy): Drop useless filter.
      * tools/virsh-interface.c (vshCommandOptInterfaceBy): Likewise.
      * tools/virsh-network.c (vshCommandOptNetworkBy): Likewise.
      * tools/virsh-nwfilter.c (vshCommandOptNWFilterBy): Likewise.
      * tools/virsh-secret.c (vshCommandOptSecret): Likewise.
      * tools/virsh.h (vshCmdHasOption): Drop unused function.
      * tools/virsh.c (vshCmdHasOption): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      31ef0836
  19. 14 4月, 2015 1 次提交
  20. 13 4月, 2015 2 次提交
    • J
      Rewrite vshParseCPUList · ff6d2314
      Ján Tomko 提交于
      Use virBitmap helpers that were added after this function.
      
      Change cpumaplen to int and fill it out by this function.
      ff6d2314
    • J
      Rewrite vshPrintPinInfo · 4c4b821e
      Ján Tomko 提交于
      Use virBitmapDataToString instead of constructing the ranges bit
      by bit, remove the checking of parameters (that is already done
      by the callers).
      
      Let the callers choose the right bitmap, since there's only
      one that uses this helper on a matrix-in-an-array.
      4c4b821e
  21. 07 4月, 2015 1 次提交
  22. 02 4月, 2015 3 次提交
  23. 30 3月, 2015 1 次提交
  24. 26 3月, 2015 3 次提交