openbmc / phosphor-net-ipmid

Network IPMI server
Apache License 2.0
9 stars 11 forks source link

Fails to get obmc-console object from srvcfg-manager #27

Open jonathan-doman opened 1 year ago

jonathan-doman commented 1 year ago

https://github.com/openbmc/phosphor-net-ipmid/blob/54e7a51f64578f773c063f5b97887dae3d99bf78/sol/sol_manager.cpp#L239-L241

This line always fails, leading to a constant stream of error messages when SOL session is active.

Oct 12 17:20:05 netipmid[299]: Failed to find object which matches
Oct 12 17:20:05 netipmid[299]: The operation failed internally.
Oct 12 17:20:05 netipmid[299]: Failed to get service path in registerSOLServiceChangeCallback: xyz.openbmc_project.Common.Error.InternalFailure: The operation failed internally.

srvcfg-manager does not publish this object, but rather only the instantiated service names, e.g. obmc_2dconsole_40ttyS2. AFAIK netipmid does not know which instance to use so there's no simple one-line fix for this.

mdmillerii commented 1 year ago

The serial console server exports connection information over dbus https://github.com/openbmc/obmc-console/blob/955d140e3caafb8a082a094d4fb6ebd2e3d7782a/console-dbus.c#L31

https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/yaml/xyz/openbmc_project/Console

But I don't understand what ipmi is doing with the service manager. It looks like some kind of hook invoked when the sol session parameters is changed but what is it trying to accomplish?

From 15 minutes of study it's restarting the whole console service instead of killing and restarting it's session when configuration such as required encryption is changed. I don't believe it shouldn't be trying restart or start/stop the multiple interfaces of the console service. Also if the administrator had disabled the service though redfish I doubt ipmi would be expected to enable it.

Kostr commented 1 year ago

I think that is the relevant commit that describes what is the purpose of the srvcfg-manager in this case https://github.com/openbmc/phosphor-net-ipmid/commit/f6e7230d9cd45772a4237c024e6c3abf9b4cf7eb