Merge "Enable no IP address to be returned"
This commit is contained in:
commit
61a58ec249
@ -137,9 +137,18 @@ def _link_ip_address_pxe_configs(task, ipxe_enabled=False):
|
|||||||
api = dhcp_factory.DHCPFactory().provider
|
api = dhcp_factory.DHCPFactory().provider
|
||||||
ip_addrs = api.get_ip_addresses(task)
|
ip_addrs = api.get_ip_addresses(task)
|
||||||
if not ip_addrs:
|
if not ip_addrs:
|
||||||
raise exception.FailedToGetIPAddressOnPort(_(
|
|
||||||
"Failed to get IP address for any port on node %s.") %
|
if ip_addrs == []:
|
||||||
task.node.uuid)
|
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:
|
for port_ip_address in ip_addrs:
|
||||||
ip_address_path = _get_pxe_ip_address_path(port_ip_address)
|
ip_address_path = _get_pxe_ip_address_path(port_ip_address)
|
||||||
ironic_utils.unlink_without_raise(ip_address_path)
|
ironic_utils.unlink_without_raise(ip_address_path)
|
||||||
|
@ -83,7 +83,6 @@ class BaseDHCP(object):
|
|||||||
:raises: FailedToUpdateDHCPOptOnPort
|
:raises: FailedToUpdateDHCPOptOnPort
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def get_ip_addresses(self, task):
|
def get_ip_addresses(self, task):
|
||||||
"""Get IP addresses for all ports/portgroups in `task`.
|
"""Get IP addresses for all ports/portgroups in `task`.
|
||||||
|
|
||||||
@ -91,6 +90,7 @@ class BaseDHCP(object):
|
|||||||
:returns: List of IP addresses associated with
|
:returns: List of IP addresses associated with
|
||||||
task's ports and portgroups.
|
task's ports and portgroups.
|
||||||
"""
|
"""
|
||||||
|
return []
|
||||||
|
|
||||||
def clean_dhcp_opts(self, task):
|
def clean_dhcp_opts(self, task):
|
||||||
"""Clean up the DHCP BOOT options for all ports in `task`.
|
"""Clean up the DHCP BOOT options for all ports in `task`.
|
||||||
|
@ -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``.
|
Loading…
Reference in New Issue
Block a user