conf: Remove deprecated 'null_kernel' opt
This flag was deprecated in a previous cycle. The flag and any uses of it can now be removed. Change-Id: Ie26f34b4f435eeb378b88f0c48f844b511696eb9
This commit is contained in:
parent
5bcfaf3e8a
commit
694fa59338
@ -408,13 +408,14 @@ class API(base.Base):
|
|||||||
image):
|
image):
|
||||||
"""Choose kernel and ramdisk appropriate for the instance.
|
"""Choose kernel and ramdisk appropriate for the instance.
|
||||||
|
|
||||||
The kernel and ramdisk can be chosen in one of three ways:
|
The kernel and ramdisk can be chosen in one of two ways:
|
||||||
|
|
||||||
1. Passed in with create-instance request.
|
1. Passed in with create-instance request.
|
||||||
|
|
||||||
2. Inherited from image.
|
2. Inherited from image metadata.
|
||||||
|
|
||||||
3. Forced to None by using `null_kernel` FLAG.
|
If inherited from image metadata, and if that image metadata value is
|
||||||
|
set to 'nokernel', both kernel and ramdisk will default to None.
|
||||||
"""
|
"""
|
||||||
# Inherit from image if not specified
|
# Inherit from image if not specified
|
||||||
image_properties = image.get('properties', {})
|
image_properties = image.get('properties', {})
|
||||||
@ -425,8 +426,8 @@ class API(base.Base):
|
|||||||
if ramdisk_id is None:
|
if ramdisk_id is None:
|
||||||
ramdisk_id = image_properties.get('ramdisk_id')
|
ramdisk_id = image_properties.get('ramdisk_id')
|
||||||
|
|
||||||
# Force to None if using null_kernel
|
# Force to None if kernel_id indicates that a kernel is not to be used
|
||||||
if kernel_id == str(CONF.null_kernel):
|
if kernel_id == 'nokernel':
|
||||||
kernel_id = None
|
kernel_id = None
|
||||||
ramdisk_id = None
|
ramdisk_id = None
|
||||||
|
|
||||||
|
@ -68,23 +68,6 @@ Possible values:
|
|||||||
here, since the snapshots that are created from the base images
|
here, since the snapshots that are created from the base images
|
||||||
doesn't need them.
|
doesn't need them.
|
||||||
* Default list: ['cache_in_nova', 'bittorrent']
|
* Default list: ['cache_in_nova', 'bittorrent']
|
||||||
"""),
|
|
||||||
cfg.StrOpt('null_kernel',
|
|
||||||
default='nokernel',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='15.0.0',
|
|
||||||
deprecated_reason="""
|
|
||||||
When an image is booted with the property 'kernel_id' with the value
|
|
||||||
'nokernel', Nova assumes the image doesn't require an external kernel and
|
|
||||||
ramdisk. This option allows user to change the API behaviour which should not
|
|
||||||
be allowed and this value "nokernel" should be hard coded.
|
|
||||||
""",
|
|
||||||
help="""
|
|
||||||
This option is used to decide when an image should have no external
|
|
||||||
ramdisk or kernel. By default this is set to 'nokernel', so when an
|
|
||||||
image is booted with the property 'kernel_id' with the value
|
|
||||||
'nokernel', Nova assumes the image doesn't require an external kernel
|
|
||||||
and ramdisk.
|
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt('multi_instance_display_name_template',
|
cfg.StrOpt('multi_instance_display_name_template',
|
||||||
default='%(name)s-%(count)d',
|
default='%(name)s-%(count)d',
|
||||||
|
@ -53,8 +53,8 @@ class TestServerGet(test.TestCase):
|
|||||||
'container_format': 'raw',
|
'container_format': 'raw',
|
||||||
'disk_format': 'raw',
|
'disk_format': 'raw',
|
||||||
'size': '25165824',
|
'size': '25165824',
|
||||||
'properties': {'kernel_id': CONF.null_kernel,
|
'properties': {'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel,
|
'ramdisk_id': 'nokernel',
|
||||||
'architecture': 'x64'}}
|
'architecture': 'x64'}}
|
||||||
self.image_id = image_service.create(None, image)['id']
|
self.image_id = image_service.create(None, image)['id']
|
||||||
self.flavor_id = self.api.get_flavors()[0]['id']
|
self.flavor_id = self.api.get_flavors()[0]['id']
|
||||||
|
@ -53,8 +53,8 @@ class _FakeImageService(object):
|
|||||||
'disk_format': 'raw',
|
'disk_format': 'raw',
|
||||||
'size': '25165824',
|
'size': '25165824',
|
||||||
'properties': {
|
'properties': {
|
||||||
'kernel_id': CONF.null_kernel,
|
'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel,
|
'ramdisk_id': 'nokernel',
|
||||||
'architecture': obj_fields.Architecture.X86_64}}
|
'architecture': obj_fields.Architecture.X86_64}}
|
||||||
|
|
||||||
image2 = {'id': 'a2459075-d96c-40d5-893e-577ff92e721c',
|
image2 = {'id': 'a2459075-d96c-40d5-893e-577ff92e721c',
|
||||||
@ -68,8 +68,8 @@ class _FakeImageService(object):
|
|||||||
'container_format': 'ami',
|
'container_format': 'ami',
|
||||||
'disk_format': 'ami',
|
'disk_format': 'ami',
|
||||||
'size': '58145823',
|
'size': '58145823',
|
||||||
'properties': {'kernel_id': CONF.null_kernel,
|
'properties': {'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel}}
|
'ramdisk_id': 'nokernel'}}
|
||||||
|
|
||||||
image3 = {'id': '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6',
|
image3 = {'id': '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6',
|
||||||
'name': 'fakeimage123456',
|
'name': 'fakeimage123456',
|
||||||
@ -82,8 +82,8 @@ class _FakeImageService(object):
|
|||||||
'container_format': 'bare',
|
'container_format': 'bare',
|
||||||
'disk_format': 'raw',
|
'disk_format': 'raw',
|
||||||
'size': '83594576',
|
'size': '83594576',
|
||||||
'properties': {'kernel_id': CONF.null_kernel,
|
'properties': {'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel}}
|
'ramdisk_id': 'nokernel'}}
|
||||||
|
|
||||||
image4 = {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
|
image4 = {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
|
||||||
'name': 'fakeimage123456',
|
'name': 'fakeimage123456',
|
||||||
@ -96,8 +96,8 @@ class _FakeImageService(object):
|
|||||||
'container_format': 'ami',
|
'container_format': 'ami',
|
||||||
'disk_format': 'ami',
|
'disk_format': 'ami',
|
||||||
'size': '84035174',
|
'size': '84035174',
|
||||||
'properties': {'kernel_id': CONF.null_kernel,
|
'properties': {'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel}}
|
'ramdisk_id': 'nokernel'}}
|
||||||
|
|
||||||
image5 = {'id': 'c905cedb-7281-47e4-8a62-f26bc5fc4c77',
|
image5 = {'id': 'c905cedb-7281-47e4-8a62-f26bc5fc4c77',
|
||||||
'name': 'fakeimage123456',
|
'name': 'fakeimage123456',
|
||||||
@ -126,8 +126,8 @@ class _FakeImageService(object):
|
|||||||
'disk_format': 'vhd',
|
'disk_format': 'vhd',
|
||||||
'size': '49163826',
|
'size': '49163826',
|
||||||
'properties': {
|
'properties': {
|
||||||
'kernel_id': CONF.null_kernel,
|
'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel,
|
'ramdisk_id': 'nokernel',
|
||||||
'architecture': obj_fields.Architecture.X86_64,
|
'architecture': obj_fields.Architecture.X86_64,
|
||||||
'auto_disk_config': 'False'}}
|
'auto_disk_config': 'False'}}
|
||||||
|
|
||||||
@ -143,8 +143,8 @@ class _FakeImageService(object):
|
|||||||
'disk_format': 'vhd',
|
'disk_format': 'vhd',
|
||||||
'size': '74185822',
|
'size': '74185822',
|
||||||
'properties': {
|
'properties': {
|
||||||
'kernel_id': CONF.null_kernel,
|
'kernel_id': 'nokernel',
|
||||||
'ramdisk_id': CONF.null_kernel,
|
'ramdisk_id': 'nokernel',
|
||||||
'architecture': obj_fields.Architecture.X86_64,
|
'architecture': obj_fields.Architecture.X86_64,
|
||||||
'auto_disk_config': 'True'}}
|
'auto_disk_config': 'True'}}
|
||||||
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The following deprecated configuration options have been removed from the
|
||||||
|
``compute`` section of ``nova.conf``:
|
||||||
|
|
||||||
|
- ``null_kernel``
|
||||||
|
|
||||||
|
These were deprecated in the 15.0.0 release as they allowed for
|
||||||
|
inconsistent API behavior across deployments.
|
Loading…
x
Reference in New Issue
Block a user