Fix backend.OSEnvironment be/hv parameters
authorIustin Pop <iustin@google.com>
Mon, 25 May 2009 09:57:50 +0000 (11:57 +0200)
committerIustin Pop <iustin@google.com>
Mon, 25 May 2009 10:12:36 +0000 (12:12 +0200)
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

index 3cdea3e..54dc023 100644 (file)
@@ -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