1. 25 3月, 2014 37 次提交
    • J
      Indent top-level labels by one space in src/qemu/ · 5922d05a
      Ján Tomko 提交于
      5922d05a
    • J
      Indent top-level labels by one space in src/parallels/ · 34ff191c
      Ján Tomko 提交于
      34ff191c
    • J
      Indent top-level labels by one space in src/nwfilter/ · 5d831597
      Ján Tomko 提交于
      5d831597
    • J
      Indent top-level labels by one space in src/network/ · c97cfce2
      Ján Tomko 提交于
      c97cfce2
    • J
      Indent top-level labels by one space in src/lxc/ · 1577e2d4
      Ján Tomko 提交于
      1577e2d4
    • J
      Indent top-level labels by one space in src/locking/ · 40cc610a
      Ján Tomko 提交于
      40cc610a
    • J
      Indent top-level labels by one space in libvirt.c · d46f4a3c
      Ján Tomko 提交于
      d46f4a3c
    • J
      Indent top-level labels by one space in src/libxl/ · 37a0c273
      Ján Tomko 提交于
      37a0c273
    • J
      Indent top-level labels by one space in src/esx/ · 2bd4a172
      Ján Tomko 提交于
      2bd4a172
    • J
      Indent top-level labels by one space in src/cpu/ · dc7238f5
      Ján Tomko 提交于
      dc7238f5
    • J
      Indent top-level labels by one space in src/conf/ · df2013fa
      Ján Tomko 提交于
      df2013fa
    • J
      sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_RESTART · 2cc27c34
      Jiri Denemark 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=905282
      https://bugzilla.redhat.com/show_bug.cgi?id=967494
      
      When lock failure is detected by sanlock, our sanlock_helper kill script
      will try to restart (shutdown followed by start) the affected domain
      when RESTART action is configured for it. While shutting down kills QEMU
      and removes all its leases (which is what sanlock wants to happen),
      trying to start it again just hangs because libvirt tries reacquire the
      locks in the failed lock space. Hence, this action cannot be supported
      by sanlock driver.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      2cc27c34
    • J
      sanlock: Forbid VIR_DOMAIN_LOCK_FAILURE_IGNORE · e3dd35e8
      Jiri Denemark 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=905280
      https://bugzilla.redhat.com/show_bug.cgi?id=967493
      
      Sanlock expects that the configured kill script either kills the PID on
      lock failure or removes all locks the PID owns. If none of the two
      options happen, sanlock will reboot the host. Although IGNORE action is
      supposed to ignore the request to kill the PID or remove all leases,
      it's certainly not designed to cause the host to be rebooted. That said,
      IGNORE action is incompatible with sanlock and should be forbidden by
      libvirt.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e3dd35e8
    • P
      util: Sanitize ATTRIBUTE_NONNULL use in viriscsi.h · 562112f4
      Peter Krempa 提交于
      Some of the function attributes marked as nonnull actually explicitly
      handle the arguments for NULL. All changed functions handle missing
      "initiatoriqn" argument well and virISCSIScanTargets also handles well
      if the return pointers are missing. Remove some of the liberaly used
      ATTRIBUTE_NONNULLs as coverity and possibly other compilers that honor
      the attribute fail to compile the code.
      
      Flaw introduced in commit 5e1d5dde
      562112f4
    • Q
      qemu: add support for virDomainCoreDumpWithFormat API · 8c023e31
      Qiao Nuohan 提交于
      This patch makes qemu driver support virDomainCoreDumpWithFormat API.
      Signed-off-by: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
      8c023e31
    • Q
      qemu: add qemuMonitorGetDumpGuestMemoryCapability · 43177e2f
      Qiao Nuohan 提交于
      This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to check
      whether the specified dump-guest-memory format is supported by qemu.
      Signed-off-by: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
      43177e2f
    • Q
      add new virDomainCoreDumpWithFormat API · 9fbaff00
      Qiao Nuohan 提交于
      --memory-only option is introduced without compression supported. Now qemu
      has support for dumping domain's memory in kdump-compressed format. This
      patch adds a new virDomainCoreDumpWithFormat API, so that the format in
      which qemu dumps domain's memory can be specified.
      Signed-off-by: NQiao Nuohan <qiaonuohan@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9fbaff00
    • P
      apparmor: Fix build after split of disk source metadata · ccef7d78
      Peter Krempa 提交于
      Commit 4f202266 breaks build with
      AppArmor enabled as it missed the refactor to the new accessors.
      ccef7d78
    • E
      conf: prepare to track multiple host source files per <disk> · 4f202266
      Eric Blake 提交于
      It's finally time to start tracking disk backing chains in
      <domain> XML.  The first step is to start refactoring code
      so that we have an object more convenient for representing
      each host source resource in the context of a single guest
      <disk>.  Ultimately, I plan to move the new type into src/util
      where it can be reused by virStorageFile, but to make the
      transition easier to review, this patch just creates the
      new type then fixes everything until it compiles again.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Split...
      (_virDomainDiskSourceDef): ...to new struct.
      (virDomainDiskAuthClear): Use new type.
      * src/conf/domain_conf.c (virDomainDiskDefFree): Split...
      (virDomainDiskSourceDefClear): ...to new function.
      (virDomainDiskGetType, virDomainDiskSetType)
      (virDomainDiskGetSource, virDomainDiskSetSource)
      (virDomainDiskGetDriver, virDomainDiskSetDriver)
      (virDomainDiskGetFormat, virDomainDiskSetFormat)
      (virDomainDiskAuthClear, virDomainDiskGetActualType)
      (virDomainDiskDefParseXML, virDomainDiskSourceDefFormat)
      (virDomainDiskDefFormat, virDomainDiskDefForeachPath)
      (virDomainDiskDefGetSecurityLabelDef)
      (virDomainDiskSourceIsBlockType): Adjust all users.
      * src/lxc/lxc_controller.c (virLXCControllerSetupDisk):
      Likewise.
      * src/lxc/lxc_driver.c (lxcDomainAttachDeviceMknodHelper):
      Likewise.
      * src/qemu/qemu_command.c (qemuAddRBDHost, qemuParseRBDString)
      (qemuParseDriveURIString, qemuParseGlusterString)
      (qemuParseISCSIString, qemuParseNBDString)
      (qemuDomainDiskGetSourceString, qemuBuildDriveStr)
      (qemuBuildCommandLine, qemuParseCommandLineDisk)
      (qemuParseCommandLine): Likewise.
      * src/qemu/qemu_conf.c (qemuCheckSharedDevice)
      (qemuAddISCSIPoolSourceHost, qemuTranslateDiskSourcePool):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig)
      (qemuDomainPrepareDiskChainElement)
      (qemuDomainSnapshotCreateInactiveExternal)
      (qemuDomainSnapshotPrepareDiskExternalBackingInactive)
      (qemuDomainSnapshotPrepareDiskInternal)
      (qemuDomainSnapshotPrepare)
      (qemuDomainSnapshotCreateSingleDiskActive)
      (qemuDomainSnapshotUndoSingleDiskActive)
      (qemuDomainBlockPivot, qemuDomainBlockJobImpl)
      (qemuDomainBlockCopy, qemuDomainBlockCommit): Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise.
      * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
      (qemuProcessInitPasswords): Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxSetSecurityFileLabel): Likewise.
      * src/storage/storage_driver.c (virStorageFileInitFromDiskDef):
      Likewise.
      * tests/securityselinuxlabeltest.c (testSELinuxLoadDef):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4f202266
    • E
      conf: use disk source accessors in xenxs/ · 41a32b0a
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr)
      (xenFormatSxprDisk, xenFormatSxpr): Use accessors.
      * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk, xenFormatXM):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      41a32b0a
    • E
      conf: use disk source accessors in xen/ · 5b05358a
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/xen/xend_internal.c (virDomainXMLDevID): Use accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5b05358a
    • E
      conf: use disk source accessors in vmx/ · f6274687
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/vmx/vmx.c (virVMXHandleLegacySCSIDiskDriverName)
      (virVMXParseDisk, virVMXFormatDisk, virVMXFormatFloppy): Use
      accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f6274687
    • E
      conf: use disk source accessors in vmware/ · 4ad6024b
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/vmware/vmware_conf.c (vmwareVmxPath): Use accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4ad6024b
    • E
      conf: use disk source accessors in vbox/ · 6c1eb084
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives)
      (vboxDomainAttachDeviceImpl, vboxDomainDetachDevice): Use
      accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6c1eb084
    • E
      conf: use disk source accessors in uml/ · 8082d9bb
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/uml/uml_conf.c (umlBuildCommandLine): Use accessors.
      * src/uml/uml_driver.c (umlDomainAttachUmlDisk): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8082d9bb
    • E
      conf: use disk source accessors in security/ · 2aad0ebe
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/security/security_dac.c (virSecurityDACSetSecurityImageLabel)
      (virSecurityDACRestoreSecurityImageLabelInt)
      (virSecurityDACSetSecurityAllLabel): Use accessors.
      * src/security/security_selinux.c
      (virSecuritySELinuxRestoreSecurityImageLabelInt)
      (virSecuritySELinuxSetSecurityImageLabel)
      (virSecuritySELinuxSetSecurityAllLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2aad0ebe
    • E
      conf: use disk source accessors in qemu/ · cd01d2ad
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/qemu/qemu_conf.c (qemuCheckSharedDevice)
      (qemuAddSharedDevice, qemuRemoveSharedDevice, qemuSetUnprivSGIO):
      Use accessors.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
      (qemuDomainObjCheckDiskTaint, qemuDomainSnapshotForEachQcow2Raw)
      (qemuDomainCheckRemoveOptionalDisk, qemuDomainCheckDiskPresence)
      (qemuDiskChainCheckBroken, qemuDomainDetermineDiskChain):
      Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia)
      (qemuDomainCheckEjectableMedia)
      (qemuDomainAttachVirtioDiskDevice, qemuDomainAttachSCSIDisk)
      (qemuDomainAttachUSBMassstorageDevice)
      (qemuDomainAttachDeviceDiskLive, qemuDomainRemoveDiskDevice)
      (qemuDomainDetachVirtioDiskDevice, qemuDomainDetachDiskDevice):
      Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationStartNBDServer)
      (qemuMigrationDriveMirror, qemuMigrationCancelDriveMirror)
      (qemuMigrationIsSafe): Likewise.
      * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
      (qemuProcessHandleIOError, qemuProcessHandleBlockJob)
      (qemuProcessInitPasswords): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainChangeDiskMediaLive)
      (qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cd01d2ad
    • E
      conf: use disk source accessors in phyp/ · 73f4ae2a
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/phyp/phyp_driver.c (phypDomainAttachDevice, phypBuildLpar):
      Use accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      73f4ae2a
    • E
      conf: use disk source accessors in parallels/ · e04a4ab9
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/parallels/parallels_driver.c (parallelsGetHddInfo)
      (parallelsAddHdd, parallelsApplyDisksParams, parallelsCreateVm):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e04a4ab9
    • E
      conf: use disk source accessors in lxc/ · a7785ccf
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/lxc/lxc_cgroup.c (virLXCCgroupSetupDeviceACL): Use
      accessors.
      * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDeviceDisk)
      (virLXCControllerSetupNBDDeviceDisk)
      (virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk):
      Likewise.
      * src/lxc/lxc_driver.c (lxcDomainAttachDeviceDiskLive)
      (lxcDomainDetachDeviceDiskLive): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a7785ccf
    • E
      conf: use disk source accessors in locking/ · 6b44ccf7
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/locking/domain_lock.c (virDomainLockManagerAddDisk): Use
      accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6b44ccf7
    • E
      conf: use disk source accessors in libxl/ · f7c81d84
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/libxl/libxl_conf.c (libxlMakeDisk): Use accessors.
      * src/libxl/libxl_driver.c (libxlDomainChangeEjectableMedia)
      (libxlDomainAttachDeviceDiskLive): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f7c81d84
    • E
      conf: use disk source accessors in esx/ · 3c975118
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/esx/esx_driver.c (esxAutodetectSCSIControllerModel)
      (esxDomainDefineXML): Use accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3c975118
    • E
      conf: use disk source accessors in bhyve/ · 119a258c
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/bhyve/bhyve_command.c (bhyveBuildDiskArgStr)
      (virBhyveProcessBuildLoadCmd): Use accessors.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      119a258c
    • E
      conf: use disk source accessors in conf/ · a9ab99ca
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      Several places in domain_conf.c still open-code raw field access,
      but that code will be touched later with the diskDef struct split
      so I'm avoiding churn here.
      
      * src/conf/domain_audit.c (virDomainAuditStart): Use accessors.
      * src/conf/domain_conf.c (virDomainDiskIndexByName)
      (virDomainDiskPathByName, virDomainDiskDefForeachPath)
      (virDomainDiskSourceIsBlockType): Likewise.
      * src/conf/snapshot_conf.c (virDomainSnapshotAlignDisks):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9ab99ca
    • E
      conf: accessors for common source information · 1014c34e
      Eric Blake 提交于
      A future patch will split virDomainDiskDef, in order to track
      multiple host resources per guest <disk>.  To reduce the size
      of that patch, I've factored out the four most common accesses
      into functions, so that I can incrementally upgrade the code
      base to use the accessors, and so that code that doesn't care
      about the distinction of per-file details won't have to be
      changed when the struct changes.
      
      * src/conf/domain_conf.h (virDomainDiskGetType)
      (virDomainDiskSetType, virDomainDiskGetSource)
      (virDomainDiskSetSource, virDomainDiskGetDriver)
      (virDomainDiskSetDriver, virDomainDiskGetFormat)
      (virDomainDiskSetFormat): New prototypes.
      * src/conf/domain_conf.c (virDomainDiskGetType)
      (virDomainDiskSetType, virDomainDiskGetSource)
      (virDomainDiskSetSource, virDomainDiskGetDriver)
      (virDomainDiskSetDriver, virDomainDiskGetFormat)
      (virDomainDiskSetFormat): Implement them.
      * src/libvirt_private.syms (domain_conf.h): Export them.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1014c34e
    • E
      vmware: fix parse of disk source · e7b0e71d
      Eric Blake 提交于
      While writing disk source refactoring, I discovered that conversion
      from XML to vmware modified the disk source in place; if the same
      code is reached twice, the second call behaves differently because
      the first call didn't clean up its mess.
      
      * src/vmware/vmware_conf.c (vmwareParsePath): Avoid munging input
      string.
      * src/vmware/vmware_conf.h (vmwareParsePath): Make static.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e7b0e71d
  2. 24 3月, 2014 1 次提交
    • M
      qemuDomainGetImageIds: Skip <seclabel/> without label · 0d93526f
      Michal Privoznik 提交于
      It's easy to shed the daemon these days. With this XML snippet:
      
          <disk type='file' device='disk'>
            <driver name='qemu' type='raw'/>
            <source file='/some/dummy/path/test.bin'>
              <seclabel model='dac' relabel='no'/>
            </source>
            <target dev='vdb' bus='virtio'/>
            <readonly/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
          </disk>
      
      I get the SIGSEGV when starting the domain. The thing is, when
      starting a domain, we check for its disk presence. For some reason,
      when determining the disk chain, we parse the <seclabel/> (don't ask
      me why). However, there's no label attribute in the XML, so we end up
      calling virParseOwnershipIds() over NULL string:
      
       [Switching to Thread 0x7ffff10c4700 (LWP 30956)]
       __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136
       136     ../sysdeps/x86_64/multiarch/strchr.S: No such file or directory.
       (gdb) bt
       #0  __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136
       #1  0x00007ffff749f800 in virParseOwnershipIds (label=0x0, uidPtr=uidPtr@entry=0x7ffff10c2df0, gidPtr=gidPtr@entry=0x7ffff10c2df4) at util/virutil.c:2115
       #2  0x00007fffe929f006 in qemuDomainGetImageIds (gid=0x7ffff10c2df4, uid=0x7ffff10c2df0, disk=0x7fffe40cb000, vm=0x7fffe40a6410, cfg=0x7fffe409ae00) at qemu/qemu_domain.c:2385
       #3  qemuDomainDetermineDiskChain (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, disk=disk@entry=0x7fffe40cb000, force=force@entry=false) at qemu/qemu_domain.c:2414
       #4  0x00007fffe929f128 in qemuDomainCheckDiskPresence (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, cold_boot=cold_boot@entry=true) at qemu/qemu_domain.c:2250
       #5  0x00007fffe92b6fc8 in qemuProcessStart (conn=conn@entry=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, migrateFrom=migrateFrom@entry=0x0, stdin_fd=stdin_fd@entry=-1, stdin_path=stdin_path@entry=0x0, snapshot=snapshot@entry=0x0,
           vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=flags@entry=1) at qemu/qemu_process.c:3813
       #6  0x00007fffe93087e8 in qemuDomainObjStart (conn=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, flags=flags@entry=0) at qemu/qemu_driver.c:6051
       #7  0x00007fffe9308e32 in qemuDomainCreateWithFlags (dom=0x7fffcc000d50, flags=0) at qemu/qemu_driver.c:6105
       #8  0x00007ffff753c5cc in virDomainCreate (domain=domain@entry=0x7fffcc000d50) at libvirt.c:8861
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0d93526f
  3. 23 3月, 2014 2 次提交