Skip to content

Commit 2301b9a

Browse files
committed
refactor(kea driver): replace debug print statements with LOG.debug
These prints were left over from troubleshooting the Kea cleaning path and would spam stdout in production; route them through the standard oslo logger instead.
1 parent 1343496 commit 2301b9a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • python/ironic-understack/ironic_understack/dhcp

python/ironic-understack/ironic_understack/dhcp/kea.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _update_host_reservation(self, hw_address, boot_file_prefix=None, remove=Fal
119119
if not remove:
120120
reservation["client-classes"] = ["BOOTSRV_A"]
121121
else:
122-
print(f"REMOVING RESERVATION: {reservation}")
122+
LOG.debug("Removing reservation: %s", reservation)
123123
reservations.remove(reservation)
124124
found = True
125125
break
@@ -133,7 +133,7 @@ def _update_host_reservation(self, hw_address, boot_file_prefix=None, remove=Fal
133133
)
134134
dhcp4_config["reservations"] = reservations
135135
else:
136-
print(f"NO RESERVATION FOUND IN {reservations}")
136+
LOG.debug("No reservation found in %s", reservations)
137137
return True
138138

139139
config["arguments"]["Dhcp4"] = dhcp4_config
@@ -166,7 +166,7 @@ def update_dhcp_opts(self, task, options, vifs=None):
166166

167167
def clean_dhcp_opts(self, task):
168168
"""Remove DHCP options for all ports associated with a node."""
169-
print("STARTING DHCP CLEANING")
169+
LOG.debug("Starting DHCP cleaning")
170170
success = True
171171
for port in task.ports:
172172
if not self._update_host_reservation(port.address, remove=True):

0 commit comments

Comments
 (0)