openbmc / phosphor-networkd

Apache License 2.0
18 stars 49 forks source link

Network configuration changes don't show on D-Bus until ~5-10 seconds after #66

Closed gtmills closed 1 year ago

gtmills commented 1 year ago

webui-vue PATCHes the ethernet interface https://github.com/openbmc/webui-vue/blob/master/src/store/modules/Settings/NetworkStore.js#L99 and then wants to reload the table with the new data https://github.com/openbmc/webui-vue/blob/master/src/store/modules/Settings/NetworkStore.js#L102

This doesn't work. webui-vue is an example client. Any Redfish client could hit this.

After PATCHing, the values don't show up on D-Bus/Redfish until 5-10 seconds later.

Based on Discord, this is due to "phosphor-networkd configures systemd-networkd and reloads systemd-networkd which takes ~3-5 seconds time to acquire DHCP IP. generally it applies to all other network configuration parameters."

The GUI could add a 10-second wait, but this violates Redfish and would be a hack.

Ed proposed a solution of "It seems like that timer should be closer to 500ms, and block each set response until the values are actually written.". bmcweb would not return until after the values are actually written.

Another choice could be bmcweb returns a task. If the operation takes longer than bmcweb can hold up the response, a task should be returned (e.g., code update). As pointed out, having phosphor-networkd return a task seems problematic.

This was discussed on Discord on 7/19/23 in the redfish-and-bmcweb channel; see below for the full conversation: https://discord.com/channels/775381525260664832/855566794994221117/1131299684074410066

gtmills commented 1 year ago

@raviteja-b @sunharis FYI

wak-google commented 1 year ago

I don't follow the behavior you are expecting here. You want us to block on the call to enable DHCP until an IP is assigned from the DHCP server? That is not guaranteed to be immediate, and could end up blocking indefinitely if we don't have a DHCP server responding to us.

I don't think any other BMC web interface blocks on this, they just show the information when available.

gtmills commented 1 year ago

I thought it was more than the use case where GUI enables DHCP and see DHCPEnabled value set After talking more, that should be handled on the GUI side with some polling. Closing. Apologies on the noise