1. 16 5月, 2015 7 次提交
    • J
      libxl: provide impl for nodeGetSecurityModel · 99a42f3c
      Jim Fehlig 提交于
      Currently, the libxl driver does not support any security drivers.
      When the qemu driver has no security driver configued,
      nodeGetSecurityModel succeeds but returns an empty virSecurityModel
      object.  Do the same in the libxl driver instead of reporting
      
      this function is not supported by the connection driver:
      virNodeGetSecurityModel
      99a42f3c
    • L
      qemu: log error when domain has an unsupported IDE controller · eadd757c
      Laine Stump 提交于
      We have previously effectively ignored all <controller type='ide'>
      elements in a domain definition.
      
      On the i440fx-based machinetypes there is an IDE controller that is
      included in the chipset and can't be removed (which is the ide
      controller with index='0'>), so it makes sense to ignore that one
      controller. However, if an i440fx domain definition has a 2nd
      controller, nothing catches this error (unless you also have a disk
      attached to it, in which case qemu will complain that you're trying to
      use the ide controller named "ide1", which doesn't exist), and if any
      other type of domain has even a single controller defined, it will be
      incorrectly ignored.
      
      Ignoring a bogus controller definition isn't such a big problem, as
      long as an error is logged when any disk is attached to that
      non-existent controller. But in the case of q35-based machinetypes,
      the hardcoded id ("alias" in libvirt terms) of its builtin SATA
      controller is "ide", which happens to be the same id as the builtin
      IDE controller on i440fx machinetypes. So libvirt creates a
      commandline believing that it is connecting the disk to the builtin
      (but actually nonexistent) IDE controller, qemu thinks that libvirt
      wanted that disk connected to the builtin SATA controller, and
      everybody is happy.
      
      Until you try to connect a 2nd disk to the IDE controller. Then qemu
      will complain that you're trying to set unit=1 on a controller that
      requires unit=0 (SATA controllers are organized differently than IDE
      controllers).
      
      After this patch, if a domain has an IDE controller defined for a
      machinetype that has no IDE controllers, libvirt will log an error
      about the controller itself as it is building the qemu commandline
      (rather than a (possible) error from qemu about disks attached to that
      controller). This is done by adding IDE to the list of controller
      types that are handled in the loop that creates controller command
      strings in qemuBuildCommandline() (previously it would *always* skip
      IDE controllers). Then qemuBuildControllerDevStr() is modified to log
      an appropriate error in the case of IDE controllers.
      
      In the future, if we add support for extra IDE controllers (piix3-ide
      and/or piix4-ide) we can just add it into the IDE case in
      qemuBuildControllerDevStr(). For now, nobody seems anxious to add
      extra support for an aging and very slow controller, when there are so
      many better options available.
      
      Resolves:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1176071 (Fedora)
      eadd757c
    • L
      qemu: clean up qemuBuildCommandline loop that builds controller args · b8f345b4
      Laine Stump 提交于
      Reorganize the loop that builds controller args to remove unnecessary
      duplicated code and superfluous else clauses. No functional change.
      b8f345b4
    • L
      qemu: remove test for allowing ide controller in s390, rename usb tests · 548ba430
      Laine Stump 提交于
      Back in 2013, commit 877bc089 added in some tests that made sure no
      error was generated on a domain definition that had an automatically
      added usb controller if that domain didn't have a PCI bus to attach
      the usb controller to. This was done because, at that time, libvirt
      was automatically adding a usb controller to *any* domain definition
      that didn't have one.  Along with permitting the controller, two
      s390-specific tests were added to ensure this behavior was maintained
      - one with <controller type='usb' model='none'/> and another (called
      "s390-piix-controllers") that had both usb and ide controllers, but
      nothing attached to them.
      
      Then in February of this year, commit 09ab9dcc eliminated the annoying
      auto-adding of a usb device for s390 and s390x machines, stating:
      
       "Since s390 does not support usb the default creation of a usb
        controller for a domain should not occur."
      
      Although, as verified here, the s390 doesn't support usb, and usb
      controllers aren't currently added to s390 domain definitions
      automatically, there are likely still some domain definitions in the
      wild that have a usb controller (which was added *by libvirt*, not by
      the user), so we will keep the tests verifying that behavior for
      now. But this patch changes the names of the tests to reflect that
      they don't actually contain a valid s390 config; this way future
      developers won't propagate the incorrect idea that an s390 virtual
      machine can have a USB (or IDE) bus.
      
      In the case of the IDE controller, though, libvirt has never
      automatically added an IDE controller unless a user added an IDE disk
      (which itself would have caused an error), and we specifically *do*
      want to begin generating an error when someone tries to add an IDE
      controller to a domain that can't support one. For that reason, while
      renaming the sz390-piix-controllers patch, this patch removes the
      <controller type='ide'...> from it (otherwise the upcoming patch would
      break make check)
      548ba430
    • L
      qemu: use controller alias when constructing device/controller args · 0260506c
      Laine Stump 提交于
      This makes sure that that the commandlines generated for devices and
      controller devices are all using the alias that has been set in the
      controller's object as the id of the controller, rather than
      hardcoding a printf (or worse, encoding exceptions to the standard
      ${controller}${index} into the logic)
      
      Since this "fixes" the controller name used for the sata controller,
      the commandline arg for the sata controller in the sata test case had
      to be adjusted to be "sata0" instead of "ahci0". All other tests
      remain unchanged, verifying that the patch causes no other functional
      change.
      
      Because the function that finds a controller alias based on a device
      def requires a pointer to the full domainDef in order to get the list
      of controllers, the arglist of a few functions had to have this added.
      0260506c
    • L
      qemu: fix exceptions in qemuAssignDeviceControllerAlias · 75cd7d9b
      Laine Stump 提交于
      There are a few extra exceptions that weren't being accounted for when
      creating the alias for a controller. This resulted in 1) incorrect
      status XML, and 2) exceptions/printfs of what *should* have been
      directly available in the controller alias when constructing device
      commandline arguments:
      
      1) The primary (and only) IDE controller on a 440FX machinetype is
      hardcoded to be "ide" in qemu.
      
      2) The primary SATA controller on a 440FX machinetype is also
      hardcoded to be "ide" in qemu.
      
      3) On machinetypes that don't support multiple PCI buses, the PCI bus
      is hardcoded in qemu to have the name "pci".
      
      4) The first usb master controller is "usb", all others are the normal
      "usb%d". (note that usb controllers that are not a "master" will have
      the same index, and thus alias, as the master).
      
      We needed to pass in the full domainDef and qemuCaps in order to
      properly make the decisions about these exceptions.
      75cd7d9b
    • L
      conf: utility to return alias of a controller based on type/index · a3dfaf12
      Laine Stump 提交于
      Because there are multiple potential reasons for an error, this
      function logs any errors before returning NULL (since the caller won't
      have the information needed to determine which was the reason for
      failure).
      a3dfaf12
  2. 15 5月, 2015 5 次提交
  3. 14 5月, 2015 8 次提交
  4. 13 5月, 2015 10 次提交
    • N
      parallels: remove connection wide wait timeout · 2f1f2888
      Nikolay Shirokovskiy 提交于
      We have a lot of passing arguments code just to pass connection
      object cause it holds jobTimeout. Taking into account that
      right now this value is defined at compile time let's just
      get rid of it and make arguments list more clear in many
      places.
      
      In case we later need some runtime configurable timeout
      value we can provide this value through arguments
      function already operate such as a parallels domain
      object etc as this timeouts are operation( and thus
      object) specific in practice.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@parallels.com>
      2f1f2888
    • Z
      qemuMigrationPrepareAny: Drop useless variable @now · 7eb5b4bf
      zhang bo 提交于
      As of eeb008db the variable is not used anymore. Drop it.
      Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
      Signed-off-by: NZhang Bo <oscar.zhangbo@huawei.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7eb5b4bf
    • A
      maint: Ignore Vim swap files · 10525df6
      Andrea Bolognani 提交于
      This removes some noise when you're working on the repository
      and also have a bunch of source files open in Vim in another
      terminal.
      10525df6
    • M
      Fix build --without-network · 564dd537
      Martin Kletzander 提交于
      In order not to bring in any link dependencies, bridge driver doesn't
      use the usual stubs as other conditionally-built code does.  However,
      having the function as a macro imposes a problem with possibly unused
      variables if just defined as "0".  This was worked around by using
      (dom=dom, iface=iface, 0) which should act like a 0 if used in a
      condition.  However, gcc still bugs about that, so I came up with
      another way how to fix that.
      
      Using static inline functions in the header won't collide with anything,
      it fixes the bug and does one thing that the macro didn't do.  It checks
      whenther passed variables are pointers of compatible type.  It has only
      one downside, and that is that we need to either a) define it with
      ATTRIBUTE_UNUSED, which needs an exception in cfg.mk or b) do something
      like ignore_value(variable); in the function body.  I went with the
      first variant.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      564dd537
    • J
      Assign virtio-serial addresses after coldplugging a device · 083c33b3
      Ján Tomko 提交于
      Otherwise we might allow coldplugging a device
      that uses an address that is already occupied, creating
      an unstartable domain.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1220195
      083c33b3
    • P
      qemu: vnc: error out for invalid port number · afaffeb8
      Pavel Hrdina 提交于
      In the XML we have the vnc port number, but QEMU takes on command line
      a vnc screen number, it's port-5900.  We should fail with error message
      that only ports in range [5900,65535] are valid.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1164966Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      afaffeb8
    • M
      virSysinfoParseProcessor: Drop useless check for NULL · abac12b5
      Michal Privoznik 提交于
      VIR_STRDUP plays nicely with NULLs. Theres no need to guard its
      call with check for non-NULL.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      abac12b5
    • J
      libxl: support VNC passwd · fa33c0b8
      Jim Fehlig 提交于
      While implementing support for SPICE, I noticed VNC passwd was
      never copied to libxl_device_vfb's vnc.passwd field.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      fa33c0b8
    • J
      conf: Remove source host name check for iSCSI · 4b2b53f6
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1171984
      https://bugzilla.redhat.com/show_bug.cgi?id=1188463
      
      Remove the check for the source host name for iSCSI source XML processing
      declaring duplicate sources when the source device path and if present the
      initiator of a proposed storage pool matches an existing storage pool.
      
      The backend iSCSI storage driver uses 'iscsiadm --mode session' to query
      available iscsid target sessions. The output displayed is the IP address
      and the IQN (target path) of known targets. The displayed IP address
      is a resolved address based on the session --login. Additionally, iscsid
      keeps track of the various ways to define the host name (IPv4 Address,
      IPv6 Address, /etc/hosts, etc.) for that IQN (see output of an 'iscsiadm
      --mode node'). If an incoming IQN matches and the host name provided by
      libvirt is resolved to the existing IQN, then iscsid will "reuse" the
      session. Although libvirt could do the same name resolution, if there
      is a difference, iscsid could still declare two seemingly different sources
      to be the same and not create a new session which means libvirt now has
      two storage pools looking at the same source. Thus to avoid any strange
      host name resolution issues, just rely on iscsid for that and do not
      allow multiple pools on the same host to use the same device path (IQN).
      4b2b53f6
    • J
      conf: Adjust duplicate source host port check · 6dd9297c
      John Ferlan 提交于
      Only perform the port number check if the incoming definition actually
      provides it. Since the port number is optional we could erroneously pass
      a duplicate source host check since some storage pool backends which fill
      in the default port number (e.g., iSCSI and sheepdog) for the started pool.
      6dd9297c
  5. 12 5月, 2015 10 次提交