| commit | 0a052baa566b3697419789dbf78934d43efc4ac4 | [log] [tgz] |
|---|---|---|
| author | George Liu <liuxiwei@inspur.com> | Thu Sep 30 11:09:57 2021 +0800 |
| committer | Ed Tanous <ed@tanous.net> | Tue Nov 02 00:48:08 2021 +0000 |
| tree | 2a93660e38ba2e54f8cf1750024309f17a15781e | |
| parent | 021d32cf907222cd72a5b9d2fe2e8159dd4bf083 [diff] |
Fix NTPServers are hard-coded for eth0
Since bmcweb is getting and patching NTPServers only from
'/xyz/openbmc_project/network/eth0' object, and this is hard-coded, if
we use eth1, it will broken the NTP configuration and fail to route to
the correct NTPServer.
All NTPServers of xyz.openbmc_project.Network.EthernetInterface
interface should be updated.
Tested:
1. When NTPServer is set through the webUI, all NTPs of the
Ethernet will be updated synchronously.
2. If eth1 is ethernet.
doPatch:
curl -k -H "X-Auth-Token: $token" -X PATCH -d '{ "NTP":{"NTPServers": ["192.168.1.2", "192.168.1.1"], "ProtocolEnabled": true}}' https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol
doGet:
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol
{
"@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol",
"@odata.type": "#ManagerNetworkProtocol.v1_5_0.ManagerNetworkProtocol",
"Description": "Manager Network Service",
"NTP": {
"NTPServers": [
"192.168.1.2",
"192.168.1.1"
],
"ProtocolEnabled": true
},
...
}
3. cat 00-bmc-eth0.network
[Match]
Name=eth0
[Link]
MACAddress=52:54:00:12:34:56
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=true
NTP=192.168.1.1
NTP=192.168.1.2
DHCP=true
[DHCP]
ClientIdentifier=mac
UseDNS=true
UseNTP=true
UseHostname=true
SendHostname=true
4. cat 00-bmc-eth1.network
[Match]
Name=eth1
[Link]
MACAddress=52:54:00:12:34:57
[Network]
LinkLocalAddressing=yes
IPv6AcceptRA=true
NTP=192.168.1.1
NTP=192.168.1.2
DHCP=true
[DHCP]
ClientIdentifier=mac
UseDNS=true
UseNTP=true
UseHostname=true
SendHostname=true
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I624afa4154464524792d072966bf1ee9db594661
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D flags that correspond to options in bmcweb/meson_options.txt and then compiling. For example, meson <builddir> -Dkvm=disabled ... followed by ninja in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the secp384r1 algorithm. The certificate
C=US, O=OpenBMC, CN=testhost,SHA-256 algorithm.