Commit 6dfad215 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix checking for valid OS in instance create

The current check in LUCreateInstance.CheckPrereq() is wrong - it only checks
if we got an OS, but not if we got a valid OS. This patch fixes it.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent c98162a7
......@@ -4730,7 +4730,7 @@ class LUCreateInstance(LogicalUnit):
# os verification
result = self.rpc.call_os_get(, self.op.os_type)
if not isinstance(, objects.OS):
if not isinstance(, objects.OS) or not
raise errors.OpPrereqError("OS '%s' not in supported os list for"
" primary node" % self.op.os_type)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment