Skip to content

Commit

Permalink
Merge "Ignore connection errors when getting ironic ports"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Sep 20, 2022
2 parents 493cee3 + d14cd50 commit a2204ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ironic_inspector/pxe_filter/dnsmasq.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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
Expand Down Expand Up @@ -90,7 +91,7 @@ def _sync(self, ironic):

# 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
Expand Down
3 changes: 2 additions & 1 deletion ironic_inspector/pxe_filter/iptables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -118,7 +119,7 @@ def sync(self, ironic):
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")
Expand Down

0 comments on commit a2204ea

Please sign in to comment.