- 20 11月, 2014 10 次提交
-
-
由 Eric Blake 提交于
Commit c0e70221 breaks on a machine that lacks dbus headers: In file included from util/virdbus.c:24:0: util/virdbuspriv.h:31:3: error: unknown type name 'dbus_int16_t' * src/util/virdbuspriv.h (DBusBasicValue): Only provide fallback when dbus is compiled. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1152382 When libvirt create's the vport (VPORT_CREATE) for the vHBA, there isn't enough "time" between the creation and the running of the following backend->refreshPool after a backend->startPool in order to find the LU's. Population of LU's happens asynchronously when udevEventHandleCallback discovers the "new" vHBA port. Creation of the infrastructure by udev is an iterative process creating and discovering actual storage devices and adjusting the environment. Because of the time it takes to discover and set things up, the backend refreshPool call done after the startPool call will generally fail to find any devices. This leaves the newly started pool appear empty when querying via 'vol-list' after startup. The "workaround" has always been to run pool-refresh after startup (or any time thereafter) in order to find the LU's. Depending on how quickly run after startup, this too may not find any LUs in the pool. Eventually though given enough time and retries it will find something if LU's exist for the vHBA. This patch adds a thread to be executed after the VPORT_CREATE which will attempt to find the LU's without requiring the external run of refresh-pool. It does this by waiting for 5 seconds and searching for the LU's. If any are found, then the thread completes; otherwise, it will retry once more in another 5 seconds. If none are found in that second pass, the thread gives up. Things learned while investigating this... No need to try and fill the pool too quickly or too many times. Over the course of creation, the udev code may 'add', 'change', and 'delete' the same device. So if the refresh code runs and finds something, it may display it only to have a subsequent refresh appear to "lose" the device. The udev processing doesn't seem to have a way to indicate that it's all done with the creation processing of a newly found vHBA. Only the Lone Ranger has silver bullets to fix everything.
-
由 John Ferlan 提交于
Fix a problem in the getBlockDevice and processLU where retval initialized to zero causing some failures to erroneously continue through to the virStorageBackendSCSINewLun with an attempt to find a path for "/dev/(null)". This would fail approximately 10 seconds later with debug message: virStorageBackendSCSINewLun:203 : No stable path found for '/dev/(null)' in '/dev/disk/by-path' The root cause of the issue is for many /sys/bus/scsi/devices/<lun path> there is no "block*" device found for the vHBA's, where "<lun path>" are the various paths created for the vHBA, such as "17:0:0:0", "17:0:1:0", "17:0:2:0", "17:0:3:0", etc. If the block device isn't found, then the directory should just be ignored rather than attempting to process it. The bug was that in getBlockDevice the assumption was "block" would exist and either getNewStyleBlockDevice or getOldStyleBlockDevice would fill in @block_device. However, if 'block*' doesn't exist, then the code returned NULL for block_device *and* a good (zero) retval value. This caused the processLU code to attempt the virStorageBackendSCSINewLun which failed "at some point in time" in the future. After this change - on test system the refresh-pool didn't have a noticable pause of about 20 seconds - it completed within a second since no longer was there an attempt/need to find "/dev/(null)". Additionally, the virStorageBackendSCSIFindLU's shouldn't be declaring found unless the processLU actually returns success. This will be important in the followup patch which relies on whether a LU was found.
-
由 Eric Blake 提交于
Compilation on a RHEL 5 host failed, due to the older dbus headers present on that machine, and triggered by commit 2aa167ca: util/virdbus.c: In function 'virDBusMessageIterDecode': util/virdbus.c:952: error: 'DBusBasicValue' undeclared (first use in this function) * m4/virt-dbus.m4 (LIBVIRT_CHECK_DBUS): Check for DBusBasicValue. * src/util/virdbuspriv.h (DBusBasicValue): Provide fallback. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Giuseppe Scrivano 提交于
getsockopt(sock->fd, SOL_SOCKET, SO_PEERCRED, ...) sets the pid to 0 when the process that opens the connection is in another container. Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
-
由 Eric Blake 提交于
Commit dc33e6e4 caused older platforms like Fedora 20 to emit scary log messages at startup: 2014-11-19 23:12:58.800+0000: 28906: error : virCommandWait:2532 : internal error: Child process (/usr/sbin/iptables -w -L -n) unexpected exit status 2: iptables v1.4.19.1: unknown option "-w" Try `iptables -h' or 'iptables --help' for more information. Since we are probing and expect to handle the case where -w is not supported, we should not let virCommand log it as an error. * src/util/virfirewall.c (virFirewallCheckUpdateLock): Handle non-zero status ourselves. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jiri Denemark 提交于
Oops, I forgot to squash one more instance of the same check in the previous commit (v1.2.10-144-g52691f99). https://bugzilla.redhat.com/show_bug.cgi?id=1147331Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Any attempt to start a tunnelled migration with libvirtd that supports RDMA migration (specifically commit v1.2.8-226-ged22a474) crashes libvirtd on the destination host. The crash is inevitable because qemuMigrationPrepareAny is always called with NULL protocol in case of tunnelled migration. https://bugzilla.redhat.com/show_bug.cgi?id=1147331Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
As discussed on the upstream list, it's better not to make this kind of predictions in libvirt. It may happen that qemu learns how to enable OVMF on other architectures too and we shouldn't try to chase that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Currently, we are whitelisting architectures, that we know how to run OVMF on. So far, only x86_64 was enabled. However, looking at qemu code, the same commandline can be used to enable OVMF for armv7l and aarch64. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 11月, 2014 5 次提交
-
-
由 Eric Blake 提交于
I noticed this while working on qemuDomainGetBlockInfo. Assigning a bool value to an int variable compiles fine, but raises red flags on the maintenance front as it becomes too easy to assign -1 or 2 or any other non-bool value to the same variable. * cfg.mk (sc_prohibit_int_assign_bool): New rule. * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix offenders. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo) (qemuDomainSnapshotCreateXML): Likewise. * src/test/test_driver.c (testDomainSnapshotAlignDisks): Likewise. * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise. * src/util/virpci.c (virPCIDeviceBindToStub): Likewise. * src/util/virutil.c (virIsCapableVport): Likewise. * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise. * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot) (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal) (cmdDetachInterface): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Use of an 'int' to represent a 'bool' value is confusing. Just because dbus made the mistake of cementing their 4-byte wire format of dbus_bool_t into their API doesn't mean we have to repeat the mistake. With a little bit of finesse, we can guarantee that we provide a large-enough value to the DBus code, while still copying only the relevant one-byte bool to the client code, and isolate the rest of our code base from the DBus stupidity. * src/util/virdbus.c (GET_NEXT_VAL): Add parameter. (virDBusMessageIterDecode): Adjust all clients. * src/util/virpolkit.c (virPolkitCheckAuth): Use nicer type. * tests/virdbustest.c (testMessageSimple, testMessageStruct): Test new behavior. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Chen Hanxiao 提交于
Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
由 Yohan BELLEGUIC 提交于
This function returned non-inactive domains instead of active domains. This broke virConnectNumOfDefinedDomains() and virConnectListDefinedDomains() functions.
-
由 Anirban Chakraborty 提交于
Ethernet interfaces in libvirt currently do not support bandwidth setting. For example, following xml file for an interface will not apply these settings to corresponding qdiscs. <interface type="ethernet"> <mac address="02:36:1d:18:2a:e4"/> <model type="virtio"/> <script path=""/> <target dev="tap361d182a-e4"/> <bandwidth> <inbound average="984" peak="1024" burst="64"/> <outbound average="2000" peak="2048" burst="128"/> </bandwidth> </interface> Signed-off-by: NAnirban Chakraborty <abchak@juniper.net> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 11月, 2014 18 次提交
-
-
由 John Ferlan 提交于
For some reason, commit id '72b4151f' triggered a Coverity uninitialized 'reply' variable check when referenced within the for loop. It seems Coverity doesn't know that flags will have to be either AFFECT_LIVE or AFFECT_CONFIG after the virDomainLiveConfigHelperMethod call. By adding a "sa_assert()" to confirm that fact, Coverity is happy again.
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1164080 After a disk is hotunplugged a subsequent call to qemuDomainGetBlockIoTune to get the --config settings of that disk will fail because the disk is no longer found by qemuDiskPathToAlias causing an unexpected failure. Since only the --live flag needs to have the disk device pointer, move the fetch inside the (flags & VIR_DOMAIN_AFFECT_LIVE) condition. This will also affect the results if no flags are provided or the --current flag is provided. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 John Ferlan 提交于
Seems the 'size_iops_sec' was a late add and the checks for whether the field was defined, but unsupported and the maximum size of the field were not being made. Also, adjust blkdeviotune support error message for grammar, spelling (paramater), and remove the "(need QEMU 1.7 or superior)". None of our other similar error messages list which QEMU version is required. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Rule sc_prohibit_newline_at_end_of_diagnostic for syntax-check does check for passing strings ending with '\n' two lines after known functions. This is, of course subject to false positives, so for the sake of future changes, trick that syntax-check by adding one more line with a comment. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 11月, 2014 3 次提交
-
-
由 Daniel P. Berrange 提交于
A previous commit introduced use of locking with invocation of iptables in the viriptables.c module commit ba95426d Author: Serge Hallyn <serge.hallyn@ubuntu.com> Date: Fri Nov 1 12:36:59 2013 -0500 util: use -w flag when calling iptables This only ever had effect with the virtual network driver, as it was not wired up into the nwfilter driver. Unfortunately in the firewall refactoring the use of the -w flag was accidentally lost. This patch introduces it to the virfirewall.c module so that both the virtual network and nwfilter drivers will be using it. It also ensures that the equivalent --concurrent flag to ebtables is used.
-
由 Jiri Denemark 提交于
Since QEMU 1.2.0, we switched to QMP probing instead of parsing -help (and other commands, such as -cpu ?) output. However, if QMP probing failed, we still tried starting QEMU with various options and parsing the output, which was guaranteed to fail because the output changed. Let's just refuse parsing -help for QEMU >= 1.2.0. https://bugzilla.redhat.com/show_bug.cgi?id=1160318Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
We used to set migration capabilities only when a user asked for them in flags. This is fine when migration succeeds since the QEMU process is killed in the end but in case migration fails or if it's cancelled, some capabilities may remain turned on with no way to turn them off. To fix that, migration capabilities have to be turned on if requested but explicitly turned off in case they were not requested but QEMU supports them. https://bugzilla.redhat.com/show_bug.cgi?id=1163953Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 13 11月, 2014 4 次提交
-
-
由 Conrad Meyer 提交于
Rather than just picking the first CD (or failing that, HDD) we come across, if the user has picked a boot device ordering with <boot order=''>, respect that (and just try to boot the lowest-index device). Adds two sets of tests to bhyve2xmlargv; 'grub-bootorder' shows that we pick a user-specified device over the first device in the domain; 'grub-bootorder2' shows that we pick the first (lowest index) device.
-
由 Erik Skultety 提交于
When user calls setmem on a running LXC machine, we do update its cgroup entry, however we neither update domain's runtime XML nor we update our internal structures and this patch fixes it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1131919
-
由 Conrad Meyer 提交于
-
由 Pavel Hrdina 提交于
Commit 6e5c79a1 tried to fix deadlock between nwfilter{Define,Undefine} and starting of guest, but this same deadlock exists for updating/attaching network device to domain. The deadlock was introduced by removing global QEMU driver lock because nwfilter was counting on this lock and ensure that all driver locks are locked inside of nwfilter{Define,Undefine}. This patch extends usage of virNWFilterReadLockFilterUpdates to prevent the deadlock for all possible paths in QEMU driver. LXC and UML drivers still have global lock. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1143780Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-