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

Fix dhcp_relay configuration in vrf TC's #6158

Conversation

AndriiLozovyi
Copy link
Contributor

Signed-off-by: Andrii-Yosafat Lozovyi andrii-yosafatx.lozovyi@intel.com

Description of PR

Summary: Vrf test case generate and applies vrf/vrf_config_db.j2, after reboot with this generated config_db.json dhcp_relay container is down and cant get up. This leads to fail of vrf TC's on loganalyzer due to below error. It looks like config_db missed to add dhcp_server under VLAN field. With this PR dhcp_relay is getting up as expected.
Fixes # (issue)

LogAnalyzerError: expected_match: 0
               expected_missing_match: 0
               match: 2
               
               Match Messages:
               Aug  7 15:21:16.816208 ERR monit[558]: 'container_checker' status failed (3) -- Expected containers not running: dhcp_relay
               
               Aug  7 15:22:16.841585 ERR monit[558]: 'container_checker' status failed (3) -- Expected containers not running: dhcp_relay

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Update vrf_config_db.j2 so that dhcp_relay could start up after config is applied.

How did you do it?

How did you verify/test it?

Run vrf/test_vrf.py, after config was applied dhcp_relay was able to start and was up.

CONTAINER ID   IMAGE                                COMMAND                  CREATED        STATUS          PORTS     NAMES
3da2544f227a   cfc3a0dd23ec                         "/usr/bin/docker_ini…"   17 hours ago   Up 3 minutes              dhcp_relay
aee89bb9b05a   docker-snmp:latest                   "/usr/local/bin/supe…"   18 hours ago   Up 34 seconds             snmp
7be979167ced   docker-sonic-telemetry:latest        "/usr/local/bin/supe…"   18 hours ago   Up 34 seconds             telemetry
b0c586a21135   docker-sonic-mgmt-framework:latest   "/usr/local/bin/supe…"   18 hours ago   Up 34 seconds             mgmt-framework
64736ff88e17   docker-lldp:latest                   "/usr/bin/docker-lld…"   18 hours ago   Up 3 minutes              lldp
9dcc1107c08b   docker-platform-monitor:latest       "/usr/bin/docker_ini…"   18 hours ago   Up 2 minutes              pmon
a900fa87a675   docker-router-advertiser:latest      "/usr/bin/docker-ini…"   18 hours ago   Up 3 minutes              radv
adc43094dbaa   docker-syncd-bfn:latest              "/usr/local/bin/supe…"   18 hours ago   Up 3 minutes              syncd
42f9e6d70253   docker-teamd:latest                  "/usr/local/bin/supe…"   18 hours ago   Up 3 minutes              teamd
d6205613327a   docker-orchagent:latest              "/usr/bin/docker-ini…"   18 hours ago   Up 3 minutes              swss
cffaa769be10   docker-fpm-frr:latest                "/usr/bin/docker_ini…"   18 hours ago   Up 3 minutes              bgp
a88d5b1e51d1   docker-database:latest               "/usr/local/bin/dock…"   18 hours ago   Up 3 minutes              database

Any platform specific information?

SONiC Software Version: SONiC.master.127871-dirty-20220728.095752
Distribution: Debian 11.4
Kernel: 5.10.0-12-2-amd64
Build commit: 746e05210
Build date: Thu Jul 28 14:13:30 UTC 2022
Built by: AzDevOps@sonic-build-workers-001UGB
Platform: x86_64-arista_7170_64c
HwSKU: Arista-7170-64C
ASIC: barefoot

Supported testbed topology if it's a new test case?

Documentation

Signed-off-by: Andrii-Yosafat Lozovyi <andrii-yosafatx.lozovyi@intel.com>
@AndriiLozovyi
Copy link
Contributor Author

@wangxin @yxieca could you please take a look?

@yxieca yxieca requested a review from kellyyeh August 24, 2022 17:18
@yxieca
Copy link
Collaborator

yxieca commented Aug 24, 2022

@kellyyeh I thought we are no longer using the vlan table for dhcp configurations?

@kellyyeh
Copy link
Contributor

On master image, dhcpv6 relay is reading from DHCP_RELAY table. 202012 had discrepancy and will be fixed after this PR sonic-net/sonic-buildimage#11794

Dhcpv6 ip helper should be read from DHCP_RELAY table only

@kellyyeh kellyyeh closed this Sep 1, 2022
@AndriiLozovyi
Copy link
Contributor Author

@yxieca
dhcpv6 is reading from DHCP_RELAY table, but is it expected that we should still use VLAN table to configure dhcp_servers ?
When on t0 topology dhcp_servers are deleted under VLAN table, dhcp_relay container wont start

   "VLAN": {
        "Vlan1000": {
            "vlanid": "1000"
        }
    },

$ docker ps -a
CONTAINER ID   IMAGE                                COMMAND                  CREATED       STATUS                      PORTS     NAMES
1a5ef845c0dc   36b65a6b8d5f                         "/usr/bin/docker_ini…"   2 hours ago   Exited (2) 10 minutes ago             dhcp_relay

 redis-cli -n 4 hgetall 'DHCP_RELAY|Vlan1000'
1) "dhcpv6_servers@"
2) "fc02:2000::1,fc02:2000::2,fc02:2000::3,fc02:2000::4"

Default config_db.json file after deploy of t0 topo:

 "VLAN": {
       "Vlan1000": {
           "dhcp_servers": [
               "192.0.0.1",
               "192.0.0.2",
               "192.0.0.3",
               "192.0.0.4"
           ],
           "dhcpv6_servers": [
               "fc02:2000::1",
               "fc02:2000::2",
               "fc02:2000::3",
               "fc02:2000::4"
           ],
           "vlanid": "1000"
       }

@kellyyeh
Copy link
Contributor

kellyyeh commented Sep 9, 2022

@AndriiLozovyi sonic-net/sonic-buildimage#11794 This PR fixes dhcp relay docker to read from DHCP_RELAY table instead of VLAN table

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 this pull request may close these issues.

3 participants