[libvirt] [PATCH 0/5] admin: Fix updating of the client limits
by Erik Skultety
This series slightly refactors the code in virnetserver.c in order to resolve
https://bugzilla.redhat.com/show_bug.cgi?id=1357776. The problem resides in
updating of the client limits which even though updated, thus "permitting" new
connections to be established, do not re-enable polling for the socket file
descriptor which results in all new connections still queueing on the socket.
Erik Skultety (5):
rpc: virnetserver: Rename ClientSetProcessingControls to
ClientSetLimits
rpc: virnetserver: Move virNetServerCheckLimits which is static up in
the file
rpc: virnetserver: Add code to CheckLimits to handle suspending of
services
admin: rpc: virnetserver: Fix updating of the client limits
rpc: virnetserver: Remove dead code checking the client limits
daemon/admin_server.c | 4 +--
src/rpc/virnetserver.c | 97 +++++++++++++++++++++++---------------------------
src/rpc/virnetserver.h | 6 ++--
3 files changed, 50 insertions(+), 57 deletions(-)
--
2.5.5
8 years, 2 months
[libvirt] [PATCH] qemu: only report errno in trace message on failure
by Daniel P. Berrange
Avoid reporting a stale errno value when the syscall succeeds,
instead always pass 0.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_monitor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 58c04d5..6c9695e 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -528,12 +528,12 @@ qemuMonitorIOWrite(qemuMonitorPtr mon)
PROBE(QEMU_MONITOR_IO_WRITE,
"mon=%p buf=%s len=%zu ret=%d errno=%d",
- mon, buf, len, done, errno);
+ mon, buf, len, done, done < 0 ? errno : 0);
if (mon->msg->txFD != -1) {
PROBE(QEMU_MONITOR_IO_SEND_FD,
"mon=%p fd=%d ret=%d errno=%d",
- mon, mon->msg->txFD, done, errno);
+ mon, mon->msg->txFD, done, done < 0 ? errno : 0);
}
if (done < 0) {
--
2.7.4
8 years, 2 months
[libvirt] [PATCH] Post-release version bump to 2.2.0
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial rule.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2c81c95..8d7d63e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
-AC_INIT([libvirt], [2.1.0], [libvir-list(a)redhat.com], [], [http://libvirt.org])
+AC_INIT([libvirt], [2.2.0], [libvir-list(a)redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
--
2.8.4
8 years, 2 months
[libvirt] [PATCH] device_conf: Let compiler decide on inlining functions
by Michal Privoznik
There's no point in forcing some functions to be both 'static'
and 'inline' at the same time at the header file level. This
leads to a situation where just linking the file defines those
function (potentially needlessly). Instead, we should let the
compiler (linker) decide whether the function are small enough to
be inlined or not.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/device_conf.c | 24 ++++++++++++++++++++++++
src/conf/device_conf.h | 21 +++------------------
src/libvirt_private.syms | 3 +++
3 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
index f58b9d0..f34b6c6 100644
--- a/src/conf/device_conf.c
+++ b/src/conf/device_conf.c
@@ -78,6 +78,30 @@ int virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
}
+bool
+virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr)
+{
+ return !(addr->domain || addr->bus || addr->slot);
+}
+
+
+bool
+virDeviceInfoPCIAddressWanted(const virDomainDeviceInfo *info)
+{
+ return info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE ||
+ (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
+ virPCIDeviceAddressIsEmpty(&info->addr.pci));
+}
+
+
+bool
+virDeviceInfoPCIAddressPresent(const virDomainDeviceInfo *info)
+{
+ return info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
+ !virPCIDeviceAddressIsEmpty(&info->addr.pci);
+}
+
+
int
virPCIDeviceAddressParseXML(xmlNodePtr node,
virPCIDeviceAddressPtr addr)
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index 8443de6..98eaf3f 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -148,26 +148,11 @@ typedef struct _virDomainDeviceInfo {
int virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
bool report);
-static inline bool
-virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr)
-{
- return !(addr->domain || addr->bus || addr->slot);
-}
+bool virPCIDeviceAddressIsEmpty(const virPCIDeviceAddress *addr);
-static inline bool
-virDeviceInfoPCIAddressWanted(const virDomainDeviceInfo *info)
-{
- return info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE ||
- (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
- virPCIDeviceAddressIsEmpty(&info->addr.pci));
-}
+bool virDeviceInfoPCIAddressWanted(const virDomainDeviceInfo *info);
-static inline bool
-virDeviceInfoPCIAddressPresent(const virDomainDeviceInfo *info)
-{
- return info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
- !virPCIDeviceAddressIsEmpty(&info->addr.pci);
-}
+bool virDeviceInfoPCIAddressPresent(const virDomainDeviceInfo *info);
int virPCIDeviceAddressParseXML(xmlNodePtr node,
virPCIDeviceAddressPtr addr);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 89c4511..8c7aef0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -76,10 +76,13 @@ virCPUModeTypeToString;
# conf/device_conf.h
+virDeviceInfoPCIAddressPresent;
+virDeviceInfoPCIAddressWanted;
virInterfaceLinkFormat;
virInterfaceLinkParseXML;
virPCIDeviceAddressEqual;
virPCIDeviceAddressFormat;
+virPCIDeviceAddressIsEmpty;
virPCIDeviceAddressIsValid;
virPCIDeviceAddressParseXML;
--
2.8.4
8 years, 2 months
[libvirt] [PATCH v2] storage: Document wiping formatted volume types
by Martin Kletzander
When wiping a volume we just rewrite all the data of the volume, not
only the content. Since format gets overridden, we need to recreate the
volume. However we can't do that for every possible format out there.
Since it was only coded for the ploop volume type, let's document what
might be the consequences instead of forbidding it for every other
format out there.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868771
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
v2:
- Reworded according to John
v1:
- https://www.redhat.com/archives/libvir-list/2016-August/msg00050.html
src/libvirt-storage.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c
index cebe02fdda66..48996ba4c9c8 100644
--- a/src/libvirt-storage.c
+++ b/src/libvirt-storage.c
@@ -1725,11 +1725,16 @@ virStorageVolDelete(virStorageVolPtr vol,
* @vol: pointer to storage volume
* @flags: extra flags; not used yet, so callers should always pass 0
*
- * Ensure data previously on a volume is not accessible to future
- * reads. Also note, that depending on the actual volume
- * representation, this call may not really overwrite the
- * physical location of the volume. For instance, files stored
- * journaled, log structured, copy-on-write, versioned, and
+ * Ensure data previously on a volume is not accessible to future reads.
+ *
+ * The data to be wiped may include the format and possibly size information,
+ * so non-raw images might become raw with a different size. It is storage
+ * backend dependent whether the format and size information is regenerated
+ * once the initial volume wipe is completed.
+ *
+ * Depending on the actual volume representation, this call may not
+ * overwrite the physical location of the volume. For instance, files
+ * stored journaled, log structured, copy-on-write, versioned, and
* network file systems are known to be problematic.
*
* Returns 0 on success, or -1 on error
--
2.9.2
8 years, 2 months
[libvirt] Question about LSN-2016-0001
by Jim Fehlig
I've noticed the behavior described by this LSN with libvirt+Xen. Config
containing <graphics type='vnc' passwd=''/> allows any client to
connect with no authentication check. I asked about this on the Xen security
list and was told that "libxl interprets an empty password in the caller's
configuration to mean that passwordless access should be permitted". The libvirt
domXML docs are not clear on semantics of empty vnc password, only stating "The
passwd attribute provides a VNC password in clear text".
Should the libvirt domXML vnc passwd documentation be amended to define the
semantics of an empty string in the passwd attribute? Is the behavior
hypervisor-dependent as the documentation in qemu.conf suggests?
Regards,
Jim
8 years, 2 months
[libvirt] [PATCH] storage: Document wiping formatted volume types
by Martin Kletzander
When wiping a volume we just rewrite all the data of the volume, not
only the content. Since format gets overriden, we need to recreate the
volume. However we can't do that for every possible format there. And
since it was only coded for the ploop volume type, let's document what
might be the consequences instead of forbidding it for every other
format out there.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=868771
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/libvirt-storage.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c
index cebe02fdda66..2be95a5adcaf 100644
--- a/src/libvirt-storage.c
+++ b/src/libvirt-storage.c
@@ -1732,6 +1732,12 @@ virStorageVolDelete(virStorageVolPtr vol,
* journaled, log structured, copy-on-write, versioned, and
* network file systems are known to be problematic.
*
+ * NB the data includes the format (and possibly size information), so
+ * non-raw images might become raw with different size from libvirt's
+ * POV. Due to the fact that not all information for re-creating the
+ * volume can be kept for every volume type, the volume might be kept
+ * in that state and not re-created.
+ *
* Returns 0 on success, or -1 on error
*/
int
--
2.9.2
8 years, 2 months