Skip to content

Failed DHCP relay test #985

Closed
Closed
@tieguoevan

Description

@tieguoevan

Description

Steps to reproduce the issue:
Run DHCP relay test and it fails

Describe the results you received:
Test failure

and get errors in /var/log/syslog:

Sep 25 12:34:42.248407 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay Traceback (most recent call last):
Sep 25 12:34:42.248619 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "/usr/local/bin/sonic-cfggen", line 215, in <module>
Sep 25 12:34:42.248728 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay     main()
Sep 25 12:34:42.248821 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "/usr/local/bin/sonic-cfggen", line 200, in main
Sep 25 12:34:42.248912 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay     print template.render(data)
Sep 25 12:34:42.249054 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
Sep 25 12:34:42.249155 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay     return self.environment.handle_exception(exc_info, True)
Sep 25 12:34:42.249248 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
Sep 25 12:34:42.249341 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay     reraise(exc_type, exc_value, tb)
Sep 25 12:34:42.249468 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "<template>", line 1, in top-level template code
Sep 25 12:34:42.249577 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay   File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 411, in getitem
Sep 25 12:34:42.249673 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay     return obj[argument]
Sep 25 12:34:42.249769 str-s8900-54xc-01 INFO supervisord: isc-dhcp-relay jinja2.exceptions.UndefinedError: 'minigraph_ports' is undefined

Describe the results you expected:
Test pass

Additional information you deem important (e.g. issue happens only occasionally):
It looks like the line 178 is outdated, since configDB has been introduced.
https://github.com/Azure/sonic-buildimage/blob/f570616b0dca24d0c38550e5c946e7e9bf00b342/src/isc-dhcp/isc-dhcp-4.3.1_dhcrelay-custom-circuit_id-remote_id-and-bridge-iface-support.patch#L178
Maybe it should be

+						sprintf(cmdstr, "sonic-cfggen -d -v \"PORT['%s'].alias\"", ip->name);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions