From 2bc22872d56b46b79af3bf96fdb5fd5e19269edb Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 28 Jan 2008 09:03:03 +0000
Subject: [PATCH] Fix "gnt-instance modify --initrd"

The new QA tests for instance modify uncovered a bug in the modify
initrd operation when setting the initrd to none.

Reviewed-by: imsnah
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index e934274aa..7e48df80b 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4171,7 +4171,7 @@ class LUSetInstanceParms(LogicalUnit):
       self.do_initrd_path = True
       if self.initrd_path not in (constants.VALUE_NONE,
                                   constants.VALUE_DEFAULT):
-        if not os.path.isabs(self.kernel_path):
+        if not os.path.isabs(self.initrd_path):
           raise errors.OpPrereqError("The initrd path must be an absolute"
                                     " filename")
     else:
-- 
GitLab