From 030b218a9ec22ed6bf18f0513e35115e940ffaa4 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 25 May 2009 11:57:50 +0200
Subject: [PATCH] Fix backend.OSEnvironment be/hv parameters

Commit 67fc3042c20f5893abf71a0b4c445c356f9603b9 added some more
variables to be exported to OSEnvironment, but it has two bugs:
  - wrong variable name (env vs. result)
  - in OSEnvironment we don't have the automatic converstion to strings
    that we do in hooks, so we must manually enforce this

With this patch instance creations work again.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/backend.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/backend.py b/lib/backend.py
index 3cdea3e99..54dc0237e 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -1692,7 +1692,7 @@ def OSEnvironment(instance, debug=0):
 
   for source, kind in [(instance.beparams, "BE"), (instance.hvparams, "HV")]:
     for key, value in source.items():
-      env["INSTANCE_%s_%s" % (kind, key)] = value
+      result["INSTANCE_%s_%s" % (kind, key)] = str(value)
 
   return result
 
-- 
GitLab