openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
146 stars 129 forks source link

IPAddresses have field's value 0.0.0.0 #269

Open hieuhuynh-ampere opened 6 months ago

hieuhuynh-ampere commented 6 months ago

Is this the right place to submit this?

Bug Description

Run Redfish GET

If there is no data setting for IP addresses/gateways, the value should be null.

Actual result:

Value display 0.0.0.0 is a wrong and meaningless IP

This make test of Redfish-Usecase-Compliance NetworkManager failed https://github.com/DMTF/Redfish-Usecase-Checkers

$ python3 manager_ethernet_interface/manager_ethernet_interface_check.py -r bmc_ip:443 -u root -p 0penBmc -S Always
Found 1 manager instances
Found 3 Ethernet interface instances in manager 'bmc'
Testing interface 'eth0'
Testing interface 'eth1'
ERROR: 'IPv4Addresses' contains an empty string, 0.0.0.0, or :: rather than null in manager 'bmc' interface 'eth1'
Testing interface 'usb0'
ERROR: 'IPv4Addresses' contains an empty string, 0.0.0.0, or :: rather than null in manager 'bmc' interface 'usb0'
ERROR: 'IPv4StaticAddresses' contains an empty string, 0.0.0.0, or :: rather than null in manager 'bmc' interface 'usb0'

Version

Openbmc SHA1: 0bb38d152cd28e699f21cf6d240f1f9ba886be5e
Platform: mtmitchell-dcscm

Additional Information

bmcweb set the default Gateway to '0.0.0.0' is this value is empty https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/ethernet.hpp#L1660

gtmills commented 4 months ago

What should bmcweb do instead? Just leave the property off?

edtanous commented 4 months ago

the value should be null.

From the description.

hieuhuynh-ampere commented 4 months ago

Hi @edtanous, could I have a MR to update these fields to null?

gtmills commented 4 months ago

Hi @edtanous, could I have a MR to update these fields to null?"

Feel free to push something to https://gerrit.openbmc.org/q/project:openbmc/bmcweb+status:open

Be sure to follow our documentation https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md

edtanous commented 4 months ago

Hi @edtanous, could I have a MR to update these fields to null?

What is an MR?

hieuhuynh-ampere commented 4 months ago

Hi @edtanous,

What is an MR?

From this: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/69864

edtanous commented 4 months ago

What does "MR" mean?

hieuhuynh-ampere commented 4 months ago

I mean a Gerrit review.

edtanous commented 5 days ago

It looks like we may have been doing this correctly. I filed an issue with DMTF, and they are going to amend the wording to specifically call out the unconfigured case for ipv6 and ipv4