Hello Tomas Golembiovsky,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/62919
to review the following change.
Change subject: v2v: Running virt-v2v with some sane environment
......................................................................
v2v: Running virt-v2v with some sane environment
Starting virt-v2v with (almost) empty environment no longer works and
virt-v2v expects at least PATH to be set properly. Otherwise it will
fail to find external tools.
Still, even if virt-v2v was OK with it, having empty environment is not
a good idea either. Since it depends on couple external tools they may
also require some basic environment to work properly.
Change-Id: Iae6455c3189b7fbbf0d9d3ad5369a06b3cd6017e
Bug-Url: https://bugzilla.redhat.com/1367839
Backport-To: 4.0
Backport-To: 3.6
Signed-off-by: Tomáš Golembiovský <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/62765
Continuous-Integration: Jenkins CI
Reviewed-by: Shahar Havivi <[email protected]>
Reviewed-by: Francesco Romani <[email protected]>
---
M lib/vdsm/v2v.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/62919/1
diff --git a/lib/vdsm/v2v.py b/lib/vdsm/v2v.py
index 22b0d16..62ccd3c 100644
--- a/lib/vdsm/v2v.py
+++ b/lib/vdsm/v2v.py
@@ -437,7 +437,11 @@
return path.rsplit(os.sep, 3)[0]
def _environment(self):
- env = {'LIBGUESTFS_BACKEND': 'direct'}
+ # Provide some sane environment
+ env = os.environ.copy()
+
+ # virt-v2v specific variables
+ env['LIBGUESTFS_BACKEND'] = 'direct'
if 'virtio_iso_path' in self._vminfo:
env['VIRTIO_WIN'] = self._vminfo['virtio_iso_path']
return env
--
To view, visit https://gerrit.ovirt.org/62919
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae6455c3189b7fbbf0d9d3ad5369a06b3cd6017e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Tomas Golembiovsky <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]