[PATCH v1 0/2] Fix environment-setting code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[This patch is for discussion only: I have not proven that
it fixes the bug]

https://bugzilla.redhat.com/show_bug.cgi?id=859596

When libvirtd runs any command, it uses a simple strategy to
set the environment for that command:

(a) It creates a new, empty environment array.

(b) It copies in a few known-good environment variables, including TMPDIR.

(c) It appends environment variables specified by the user, eg. ones
specified in <qemu:env>.

Unfortunately this means if you try to set TMPDIR via a <qemu:env> XML
directive, then it is appended to the list of environment variables
which already includes TMPDIR.  The qemu subprocess picks an
environment variable (probably) first from the list, which is the
TMPDIR that libvirtd had originally, not the TMPDIR that was specified
by the user.

This [possibly, not proven] leads to bug 859596, where we see qemu
trying to create temporary files in a directory that no longer exists.

The follow-up patches change libvirtd so that environment variables in
the virCommandPtr array are replaced if they exist already.

Rich.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]