yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #84077
[Bug 1896850] Re: dhcp release fails when client_id is specified
Reviewed: https://review.opendev.org/753865
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2864957ca53a346418f89cc945bba5cdcf204799
Submitter: Zuul
Branch: master
commit 2864957ca53a346418f89cc945bba5cdcf204799
Author: Steve Baker <sbaker@xxxxxxxxxx>
Date: Thu Sep 24 11:58:05 2020 +1200
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
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1896850
Title:
dhcp release fails when client_id is specified
Status in neutron:
Fix Released
Bug description:
Since dhcp_release was migrated to oslo.privsep[1], specifying a
client_id results in the command failing because the client_id string
is appended to a list, exploding each character into a list item[2].
Here is the error in a CI log[3]:
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-agent[11285]: Stderr: 'usage: dhcp_release <interface> <addr> <mac> [<client_id>]\n' {{(pid=25342) _process_cmd /usr/local/lib/python3.6/dist-packages/oslo_privsep/daemon.py:490}}
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Traceback (most recent call last):
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: File "/usr/local/lib/python3.6/dist-
packages/oslo_privsep/daemon.py", line 485, in _process_cmd
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: ret = func(*f_args, **f_kwargs)
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: File "/usr/local/lib/python3.6/dist-
packages/oslo_privsep/priv_context.py", line 249, in _wrap
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: return func(*args, **kwargs)
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: File
"/opt/stack/neutron/neutron/privileged/agent/linux/dhcp.py", line 28,
in dhcp_release
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: return processutils.execute(*cmd,
log_errors=log_errors)
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: File "/usr/local/lib/python3.6/dist-
packages/oslo_concurrency/processutils.py", line 434, in execute
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: cmd=sanitized_cmd)
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: oslo_concurrency.processutils.ProcessExecutionError:
Unexpected error while running command.
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Command: ip netns exec qdhcp-5885eb4e-3b5c-
48e6-ae40-8a1eeb6629a1 dhcp_release tapa3753962-c7 10.1.0.27
52:54:00:f5:77:63 0 1 : 5 2 : 5 4 : 0 0 : f 5 : 7 7 : 6 3
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Exit code: 1
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Stdout: ''
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Stderr: 'usage: dhcp_release <interface> <addr> <mac>
[<client_id>]\n'
Sep 23 16:15:03.221252 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: DEBUG oslo.privsep.daemon [-] privsep:
reply[140015332807184]: (5,
'oslo_concurrency.processutils.ProcessExecutionError', ('', 'usage:
dhcp_release <interface> <addr> <mac> [<client_id>]\n', 1, 'ip netns
exec qdhcp-5885eb4e-3b5c-48e6-ae40-8a1eeb6629a1 dhcp_release
tapa3753962-c7 10.1.0.27 52:54:00:f5:77:63 0 1 : 5 2 : 5 4 : 0 0 : f 5
: 7 7 : 6 3', None)) {{(pid=25342) _call_back /usr/local/lib/python3.6
/dist-packages/oslo_privsep/daemon.py:511}}
Sep 23 16:15:03.227555 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: WARNING neutron.agent.linux.dhcp [-] DHCP release failed
for params {'interface_name': 'tapa3753962-c7', 'ip_address':
'10.1.0.27', 'mac_address': '52:54:00:f5:77:63', 'client_id':
'01:52:54:00:f5:77:63', 'namespace': 'qdhcp-5885eb4e-3b5c-
48e6-ae40-8a1eeb6629a1'}. Reason: Unexpected error while running
command.
Sep 23 16:15:03.227555 ubuntu-bionic-rax-ord-0019993612 neutron-dhcp-
agent[11285]: Command: ip netns exec qdhcp-5885eb4e-3b5c-
48e6-ae40-8a1eeb6629a1 dhcp_release tapa3753962-c7 10.1.0.27
52:54:00:f5:77:63 0 1 : 5 2 : 5 4 : 0 0 : f 5 : 7 7 : 6 3
[1] https://review.opendev.org/#/c/733864
[2] https://opendev.org/openstack/neutron/src/branch/master/neutron/privileged/agent/linux/dhcp.py#L26
[3] https://zuul.opendev.org/t/openstack/build/ee0efe9616b04dc384aa3f4d0ca62168/log/controller/logs/screen-q-dhcp.txt#4142
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1896850/+subscriptions
References