summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Santa Barbara <justinsb@justinsb-desktop>2010-07-31 20:49:21 -0700
committerJustin Santa Barbara <justinsb@justinsb-desktop>2010-07-31 20:49:21 -0700
commit6227cb13c311624998b9c2c6e55fc0d261cfcb6c (patch)
tree63d6e382e89fe3ce4742ce2756714dc625f2f953
parent6526f21d9bf5a53546240ec29099d68933165500 (diff)
Recognize 'magic' kernel value that means "don't use a kernel" - currently aki-00000000
-rw-r--r--nova/endpoint/cloud.py10
-rw-r--r--nova/flags.py3
2 files changed, 11 insertions, 2 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index b4157e48c..344352a93 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -523,9 +523,15 @@ class CloudController(object):
kernel_id = kwargs.get('kernel_id', kernel_id)
ramdisk_id = kwargs.get('ramdisk_id', ramdisk_id)
+ if kernel_id == str(FLAGS.null_kernel):
+ kernel_id = None
+ ramdisk_id = None
+
# make sure we have access to kernel and ramdisk
- self._get_image(context, kernel_id)
- self._get_image(context, ramdisk_id)
+ if kernel_id:
+ self._get_image(context, kernel_id)
+ if ramdisk_id:
+ self._get_image(context, ramdisk_id)
logging.debug("Going to run instances...")
reservation_id = utils.generate_uid('r')
diff --git a/nova/flags.py b/nova/flags.py
index f35f5fa10..caae33e14 100644
--- a/nova/flags.py
+++ b/nova/flags.py
@@ -57,6 +57,9 @@ DEFINE_string('ec2_url',
'http://127.0.0.1:8773/services/Cloud',
'Url to ec2 api server')
+DEFINE_string('null_kernel',
+ 'aki-00000000',
+ 'Kernel image that indicates not to use a kernel (use a raw disk image instead)')
DEFINE_string('default_image',
'ami-11111',
'default image to use, testing only')