openbmc / bmcweb

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

`redfish/v1/Systems/system` contains link only to the first chassis from the chassis collection #225

Open Kostr opened 2 years ago

Kostr commented 2 years ago

redfish/v1/Systems/system contains link only to the first chassis from the chassis collection.

Example: there are 3 chassis under redfish/v1/Chassis:

{
    "@odata.id": "/redfish/v1/Chassis",
    "@odata.type": "#ChassisCollection.ChassisCollection",
    "Members": [
        {
            "@odata.id": "/redfish/v1/Chassis/AMD_EthanolX_Baseboard"
        },
        {
            "@odata.id": "/redfish/v1/Chassis/SP3_Baseboard"
        },
        {
           "@odata.id": "/redfish/v1/Chassis/AMD_EthanolX_Chassis"
        }
    ],
    "Members@odata.count": 3,
    "Name": "Chassis Collection"
}

But redfish/v1/Systems/system contains link only to the first one:

"Links": {
    "Chassis": [
        {
            "@odata.id": "/redfish/v1/Chassis/AMD_EthanolX_Baseboard"
        }
    ],
    "ManagedBy": [
        {
            "@odata.id": "/redfish/v1/Managers/bmc"
        }
    ]
},

Relevant links to the code that is responsible for this behaviour: https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/systems.hpp#L2748 https://github.com/openbmc/bmcweb/blob/b4bec66b24755cf87e924d56219c60e9506f196b/redfish-core/lib/redfish_util.hpp#L78

sandeepiot commented 2 years ago

Hi Guys,

Can Someone please assign this ticket to my name ? We are trying to contribute to the openBmc community. Please do let us know the process/steps as well.

Thanks, Sandeep.

edtanous commented 2 years ago

Feel free to work on it; We generally don't use the assigned field in github. Our development process is documented in the openbmc/docs repository, and the local bmcweb advice is documented in DEVELOPING.md in this repo.

Looking forward to seeing the patch.

sandeepiot commented 2 years ago

Hi @edtanous,

Thanks for the information. Could you please let us know how to reproduce this issue ? I am running it on QEMU and not finding a way to reproduce this. So is there a way to simulate it on QEMU. Please do let us know. This would help us to test the patch as well.

Thanks, Sandeep.

edtanous commented 2 years ago

Hi @edtanous,

Thanks for the information. Could you please let us know how to reproduce this issue ? I am running it on QEMU and not finding a way to reproduce this. So is there a way to simulate it on QEMU. Please do let us know. This would help us to test the patch as well.

Thanks, Sandeep.

Given that qemu has no chassis, you're not going to be able to reproduce it there. You'll likely need to get on a real system, and the first description shows how to reproduce it.

Anjaliintel-21 commented 1 year ago

Whether anyone is still working on this issue?

chaul-ampere commented 1 year ago

Hi, is there anyone still working on this issue? I'm about to submit a patch and wonder if there is an ongoing duplication.

amboar commented 1 year ago

s/ongoing duplication/opportunity for collaboration/ ;)

chaul-ampere commented 1 year ago

s/ongoing duplication/opportunity for collaboration/ ;)

Sure

gtmills commented 6 months ago

Still a problem. https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/redfish_util.hpp#L63

Need an association or something to look at here