[libvirt] [PATCH] fix rawhide/F13 --no-add-needed/dlopen-related build failures
by Jim Meyering
Diego,
I saw no follow-up here,
http://thread.gmane.org/gmane.comp.emulators.libvirt/21398/focus=21671
so I've fixed your two patches to address Eric's review feedback,
and confirmed that they solve the problem on Rawhide.
>From 55c182d89cd6e5417eafe9f4bdf2e0ef7f8721f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes(a)gmail.com>
Date: Thu, 4 Mar 2010 16:45:02 +0100
Subject: [PATCH 1/2] build: avoid dlopen-related link failure on rawhide/F13
Instead of using AC_CHECK_LIB and hardcoding -ldl, search for the library
needed to get dlopen() and then use the cached value.
---
configure.ac | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 682b8b5..d5d62ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1700,7 +1700,7 @@ if test "x$with_driver_modules" = "xyes" ; then
old_libs="$LIBS"
fail=0
AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
- AC_CHECK_LIB([dl], [dlopen],[],[fail=1])
+ AC_SEARCH_LIBS([dlopen], [dl], [], [fail=1])
test $fail = 1 &&
AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
@@ -1709,7 +1709,10 @@ if test "x$with_driver_modules" = "xyes" ; then
fi
if test "$with_driver_modules" = "yes"; then
DRIVER_MODULE_CFLAGS="-export-dynamic"
- DRIVER_MODULE_LIBS="-ldl"
+ case $ac_cv_search_dlopen in
+ no*) DRIVER_MODULE_LIBS= ;;
+ *) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
+ esac
AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
fi
AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
--
1.7.0.1.475.gaf89b
>From ca7a9f299b0bd415f8434b3c9e6c70528d2f85cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes(a)gmail.com>
Date: Thu, 4 Mar 2010 16:48:10 +0100
Subject: [PATCH 2/2] build: vbox: avoid build failure when linking with --no-add-needed
With the recent changes to the linking defaults in Fedora 13 (namely
enabling --no-add-needed behaviour by default), we have to pass the
dlopen()-providing libraries directly at the link of the module; use the
same AC_SEARCH_LIBS function as used before to look for it and add it to
the Makefile.
---
configure.ac | 6 ++++++
src/Makefile.am | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index d5d62ea..923d7b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,6 +303,12 @@ fi
AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"])
if test "x$with_vbox" = "xyes"; then
+ AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([Unable to find dlopen()])])
+ case $ac_cv_search_dlopen in
+ no*) DLOPEN_LIBS= ;;
+ *) DLOPEN_LIBS=$ac_cv_search_dlopen ;;
+ esac
+ AC_SUBST([DLOPEN_LIBS])
AC_DEFINE_UNQUOTED([WITH_VBOX], 1, [whether VirtualBox driver is enabled])
fi
AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"])
diff --git a/src/Makefile.am b/src/Makefile.am
index 2051e5d..67f8b6d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -463,6 +463,7 @@ libvirt_driver_vbox_la_CFLAGS = \
if WITH_DRIVER_MODULES
libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version
endif
+libvirt_driver_vbox_la_LIBADD = $(DLOPEN_LIBS)
libvirt_driver_vbox_la_SOURCES = $(VBOX_DRIVER_SOURCES)
endif
--
1.7.0.1.475.gaf89b
14 years, 8 months
[libvirt] FW: Bringing up LXC container from virsh command prompt.
by Kumar L Srikanth-B22348
Hi Daniel,
One more thing is that in my host machine vibr0 inteface is missing.
Because of the the 'default' network is in 'inactive' state and if I
tried to activate, it's giving the following error:
error: Failed to start network default
error: internal error '/usr/sbin/dnsmasq --strict-order
--bind-interfaces --pid-file=/var/run/libvirt/network/default.pid
--conf-file= --listen-address 192.168.122.1 --except-interface lo
--dhcp-range 192.168.122.2,192.168.122.254' exited with non-zero status
2 and signal 0:
dnsmasq: failed to bind listening socket for 192.168.122.1: Address
already in use
Can you please guide me in this regard?
Regards,
Srikanth.
-----Original Message-----
From: Kumar L Srikanth-B22348
Sent: Thursday, March 04, 2010 4:43 PM
To: 'Daniel P. Berrange'
Cc: libvir-list(a)redhat.com; Reddy B Veera-B22347
Subject: RE: Bringing up LXC container from virsh command prompt.
Hi,
I want to create eth0 network interface in the container, which is
linked to br0 bridge in the host machine.
For that, I have created a bridge 'br0' with the IP '172.16.1.10'. Now,
I want to create a network interface eth0 in the container with the IP
'172.16.1.17'. I created the following network XML for the above
requirement.
<network>
<name>mynetwork</name>
<uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
<bridge name="br0" stp="on" delay="5"/>
<forward mode="nat" dev="eth0"/>
<ip address="172.16.1.17" netmask="255.255.255.0"/> </network>
I am able to define the network, but unable to start the network. The
following error is coming when I start the network with the following
command:
#virsh -c lxc:/// net-start mynetwork
error: Failed to start network mynetwork
error: cannot create bridge 'br0': File exists
Can you please guide me to create a network?
My network interfaces in the host machine is shown below:
br0 Link encap:Ethernet HWaddr 00:50:BF:27:AA:60
inet addr:172.16.1.10 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:bfff:fe27:aa60/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:80728 errors:0 dropped:0 overruns:0 frame:0
TX packets:170078 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:54037401 (51.5 MiB) TX bytes:123567268 (117.8 MiB)
eth0 Link encap:Ethernet HWaddr 00:50:BF:27:AA:60
inet6 addr: fe80::250:bfff:fe27:aa60/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:288 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:30108 (29.4 KiB)
Interrupt:21 Base address:0x1140
eth1 Link encap:Ethernet HWaddr 00:16:76:4B:91:DC
inet addr:192.168.1.10 Bcast:192.168.1.255
Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth2 Link encap:Ethernet HWaddr 00:11:95:FC:8D:62
inet addr:10.232.113.80 Bcast:10.232.113.255
Mask:255.255.254.0
inet6 addr: fe80::211:95ff:fefc:8d62/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:563988 errors:0 dropped:0 overruns:0 frame:0
TX packets:391293 errors:1100 dropped:0 overruns:0
carrier:1100
collisions:188525 txqueuelen:1000
RX bytes:565906426 (539.6 MiB) TX bytes:234291753 (223.4 MiB)
Interrupt:22 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:23001 errors:0 dropped:0 overruns:0 frame:0
TX packets:23001 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3478027 (3.3 MiB) TX bytes:3478027 (3.3 MiB)
Regards,
Srikanth.
-----Original Message-----
From: Daniel P. Berrange [mailto:berrange@redhat.com]
Sent: Thursday, March 04, 2010 3:41 PM
To: Kumar L Srikanth-B22348
Cc: libvir-list(a)redhat.com; Reddy B Veera-B22347
Subject: Re: Bringing up LXC container from virsh command prompt.
On Thu, Mar 04, 2010 at 03:38:43PM +0530, Kumar L Srikanth-B22348 wrote:
> So, again I need to add one network interface in the libvirt XML?. It
> will not take the interface which was created earlier while creating
> container using lxc-tools?.
> But, in the container which was created with lxc-tools(lxc-create,
> lxc-start ..etc), I am not getting any such issues.
The lxc-XXX tools are completely unrelated. They have a configuration
file where you specify what network interfaces are created. Likewise if
you use libvirt you need to specify what network interfaces are to be
created.
> Why I am getting these issues in virsh command prompt, when I am
> mounting the same rootfs that was used while creating container using
> lxc-tools.
You need to setup $PATH in your container.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o-
http://deltacloud.org :|
|: http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B
9505 :|
14 years, 8 months
[libvirt] Bringing up LXC container from virsh command prompt.
by Kumar L Srikanth-B22348
Hi,
I am new to libvirt virsh console.
Currently I am working on Linux Containers(LXC). After lot of
exploration, I am able to create a Linux Container(fedora12) with the
help of
lxc-tools(lxc-create, lxc-start, ...etc). I am able to start that
container and use it's console. I am able to assign an IP address to the
container,
by creating a bridge in the host machine and assigning it to the
container.
Here, my goal is to bring up this container(fedora12) through libvirt
virsh command prompt. For that I created a domain with the following XML
file:
[vm1_fedora_container.xml]
<domain type='lxc' id='1'>
<name>vm1_fedora</name>
<memory>500000</memory>
<os>
<type>exe</type>
<init>/bin/bash</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/root/lxc/fedora12'/> /*This is the rootfs
directory for my linux container(fedora12)*/
<target dir='/'/> /* I mounted it to '/' directory in the
Domain. */
</filesystem>
<console type='pty' />
</devices>
</domain>
I executed the following virsh commands:
# virsh --connect lxc:/// define vm1_fedora_container.xml
Domain vm1_fedora defined from /root/lxc_devel/fedora.xml
# virsh --connect lxc:/// list --all
Id Name State
----------------------------------
- vm1_fedora shut off
# virsh --connect lxc:/// start vm1_fedora
Domain vm1_fedora started
# virsh --connect lxc:/// list --all
Id Name State
----------------------------------
7805 vm1_fedora running
# virsh --connect lxc:/// console vm1_fedora
Connected to domain vm1_fedora
Escape character is ^]
[root@localhost /]#
I am able to view the console of my container(fedora12), but when I
execute 'ifconfig' in that console, I am getting the following error:
bash: ifconfig: command not found
When I execute the same 'ifconfig' command through lxc-tools (like
lxc_start -n fedora12 /bin/bash), I am able to get the assigned IP
address.
Can you please suggest me where did I go wrong?
Regards,
Srikanth.
14 years, 8 months
[libvirt] [PATCH 0/9] Vol Zeroing API
by David Allan
This patch set contains a new API for zeroing out volumes. I called
it zero out rather than overwrite because it doesn't overwrite
anything in the case of sparse files. It does guarantee that any
subsequent reads from the volume will return zeroes.
The ESX driver change is part of the patch. Without it, the struct is
missing its initializer and fails to build. I'm not sure what our
position on the style of struct initializers is; there are both forms
in the code. If this style is heresy, we should add a statement to
that effect in HACKING.
Dave
David Allan (9):
Fix ESX storage driver struct initializer
Add public API for volume zeroing
Define the internal driver API for vol zeroing
Implement the public API for vol zeroing
Define wire protocol format for vol zeroing
Implement RPC client for vol zeroing
Implement the remote dispatch bits of vol zeroing
Simplified version of volume zeroing based on feedback from the list.
Virsh support for vol zeroing
daemon/remote.c | 32 +++++
daemon/remote_dispatch_args.h | 1 +
daemon/remote_dispatch_prototypes.h | 8 ++
daemon/remote_dispatch_table.h | 5 +
include/libvirt/libvirt.h.in | 2 +
src/driver.h | 5 +
src/esx/esx_storage_driver.c | 39 +------
src/libvirt.c | 47 ++++++++
src/libvirt_public.syms | 1 +
src/remote/remote_driver.c | 27 +++++
src/remote/remote_protocol.c | 11 ++
src/remote/remote_protocol.h | 9 ++
src/remote/remote_protocol.x | 8 +-
src/storage/storage_driver.c | 218 +++++++++++++++++++++++++++++++++++
tools/virsh.c | 42 +++++++
15 files changed, 418 insertions(+), 37 deletions(-)
14 years, 8 months
[libvirt] [PATCH] Add TCK script for verifying disk based storage pools
by Daniel P. Berrange
This adds a reasonably comprehensive test script for working with
disk based storage pools. It checks
- Prevent re-formating an existing partition table (currently
missing this check in libvirt)
- Formating of a partiton table
- Wiping a partition table (currently missing in libvirt)
- Creating multiple storage volumes
- Deleteing storage volumes
* conf/default.cfg: add config entry for specifying host block
devices that a test script can use
* lib/Sys/Virt/TCK.pm: Add API to get a host block device
* lib/Sys/Virt/TCK/StoragePoolBuilder.pm: Fix typo in device
XML formatting. Allow pool source format to be specified
* scripts/storage/110-disk-pool.t: Test which creates a storage
pool, creates some volumes, then deletes it all again.
---
conf/default.cfg | 9 ++
lib/Sys/Virt/TCK.pm | 7 ++
lib/Sys/Virt/TCK/StoragePoolBuilder.pm | 13 +++-
scripts/storage/110-disk-pool.t | 127 ++++++++++++++++++++++++++++++++
4 files changed, 155 insertions(+), 1 deletions(-)
create mode 100644 scripts/storage/110-disk-pool.t
diff --git a/conf/default.cfg b/conf/default.cfg
index 5b85cbc..288540f 100644
--- a/conf/default.cfg
+++ b/conf/default.cfg
@@ -127,3 +127,12 @@ host_pci_devices = (
# }
# Can list more than one PCI device if many are available
)
+
+# List of host block devices that the test suite can trash all
+# data on, for purposes of testing. You have been warned !
+# Only full block devices allowed, no single partitions, since
+# the test suite itself needs to create partitions.
+# The disks should be at *least* 512 MB in size
+host_block_devices = (
+# /dev/vdb
+)
diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index f101937..d32b03d 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -805,4 +805,11 @@ sub get_host_pci_device {
return ($domain, $bus, $slot, $function);
}
+sub get_host_block_device {
+ my $self = shift;
+ my $devindex = @_ ? shift : 0;
+
+ return $self->config("host_block_devices/[$devindex]", undef);
+}
+
1;
diff --git a/lib/Sys/Virt/TCK/StoragePoolBuilder.pm b/lib/Sys/Virt/TCK/StoragePoolBuilder.pm
index f92b21a..c9ef2dd 100644
--- a/lib/Sys/Virt/TCK/StoragePoolBuilder.pm
+++ b/lib/Sys/Virt/TCK/StoragePoolBuilder.pm
@@ -77,6 +77,14 @@ sub target {
return $self;
}
+sub format {
+ my $self = shift;
+
+ $self->{format} = shift;
+
+ return $self;
+}
+
sub as_xml {
my $self = shift;
@@ -98,7 +106,7 @@ sub as_xml {
}
if ($self->{source}->{device}) {
foreach my $dev (@{$self->{source}->{device}}) {
- $w->emptyTag("dev", path => $dev);
+ $w->emptyTag("device", path => $dev);
}
}
if ($self->{source}->{adapter}) {
@@ -107,6 +115,9 @@ sub as_xml {
if ($self->{source}->{name}) {
$w->dataElement("name", $self->{source}->{name});
}
+ if ($self->{format}) {
+ $w->emptyTag("format", type => $self->{format});
+ }
$w->endTag("source");
$w->startTag("target");
diff --git a/scripts/storage/110-disk-pool.t b/scripts/storage/110-disk-pool.t
new file mode 100644
index 0000000..faa13c5
--- /dev/null
+++ b/scripts/storage/110-disk-pool.t
@@ -0,0 +1,127 @@
+# -*- perl -*-
+#
+# Copyright (C) 2009-2010 Red Hat
+# Copyright (C) 2009-2010 Daniel P. Berrange
+#
+# This program is free software; You can redistribute it and/or modify
+# it under the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any
+# later version
+#
+# The file "LICENSE" distributed along with this file provides full
+# details of the terms and conditions
+#
+
+=pod
+
+=head1 NAME
+
+storage/110-disk-pool.t - test disk storage pools
+
+=head1 DESCRIPTION
+
+The test case validates that it is possible to use all core
+functions of the disk pool type.
+
+=cut
+
+use strict;
+use warnings;
+
+use Test::More tests => 20;
+
+use Sys::Virt::TCK;
+use Test::Exception;
+use File::stat;
+
+my $tck = Sys::Virt::TCK->new();
+my $conn = eval { $tck->setup(); };
+BAIL_OUT "failed to setup test harness: $@" if $@;
+END {
+ $tck->cleanup if $tck;
+}
+
+
+SKIP: {
+ my $dev = $tck->get_host_block_device();
+
+ skip "no host block device available", 20 unless defined $dev;
+
+ # Blow away partition table (if any)
+ open DEV, ">$dev" or die "cannot write to $dev: $!";
+ my $data = " "x 512;
+
+ print DEV $data;
+ close DEV or die "cannot save $dev: $!";
+
+ my $poolxml = $tck->generic_pool("disk", "tck")
+ ->source_device($dev)
+ ->format("dos")
+ ->target("/dev/")
+ ->as_xml;
+
+ diag "Defining persistent storage pool $poolxml";
+ my $pool;
+ ok_pool(sub { $pool = $conn->define_storage_pool($poolxml) }, "define persistent storage pool");
+
+ # Since we blew away the partition table we should not be able to
+ # start the pool yet
+ ok_error(sub { $pool->create }, "unable to start un-built storage pool");
+
+ lives_ok(sub { $pool->build(0) }, "built storage pool");
+
+ # We should get an error if trying to build a pool which already
+ # has a partition table written.
+ ok_error(sub { $pool->build(0) }, "prevent rebuilding existing storage pool");
+
+ lives_ok(sub { $pool->create }, "started storage pool");
+
+ my @vols = $pool->list_volumes();
+
+ is($#vols, -1, "no storage volumes in new pool");
+
+ my $poolinfo = $pool->get_info();
+
+ ok($poolinfo->{available} > 1000, "there is some space available in the pool");
+
+ my $volbase = $dev;
+ $volbase =~ s,/dev/,,;
+
+ my $vol1xml = $tck->generic_volume($volbase . "1", undef, 1024*1024*256)->as_xml;
+ my $vol2xml = $tck->generic_volume($volbase . "2", undef, 1024*1024*64)->as_xml;
+
+ diag "Vol $vol1xml $vol2xml";
+ my $vol1;
+ my $vol2;
+ ok_volume(sub { $vol1 = $pool->create_volume($vol1xml) }, "create disk partition");
+ ok_volume(sub { $vol2 = $pool->create_volume($vol2xml) }, "create disk partition");
+
+ for my $vol (($vol1, $vol2)) {
+ my $path = xpath($vol, "string(/volume/target/path)");
+ my $st = stat($path);
+
+ ok($st, "path $path exists");
+ }
+
+ @vols = $pool->list_volumes();
+ is($#vols, 1, "two storage volumes in pool");
+
+ lives_ok(sub { $vol1->delete(0) }, "deleted volume");
+
+ @vols = $pool->list_volumes();
+ is($#vols, 0, "one storage volume in pool");
+
+ lives_ok(sub { $vol2->delete(0) }, "deleted volume");
+
+ @vols = $pool->list_volumes();
+ is($#vols, -1, "zero storage volume in pool");
+
+ lives_ok(sub { $pool->destroy() }, "destroyed pool");
+ lives_ok(sub { $pool->delete(0) }, "deleted pool");
+
+ # Since we blew away the partition table we should not be able to
+ # start the pool anymore
+ ok_error(sub { $pool->create }, "unable to start un-built storage pool");
+
+ lives_ok(sub { $pool->undefine() }, "undefined pool");
+}
--
1.6.5.2
14 years, 8 months
[libvirt] Problem building on Fedora Rawhide
by Laine Stump
I just checked out a clean tree on a Fedora Rawhide system (up to date
as of today), and ran "./autogen.sh && make", and ended up with the
following error. Am I missing something, or is configure missing something?
make[3]: Entering directory `/home/laine/devel/libvirt/daemon'
CC libvirtd-event.o
CC libvirtd-libvirtd.o
CC libvirtd-remote.o
CC libvirtd-dispatch.o
CC libvirtd-stream.o
CC libvirtd-remote_protocol.o
CCLD libvirtd
../src/.libs/libvirt.so: undefined reference to `g_pfnGetFunctions'
../src/.libs/libvirt.so: undefined reference to `g_pVBoxFuncs'
../src/.libs/libvirt.so: undefined reference to `VBoxCGlueInit'
14 years, 8 months
[libvirt] [PATCH] Fix parser checking of storage pool device
by Daniel P. Berrange
The storage backend implementations all presume that the XML parser
is validating correctness of the source specification. The check for
a source device was lost at some point. This allowed for a potential
crash in the disk backend. Re-introduce the sanity check
* src/conf/storage_conf.c: Re-add check for source device
---
src/conf/storage_conf.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 19a1db9..b0f326f 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -689,6 +689,15 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) {
}
}
+ /* If DEVICE is the only source type, then its required */
+ if (options->flags == VIR_STORAGE_POOL_SOURCE_DEVICE) {
+ if (!ret->source.ndevice) {
+ virStorageReportError(VIR_ERR_XML_ERROR,
+ "%s", _("missing storage pool source device name"));
+ goto cleanup;
+ }
+ }
+
if ((ret->target.path = virXPathString("string(./target/path)", ctxt)) == NULL) {
virStorageReportError(VIR_ERR_XML_ERROR,
"%s", _("missing storage pool target path"));
--
1.6.5.2
14 years, 8 months
[libvirt] [PATCH] Fix mis-leading error message in pool delete API
by Daniel P. Berrange
When trying to delete a pool the error message claimed the volume
could not be deleted.
* src/storage/storage_driver.c: Error message referred to
volumes instead of pools
---
src/storage/storage_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 6b1045a..f3be6de 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -822,7 +822,7 @@ storagePoolDelete(virStoragePoolPtr obj,
if (!backend->deletePool) {
virStorageReportError(VIR_ERR_NO_SUPPORT,
- "%s", _("pool does not support volume delete"));
+ "%s", _("pool does not support pool deletion"));
goto cleanup;
}
if (backend->deletePool(obj->conn, pool, flags) < 0)
--
1.6.5.2
14 years, 8 months
[libvirt] [PATCH 0/2] virsh: consistent N_() usage
by Eric Blake
As discussed here[1], we aren't being very smart about the use
of gettext_noop(). In particular, most packages use N_() to
mean gettext_noop rather than a synonym to _(); furthermore,
our current definition of N_() meant that we were effectively
calling gettext(gettext("string")), which has undefined results.
Patch 1/2 also fixes a potential crash due to a translation bug,
by telling xgettext to enforce that the translation of a string
later handed to printf does not violate printf constraints.
[1] https://www.redhat.com/archives/libvir-list/2010-March/msg00197.html
[PATCH 1/2] virsh: fix existing N_ uses
[PATCH 2/2] virsh: use N_ rather than gettext_noop
.../0008-Step-8-of-8-Add-virsh-support.patch | 21 +-
src/internal.h | 2 +-
tools/virsh.c | 895 ++++++++++----------
3 files changed, 459 insertions(+), 459 deletions(-)
14 years, 8 months
[libvirt] [PATCH] Add a define for NFS_SUPER_MAGIC
by Chris Lalancette
Commit 3c12a67b766cce51b47861ccde2be41de369f832 added
a dependency on the NFS_SUPER_MAGIC macro, which is
defined in linux/magic.h. Unfortunately linux/magic.h
is not available in RHEL-5, and causes a compile error.
Just define it locally, since this is something that
can't change.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/qemu/qemu_driver.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ccb9ef9..efc3be1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -49,8 +49,10 @@
#ifdef __linux__
#include <sys/vfs.h>
-#include <linux/magic.h>
-#endif
+#ifndef NFS_SUPER_MAGIC
+#define NFS_SUPER_MAGIC 0x6969
+#endif /* NFS_SUPER_MAGIC */
+#endif /* __linux__ */
#include "virterror_internal.h"
#include "logging.h"
--
1.6.6.1
14 years, 8 months