1. 26 1月, 2016 6 次提交
  2. 25 1月, 2016 8 次提交
  3. 23 1月, 2016 1 次提交
    • L
      util: reset MAC address of macvtap passthrough physdev after disassociate · 29cc45cb
      Laine Stump 提交于
      libvirt always resets the MAC address of the physdev used for macvtap
      passthrough when the guest is finished with it. This was happening
      prior to the 802.1Qb[gh] DISASSOCIATE command, and was quite often
      failing, presumably because the driver wouldn't allow the MAC address
      to be reset while the association was still active, with a log message
      like this:
      
      virNetDevSetMAC:168 : Cannot set interface MAC to 00:00:00:00:00:00 on 'eth13': Cannot assign requested address
      
      This patch changes the order - we now do the 802.1Qb[gh] disassociate
      and delete the macvtap interface first, then and reset the MAC
      address.
      29cc45cb
  4. 22 1月, 2016 8 次提交
    • C
      lxc: fuse: Stub out Slab bits in /proc/meminfo · 81da8bc7
      Cole Robinson 提交于
      'free' on fedora23 wants to use the Slab field for calculated used
      memory. The equation is:
      
      used = MemTotal - MemFree - (Cached + Slab) - Buffers
      
      We already set Cached and Buffers to 0, do the same for Slab and its
      related values
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1300781
      81da8bc7
    • C
      lxc: fuse: Fill in MemAvailable for /proc/meminfo · c7be484d
      Cole Robinson 提交于
      'free' on Fedora 23 will use MemAvailable to calculate its 'available'
      field, but we are passing through the host's value. Set it to match
      MemFree, which is what 'free' will do for older linux that don't have
      MemAvailable
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1300781
      c7be484d
    • C
      lxc: fuse: Fix /proc/meminfo size calculation · 8418245a
      Cole Robinson 提交于
      We virtualize bits of /proc/meminfo by replacing host values with
      values specific to the container.
      
      However for calculating the final size of the returned data, we are
      using the size of the original file and not the altered copy, which
      could give garbelled output.
      8418245a
    • C
      lxc: fuse: Unindent meminfo logic · f65dcfcd
      Cole Robinson 提交于
      Reverse the conditional at the start so we aren't stuffing all the logic
      in an 'if' block
      f65dcfcd
    • I
      libxl: Support cmdline= in xl config files · daeace5c
      Ian Campbell 提交于
      ... and consolidate the cmdline/extra/root parsing to facilitate doing
      so.
      
      The logic is the same as xl's parse_cmdline from the current xen.git master
      branch (e6f0e099d2c17de47fd86e817b1998db903cab61).
      
      On the formatting side switch to producing cmdline= instead of extra=.
      
      Update a few tests and add serveral more.
        - test-cmdline is added to test the exclusive use of cmdline.
        - test-fullvirt-direct-kernel-boot.cfg is updated due to the switch
          on the formatting side and now tests the exclusive use of cmdline=.
        - Tests are added for both paravirt and fullvirt where the .cfg uses
          extra= and (paravirt only) root=. These are format (xl->xml) only
          since the inverse will generate cmdline= hence is not a round trip
          (which was already true if using root=, which used to generate
          extra= on the way back).
        - Tests are added for both paravirt and fullvirt where the .cfg
          declares cmdline= as well as bogus extra= and (paravirt only) root=
          entries which should be ignored. Again these are format only tests
          since the inverse won't include the bogus lines.
      
      The last two bullets here required splitting the DO_TEST macro into
      two halves, as is done in the xmconfigtest.c case.
      
      In order to introduce a use of VIR_WARN for logging I had to add
      virerror.h and VIR_LOG_INIT.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      daeace5c
    • J
      libxl: dispose libxl_dominfo after libxl_domain_info() · d18d6a85
      Joao Martins 提交于
      As suggested in a previous thread [0] this patch adds some missing calls
      to libxl_dominfo_{init,dispose} when doing some of the libxl_domain_info
      operations which would otherwise lead to memory leaks.
      
      [0]
      https://www.redhat.com/archives/libvir-list/2015-September/msg00519.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com>
      d18d6a85
    • J
      Xen: add XENXL to virErrorDomain enum · 8c3c32f1
      Jim Fehlig 提交于
      Add "Xen XL Config" to the virErrorDomain enum and use it in
      src/xenconfig/xen_xl.c.
      8c3c32f1
    • J
      Xen: VIR_FROM_THIS cleanup · 7d3698b4
      Jim Fehlig 提交于
      The virErrorDomain enum has VIR_FROM_XEN, VIR_FROM_XEND,
      VIR_FROM_XENSTORE, VIR_FROM_SEXPR, and VIR_FROM_XENXM. Use
      these elements in the corresponding .c files. While at it,
      remove the VIR_FROM_THIS define in src/xenconfig/xenxs_private.h.
      7d3698b4
  5. 21 1月, 2016 4 次提交
    • J
      qemu: Add support for migration iteration event · 56635345
      Jiri Denemark 提交于
      The corresponding event in QEMU is called MIGRATION_PASS.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      56635345
    • J
      Introduce migration iteration event · 0b50f4a0
      Jiri Denemark 提交于
      The VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION event will be triggered
      whenever VIR_DOMAIN_JOB_MEMORY_ITERATION changes its value, i.e.,
      whenever a new iteration over guest memory pages is started during
      migration.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      0b50f4a0
    • D
      qemuDomainReboot: use fakeReboot=true only for acpi mode · e2b86f58
      Dmitry Andreev 提交于
      When acpi is used to reboot/shutdown qemu domain, qemu emits
      SHUTDOWN event. Libvirt uses fakeReboot variable in order to
      differentiate reboot or shutdown. fakeReboot value is reseted
      to false after domain restart/reset.
      
      When mode=agent is used to reboot qemu domain, qemu doesn't emit
      SHUTDOWN event and libvirt doesn't reset fakeReboot value to false.
      In this case next 'shutdown -h now' performs reboot. That's why
      we don't need to set fakeReboot=true for mode=agent.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e2b86f58
    • M
      virsh: Don't fetch status for all domains in cmdList · 3bd2ee5d
      Michal Privoznik 提交于
      We are getting the list of domains and after that we iterate over
      the list and try to get status for each domain hoping it will
      skip over domains that disappeared meanwhile. However, this
      solution to race is bogus - domain may disappear right after we
      have checked its state and before we exec another API over it
      (e.g. virDomainHasManagedSaveImage()). Also, when printing just
      names or uuids (list --name / --uuid) we issue APIs to obtain the
      values, however these require no RPC call as all requested info
      is in virDomain object that client already has.
      Therefore move the status obtaining only to the place that really
      needs it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3bd2ee5d
  6. 20 1月, 2016 12 次提交
    • C
      docs: fix syntax-check long line error · a6cfd22e
      Cole Robinson 提交于
      a6cfd22e
    • C
      build: predictably generate systemtap tapsets (bz 1173641) · a1edb05c
      Cole Robinson 提交于
      The generated output is dependent on perl hashtable ordering, which
      gives different results for i686 and x86_64. Fix this by sorting
      the hash keys before iterating over them
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1173641
      a1edb05c
    • D
      docs: fix generation of docs from VPATH build · 7659bd92
      Daniel P. Berrange 提交于
      When generating docs in a VPATH build we get a failure to
      create a file due to the 'internals' subdir not existing:
      
        Generating internals/locking.html.tmp
        /bin/sh: line 3: internals/locking.html.tmp: No such file or directory
        rm: cannot remove ‘internals/locking.html.tmp’: No such file or directory
        Makefile:2229: recipe for target 'internals/locking.html.tmp' failed
        make: *** [internals/locking.html.tmp] Error 1
      
      For some reason, make has decided to run the target
      
        %.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated)
      
      instead of the target
      
        internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
      
      Removing '$(acl_generated)' from the first target, inexplicably
      causes make to now run the correct target for the internals/
      files.
      
      Rather than figure this out, lets just combine the two targets
      into one.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7659bd92
    • J
      leaseshelper: reduce indentation level in virLeaseReadCustomLeaseFile · ce9085eb
      Ján Tomko 提交于
      Instead of nested ifs, jump out early.
      
      Mostly whitespace changes.
      ce9085eb
    • J
      leaseshelper: remove useless comparison · d7049a67
      Ján Tomko 提交于
      We do not care if the mac was specified in the delete section,
      we are going to delete the record anyway.
      d7049a67
    • J
      leaseshelper: move comment about adding IPv6 leases · 99569948
      Ján Tomko 提交于
      The comment is relevant to the ADD action, not DEL.
      99569948
    • J
      leaseshelper: split out virLeasePrintLeases · 21fb3795
      Ján Tomko 提交于
      Introduce a function for printing the leases on the 'init' operation.
      21fb3795
    • J
      leaseshelper: split out custom leases file read · 7f9c425b
      Ján Tomko 提交于
      Introduce virLeaseReadCustomLeaseFile which will populate
      the new leases array with all the leases, except for expired
      ones and the ones matching 'ip_to_delete'.
      
      This removes five variables from main().
      7f9c425b
    • J
      leaseshelper: store server_duid as an allocated string · 9e7e7662
      Ján Tomko 提交于
      We either use the value from the environment variable, or learn it from
      the existing lease file.
      
      In the second case, the pointer would be pointing into the JSON object
      of the first lease with a DUID, owned by leases_array, then
      leases_array_new.
      
      Always allocate the string instead, making obvious who should free the
      string.
      9e7e7662
    • J
      leaseshelper: fix crash when no mac is specified · df9fe124
      Ján Tomko 提交于
      If dnsmasq specified DNSMASQ_IAID (so we're dealing with an IPv6
      lease) but no DNSMASQ_MAC, we skip creation of the new lease object.
      
      Also skip adding it to the leases array.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1202350
      df9fe124
    • J
      storage: Add new flag for libvirt_parthelper · 020135dc
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1265694
      
      In order to be able to process disk storage pool's using a multipath
      device to handle the partitions, libvirt_parthelper will need a way to
      not automatically add a partition separator "p" to the generated device
      name for each partition found. This is designed to mimic the multipath
      features known as 'user_friendly_names' and custom 'alias' name.
      
      If the part_separator attribute is set to "no", then generation of the
      multipath partition name will not include the "p" partition separator
      unless the source device path name ends with a number. The generated
      partition names that get passed back to libvirt are processed in order
      to find the device mapper multipath (dm-#) path device.
      
      For example, device path "/dev/mapper/mpatha" would create partitions
      "/dev/mapper/mpatha1", "/dev/mapper/mpatha2", etc. instead of
      "/dev/mapper/mpathap1", "/dev/mapper/mpathap2", etc. If the device
      path ends with a number "/dev/mapper/mpatha1", then the algorithm
      to generate names "/dev/mapper/mpatha1p1", "/dev/mapper/mpatha1p2", etc.
      would be utilized.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      020135dc
    • J
      conf: Add storage pool device attribute part_separator · 4f846170
      John Ferlan 提交于
      Add a new storage pool source device attribute 'part_separator=[yes|no]'
      in order to allow a 'disk' storage pool using a device mapper multipath
      device to not add the "p" partition separator to the generated device
      name when libvirt_parthelper is run.
      
      This will allow libvirt to find device mapper multipath devices which were
      configured in /etc/multipath.conf to use 'user_friendly_names' or custom
      'alias' names for the LUN.
      4f846170
  7. 19 1月, 2016 1 次提交
    • M
      virLogManagerDomainReadLogFile: Don't do dummy allocs · c03fbecc
      Michal Privoznik 提交于
      Since we pass dummy variables @fdout and @fdoutlen into
      virNetClientProgramCall() we make it alloc @fdout array (even
      though it's an array of 0 elements since vitlogd can hardly pass
      us some FDs at this stage). Nevertheless, it's an allocation not
      followed by free():
      
      ==29385== 0 bytes in 60 blocks are definitely lost in loss record 2 of 1,009
      ==29385==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==29385==    by 0x54B99EF: virAllocN (viralloc.c:191)
      ==29385==    by 0x56821B1: virNetClientProgramCall (virnetclientprogram.c:359)
      ==29385==    by 0x563B304: virLogManagerDomainReadLogFile (log_manager.c:272)
      ==29385==    by 0x217CD613: qemuDomainLogContextRead (qemu_domain.c:2485)
      ==29385==    by 0x217EDC76: qemuProcessReadLog (qemu_process.c:1660)
      ==29385==    by 0x217EDE1D: qemuProcessReportLogError (qemu_process.c:1696)
      ==29385==    by 0x217EE8C1: qemuProcessWaitForMonitor (qemu_process.c:1957)
      ==29385==    by 0x217F6636: qemuProcessLaunch (qemu_process.c:4955)
      ==29385==    by 0x217F71A4: qemuProcessStart (qemu_process.c:5152)
      ==29385==    by 0x21846582: qemuDomainObjStart (qemu_driver.c:7396)
      ==29385==    by 0x218467DE: qemuDomainCreateWithFlags (qemu_driver.c:7450)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c03fbecc