1. 24 10月, 2012 12 次提交
  2. 23 10月, 2012 13 次提交
    • C
      selinux: Don't fail RestoreAll if file doesn't have a default label · 767be8be
      Cole Robinson 提交于
      When restoring selinux labels after a VM is stopped, any non-standard
      path that doesn't have a default selinux label causes the process
      to stop and exit early. This isn't really an error condition IMO.
      
      Of course the selinux API could be erroring for some other reason
      but hopefully that's rare enough to not need explicit handling.
      
      Common example here is storing disk images in a non-standard location
      like under /mnt.
      767be8be
    • E
      build: print uids as unsigned · add633bd
      Eric Blake 提交于
      Reported by Michal Privoznik.
      
      * src/security/security_dac.c (virSecurityDACGenLabel): Use
      correct format.
      add633bd
    • J
      xml: omit domain name from comment if it contains double hyphen · 9b704ab8
      Ján Tomko 提交于
      We put a comment containing "virsh edit <domain_name>" at the start of
      the XML. W3C recommendation forbids the use of "--" in comments [1] and
      libvirt can't parse it either. This patch omits the domain name if it
      contains a double hyphen.
      
      [1] http://www.w3.org/TR/REC-xml/#sec-comments
      9b704ab8
    • J
      storage: don't shadow global 'wait' declaration · b326765c
      Ján Tomko 提交于
      Rename the 'wait' parameter to 'loop'.
      This silences the warning:
      storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows
      a global declaration [-Werror=shadow]
      and fixes the build with -Werror.
      --
      Note: loop is pool backwards.
      b326765c
    • C
      Fix disabling of apparmor/selinux security drivers · 662f8a2a
      Christophe Fergeau 提交于
      When using --without-$name --without-secdriver-$name with $name being
      selinux or apparmor, configure will fail saying that AppArmor/SELinux
      development package must be installed.
      This is caused by a small bug in --with-secdriver-$name handling in
      configure.ac which treats --without-secdriver-$name when $name as if the
      user had requested to enable $name when $name couldn't be detected on
      the system.
      
      This commit also makes sure the detection checks for disabled
      secdrivers do not needlessly get run, especially as this could
      cause an error as well in --with-$name --without-secdriver-$name
      situations.
      662f8a2a
    • E
      maint: update to latest gnulib · 6ee0e237
      Eric Blake 提交于
      * .gnulib: Update to latest, prior to freeze.
      6ee0e237
    • E
      snapshot: sanity check when reusing file for snapshot · 33eaebe4
      Eric Blake 提交于
      The snapshot code when reusing an existing file had hard-to-read
      logic, as well as a missing sanity check: REUSE_EXT should require
      the destination to already be present.
      
      * src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare): Require
      destination on REUSE_EXT, rename variable for legibility.
      33eaebe4
    • E
      build: use correct printf types for uid/gid · 23a4df88
      Eric Blake 提交于
      Fixes a build failure on cygwin:
      cc1: warnings being treated as errors
      security/security_dac.c: In function 'virSecurityDACSetProcessLabel':
      security/security_dac.c:862:5: error: format '%u' expects type 'unsigned int', but argument 7 has type 'uid_t' [-Wformat]
      security/security_dac.c:862:5: error: format '%u' expects type 'unsigned int', but argument 8 has type 'gid_t' [-Wformat]
      
      * src/security/security_dac.c (virSecurityDACSetProcessLabel)
      (virSecurityDACGenLabel): Use proper casts.
      23a4df88
    • C
      Remove a couple duplicates from AUTHORS.in · 2e99fa03
      Cole Robinson 提交于
      2e99fa03
    • C
      storage: Don't do wait loops from VolLookupByPath · 77eff5ee
      Cole Robinson 提交于
      virStorageVolLookupByPath is an API call that virt-manager uses
      quite a bit when dealing with storage. This call use BackendStablePath
      which has several usleep() heuristics that can be tripped up
      and hang virt-manager for a while.
      
      Current example: an empty mpath pool pointing to /dev/mapper makes
      _any_ calls to virStorageVolLookupByPath take 5 seconds.
      
      The sleep heuristics are actually only needed in certain cases
      when we are waiting for new storage to appear, so let's skip the
      timeout steps when calling from LookupByPath.
      77eff5ee
    • C
      spec: Fix multilib issue with systemtap tapsets · 18d0632d
      Cole Robinson 提交于
      If building on a 64bit host, rename the affected tapsets to <name>-64.stp.
      This is similar to what the python package does in fedora.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=831425
      18d0632d
    • C
      docs: Fix installation of internals/*.html · 7146d416
      Cole Robinson 提交于
      We were just installing them in the top level html directory, which
      broke navigation and overwrote other pages.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=837825
      7146d416
    • C
      qemu: Don't use -enable-nesting with qemu 1.2.0+ · e58dfad4
      Cole Robinson 提交于
      Since the option doesn't exist. Fixes booting with
      cpu mode='host-model' and qemu 1.2.0
      e58dfad4
  3. 22 10月, 2012 12 次提交
  4. 21 10月, 2012 2 次提交
    • L
      network: don't allow multiple default portgroups · 6f8a8b30
      Laine Stump 提交于
      This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868483
      
      virNetworkUpdate, virNetworkDefine, and virNetworkCreate all three
      allow network definitions to contain multiple <portgroup> elements
      with default='yes'. Only a single default portgroup should be allowed
      for each network.
      
      This patch updates networkValidate() (called by both
      virNetworkCreate() and virNetworkDefine()) and
      virNetworkDefUpdatePortGroup (called by virNetworkUpdate() to not
      allow multiple default portgroups.
      6f8a8b30
    • L
      network: always create dnsmasq hosts and addnhosts files, even if empty · 1cb1f9da
      Laine Stump 提交于
      This fixes the problem reported in:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=868389
      
      Previously, the dnsmasq hosts file (used for static dhcp entries, and
      addnhosts file (used for additional dns host entries) were only
      created/referenced on the dnsmasq commandline if there was something
      to put in them at the time the network was started. Once we can update
      a network definition while it's active (which is now possible with
      virNetworkUpdate), this is no longer a valid strategy - if there were
      0 dhcp static hosts (resulting in no reference to the hosts file on the
      commandline), then one was later added, the commandline wouldn't have
      linked dnsmasq up to the file, so even though we create it, dnsmasq
      doesn't pay any attention.
      
      The solution is to just always create these files and reference them
      on the dnsmasq commandline (almost always, anyway). That way dnsmasq
      can notice when a new entry is added at runtime (a SIGHUP is sent to
      dnsmasq by virNetworkUdpate whenever a host entry is added or removed)
      
      The exception to this is that the dhcp static hosts file isn't created
      if there are no lease ranges *and* no static hosts. This is because in
      this case dnsmasq won't be setup to listen for dhcp requests anyway -
      in that case, if the count of dhcp hosts goes from 0 to 1, dnsmasq
      will need to be restarted anyway (to get it listening on the dhcp
      port). Likewise, if the dhcp hosts count goes from 1 to 0 (and there
      are no dhcp ranges) we need to restart dnsmasq so that it will stop
      listening on port 67. These special situations are handled in the
      bridge driver's networkUpdate() by checking for ((bool)
      nranges||nhosts) both before and after the update, and triggering a
      dnsmasq restart if the before and after don't match.
      1cb1f9da
  5. 20 10月, 2012 1 次提交
    • L
      network: free/null newDef if network fails to start · 78fab277
      Laine Stump 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=866364
      
      pointed out a crash due to virNetworkObjAssignDef free'ing
      network->newDef without NULLing it afterward. A fix for this is in
      upstream commit b7e92024. While the
      NULLing of newDef was a legitimate fix, newDef should have already
      been empty (NULL) anyway (as indicated in the comment that was deleted
      by that commit).
      
      The reason that newDef had a non-NULL value (i.e. the root cause) was
      that networkStartNetwork() had failed after populating
      network->newDef, but then neglected to free/NULL newDef in the
      cleanup.
      
      (A bit of background here: network->newDef should contain the
      persistent config of a network when a network is active (and of course
      only when it is persisten), and NULL at all other times. There is also
      a network->def which should contain the persistent definition of the
      network when it is inactive, and the current live state at all other
      times. The idea is that you can make changes to network->newDef which
      will take effect the next time the network is restarted, but won't
      mess with the current state of the network (virDomainObj has a similar
      pair of virDomainDefs that behave in the same fashion). Personally I
      think there should be a network->live and network->config, and the
      location of the persistent config should *always* be in
      network->config, but that's for a later cleanup).
      
      Since I love things to be symmetric, I created a new function called
      virNetworkObjUnsetDefTransient(), which reverses the effects of
      virNetworkObjSetDefTransient(). I don't really like the name of the
      new function, but then I also didn't really like the name of the old
      one either (it's just named that way to match a similar function in
      the domain conf code).
      78fab277