https://bugzilla.redhat.com/show_bug.cgi?id=1552127
When building command line for USB controllers we have to do more
than just put controller's alias onto the command line. QEMU has
concept of these joined USB controllers. For instance ehci and
uhci controllers need to create the same USB bus. To achieve that
the slave controller needs to refer the master controller. This
worked until we've introduced user aliases because both master
and slave had the same alias. With user aliases slave can have
different alias than master. Therefore, when generating command
line for slave we need to look up the master's alias.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
commit 7210cef452 'qemu: build command line for virtio input devices'
introduced an error, by checking if input bus type is
VIR_DOMAIN_DISK_BUS_VIRTIO.
Fix it by using the correct bus type for input devices.
Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Commit id '177db487' renamed 'qemuValidateDevicePCISlotsChipsets' to
'qemuDomainValidateDevicePCISlotsChipsets', but didn't adjust comment.
Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
We have to use VIR_WARNINGS_NO_CAST_ALIGN to avoid clang warning
about increased required alignment caused by some netlink macros.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Set the eventID for remoteRelayDomainQemuMonitorEvent explicitly to an
invalid value. Although the value is not used by
remoteRelayDomainQemuMonitorEvent, but it might be less prone to
errors for further refactorings.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Use stream->prog instead of a hard-coded "remoteProgram" since at
stream creation in daemonCreateClientStream "remoteProgram" is used
so we should use that especially since these functions are intended
as generic helpers for streams.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Remove unneeded global variables and convert them into local variables
where they're needed.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
In case of an error do the cleanup of the private data of the
connection.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Refactor testConnectClose as it's then obvious that conn->privateData
is set to NULL in all cases. In addition, 'testConnectCloseInternal'
can be better reused.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Rename the variable @defaultConn to @defaultPrivconn as it doesn't
point to a default connection but to the private data used for the
shared default connection of the test driver.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Set privateData to NULL also for a connection that uses @defaultConn
as privateData regardless of whether @defaultConn was freed or
not. @defaultConn is shared between multiple connections and it's
ensured that there will be no memory leak by counting references.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
The two code paths have some cleanup in common so lets refactor it.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Add typedef for the anonymous enum used for the driver features. This
allows the usage of the type in a switch statement and taking
advantage of the compilers feature to detect uncovered cases.
Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Instead of appearing as one long paragraph, split the output to list
each command option on its own line for better readability.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-path volume pool', or
'virsh vol-name volume pool', or 'virsh vol-key volume'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-info volume pool'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-dumpxml volume pool'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-wipe volume pool algorithm'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-download volume file pool'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-upload volume file pool'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-delete volume pool'. While
making the modification clean up the description a bit too in order
to help clarify under what circumstances the volume could be found
if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
The proper command order is 'virsh vol-clone source-vol target-vol pool'.
While making the modification clean up the description a bit too in
order to help clarify under what circumstances the source-vol could be
found if the pool name was not provided.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Clean up the formatting to make the output a bit more readable at
least with respect to not having one paragraph of output. Each
option will start on its own line.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Commit id '477502de3' altered the entry to add one too many closing
parenthesis ')' and that propagated into commit id '9176b42bd'.
Signed-off-by: John Ferlan <jferlan@redhat.com>
This deals with cls.version possibly being None.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
We use text operations on the contents after reading them.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
The keys() method no longer returns a list, so converting the
return value would be necessary before calling sort() on it;
alternatively, we can just call sorted(), which returns a
sorted list.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
For list concatenation to work, the value returned by the
keys() method must be converted to a list first.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
All of these have been replaced with methods.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This replaces uses of the has_key() method.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Commit ce7ae55ea1 introduced a typo in virtlockd-admin socket file
/usr/lib/systemd/system/virtlockd-admin.socket:7: Unknown lvalue
'Server' in section 'Socket'
Change 'Server' to 'Service'.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
The 'brew upgrade' command is pulling in the python2 package which
promptly fails due to clashing symlinks installed by the new python
package (which is python3 based):
==> Pouring python@2-2.7.14_3.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-2
Target /usr/local/bin/2to3-2
is a symlink belonging to python. You can unlink it:
brew unlink python
To force the link and overwrite all conflicting files:
brew link --overwrite python@2
To list all files that would be deleted:
brew link --overwrite --dry-run python@2
By running 'brew unlink python' we can get rid of the python3 links that
we didn't want in the first place and avoid this error.
This is the working fix for what we previously attempted todo in:
commit c9c9fc90ce
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Mon Mar 5 10:13:12 2018 +0000
travis: force install of python2 into $PATH on macOS
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The list of commands we're running for the before_install task
is rather large. We have it all on one line because we're
wrapping it all in a test against TRAVIS_OS_NAME env variable.
By moving it into the osx matrix entry we can remove the need
for the conditional shell test. This lets us put each command
on a separate line making the steps clear to understand.
Fortunately the 'before_install' task does not have the crazy
behaviour whereby travis ignores errors and runs all commands
regardless, like the 'script' task does. The first command
failing will cause an immediate stop with error status.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
And at the same time, do that from .c rather than .h file.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Chen Hanxiao<chenhanxiao@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
The setuid-rpc-client.la is intended to be small and contain only
bare minimum of source files. virarptable.c is not one of them.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Chen Hanxiao<chenhanxiao@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
As of 2499d1a095 we don't link against libpolkit anymore, so
we only need the polkit package to be available during build.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
We can use:
domifaddr f26-cloud --source arp
to get the address.
Acked-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address
of VM from the message of netlink RTM_GETNEIGH
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
introduce helper to parse RTM_GETNEIGH query message and
store it in struct virArpTable.
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Libvirt provides full path to the backing file since commit
fec8f9c49a. This made qemu create the backend object but did not
delete it. This was fixed for unplug case in 4d83a6722f but not in case
of failure to hotplug the frontend. We'd leave the files behind which
would make memory unusable in case of hugepages.
https://bugzilla.redhat.com/show_bug.cgi?id=1553085
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Having to repeat "./job[1]/" XPath prefix for every single element or
attribute we want to parse is suboptimal. And even more so once we
further extract code from qemuDomainObjPrivateXMLParseJob into separate
functions.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>