diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-07-15 07:30:04 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-07-15 07:30:04 +0000 |
commit | 7c216d035057b6a72e9c187f0898eb13e43719de (patch) | |
tree | 2897159285128ef3e006b929b64f9a6c3a689c9f | |
parent | 91cd789a3b7c4cfe8ec9055decf70ed30314edfa (diff) | |
parent | c55b15cc0ab2ab7cbdcec25fa4d7e446912341c7 (diff) | |
download | ironic-7c216d035057b6a72e9c187f0898eb13e43719de.tar.gz |
Merge "Fix chainloading iPXE (undionly.kpxe)" into stable/kilo
-rw-r--r-- | doc/source/deploy/install-guide.rst | 32 | ||||
-rw-r--r-- | ironic/common/pxe_utils.py | 8 | ||||
-rw-r--r-- | ironic/tests/test_pxe_utils.py | 2 |
3 files changed, 37 insertions, 5 deletions
diff --git a/doc/source/deploy/install-guide.rst b/doc/source/deploy/install-guide.rst index 9043ad69b..5da8880ba 100644 --- a/doc/source/deploy/install-guide.rst +++ b/doc/source/deploy/install-guide.rst @@ -802,6 +802,38 @@ on the Bare Metal Service node(s) where ``ironic-conductor`` is running. service ironic-conductor restart + +Neutron configuration +--------------------- + +DHCP requests from iPXE need to have a DHCP tag called ``ipxe``, in order +for the DHCP server to tell the client to get the boot.ipxe script via +HTTP. Otherwise, if the tag isn't there, the DHCP server will tell the +DHCP client to chainload the iPXE image (undionly.kpxe). Neutron needs to +be configured to create this DHCP tag, since it isn't create by default. + +#. Create a custom ``dnsmasq.conf`` file with a setting for the ipxe tag. For + example, create the file ``/etc/dnsmasq-ironic.conf`` with the content:: + + # Create the "ipxe" tag if request comes from iPXE user class + dhcp-userclass=set:ipxe,iPXE + + # Alternatively, create the "ipxe" tag if request comes from DHCP option 175 + # dhcp-match=set:ipxe,175 + +#. In the Neutron DHCP Agent configuration file (typically located at + /etc/neutron/dhcp_agent.ini), set the custom ``/etc/dnsmasq-ironic.conf`` + file as the dnsmasq configuration file:: + + [DEFAULT] + dnsmasq_config_file = /etc/dnsmasq-ironic.conf + + +#. Restart the ``neutron-dhcp-agent`` process:: + + service neutron-dhcp-agent restart + + IPMI support ------------ diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py index 09528a218..fdd2c0d0f 100644 --- a/ironic/common/pxe_utils.py +++ b/ironic/common/pxe_utils.py @@ -260,15 +260,15 @@ def dhcp_options_for_instance(task): # to neutron "dhcp-match=set:ipxe,175" and use below option dhcp_opts.append({'opt_name': 'tag:!ipxe,bootfile-name', 'opt_value': CONF.pxe.pxe_bootfile_name}) + dhcp_opts.append({'opt_name': 'tag:ipxe,bootfile-name', + 'opt_value': ipxe_script_url}) else: # !175 == non-iPXE. # http://ipxe.org/howto/dhcpd#ipxe-specific_options dhcp_opts.append({'opt_name': '!175,bootfile-name', 'opt_value': CONF.pxe.pxe_bootfile_name}) - # If the request comes from iPXE, direct it to boot from the - # iPXE script - dhcp_opts.append({'opt_name': 'bootfile-name', - 'opt_value': ipxe_script_url}) + dhcp_opts.append({'opt_name': 'bootfile-name', + 'opt_value': ipxe_script_url}) else: if deploy_utils.get_boot_mode_for_deploy(task.node) == 'uefi': boot_file = CONF.pxe.uefi_pxe_bootfile_name diff --git a/ironic/tests/test_pxe_utils.py b/ironic/tests/test_pxe_utils.py index 1792d840a..cca824a33 100644 --- a/ironic/tests/test_pxe_utils.py +++ b/ironic/tests/test_pxe_utils.py @@ -357,7 +357,7 @@ class TestPXEUtils(db_base.DbTestCase): 'opt_value': '192.0.2.1'}, {'opt_name': 'tftp-server', 'opt_value': '192.0.2.1'}, - {'opt_name': 'bootfile-name', + {'opt_name': 'tag:ipxe,bootfile-name', 'opt_value': expected_boot_script_url}] with task_manager.acquire(self.context, self.node.uuid) as task: self.assertEqual(sorted(expected_info), |