1. 13 7月, 2016 5 次提交
    • M
      dnsmasq: disable IPv6 default gateway in RA for isolated networks · 527968d4
      Maxim Perevedentsev 提交于
      IPv6 RA always contains an implicit default route via
      the link-local address of the source of RA. This forces
      the guest to install a route via isolated network, which
      may disturb the guest's networking in case of multiple interfaces.
      More info in 013427e6.
      
      The validity of this route is controlled by "default [route] lifetime"
      field of RA. If the lifetime is set to 0 seconds, then no route
      is installed by receiver.
      
      dnsmasq 2.67+ supports "ra-param=<interface>,<RA interval>,<default
      lifetime>" option. We pass "ra-param=*,0,0"
      (here, RA_interval=0 means default) to disable default gateway in RA
      for isolated networks.
      527968d4
    • M
      a96528e9
    • Y
      qemu: getAutoDumpPath() return value should be dumpfile not domname. · 8305322d
      Yan Fu 提交于
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1354238
      
      So we spend some time and effort constructing perfect file name
      for an automatic coredump of a domain, but then just leak it and
      use the domain name anyway. This is probably due to a silly
      mistake that slipped even through review.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8305322d
    • J
      systemd: fix ready notification on abstract socket · c8f08e48
      Jim Fehlig 提交于
      At least with systemd v210, NOTIFY_SOCKET is abstact, e.g.
      @/org/freedesktop/systemd1/notify. sendmsg() fails on such a socket
      with "Connection refused". The unix(7) man page contains the following
      details wrt abstract socket addresses
      
      abstract: an abstract socket address is distinguished (from a
                pathname socket) by the fact that sun_path[0] is a null byte
                ('\0').  The socket's address in this namespace is given by the
                additional bytes in sun_path that are covered by the specified
                length of the address structure.  (Null bytes in the name have
                no special significance.)
      
      So we need to be more precise about the address length, setting it to
      the sizeof sa_family_t + length of address copied to sun_path instead
      of setting it to the sizeof the entire sockaddr_un struct.
      
      Resolves: https://bugzilla.opensuse.org/show_bug.cgi?id=987668Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      c8f08e48
    • T
      esx: Fetch snapshot info directly for filtering · 8ddc56e7
      Tomáš Golembiovský 提交于
      When fetching domains with virConnectListAllDomains() and when filtering
      by snapshot existence is requested the ESX driver first lists all the
      domains and then check one-by-one for snapshot existence. This process
      takes unnecessarily long time.
      
      To significantly improve the time necessary to finish the query we can
      request the snapshot related info directly when querying the list of
      domains from VMware.
      Signed-off-by: NTomáš Golembiovský <tgolembi@redhat.com>
      8ddc56e7
  2. 12 7月, 2016 29 次提交
  3. 11 7月, 2016 6 次提交
    • T
      qemuhotplugtest: Move domain and device XMLs to different directories · b0b4a35c
      Tomasz Flendrich 提交于
      This way we can safely differentiate what XMLs contain whole domain
      definitions and which contain just devices.  Thanks to that we can
      test the domain XMLs in virschematest again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b0b4a35c
    • T
      qemuhotplugtest: Move all XMLs to one directory · ec5dcf2a
      Tomasz Flendrich 提交于
      This makes the search for related XMLs easier, plus they are not used in
      the xml2argv tests anyway.  This also makes future patches cleaner.
      While on that remove unnecessary '-hotplug' from the filenames.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      ec5dcf2a
    • M
      qemuxml2argvmock: Don't leak @netdef->ifname · 1cbb8d4a
      Michal Privoznik 提交于
      In the mock, we have a stub for virNetDevTapCreate(). However,
      the mocked version does not exactly as it's native counterpart.
      The function receives a string, which is an interface name that
      caller would like to have, but it's not guaranteed that they will
      get just that one. If they don't, the function free()-s the one
      passed and returns the new one. Just like the mocked version. But
      what is the mocked version missing is the free().
      
      ==1068== 6 bytes in 1 blocks are definitely lost in loss record 9 of 132
      ==1068==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==1068==    by 0xDE13356: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4)
      ==1068==    by 0xAE2333E: virXMLPropString (virxml.c:479)
      ==1068==    by 0xAE45975: virDomainNetDefParseXML (domain_conf.c:9038)
      ==1068==    by 0xAE5C0BB: virDomainDefParseXML (domain_conf.c:16734)
      ==1068==    by 0xAE5EB96: virDomainDefParseNode (domain_conf.c:17444)
      ==1068==    by 0xAE5EA05: virDomainDefParse (domain_conf.c:17391)
      ==1068==    by 0xAE5EA93: virDomainDefParseFile (domain_conf.c:17415)
      ==1068==    by 0x433430: testCompareXMLToArgvFiles (qemuxml2argvtest.c:278)
      ==1068==    by 0x433A18: testCompareXMLToArgvHelper (qemuxml2argvtest.c:414)
      ==1068==    by 0x446ED4: virTestRun (testutils.c:179)
      ==1068==    by 0x43A099: mymain (qemuxml2argvtest.c:1016)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1cbb8d4a
    • M
      qemuxml2argvtest: Don't leak dummy monitor · 958d6208
      Michal Privoznik 提交于
      It's just test, but why leak it?
      
      ==26971== 20 bytes in 1 blocks are definitely lost in loss record 623 of 704
      ==26971==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==26971==    by 0xE560447: vasprintf (vasprintf.c:76)
      ==26971==    by 0xAE0DEE2: virVasprintfInternal (virstring.c:480)
      ==26971==    by 0xAE0DFF7: virAsprintfInternal (virstring.c:501)
      ==26971==    by 0x4751F3: qemuProcessPrepareMonitorChr (qemu_process.c:2651)
      ==26971==    by 0x4334B1: testCompareXMLToArgvFiles (qemuxml2argvtest.c:297)
      ==26971==    by 0x4339AC: testCompareXMLToArgvHelper (qemuxml2argvtest.c:413)
      ==26971==    by 0x446E7A: virTestRun (testutils.c:179)
      ==26971==    by 0x445D33: mymain (qemuxml2argvtest.c:2029)
      ==26971==    by 0x44886F: virTestMain (testutils.c:969)
      ==26971==    by 0x445D9B: main (qemuxml2argvtest.c:2036)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      958d6208
    • M
      qemuDomainObjPrivateFree: Free @masterKey too · 6b6e2cf9
      Michal Privoznik 提交于
      This one's a bit more complicated. In qemuProcessPrepareDomain()
      a master key for encrypting secret for ciphered disks is created.
      This object lives within qemuDomainObjPrivate object. It is freed
      in qemuProcessStop(), but if nobody calls it (for instance like
      our qemuxml2argvtest does), the key object leaks.
      
      ==17078== 32 bytes in 1 blocks are definitely lost in loss record 633 of 707
      ==17078==    at 0x4C2C070: calloc (vg_replace_malloc.c:623)
      ==17078==    by 0xAD924DF: virAllocN (viralloc.c:191)
      ==17078==    by 0x5050BA6: virCryptoGenerateRandom (qemuxml2argvmock.c:166)
      ==17078==    by 0x453DC8: qemuDomainMasterKeyCreate (qemu_domain.c:678)
      ==17078==    by 0x47A36B: qemuProcessPrepareDomain (qemu_process.c:4913)
      ==17078==    by 0x47C728: qemuProcessCreatePretendCmd (qemu_process.c:5542)
      ==17078==    by 0x433698: testCompareXMLToArgvFiles (qemuxml2argvtest.c:332)
      ==17078==    by 0x4339AC: testCompareXMLToArgvHelper (qemuxml2argvtest.c:413)
      ==17078==    by 0x446E7A: virTestRun (testutils.c:179)
      ==17078==    by 0x445BD9: mymain (qemuxml2argvtest.c:2022)
      ==17078==    by 0x44886F: virTestMain (testutils.c:969)
      ==17078==    by 0x445D9B: main (qemuxml2argvtest.c:2036)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6b6e2cf9
    • M
      qemuBuildCpuCommandLine: Don't leak @buf · 87df9452
      Michal Privoznik 提交于
      Just like every other qemuBuild*CommandLine() function, this uses
      a buffer to hold partial cmd line strings too. However, if
      there's an error, the control jumps to 'cleanup' label leaving
      the buffer behind and thus leaking it.
      
      ==2013== 1,006 bytes in 1 blocks are definitely lost in loss record 701 of 711
      ==2013==    at 0x4C29F80: malloc (vg_replace_malloc.c:296)
      ==2013==    by 0x4C2C32F: realloc (vg_replace_malloc.c:692)
      ==2013==    by 0xAD925A8: virReallocN (viralloc.c:245)
      ==2013==    by 0xAD95EA8: virBufferGrow (virbuffer.c:130)
      ==2013==    by 0xAD95F78: virBufferAdd (virbuffer.c:165)
      ==2013==    by 0x5097F5: qemuBuildCpuModelArgStr (qemu_command.c:6339)
      ==2013==    by 0x509CC3: qemuBuildCpuCommandLine (qemu_command.c:6437)
      ==2013==    by 0x51142C: qemuBuildCommandLine (qemu_command.c:9174)
      ==2013==    by 0x47CA3A: qemuProcessCreatePretendCmd (qemu_process.c:5546)
      ==2013==    by 0x433698: testCompareXMLToArgvFiles (qemuxml2argvtest.c:332)
      ==2013==    by 0x4339AC: testCompareXMLToArgvHelper (qemuxml2argvtest.c:413)
      ==2013==    by 0x446E7A: virTestRun (testutils.c:179)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      87df9452