← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1896850] [NEW] dhcp release fails when client_id is specified

 

Public bug reported:

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

** Affects: neutron
     Importance: Undecided
     Assignee: Steve Baker (steve-stevebaker)
         Status: In Progress

-- 
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:
  In Progress

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


Follow ups