openbmc / openbmc-test-automation

Apache License 2.0
106 stars 92 forks source link

[Redfish/event/SNMP] test "Configure Multiple SNMP Managers On BMC And Check Trap On BMC Reboot" failed #2243

Open Julia-Delta opened 5 months ago

Julia-Delta commented 5 months ago

Test environment as following, BMC IP: 100.100.100.142 SNMP_MGR1_IP:100.100.100.142 SNMP_MGR2_IP:100.100.100.151 SNMP_MGR3_IP:100.100.100.144 SNMP_TRAPD_CMD:/usr/sbin/snmptrapd -f -c /etc/snmp/snmptrapd.conf -Le

Test result is failed because that the ${snmp_trap} was a empty string as the following capture. image

But I test commands which in the robot script manually. snmptrapd can get the trap which occurred by setting error event log reuqest image

These are 2 questions,

  1. Why did the robot get nothing after the error occurred?
  2. Does SNMP_MGR1_IP and SNMP_MGR2_IP have to be vaild IP binding on eth0? SNMP_MGR1_IP need to build a ssh connection and SNMP_MGR2_IP is snmp trap server, I thought that these manager IP have to vaild and binding on eth0, so I need to set two IP on eth0 before testing?

Attached file is testing resuslt results.zip

gkeishin commented 5 months ago

@meghagn12345 @prkatti1 Please check on this

meghagn5 commented 5 months ago

@Julia-Delta We tested it on our system & this code is working fine.

For SNMP_MGR1_IP & SNMP_MGR2_IP please pass the IP of the system from where your are tracking/checking the snmp trap

snmp

Julia-Delta commented 5 months ago

@meghagn5 Thanks for your reply. What is your testing environment? My test environment is the following: Python 3.10.12 Robot Framework 6.1.1 (Python 3.10.12 on linux) redfish 3.2.2 redfish_utilities 3.2.7 redfishtool 1.1.8

meghagn5 commented 5 months ago

@Julia-Delta

Python - 3.11 Robot Framework - 6.11

Julia-Delta commented 5 months ago

Hi @meghagn5, I changed the environment to python 3.11, but test still failed. I could enable snmptrapd, but recevied nothing after sending the error log event request. May I ask the snmptrapd complete command? the trap message will send to the standard error stream, the standard output stream or others?