summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ironic/common/pxe_utils.py15
-rw-r--r--ironic/dhcp/base.py2
-rw-r--r--releasenotes/notes/fixes-noop-network-with-grub-8fd99a73b593ddba.yaml6
3 files changed, 19 insertions, 4 deletions
diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py
index 53dfbc8ad..ddbfdc004 100644
--- a/ironic/common/pxe_utils.py
+++ b/ironic/common/pxe_utils.py
@@ -137,9 +137,18 @@ def _link_ip_address_pxe_configs(task, ipxe_enabled=False):
api = dhcp_factory.DHCPFactory().provider
ip_addrs = api.get_ip_addresses(task)
if not ip_addrs:
- raise exception.FailedToGetIPAddressOnPort(_(
- "Failed to get IP address for any port on node %s.") %
- task.node.uuid)
+
+ if ip_addrs == []:
+ LOG.warning("No IP addresses assigned for node %(node)s.",
+ {'node': task.node.uuid})
+ else:
+ LOG.warning(
+ "DHCP address management is not available for node "
+ "%(node)s. Operators without Neutron can ignore this "
+ "warning.",
+ {'node': task.node.uuid})
+ # Just in case, reset to empty list if we got nothing.
+ ip_addrs = []
for port_ip_address in ip_addrs:
ip_address_path = _get_pxe_ip_address_path(port_ip_address)
ironic_utils.unlink_without_raise(ip_address_path)
diff --git a/ironic/dhcp/base.py b/ironic/dhcp/base.py
index 88dd3e4e0..39fa34c7c 100644
--- a/ironic/dhcp/base.py
+++ b/ironic/dhcp/base.py
@@ -83,7 +83,6 @@ class BaseDHCP(object):
:raises: FailedToUpdateDHCPOptOnPort
"""
- @abc.abstractmethod
def get_ip_addresses(self, task):
"""Get IP addresses for all ports/portgroups in `task`.
@@ -91,6 +90,7 @@ class BaseDHCP(object):
:returns: List of IP addresses associated with
task's ports and portgroups.
"""
+ return []
def clean_dhcp_opts(self, task):
"""Clean up the DHCP BOOT options for all ports in `task`.
diff --git a/releasenotes/notes/fixes-noop-network-with-grub-8fd99a73b593ddba.yaml b/releasenotes/notes/fixes-noop-network-with-grub-8fd99a73b593ddba.yaml
new file mode 100644
index 000000000..1d8f0e830
--- /dev/null
+++ b/releasenotes/notes/fixes-noop-network-with-grub-8fd99a73b593ddba.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ Fixes an issue where users attempting to leverage non-iPXE UEFI booting
+ would experience failures when their ``dhcp_provider`` was set to
+ ``none``.