Commit Graph

4065 Commits

Author SHA1 Message Date
Daniel Veillard
74e3b5578e Update of indian, spanish and russian translations
and regeneration of the po/pot files
2010-03-01 12:14:23 +01:00
David Allan
b2111ba3cd Revert fs pool formatting
* We are reverting this patch pending a discussion of the right way to implement.
2010-02-26 03:33:27 -05:00
Jim Meyering
bd3ff6b348 build: update gnulib submodule to latest
* .gnulib: Update to latest.
Commit 89bdf84bcd inadvertently rewound the .gnulib
submodule by 51 commits.  This corrects it.
Spotted by Eric Blake.
2010-02-26 17:14:01 +01:00
Jim Meyering
303cf4dbff build: avoid warning about return-with-value in void function
* tools/virsh.c: Just "return;", not "return NULL;".
2010-02-26 17:12:00 +01:00
Jim Meyering
7ca954cf26 libvirtd: do not ignore failure to set group ID in privileged mode
* daemon/libvirtd.c (qemudListenUnix): Diagnose and fail upon
failure to set or restore group-ID.
2010-02-26 17:12:00 +01:00
Chris Lalancette
1204e41f01 Only build virDomainObjFormat if not building proxy.
While building under RHEL-5, I got a compile warning because
virDomainObjFormat was defined but not used.  That came about
because in RHEL-5 we build with "#define PROXY", and
virDomainObjFormat is only used with !PROXY.  Move the
define.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2010-02-26 08:46:17 -05:00
Jim Meyering
f3439c7eae openvzGetVEID: don't leak (memory + file descriptor)
* src/openvz/openvz_conf.c (openvzGetVEID): Always call fclose.
Diagnose parse failure also when vzlist output is empty.
If somehow we read a -1, diagnose that (albeit as a parse failure).
2010-02-25 19:28:59 +01:00
Cole Robinson
8ac0334ebd Use standard spacing for user/pass prompt
Kind of minor, but it annoys me that the default auth callback
doesn't put a space between the prompt and the input, like a typical
terminal, ssh, etc. This patch changes the current prompt:

Please enter your authentication name:myuser

to

Please enter your authentication name: myuser
2010-02-25 11:43:57 -05:00
Cole Robinson
b39c2068e4 libvirtd: Better initscript error reporting
From time to time I bork my install, and hate it when the initscript
returns no info. This patch removes the sanity check, which lets
the shell give us 'command not found' or 'permission denied' errors.
2010-02-25 11:43:57 -05:00
Cole Robinson
a09af3b004 qemu: Report binary path if error parsing -help 2010-02-25 11:43:57 -05:00
Cole Robinson
67b2eb1042 remote: Improve daemon startup error reporting
If I toggle enable_tcp in libvirtd.conf and add --listen in
/etc/init.d/libvirtd, I get the unhelpful error:

Starting libvirtd daemon: error: Unable to initialize network sockets.

Running without --daemon provides much more useful info:

sudo libvirtd --listen
11:29:26.117: error : remoteCheckCertFile:270 : Cannot access CA certificate '/etc/pki/CA/cacert.pem': No such file or directory

The daemon architecture makes it difficult to report this useful
info if daemonized, so point users to /var/log/messages and
dropping the --daemon flag if they want more info.
2010-02-25 11:43:57 -05:00
Cole Robinson
482869633a virsh: Show errors reported by nonAPI functions
Only API calls trigger the error callback, which is required for
proper virsh error reporting. Since we use non API functions from
util/, make sure we properly report these errors.

Fixes lack of error message from 'virsh create idontexit.xml'
2010-02-25 11:43:56 -05:00
Cole Robinson
c56cf8d55f remote: Improve error message when libvirtd isn't running
While this could lead people in the wrong direction, people most commonly
hit this error when libvirtd isn't running, so let's mention a possible
fix.
2010-02-25 11:43:56 -05:00
Jim Meyering
8ddff3e6cd build: avoid warning about unused variables
* tools/virsh.c (cmdCPUBaseline): Remove declarations of unused
variables, p and cur.
2010-02-25 14:19:33 +01:00
Jim Meyering
a79fb1c491 build: avoid "make rpm" failure in docs/
Add missing rule to build html/libvirt-libvirt.html.
Use a GNU Make pattern rule to avoid running apibuild.py once
for each out-of-date target, in a parallel build.
* docs/Makefile.am
2010-02-25 14:14:51 +01:00
Jim Meyering
ace4dca5df build: teach apibuild.py to work in a non-srcdir build
* docs/Makefile.am (libvirt-api.xml libvirt-refs.xml): Generalize
apibuild.py to work in a non-srcdir build.  Pass "srcdir" to it.
* docs/apibuild.py (rebuild): Honor the $srcdir envvar.
2010-02-25 14:14:42 +01:00
Jim Meyering
f064dca7ea build: avoid non-srcdir "make distcheck" failures (CLEANFILES)
* docs/Makefile.am (MAINTAINERCLEANFILES): Use this variable
for generated-and-distributed files, not "CLEANFILES".
Besides, "make clean" and "make distclean" should not delete
distributed files.
2010-02-25 13:46:27 +01:00
Jim Meyering
0f88dade23 build: make git submodule checking more reliable
* cfg.mk (_curr_status): Accommodate leading "+" or "-" in the output
of git submodule status.
* autogen.sh: Likewise.
2010-02-25 13:35:03 +01:00
Jim Meyering
083b901eb3 build: avoid non-srcdir "make distcheck" failures (srcdir vs wildcard)
* tests/xencapsdata/Makefile.am: Use $(wildcard in $(srcdir)-aware manner
* tests/xmconfigdata/Makefile.am: Likewise.
* tests/xml2sexprdata/Makefile.am: Likewise.
* tests/sexpr2xmldata/Makefile.am (EXTRA_DIST): Likewise.
* Makefile.am (XML_EXAMPLES): Use $(wildcard in $(srcdir)-aware manner.
2010-02-25 10:50:18 +01:00
Jim Meyering
327d5fe072 build: avoid non-srcdir "make distcheck" failure (test_conf.sh)
* tests/confdata/Makefile.am (EXTRA_DIST): Apply $(wildcard... to
$(srcdir)/..., and then remove the prefix.
2010-02-25 10:50:09 +01:00
Jim Meyering
0a42b9e2c5 build: avoid non-srcdir installation failure (sitemap.html.in)
* docs/Makefile.am (EXTRA_DIST): Add sitemap.html.in.
2010-02-25 10:49:58 +01:00
Jim Meyering
53ed2c4c58 build: avoid non-srcdir installation failure (apibuild.py)
* docs/Makefile.am (libvirt-api.xml): Insert missing "$(srcdir)/".
Also, remove unnecessary sub-shell.
2010-02-25 10:49:51 +01:00
Jim Meyering
5365ff40d3 build: fix typos in makefile variable names
* configure.ac: Fix typos:
s/DRIVER_MODULES_CFLAGS/DRIVER_MODULE_CFLAGS/
s/DRIVER_MODULES_LIBS/DRIVER_MODULE_LIBS/
2010-02-25 10:48:58 +01:00
Jim Meyering
89bdf84bcd build: ensure that MKINSTALLDIRS is AC_SUBST-defined
since we're using gettext-0.14.1, which uses that now-obsolete
automake symbol.  Otherwise, make distcheck would fails like this:

    make[2]: Entering directory `/t/libvirt-0.7.6/_build/po'
    /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share
    /bin/sh: @MKINSTALLDIRS@: No such file or directory
    make[2]: *** [install-data-yes] Error 127

* configure.ac (MKINSTALLDIRS): Define.
For reference, we're currently hamstrung by our desire
to support RHEL5, which still uses gettext-0.14:
http://bugzilla.redhat.com/523713
2010-02-25 10:42:45 +01:00
Eric Blake
c560fc4933 maint: relax git minimum version
Requiring git 1.6.4, just for the optional GNULIB_SRCDIR support,
was too harsh.  Resynchronize from gnulib.

* .gnulib: Import from latest gnulib.
* bootstrap: Re-synchronize from .gnulib/build-aux.
* bootstrap.conf: Drop git to 1.5.5.
* README-hacking: Document use of GNULIB_SRCDIR.
2010-02-24 14:29:27 -05:00
Richard Jones
f4a43df52b Ignore SIGWINCH in remote client call to poll(2) (RHBZ#567931).
In bug 567931 we found that virt-top would exit occasionally
when the terminal window was resized.  Tracking this down it
turned out that SIGWINCH was being delivered to the process at
exactly the point where the libvirt remote driver was calling
poll(2) waiting for a reply from libvirtd.

This caused the poll(2) call to be interrupted (returning errno
EINTR).  However handling EINTR the same way as EAGAIN was not
the solution to this problem since we found previously that this
would break Ctrl-C handling (commit 47fec8eac2).

The correct solution is to mask out SIGWINCH for the duration
of the poll(2) system call.  The per-thread mask is changed and
restored immediately after the call.  Since we are using
pthread_sigmask, this should not affect other threads, and
since we restore the signal mask immediately afterwards it should
not affect the current thread visibly either.  Other possibly
problematic signals are SIGCHLD and SIGPIPE and these are
masked too.

Note use of ignore_value: It's not fatal if we cannot mask out
SIGWINCH, and in any case pthread_sigmask never fails on Linux
as long as you supply the correct arguments.

I tested this patch and it cures the original problem with
virt-top.
2010-02-24 16:06:40 +00:00
Stefan Berger
c7b85e3710 Add descriptions for macvtap direct type interfaces
This adds a description about the 'direct' type of interface recently
added for macvtap device type support on the host.
2010-02-24 10:29:23 +01:00
Dave Allan
b738016b78 Format FS pools on creation
Create the filesystem on the partition used by the pool
* configure.ac: check for mkfs availability
* libvirt.spec.in: add extra require on util-linux for mkfs
* src/storage/storage_backend_fs.c: run mkfs with the expected
  fs type when creating a filesystem pool
2010-02-24 09:51:34 +01:00
Eric Blake
9ad255f975 maint: sort .gitignore
Fallout from the new bootstrap.

* .gitignore: Commit sorting done by bootstrap.
* build-aux/.gitignore: Likewise.
* po/.gitignore: Likewise.
2010-02-23 21:32:04 +01:00
Eric Blake
38c9440a15 maint: import modern bootstrap
Copy the latest gnulib bootstrap, which runs autoreconf and
generates po/Makevars for us.  Other improvements include some
improved prerequisite tool checking.

This also fixes a bug in the .pot files, regarding the copyright holder.

* bootstrap: Update to version in .gnulib/build-aux.
* bootstrap.conf (MSGID_BUGS_ADDRESS, COPYRIGHT_HOLDER, SKIP_PO)
(gnulib_mk, ACLOCAL, bootstrap_epilogue): Provide overrides.
* autogen.sh (autoreconf): Avoid redundant autoreconf if bootstrap
was run.
* po/Makevars: Delete, now that bootstrap creates it.
* po/.gitignore: Update.
2010-02-23 21:31:21 +01:00
Eric Blake
1a51d05f8b maint: start factoring bootstrap
Borrow ideas from gnulib/build-aux/bootstrap, in order to factor the
specifics of libvirt into bootstrap.conf, while allowing future
upgrades of bootstrap to happen with less effort.

* bootstrap (gnulib_tool): Update invocation to be closer to
gnulib's version.  Move libvirt specifics...
* bootstrap.conf: ...into new file.
2010-02-23 21:31:17 +01:00
Eric Blake
f1ef0e31d2 maint: fix quoting in autogen.sh
* autogen.sh (srcdir, THEDIR, OBJ_DIR): Use proper quoting.
(.git-module-status): Abort if bootstrap fails.
2010-02-23 21:31:17 +01:00
Jim Meyering
d2a9773457 build: update gnulib submodule to latest
* cfg.mk (local-checks-to-skip): Disable sc_prohibit_hash_without_use
for now, since it fails with a false-positive match.
2010-02-23 21:31:17 +01:00
Jim Meyering
0e69905d9f virFork: placate static analyzers: ignore pthread_sigmask return value
* src/util/util.c: Include "ignore-value.h".
(virFork): We really do want to ignore pthread_sigmask failure.
2010-02-23 17:43:33 +01:00
Cole Robinson
1edc59e71b docs: Fix syntax warnings from recent changes. 2010-02-23 10:25:17 -05:00
Cole Robinson
e530940e47 docs: network: Document <domain> element 2010-02-23 09:44:40 -05:00
Cole Robinson
f51e01f47d docs: network: Document STP and delay attributes 2010-02-23 09:44:39 -05:00
Cole Robinson
9b9e52a1cb docs: domain: Document <description> element 2010-02-23 09:44:39 -05:00
Cole Robinson
582f04f064 docs: storage: Document multipath pools 2010-02-23 09:44:39 -05:00
Cole Robinson
c5bad3ad21 docs: storage: Document SCSI pools 2010-02-23 09:44:38 -05:00
Cole Robinson
e563b3b326 docs: storage: Fix backingStore <format> docs 2010-02-23 09:44:38 -05:00
Cole Robinson
f66dcd044f docs: storage: <volume><key> is always generated. 2010-02-23 09:44:38 -05:00
Cole Robinson
3a6555b345 docs: storage: Document capacity/alloc 'unit' 2010-02-23 09:44:38 -05:00
Cole Robinson
67b44811af storage: conf: Correctly calculate exabyte unit
We were using 'Y' to mean exabyte, when the correct abbreviation would be
'E' ('Y' is yettabyte, which is exabyte * 1024 * 1024). While it isn't
strictly backwards compatible, I highly doubt anyone was actually using
this broken behavior, so I don't see any harm in in dropping 'Y' handling.
2010-02-23 09:44:37 -05:00
Jiri Denemark
dca81d0472 virsh.c: avoid all leaks in OOM path in cmdCPUBaseline
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2010-02-23 13:53:39 +01:00
Jiri Denemark
9568c1d985 Create raw storage files with O_DSYNC (again)
Recently we introduced O_DSYNC flag when creating raw storage files to
avoid filling all disk cache with dirty pages. However, the patch got
lost when virStorageBackendCreateRaw was reworked using
virFileOperation. Let's use O_DSYNC again.
2010-02-22 14:54:17 +01:00
David Allan
617075f49f Fixed reference count in virsh pool-build command
* tools/virsh.c: call virStoragePoolFree() in the main path too
2010-02-21 15:28:34 +01:00
Dan Kenigsberg
d5739ab56a docs: add 3 missing spaces 2010-02-21 14:56:23 +01:00
David Allan
b4bf51253b Fix daemon-conf invalid failures
The daemon-conf test would fail on my system if there was a system libvirtd
running.  In the course of troubleshooting that problem, I discovered that the
daemon-conf script would always fail if run by itself because it found the line:

\# that each "PARAMETER = VALUE" line in this file have the parameter

which it mistook for a line containing a parameter.  I have changed the test to
avoid mistaking a line containing \"PARAMETER = VALUE\" for a parameter line.

The corrupted config tests turned out to be failing because the test daemon was
discovering the pid file from the running daemon and exiting before it processed
the test config file.  Specifying the pid file for the corrupt config tests in
the same way as for the valid config test solved that problem.
2010-02-20 15:26:53 +01:00
Jim Meyering
27fc6782bc virsh.c: avoid leak on OOM error path
* tools/virsh.c (cmdCPUBaseline): Also free "buffer" and "list" upon OOM.
2010-02-19 18:32:23 +01:00