summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Version 1.16.7.1.16.7Richard W.M. Jones2012-03-031-1/+1
|
* ruby: Use RbConfig instead of Config.Richard W.M. Jones2012-03-031-2/+2
| | | | | I have checked, and this works with Ruby 1.8 as well. (cherry picked from commit 3b78b3a8496cdd66567b6f433206273966858e74)
* Add a 'fixed' style of appliance.Richard W.M. Jones2012-03-031-3/+33
| | | | | | | | | | | This is just the 'kernel', 'initrd' and 'root' files, copied from one machine to another, along with a 'README.fixed' file which is also used for identification. This allows the appliance to be copied from one machine to another, making it easier for us to distribute a starter appliance for people who cannot get febootstrap or appliance-building working. (cherry picked from commit 5e8a4627d9f0d313485f186a63dc2250f6fd5c01)
* Rebrand 'ordinary appliance' as 'old-style appliance'.Richard W.M. Jones2012-03-032-8/+8
| | | | | This is just code motion. (cherry picked from commit 49726b9269490e331e740d55952da87552ca2500)
* Test fails in arch linuxNikos Skalkotos2012-03-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --20cf303ea4a84a7a7c04ba331375 Content-Type: text/plain; charset=ISO-8859-1 Hello Richard, I found what the problem was and the udev symlinks where not created. The init script in the appliance uses a full paths for udevadm (/sbin/udevadm) which in my case was wrong. In Arch Linux udevadm is hosted under /usr/bin, not /sbin. When I fixed this, libguestfs was able to communicate with the appliance VM. Since PATH variable is defined and exported in init, there is no need in using full paths for external programs. As far as I've seen this affects all the git branches in libguestfs's repository. Please find attached a patch for the master branch. Nikos Skalkotos, Athens, Greece On 24 February 2012 10:25, Richard W.M. Jones <rjones@redhat.com> wrote: > On Thu, Feb 23, 2012 at 08:50:12PM +0200, Nikos Skalkotos wrote: > [...] > > I don't know specifically why it fails with ArchLinux, but the problem > is caused by the /dev/virtio-ports/* symlinks not getting created by > udev. > > /dev/vport0p1 exists: > > > crw------- 1 root root 252, 1 Feb 23 18:17 vport0p1 > > but udev doesn't make the corresponding /dev/virtio-ports symlink: > > > /dev/virtio-ports/org.libguestfs.channel.0: No such file or directory > > The symlink is supposed to be created by this udev rule: > > /lib/udev/rules.d/50-udev-default.rules:KERNEL=="vport*", > ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" > > So I'd start by looking to see if that rule exists in the udev rules > that Arch is using. Secondly if it does exist, is the corresponding > *.rules being copied into the appliance? (Check appliance/supermin.d/ > hostfiles) > > In an old Ubuntu that has udev that predates having this rule, we add > the following patch: > > > http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > virt-p2v converts physical machines to virtual machines. Boot with a > live CD or over the network (PXE) and turn machines into Xen guests. > http://et.redhat.com/~rjones/virt-p2v > Hello Richard,<br><br>I found what the problem was and the udev symlinks where not created. The init script in the appliance uses a full paths for udevadm (/sbin/udevadm) which in my case was wrong. In Arch Linux udevadm is hosted under /usr/bin, not /sbin. When I fixed this, libguestfs was able to communicate with the appliance VM.<br> <br>Since PATH variable is defined and exported in init, there is no need in using full paths for external programs. As far as I&#39;ve seen this affects all the git branches in libguestfs&#39;s repository. Please find attached a patch for the master branch.<br> <br>Nikos Skalkotos,<br>Athens, Greece<br><br><div class="gmail_quote">On 24 February 2012 10:25, Richard W.M. Jones <span dir="ltr">&lt;<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Thu, Feb 23, 2012 at 08:50:12PM +0200, Nikos Skalkotos wrote:<br> [...]<br> <br> I don&#39;t know specifically why it fails with ArchLinux, but the problem<br> is caused by the /dev/virtio-ports/* symlinks not getting created by<br> udev.<br> <br> /dev/vport0p1 exists:<br> <div class="im"><br> &gt; crw------- 1 root root 252,   1 Feb 23 18:17 vport0p1<br> <br> </div>but udev doesn&#39;t make the corresponding /dev/virtio-ports symlink:<br> <div class="im"><br> &gt; /dev/virtio-ports/org.libguestfs.channel.0: No such file or directory<br> <br> </div>The symlink is supposed to be created by this udev rule:<br> <br> /lib/udev/rules.d/50-udev-default.rules:KERNEL==&quot;vport*&quot;, ATTR{name}==&quot;?*&quot;, SYMLINK+=&quot;virtio-ports/$attr{name}&quot;<br> <br> So I&#39;d start by looking to see if that rule exists in the udev rules<br> that Arch is using.  Secondly if it does exist, is the corresponding<br> *.rules being copied into the appliance?  (Check appliance/supermin.d/<br> hostfiles)<br> <br> In an old Ubuntu that has udev that predates having this rule, we add<br> the following patch:<br> <br> <a href="http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch" target="_blank">http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch</a><br> <br> Rich.<br> <span class="HOEnZb"><font color="#888888"><br> --<br> Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones%0Avirt-p2v" target="_blank">http://people.redhat.com/~rjones<br> virt-p2v</a> converts physical machines to virtual machines.  Boot with a<br> live CD or over the network (PXE) and turn machines into Xen guests.<br> <a href="http://et.redhat.com/%7Erjones/virt-p2v" target="_blank">http://et.redhat.com/~rjones/virt-p2v</a><br> </font></span></blockquote></div><br> (cherry picked from commit ba468e9c5ecb32046299dd69a6e045f2aa7ba982)
* Version 1.16.6.1.16.6Richard W.M. Jones2012-03-011-1/+1
|
* resize: Fix --output-format flag (RHBZ#798196).Richard W.M. Jones2012-03-012-3/+10
| | | | | Update the test to use the --format and --output-format flags. (cherry picked from commit 88ba4da4d6c07762fc95c96ea67019f0ebf4677c)
* resize: Document steps to avoid UNMOUNTABLE_BOOT_VOLUME BSOD (RHBZ#797986).Richard W.M. Jones2012-03-011-0/+8
| | | | | (Thanks Grant Williamson for finding and fixing this problem) (cherry picked from commit a93d4a9dc1aea6940886c85d4b09f21cbfc80969)
* sysprep: Try unmounting the filesystem a few times when busy.Richard W.M. Jones2012-03-011-1/+11
| | | | | | tracker-miner-fs jumps into newly mounted filesystems. This prevents the filesystem from being unmounted, so retry a few times. (cherry picked from commit 5fa7aace200a49961173de6316a81e239987c179)
* appliance: Make appliance building thread-safe (RHBZ#790721).Richard W.M. Jones2012-03-011-1/+12
| | | | | | | | | | | | | | | | Appliance building can be called from multiple processes, but this is only safe if each process holds a lock on the 'checksum' file. However threads within a process are not excluded by a file lock, and so this strategy completely failed for a multithreaded program calling guestfs_launch in parallel. Since it makes no sense for threads in a single program to race each other to try to create the appliance, add a lock around appliance building. This serialises building the appliance, but the rest of guestfs_launch (eg. starting up qemu) can run in parallel. (cherry picked from commit afed7e493dcd594620f19b93e9fb73e58553f60a)
* tests: Test parallel launch from multiple threads.Richard W.M. Jones2012-03-013-1/+183
| | | | (cherry picked from commit c9ea94810e2f7a5fcce2a7136eb07ce795f49c53)
* test-user-cancel: Add \n to fprintf error messages.Richard W.M. Jones2012-03-011-6/+6
| | | | (cherry picked from commit 6a70cb337cff736831b51bbc9c4331785d756c20)
* Version 1.16.5.1.16.5Richard W.M. Jones2012-02-1318-26/+32
|
* tests: Add a regression test for RHBZ#789960.Richard W.M. Jones2012-02-132-0/+69
| | | | | | Test all the ways that the 'mount' command can fail. Ensure that none of them result in failures or desynchronization. (cherry picked from commit cd06ddf4422a31528f4a268dad813938947e1a0d)
* regressions: One test is not being run.Richard W.M. Jones2012-02-131-0/+4
| | | | | | | | | | rhbz727178.sh exists, but historically was never added to the list of tests, so it doesn't run. Create a special variable for this test and ensure it is added to EXTRA_DIST. Test was originally added in commit d7356a2801130907997acd5c7502e8417566e782. (cherry picked from commit 1b15e543a8efee027451dcfb68743d35eda95dfc)
* daemon: Return error properly when user tries to mount appliance root ↵Richard W.M. Jones2012-02-131-1/+4
| | | | | | | | | | | | | (RHBZ#789960). In the case where the caller attempts to mount the "hidden" appliance root device (eg. /dev/vdb if /dev/vda is the only normal block device added), we were calling reply_with_error but not actually returning immediately, resulting in protocol desynchronization. This commit fixes this obvious mistake. (cherry picked from commit 07081591cf9928454148db84828da8a7f39b6c6f)
* daemon: Don't xdr_free uninitialized args struct on error paths.Richard W.M. Jones2012-02-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For stubs of functions that had arguments, code did this: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args); return; } This caused xdr_free to be called on uninitialized 'args' struct, causing a segfault. The fix is to add another label, so the code looks like: static void mount_stub (XDR *xdr_in) { int r; struct guestfs_mount_args args; if (optargs_bitmask != 0) { //... goto done_no_free; } // possibly other tests here memset (&args, 0, sizeof args); [...] done: xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args); done_no_free: return; } This fixes commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0 and commit 0344248af55802bbbd816b349ec1ba9305996f6e. (cherry picked from commit ba443ae0486ae30ea597c4e126de63371f8fa7a8)
* Do not run test-virt-format.sh if appliance has not been builtHilko Bengen2012-02-131-0/+2
| | | | (cherry picked from commit c8a11468c4dc761acdcb9b184d345bafe1b5114d)
* Version 1.16.4.1.16.4Richard W.M. Jones2012-02-1020-2653/+2661
|
* virt-format: Add a test.Richard W.M. Jones2012-02-102-7/+40
| | | | (cherry picked from commit badf2d6c4d2c2a3e12bad4dcbd5854401156bb5f)
* fish: edit: Preserve permissions, UID, GID, SELinux context when editing ↵Richard W.M. Jones2012-02-102-1/+92
| | | | | | files (RHBZ#788641). (cherry picked from commit 7c21e49c2c83092e9fd5f40c43a03c764a6d3663)
* fish: In edit command, upload to a new file.Richard W.M. Jones2012-02-104-3/+110
| | | | | | | | If the upload fails, this means we don't leave a partially written file. Also add a test for the edit command. (cherry picked from commit ddae5abf80f65fc149eec253f14f073d397b49c2)
* fish: Refactor error handling in the 'edit' command.Richard W.M. Jones2012-02-101-24/+17
| | | | | This is just code motion. (cherry picked from commit ca80e4490463d646de4504fc2bcb4e4a722bedb8)
* ocaml: Ensure bindings are recompiled whenever there is an API change.Richard W.M. Jones2012-02-101-7/+3
| | | | (cherry picked from commit 39625b59ee5aeecfb855575abb939934216eeff2)
* docs: Note that JRuby should use the Java bindings.Richard W.M. Jones2012-02-101-0/+2
| | | | (cherry picked from commit 6ca8a2db6d6f1028a35ece616af44538074483fc)
* edit: Preserve file permissions, UID, GID, SELinux context on edited files. ↵Richard W.M. Jones2012-02-103-0/+93
| | | | | | (RHBZ#788641) (cherry picked from commit 24d7889eba3eb6ee2f37ed9d384aa8734ebad7b7)
* java: Make use of JAR_INSTALL_DIR, JNI_INSTALL_DIRHilko Bengen2012-02-102-5/+9
| | | | (cherry picked from commit 016ae77e6c2331560a3716ea1ebae82f122b4909)
* Version 1.16.3.1.16.3Richard W.M. Jones2012-02-0818-42/+67
|
* findfs: Remove /run/blkid/blkid.tab.Richard W.M. Jones2012-02-081-0/+1
| | | | | | See this util-linux commit: https://github.com/karelzak/util-linux/commit/b82590ad46acf9fe8d332b53875e24c3c31e2482 (cherry picked from commit f504cb02e1e8ef394287ddbaaad2fb1ec04bc33f)
* extra-tests: Add suppression for uninitialized memory bug in latest glibc.Richard W.M. Jones2012-02-081-0/+8
| | | | (cherry picked from commit 518edc506fbdd66dcdd5a558cd086cfa296585a2)
* extra-tests: libnl moved from /lib64 to /usr/lib64 on Fedora.Richard W.M. Jones2012-02-081-0/+13
| | | | | Update suppressions file to match. (cherry picked from commit 0559f038ada850f627529ece97f5a4e8721a7ecd)
* perl: Ignore perl/MYMETA.jsonRichard W.M. Jones2012-02-081-0/+1
| | | | (cherry picked from commit 825b5e65c094396154594fcb31db59fe51867a33)
* blockdev, parted: Call udev_settle before and after commands. (RHBZ#769304)Richard W.M. Jones2012-02-082-52/+115
| | | | | | | | See comments in the code for details. This is an alternate fix to commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11. (cherry picked from commit 21a9efcad5379cbfcc2404142472ec5efda4aaa0)
* Revert "daemon: Run udev_settle after pwrite-device finishes."Richard W.M. Jones2012-02-082-17/+4
| | | | | This reverts commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11. (cherry picked from commit a98170e0e255021481cd428ee12d0858a59a875b)
* build: Choose a virtual directory for the daemon which is not a symlink.Richard W.M. Jones2012-02-062-4/+27
| | | | | | | | Check /sbin, /usr/sbin, /bin and /usr/bin to ensure that neither the directory nor the parent (eg. /usr) is a symlink, and use this directory for the virtual directory used to store guestfsd in the appliance. (cherry picked from commit 3c9ef0e9780443d28a078c49bab80cb13e5608ae)
* build: Remove 'run' from EXTRA_DIST.Richard W.M. Jones2012-02-061-1/+0
| | | | | | | This file shouldn't be included in the tarball as it contains hard-coded paths from the maintainer's machine which cannot be relevant to the target machine. (cherry picked from commit 590d8c3c3732c603cfb1d2180190a02df528e5ed)
* Clarify the error message when unavailable functions are called (RHBZ#679737).Richard W.M. Jones2012-02-028-136/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers are supposed to use the availability API to check for functions that may not be available in particular builds of libguestfs. If they don't do this, currently they tend to get obscure error messages, eg: libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory This commit changes the error message to explain what callers ought to be doing instead: libguestfs: error: zerofree: feature 'zerofree' is not available in this build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for how to check for the availability of features. This patch makes the stubs check for availability. The stub code changes to: static void zerofree_stub (XDR *xdr_in) { [...] /* The caller should have checked before calling this. */ if (! optgroup_zerofree_available ()) { reply_with_error ("feature '%s' is not available in this\n" "build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for\n" "how to check for the availability of features.", "zerofree"); goto done; } [...] (cherry picked from commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0)
* examples: code cleanupsWanlong Gao2012-02-022-2/+2
| | | | | | | do a code cleanup by removing the tailing spaces Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> (cherry picked from commit 90d6386c13edcb479113889bbd3cedf83c2e6277)
* Version 1.16.2.1.16.2Richard W.M. Jones2012-01-3020-28/+40
|
* guestmount: use O_ACCMODE instead of hard codingWanlong Gao2012-01-301-1/+1
| | | | | | | | Change hard code 3 to O_ACCMODE. it'll be more sensible. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> (cherry picked from commit d60d5c091f46dda8399ce2af1b6e5920bd5fb819)
* guestmount: remove tailing spacesWanlong Gao2012-01-301-2/+2
| | | | | | | | just do a cleanup. remove the tailing spaces. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> (cherry picked from commit 0042898880167f93c5e64d76008ab07bd0aa9485)
* daemon: Fix crash in aug-defnode (RHBZ#785668).Richard W.M. Jones2012-01-301-6/+15
| | | | (cherry picked from commit e3f15780c8197a66bfb620b802ba18d0ba0dd2ce)
* virt-alignment-scan: Fix typo in man page (thanks yurchor).Richard W.M. Jones2012-01-291-1/+1
| | | | (cherry picked from commit 6e703c1316548e42b5133ba508fe0e7d090ac3d0)
* ocaml: Various fixes for bytecode compilation.Richard W.M. Jones2012-01-291-8/+15
| | | | | | | | | | | | | Set LD_LIBRARY_PATH so we link against the just-built library, not the installed library. Use OCAMLCFLAGS instead of OCAMLOPTFLAGS where appropriate. Remove unnecessary -cclib option for bytecode linking (gcc is not used in this case). This fixes commit eb68a314133c88260cdf4547d7d338446488e698. (cherry picked from commit 03684e7a616eab56a81665c8c8859426e50ae429)
* ocaml: Sort the tests.Richard W.M. Jones2012-01-291-2/+3
| | | | (cherry picked from commit d33c70fd6417c71b8965a088355dcc9e2ade51f7)
* extra-tests: ocaml: Additional suppressions so we can test bytecode.Richard W.M. Jones2012-01-291-0/+14
| | | | (cherry picked from commit 8fd5a377b8521d53f56b66136d686a31c7e302b6)
* ocaml: Test bytecode and native code bindings.Richard W.M. Jones2012-01-293-24/+68
| | | | | | Compile each test twice, as bytecode and native code, and test both. (cherry picked from commit eb68a314133c88260cdf4547d7d338446488e698)
* ocaml: Fix bytecode bindings for functions with >= 6 args.Richard W.M. Jones2012-01-291-1/+1
| | | | (cherry picked from commit 799852e64691068f3256c27d18870bdb2537c2be)
* Update to latest gnulib.Richard W.M. Jones2012-01-292-0/+1
| | | | | | | | | This contains a workaround for stdalign bug: http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00340.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023 (Thanks Paul Eggert). (cherry picked from commit 7972b1da8121e3f9c98865f00fc6115d9aff2754)
* appliance: udev >= 176 now requires /dev to be a devtmpfs.Richard W.M. Jones2012-01-291-0/+3
| | | | | | See this udev commit: https://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=220893b3cbdbf8932f95c44811b169a8f0d33939 (cherry picked from commit 8f564ae7a2fb0f170308bd103a6be0a981583b1c)