diff --git a/neutron/api/rpc/handlers/dhcp_rpc.py b/neutron/api/rpc/handlers/dhcp_rpc.py index d7388e9e0d8..c7f84b1214e 100644 --- a/neutron/api/rpc/handlers/dhcp_rpc.py +++ b/neutron/api/rpc/handlers/dhcp_rpc.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import copy import itertools import operator @@ -195,7 +196,9 @@ class DhcpRpcCallback(object): """ host = kwargs.get('host') - port = kwargs.get('port') + # Note(pbondar): Create deep copy of port to prevent operating + # on changed dict if RetryRequest is raised + port = copy.deepcopy(kwargs.get('port')) LOG.debug('Create dhcp port %(port)s ' 'from %(host)s.', {'port': port,