Merge "Ignore connection errors when getting ironic ports"

This commit is contained in:
Zuul 2022-09-20 02:32:00 +00:00 committed by Gerrit Code Review
commit a2204eaea4
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import fcntl
import os
import time
from keystoneauth1 import exceptions as ksa_exc
from openstack import exceptions as os_exc
from oslo_concurrency import processutils
from oslo_config import cfg
@ -90,7 +91,7 @@ class DnsmasqFilter(pxe_filter.BaseFilter):
# ironic_macs are all the MACs know to ironic (all ironic ports)
ironic_macs = pxe_filter.get_ironic_macs(ironic)
except os_exc.SDKException:
except (os_exc.SDKException, ksa_exc.ConnectFailure):
LOG.exception(
"Could not list ironic ports, can not sync dnsmasq PXE filter")
return

View File

@ -13,6 +13,7 @@
import contextlib
from keystoneauth1 import exceptions as ksa_exc
from openstack import exceptions as os_exc
from oslo_concurrency import processutils
from oslo_config import cfg
@ -118,7 +119,7 @@ class IptablesFilter(pxe_filter.BaseFilter):
else:
to_deny = pxe_filter.get_inactive_macs(ironic)
to_allow = None
except os_exc.SDKException:
except (os_exc.SDKException, ksa_exc.ConnectFailure):
LOG.exception(
"Could not list ironic ports, iptables PXE filter can not "
"be synced")