Merge "Cleanup unused (i)PXE kernel parameters"

This commit is contained in:
Jenkins 2016-10-13 15:02:08 +00:00 committed by Gerrit Code Review
commit ac51ae41ec
17 changed files with 42 additions and 133 deletions

View File

@ -440,7 +440,7 @@ class BootInterface(object):
different ways by passing parameters to them. For example,
When Agent ramdisk is booted to deploy a node, it takes the
parameters ipa-driver-name, ipa-api-url, root_device, etc.
parameters ipa-driver-name, ipa-api-url, etc.
Other implementations can make use of ramdisk_params to pass such
information. Different implementations of boot interface will

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel {{ pxe_options.deployment_aki_path }}
append initrd={{ pxe_options.deployment_ari_path }} text {{ pxe_options.pxe_append_params }} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }}{% if pxe_options.root_device %} root_device={{ pxe_options.root_device }}{% endif %} coreos.configdrive=0
append initrd={{ pxe_options.deployment_ari_path }} text {{ pxe_options.pxe_append_params }} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} coreos.configdrive=0
label boot_partition
kernel {{ pxe_options.aki_path }}

View File

@ -1107,12 +1107,6 @@ def build_agent_options(node):
# NOTE: The below entry is a temporary workaround for bug/1433812
'coreos.configdrive': 0,
}
# TODO(dtantsur): deprecate in favor of reading root hints directly from a
# node record.
root_device = parse_root_device_hints(node)
if root_device:
agent_config_opts['root_device'] = root_device
return agent_config_opts

View File

@ -3,7 +3,7 @@ default=deploy
image={{pxe_options.deployment_aki_path}}
label=deploy
initrd={{pxe_options.deployment_ari_path}}
append="selinux=0 disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ip=%I:{{pxe_options.tftp_server}}:%G:%M:%H::on {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} boot_option={{ pxe_options.boot_option }} boot_mode={{ pxe_options['boot_mode'] }} coreos.configdrive=0"
append="selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ip=%I:{{pxe_options.tftp_server}}:%G:%M:%H::on ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} coreos.configdrive=0"
image={{pxe_options.aki_path}}

View File

@ -6,7 +6,7 @@ goto deploy
:deploy
imgfree
kernel {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_aki_path }} selinux=0 disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_option={{ pxe_options.boot_option }} ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} boot_mode={{ pxe_options['boot_mode'] }} initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
kernel {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
initrd {% if pxe_options.ipxe_timeout > 0 %}--timeout {{ pxe_options.ipxe_timeout }} {% endif %}{{ pxe_options.deployment_ari_path }} || goto deploy
boot

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel {{ pxe_options.deployment_aki_path }}
append initrd={{ pxe_options.deployment_ari_path }} selinux=0 disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_option={{ pxe_options.boot_option }} {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} boot_mode={{ pxe_options['boot_mode'] }} coreos.configdrive=0
append initrd={{ pxe_options.deployment_ari_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} coreos.configdrive=0
ipappend 3

View File

@ -3,7 +3,7 @@ set timeout=5
set hidden_timeout_quiet=false
menuentry "deploy" {
linuxefi {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text disk={{ pxe_options.disk }} iscsi_target_iqn={{ pxe_options.iscsi_target_iqn }} deployment_id={{ pxe_options.deployment_id }} deployment_key={{ pxe_options.deployment_key }} ironic_api_url={{ pxe_options.ironic_api_url }} {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}} {% if pxe_options.root_device %}root_device={{ pxe_options.root_device }}{% endif %} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} boot_option={{ pxe_options.boot_option }} boot_mode={{ pxe_options['boot_mode'] }} coreos.configdrive=0
linuxefi {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}} ipa-api-url={{ pxe_options['ipa-api-url'] }} ipa-driver-name={{ pxe_options['ipa-driver-name'] }} coreos.configdrive=0
initrdefi {{ pxe_options.deployment_ari_path }}
}

View File

@ -46,38 +46,15 @@ class TestPXEUtils(db_base.DbTestCase):
'pxe_append_params': 'test_param',
'deployment_ari_path': u'/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7'
u'f33c123/deploy_ramdisk',
'root_device': 'vendor=fake,size=123',
'ipa-api-url': 'http://192.168.122.184:6385',
'ipxe_timeout': 0,
}
self.pxe_options = {
'deployment_key': '0123456789ABCDEFGHIJKLMNOPQRSTUV',
'iscsi_target_iqn': u'iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33'
u'c123',
'deployment_id': u'1be26c0b-03f2-4d2e-ae87-c02d7f33c123',
'ironic_api_url': 'http://192.168.122.184:6385',
'disk': 'cciss/c0d0,sda,hda,vda',
'boot_option': 'netboot',
'ipa-driver-name': 'pxe_ssh',
}
self.pxe_options.update(common_pxe_options)
self.pxe_options_bios = {
'boot_mode': 'bios',
}
self.pxe_options_bios.update(self.pxe_options)
self.pxe_options_uefi = {
'boot_mode': 'uefi',
}
self.pxe_options_uefi.update(self.pxe_options)
self.agent_pxe_options = {
'ipa-driver-name': 'agent_ipmitool',
}
self.agent_pxe_options.update(common_pxe_options)
self.ipxe_options = self.pxe_options.copy()
self.ipxe_options.update({
'deployment_aki_path': 'http://1.2.3.4:1234/deploy_kernel',
@ -86,27 +63,17 @@ class TestPXEUtils(db_base.DbTestCase):
'ari_path': 'http://1.2.3.4:1234/ramdisk',
})
self.ipxe_options_bios = {
'boot_mode': 'bios',
}
self.ipxe_options_bios.update(self.ipxe_options)
self.ipxe_options_timeout = self.ipxe_options_bios.copy()
self.ipxe_options_timeout = self.ipxe_options.copy()
self.ipxe_options_timeout.update({
'ipxe_timeout': 120
})
self.ipxe_options_uefi = {
'boot_mode': 'uefi',
}
self.ipxe_options_uefi.update(self.ipxe_options)
self.node = object_utils.create_test_node(self.context)
def test__build_pxe_config(self):
rendered_template = pxe_utils._build_pxe_config(
self.pxe_options_bios, CONF.pxe.pxe_config_template,
self.pxe_options, CONF.pxe.pxe_config_template,
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
@ -114,7 +81,7 @@ class TestPXEUtils(db_base.DbTestCase):
self.assertEqual(six.text_type(expected_template), rendered_template)
def test__build_ipxe_bios_config(self):
def test__build_ipxe_config(self):
# NOTE(lucasagomes): iPXE is just an extension of the PXE driver,
# it doesn't have it's own configuration option for template.
# More info:
@ -125,7 +92,7 @@ class TestPXEUtils(db_base.DbTestCase):
)
self.config(http_url='http://1.2.3.4:1234', group='deploy')
rendered_template = pxe_utils._build_pxe_config(
self.ipxe_options_bios, CONF.pxe.pxe_config_template,
self.ipxe_options, CONF.pxe.pxe_config_template,
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
@ -152,26 +119,6 @@ class TestPXEUtils(db_base.DbTestCase):
self.assertEqual(six.text_type(expected_template), rendered_template)
def test__build_ipxe_uefi_config(self):
# NOTE(lucasagomes): iPXE is just an extension of the PXE driver,
# it doesn't have it's own configuration option for template.
# More info:
# http://docs.openstack.org/developer/ironic/deploy/install-guide.html
self.config(
pxe_config_template='ironic/drivers/modules/ipxe_config.template',
group='pxe'
)
self.config(http_url='http://1.2.3.4:1234', group='deploy')
rendered_template = pxe_utils._build_pxe_config(
self.ipxe_options_uefi, CONF.pxe.pxe_config_template,
'{{ ROOT }}', '{{ DISK_IDENTIFIER }}')
expected_template = open(
'ironic/tests/unit/drivers/'
'ipxe_uefi_config.template').read().rstrip()
self.assertEqual(six.text_type(expected_template), rendered_template)
def test__build_elilo_config(self):
pxe_opts = self.pxe_options
pxe_opts['boot_mode'] = 'uefi'
@ -316,11 +263,11 @@ class TestPXEUtils(db_base.DbTestCase):
@mock.patch('oslo_utils.fileutils.ensure_tree', autospec=True)
def test_create_pxe_config(self, ensure_tree_mock, build_mock,
write_mock):
build_mock.return_value = self.pxe_options_bios
build_mock.return_value = self.pxe_options
with task_manager.acquire(self.context, self.node.uuid) as task:
pxe_utils.create_pxe_config(task, self.pxe_options_bios,
pxe_utils.create_pxe_config(task, self.pxe_options,
CONF.pxe.pxe_config_template)
build_mock.assert_called_with(self.pxe_options_bios,
build_mock.assert_called_with(self.pxe_options,
CONF.pxe.pxe_config_template,
'{{ ROOT }}',
'{{ DISK_IDENTIFIER }}')
@ -331,7 +278,7 @@ class TestPXEUtils(db_base.DbTestCase):
ensure_tree_mock.assert_has_calls(ensure_calls)
pxe_cfg_file_path = pxe_utils.get_pxe_config_file_path(self.node.uuid)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options_bios)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options)
@mock.patch('ironic.common.pxe_utils._link_ip_address_pxe_configs',
autospec=True)
@ -345,10 +292,10 @@ class TestPXEUtils(db_base.DbTestCase):
'elilo_efi_pxe_config.template'),
group='pxe'
)
build_mock.return_value = self.pxe_options_uefi
build_mock.return_value = self.pxe_options
with task_manager.acquire(self.context, self.node.uuid) as task:
task.node.properties['capabilities'] = 'boot_mode:uefi'
pxe_utils.create_pxe_config(task, self.pxe_options_uefi,
pxe_utils.create_pxe_config(task, self.pxe_options,
CONF.pxe.uefi_pxe_config_template)
ensure_calls = [
@ -356,14 +303,14 @@ class TestPXEUtils(db_base.DbTestCase):
mock.call(os.path.join(CONF.pxe.tftp_root, 'pxelinux.cfg'))
]
ensure_tree_mock.assert_has_calls(ensure_calls)
build_mock.assert_called_with(self.pxe_options_uefi,
build_mock.assert_called_with(self.pxe_options,
CONF.pxe.uefi_pxe_config_template,
'{{ ROOT }}',
'{{ DISK_IDENTIFIER }}')
link_ip_configs_mock.assert_called_once_with(task, True)
pxe_cfg_file_path = pxe_utils.get_pxe_config_file_path(self.node.uuid)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options_uefi)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options)
@mock.patch('ironic.common.pxe_utils._link_ip_address_pxe_configs',
autospec=True)
@ -372,11 +319,11 @@ class TestPXEUtils(db_base.DbTestCase):
@mock.patch('oslo_utils.fileutils.ensure_tree', autospec=True)
def test_create_pxe_config_uefi_grub(self, ensure_tree_mock, build_mock,
write_mock, link_ip_configs_mock):
build_mock.return_value = self.pxe_options_uefi
build_mock.return_value = self.pxe_options
grub_tmplte = "ironic/drivers/modules/pxe_grub_config.template"
with task_manager.acquire(self.context, self.node.uuid) as task:
task.node.properties['capabilities'] = 'boot_mode:uefi'
pxe_utils.create_pxe_config(task, self.pxe_options_uefi,
pxe_utils.create_pxe_config(task, self.pxe_options,
grub_tmplte)
ensure_calls = [
@ -384,14 +331,14 @@ class TestPXEUtils(db_base.DbTestCase):
mock.call(os.path.join(CONF.pxe.tftp_root, 'pxelinux.cfg'))
]
ensure_tree_mock.assert_has_calls(ensure_calls)
build_mock.assert_called_with(self.pxe_options_uefi,
build_mock.assert_called_with(self.pxe_options,
grub_tmplte,
'(( ROOT ))',
'(( DISK_IDENTIFIER ))')
link_ip_configs_mock.assert_called_once_with(task, False)
pxe_cfg_file_path = pxe_utils.get_pxe_config_file_path(self.node.uuid)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options_uefi)
write_mock.assert_called_with(pxe_cfg_file_path, self.pxe_options)
@mock.patch('ironic.common.pxe_utils._link_mac_pxe_configs',
autospec=True)
@ -401,11 +348,11 @@ class TestPXEUtils(db_base.DbTestCase):
def test_create_pxe_config_uefi_ipxe(self, ensure_tree_mock, build_mock,
write_mock, link_mac_pxe_mock):
self.config(ipxe_enabled=True, group='pxe')
build_mock.return_value = self.ipxe_options_uefi
build_mock.return_value = self.ipxe_options
ipxe_template = "ironic/drivers/modules/ipxe_config.template"
with task_manager.acquire(self.context, self.node.uuid) as task:
task.node.properties['capabilities'] = 'boot_mode:uefi'
pxe_utils.create_pxe_config(task, self.ipxe_options_uefi,
pxe_utils.create_pxe_config(task, self.ipxe_options,
ipxe_template)
ensure_calls = [
@ -413,7 +360,7 @@ class TestPXEUtils(db_base.DbTestCase):
mock.call(os.path.join(CONF.deploy.http_root, 'pxelinux.cfg'))
]
ensure_tree_mock.assert_has_calls(ensure_calls)
build_mock.assert_called_with(self.ipxe_options_uefi,
build_mock.assert_called_with(self.ipxe_options,
ipxe_template,
'{{ ROOT }}',
'{{ DISK_IDENTIFIER }}')
@ -421,7 +368,7 @@ class TestPXEUtils(db_base.DbTestCase):
pxe_cfg_file_path = pxe_utils.get_pxe_config_file_path(self.node.uuid)
write_mock.assert_called_with(pxe_cfg_file_path,
self.ipxe_options_uefi)
self.ipxe_options)
@mock.patch('ironic.common.utils.rmtree_without_raise', autospec=True)
@mock.patch('ironic_lib.utils.unlink_without_raise', autospec=True)

View File

@ -1,14 +0,0 @@
default deploy
label deploy
kernel /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk text test_param ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=agent_ipmitool root_device=vendor=fake,size=123 coreos.configdrive=0
label boot_partition
kernel /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk root={{ ROOT }} ro text test_param
label boot_whole_disk
COM32 chain.c32
append mbr:{{ DISK_IDENTIFIER }}

View File

@ -3,7 +3,7 @@ default=deploy
image=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel
label=deploy
initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
append="selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 troubleshoot=0 text test_param ip=%I::%G:%M:%H::on root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_option=netboot boot_mode=uefi coreos.configdrive=0"
append="selinux=0 troubleshoot=0 text test_param ip=%I::%G:%M:%H::on ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh coreos.configdrive=0"
image=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel

View File

@ -6,7 +6,7 @@ goto deploy
:deploy
imgfree
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 troubleshoot=0 text test_param boot_option=netboot ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_mode=bios initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
initrd http://1.2.3.4:1234/deploy_ramdisk || goto deploy
boot

View File

@ -6,7 +6,7 @@ goto deploy
:deploy
imgfree
kernel --timeout 120 http://1.2.3.4:1234/deploy_kernel selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 troubleshoot=0 text test_param boot_option=netboot ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_mode=bios initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
kernel --timeout 120 http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
initrd --timeout 120 http://1.2.3.4:1234/deploy_ramdisk || goto deploy
boot

View File

@ -1,21 +0,0 @@
#!ipxe
dhcp
goto deploy
:deploy
imgfree
kernel http://1.2.3.4:1234/deploy_kernel selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 troubleshoot=0 text test_param boot_option=netboot ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_mode=uefi initrd=deploy_ramdisk coreos.configdrive=0 || goto deploy
initrd http://1.2.3.4:1234/deploy_ramdisk || goto deploy
boot
:boot_partition
imgfree
kernel http://1.2.3.4:1234/kernel root={{ ROOT }} ro text test_param initrd=ramdisk || goto boot_partition
initrd http://1.2.3.4:1234/ramdisk || goto boot_partition
boot
:boot_whole_disk
sanboot --no-describe

View File

@ -2180,14 +2180,6 @@ class AgentMethodsTestCase(db_base.DbTestCase):
self.assertEqual('fake_agent', options['ipa-driver-name'])
self.assertEqual(0, options['coreos.configdrive'])
def test_build_agent_options_root_device_hints(self):
self.config(api_url='api-url', group='conductor')
self.node.properties['root_device'] = {'model': 'fake_model'}
options = utils.build_agent_options(self.node)
self.assertEqual('api-url', options['ipa-api-url'])
self.assertEqual('fake_agent', options['ipa-driver-name'])
self.assertEqual('model=fake_model', options['root_device'])
@mock.patch.object(disk_utils, 'is_block_device', autospec=True)
@mock.patch.object(utils, 'login_iscsi', lambda *_: None)

View File

@ -2,7 +2,7 @@ default deploy
label deploy
kernel /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk selinux=0 disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 troubleshoot=0 text test_param boot_option=netboot root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_mode=bios coreos.configdrive=0
append initrd=/tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk selinux=0 troubleshoot=0 text test_param ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh coreos.configdrive=0
ipappend 3

View File

@ -3,7 +3,7 @@ set timeout=5
set hidden_timeout_quiet=false
menuentry "deploy" {
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text disk=cciss/c0d0,sda,hda,vda iscsi_target_iqn=iqn-1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_id=1be26c0b-03f2-4d2e-ae87-c02d7f33c123 deployment_key=0123456789ABCDEFGHIJKLMNOPQRSTUV ironic_api_url=http://192.168.122.184:6385 test_param boot_server=192.0.2.1 root_device=vendor=fake,size=123 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh boot_option=netboot boot_mode=uefi coreos.configdrive=0
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text test_param boot_server=192.0.2.1 ipa-api-url=http://192.168.122.184:6385 ipa-driver-name=pxe_ssh coreos.configdrive=0
initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
}

View File

@ -0,0 +1,11 @@
---
upgrade:
- Ironic no longer passes ``root_device`` as kernel parameter via boot
config files.
Passing root device hints to Ironic Python Agent (IPA) as kernel
parameters was deprecated in Newton release.
As a consequence, using root device hints with Ironic as of Ocata release
will not be possible when deploying nodes with the help of ramdisks based
on IPA as of Mitaka release.
Operators relying on root device hints functionality are advised
to update their IPA-based Ironic deploy images.