Project

General

Profile

« Previous | Next » 

Revision 3d35120d

Added by Marek Hulán over 7 years ago

Fixes #16782 - reset dhcp record cache after mac change

(cherry picked from commit 969832057c5ea6a1f84eaf5c53f5cdc7ee445af2)

View differences:

app/models/concerns/orchestration/compute.rb
mac = selected_nic.send(fog_attr)
logger.debug "Orchestration::Compute: nic #{nic.inspect} assigned to #{selected_nic.inspect}"
nic.mac = mac
nic.reset_dhcp_record_cache if nic.respond_to?(:reset_dhcp_record_cache) # delete the cached dhcp_record with old MAC on managed nics
fog_nics.delete(selected_nic) # don't use the same fog nic twice
# In future, we probably want to skip validation of macs/ips on the Nic

Also available in: Unified diff