Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed DHCP relay test #985

Closed
tieguoevan opened this issue Sep 25, 2017 · 1 comment · Fixed by #999
Closed

Failed DHCP relay test #985

tieguoevan opened this issue Sep 25, 2017 · 1 comment · Fixed by #999

Comments

@tieguoevan
Copy link

tieguoevan commented Sep 25, 2017

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);
@jleveque
Copy link
Contributor

You are correct. This line was overlooked in the transition to ConfigDB. However, I am currently working on modifications to the DHCP relay agent, and in these changes, I have created a better solution here that doesn't involve a direct call to sonic-cfggen. I expect the changes to be committed sometime this week.

zhenggen-xu added a commit to zhenggen-xu/sonic-buildimage that referenced this issue Aug 2, 2019
* src/sonic-swss 63afbd5...5be3963 (11):
  > Remove the platform check for remove/add port action at init phase. (sonic-net#1006)
  > [test]: Add Class object in each test script file (sonic-net#992)
  > [vstest]: add --imgname option to specify vs image to test (sonic-net#996)
  > [qosorch]: Add cir and pir parameters for scheduler (sonic-net#991)
  > [vstest]: report error when team kernel module is not available (sonic-net#994)
  > Support per buffer pool watermark polling mode (sonic-net#973)
  > [test]: Update test_vlan to use dvs functions (sonic-net#986)
  > Add synchronous switch to orch agent (sonic-net#987)
  > ARM32 bit fixes, for 64bit printf format specifier (sonic-net#989)
  > [portsorch]: Rename function isPortReady() to allPortsReady() (sonic-net#990)
  > [routeorch]: Fix observer detaching procedure for next hop observers (sonic-net#985)

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
lguohan pushed a commit that referenced this issue Aug 7, 2019
… platform (#3240)

* Utilize the same sai.profile and config.bcm file

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Fix the index issues for HWSKU: Seastone-DX010-25-50 and Seastone-DX010-50-40

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Update sonic-swss submodule

* src/sonic-swss 63afbd5...5be3963 (11):
  > Remove the platform check for remove/add port action at init phase. (#1006)
  > [test]: Add Class object in each test script file (#992)
  > [vstest]: add --imgname option to specify vs image to test (#996)
  > [qosorch]: Add cir and pir parameters for scheduler (#991)
  > [vstest]: report error when team kernel module is not available (#994)
  > Support per buffer pool watermark polling mode (#973)
  > [test]: Update test_vlan to use dvs functions (#986)
  > Add synchronous switch to orch agent (#987)
  > ARM32 bit fixes, for 64bit printf format specifier (#989)
  > [portsorch]: Rename function isPortReady() to allPortsReady() (#990)
  > [routeorch]: Fix observer detaching procedure for next hop observers (#985)

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this issue Mar 23, 2020
…onic-net#985)

- erase the correct observer in the observer list
- remove the NextHopObserverEntry once no observer is observing the entry
- refine some logs and comments

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
Pterosaur added a commit that referenced this issue Feb 23, 2022
Signed-off-by: Ze Gan <ganze718@gmail.com>

b9337dc (HEAD, origin/master, origin/HEAD) [vslib]: Fix MACsec bug in SCI and XPN (#1003)
edbceb9 [syncd][vslib] Keep new warm boot discovered SERDES objects (#985)
af5c156 Fix build issues on gcc-10 (#999)
1445cd5 update SAI submoule (#1001)
48fe704 [ci] pipeline fixes for VS test (#1002)
f484cf9 Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#975)
5d0b22d Enable SAI_SWITCH_ATTR_UNINIT_DATA_PLANE_ON_REMOVAL attribute (#975)
1b8ce97 (origin/202111) [pipeline] Download swss common artifact in a separated directory (#995)
7a2e096 Change sonic-buildimage.vs artifact source from CI build to official build. (#992)
AidanCopeland pushed a commit to Metaswitch/sonic-buildimage that referenced this issue Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants