From 2864957ca53a346418f89cc945bba5cdcf204799 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Thu, 24 Sep 2020 11:58:05 +1200 Subject: [PATCH] Fix dhcp_release when client_id is specified Appending a string to a list results in each character being appended as list items, this results in an invalid release command. This change appends the client_id string to the list instead. Change-Id: I71a114308e3b68f6daf6e1a202a47b6a453bb81a Closes-Bug: #1896850 --- neutron/privileged/agent/linux/dhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/privileged/agent/linux/dhcp.py b/neutron/privileged/agent/linux/dhcp.py index a22e87535b1..9503cf7cbd1 100644 --- a/neutron/privileged/agent/linux/dhcp.py +++ b/neutron/privileged/agent/linux/dhcp.py @@ -23,7 +23,7 @@ def dhcp_release(interface_name, ip_address, mac_address, client_id, cmd += ['ip', 'netns', 'exec', namespace] cmd += ['dhcp_release', interface_name, ip_address, mac_address] if client_id: - cmd += client_id + cmd.append(client_id) log_errors = processutils.LOG_FINAL_ERROR return processutils.execute(*cmd, log_errors=log_errors)