sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
200 stars 732 forks source link

SNMP test result is fail, because sonic-mgmt tell this reason "ERROR! 'snmp_ports' is undefined" #689

Open dnisqa opened 6 years ago

dnisqa commented 6 years ago

Description

  1. SNMP test result is fail, because sonic-mgmt tell this reason "ERROR! 'snmp_ports' is undefined"
  2. DUT is Delta-AG9032v1
  3. sonic-mgmt build number is 368 from "https://sonic-jenkins.westus2.cloudapp.azure.com/job/bldenv/job/docker-sonic-mgmt/"

Steps to reproduce the issue:

  1. "./testbed-cli.sh gen-mg vmst0-1 lab password.txt" produce t0 topology minigraph file.
  2. To deploy t0 minigraph file to DUT.
  3. To verify T0 - 4VMs has been started and working.
  4. ansible-playbook -vvv -i lab -l sonic-ag9032 test_sonic.yml -e "testcase_name=snmp testbed_type=t0 testbed_name=vmst0-1"

Describe the results you received: TASK [test : Verify lldpLocPortTable is present] *** task path: /var/johnar/sonic-mgmt/ansible/roles/test/tasks/snmp/lldp.yml:41 Wednesday 29 August 2018 07:22:19 +0000 (0:00:13.877) 0:09:28.842 ** fatal: [sonic-ag9032]: FAILED! => {"failed": true, "msg": "ERROR! 'snmp_ports' is undefined"}

Describe the results you expected:

  1. The snmp test item is pass on old sonic-mgmt(old sonic-mgmt doesn't has snmp/lldp.yml file).
  2. lldp table and lldp neighbors status of DUT are normally.

Additional information you deem important:

show lldp table Capability codes: (R) Router, (B) Bridge, (O) Other LocalPort RemoteDevice RemotePortID Capability RemotePortDescr


Ethernet112 ARISTA01T1 Ethernet1 BR Ethernet116 ARISTA02T1 Ethernet1 BR Ethernet120 ARISTA03T1 Ethernet1 BR Ethernet124 ARISTA04T1 Ethernet1 BR

Total entries displayed: 4

show lldp neighbors

LLDP neighbors:

Interface: Ethernet112, via: LLDP, RID: 4, Time: 0 day, 00:38:32 Chassis:
ChassisID: mac 52:54:00:a9:d4:74 SysName: ARISTA01T1 SysDescr: Arista Networks EOS version 4.20.1F running on an Arista Networks vEOS TTL: 120 MgmtIP: 192.168.59.130 Capability: Bridge, on Capability: Router, on Port:
PortID: ifname Ethernet1 MFS: 9236 Port is aggregated. PortAggregID: 1000001

Interface: Ethernet120, via: LLDP, RID: 1, Time: 0 day, 00:39:02 Chassis:
ChassisID: mac 52:54:00:34:82:1c SysName: ARISTA03T1 SysDescr: Arista Networks EOS version 4.20.1F running on an Arista Networks vEOS TTL: 120 MgmtIP: 192.168.59.132 Capability: Bridge, on Capability: Router, on Port:
PortID: ifname Ethernet1 MFS: 9236 Port is aggregated. PortAggregID: 1000001

Interface: Ethernet124, via: LLDP, RID: 3, Time: 0 day, 00:39:01 Chassis:
ChassisID: mac 52:54:00:63:46:86 SysName: ARISTA04T1 SysDescr: Arista Networks EOS version 4.20.1F running on an Arista Networks vEOS TTL: 120 MgmtIP: 192.168.59.133 Capability: Bridge, on Capability: Router, on Port:
PortID: ifname Ethernet1 MFS: 9236 Port is aggregated. PortAggregID: 1000001

Interface: Ethernet116, via: LLDP, RID: 2, Time: 0 day, 00:39:01 Chassis:
ChassisID: mac 52:54:00:97:57:fa SysName: ARISTA02T1 SysDescr: Arista Networks EOS version 4.20.1F running on an Arista Networks vEOS TTL: 120 MgmtIP: 192.168.59.131 Capability: Bridge, on Capability: Router, on Port:
PortID: ifname Ethernet1 MFS: 9236 Port is aggregated. PortAggregID: 1000001

show version SONiC Software Version: SONiC.HEAD.695-3f37b96 Distribution: Debian 9.5 Kernel: 4.9.0-7-amd64 Build commit: 3f37b96 Build date: Tue Aug 28 09:14:18 UTC 2018 Built by: johnar@jenkins-worker-4

Docker images: REPOSITORY TAG IMAGE ID SIZE docker-syncd-brcm HEAD.695-3f37b96 1c18b24a6e48 336.6 MB docker-syncd-brcm latest 1c18b24a6e48 336.6 MB docker-orchagent-brcm HEAD.695-3f37b96 3262f7092eec 257.6 MB docker-orchagent-brcm latest 3262f7092eec 257.6 MB docker-lldp-sv2 HEAD.695-3f37b96 f3dea700618d 270.8 MB docker-lldp-sv2 latest f3dea700618d 270.8 MB docker-dhcp-relay HEAD.695-3f37b96 67838b22d789 253.7 MB docker-dhcp-relay latest 67838b22d789 253.7 MB docker-database HEAD.695-3f37b96 e461fcff0a1c 252.3 MB docker-database latest e461fcff0a1c 252.3 MB docker-teamd HEAD.695-3f37b96 d6f6c30d46fc 257.3 MB docker-teamd latest d6f6c30d46fc 257.3 MB docker-snmp-sv2 HEAD.695-3f37b96 ad8ecf48b7b6 291.2 MB docker-snmp-sv2 latest ad8ecf48b7b6 291.2 MB docker-router-advertiser HEAD.695-3f37b96 c77a344ea4a2 250 MB docker-router-advertiser latest c77a344ea4a2 250 MB docker-platform-monitor HEAD.695-3f37b96 728fd2f62e10 283.3 MB docker-platform-monitor latest 728fd2f62e10 283.3 MB docker-fpm-quagga HEAD.695-3f37b96 4fdc45046970 264.1 MB docker-fpm-quagga latest 4fdc45046970 264.1 MB

show platform summary Platform: x86_64-delta_ag9032v1-r0 HwSKU: Delta-ag9032v1 ASIC: broadcom

li7hui commented 6 years ago

1."./testbed-cli.sh gen-mg vmst0-1 lab password.txt" produce t0 topology minigraph file. 2.To deploy t0 minigraph file to DUT.

@dnisqa, i have two questiones. in step1, where do you get the t0 generated minigraph file? in step2, how do you deploy t0 minigraph file to DUT?

dnisqa commented 6 years ago

Hi Hui:

step1: "./testbed-cli.sh gen-mg vmst0-1 lab password.txt" <= this command will general my sonic switch minigraph file in our sonic-mgmt docker we have setting our sonic switch " manager IP, switch name, switch hwsku, switch speed, and docker-ptf IP in "lab" file of sonic-mgmt. we have setting our topology information (ex:

conf-name,group-name,topo,ptf_image_name,ptf_ip,server,vm_base,dut,comment

   ptf-p1,ptf-p1,ptf32,docker-ptf,192.168.59.181/24,server_1,,sonic-ag9032,SQA Test ptf for sonic-ag9032
   vmst0-1,vmst0-1,t0,docker-ptf,192.168.59.181/24,server_1,VM0100,sonic-ag9032,SQA Test T0 for sonic-ag9032
  ) in testbed.csv of sonic-mgmt

step2: "To deploy minigraph file to DUT" command ./testbed-cli.sh deploy-mg vmst0-1 lab password.txt

Attached file is our minigraph file

li7hui commented 6 years ago

Hi Cheng, I can now generate the minigraph file with this commond:./testbed-cli.sh gen-mg vms-sn2700-t0 lab password.txt However, I got problem when deploy the minigraph file. it has following errors. The very first it has following error: error21 The second time, and the times since the second time, it shows the following errors: where the "config load_minigraph -y" command hangs there. error22

Could you show me your 'lab' file of sonic-mgmt please?