diff options
author | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-09-05 12:46:17 +0300 |
---|---|---|
committer | Andrey V.Kosteltsev <AKosteltsev@IBS.RU> | 2022-09-05 12:47:11 +0300 |
commit | d52f6ea174ad4480ab78ac76126001de978a86cd (patch) | |
tree | 22400b5d4b2b2718a286e0e1980b5c265755853c /meta-ibs/meta-cp2-5422/recipes-phosphor/network | |
parent | c04112aeee939192a93621850ddbc9a8b9e2e40f (diff) | |
download | openbmc-d52f6ea174ad4480ab78ac76126001de978a86cd.tar.xz |
entity-manager, dbus-sensors, x86-power-control patches applicable for bumped revisions
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/network')
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/network/phosphor-network/0002-Added-check-of-sync-status-with-NTP-servers.patch | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/network/phosphor-network/0002-Added-check-of-sync-status-with-NTP-servers.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/network/phosphor-network/0002-Added-check-of-sync-status-with-NTP-servers.patch index 0b18b594ba..11ae185d20 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/network/phosphor-network/0002-Added-check-of-sync-status-with-NTP-servers.patch +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/network/phosphor-network/0002-Added-check-of-sync-status-with-NTP-servers.patch @@ -1,6 +1,6 @@ -From e4492d4f1e29731db6ac278ecb121cb47a8e204f Mon Sep 17 00:00:00 2001 +From 1ab29ac7531a82daf500279b4dc8b71d309f48ca Mon Sep 17 00:00:00 2001 From: Nikita Kosenkov <NKosenkov@IBS.RU> -Date: Tue, 23 Aug 2022 10:00:35 +0300 +Date: Mon, 5 Sep 2022 11:47:06 +0300 Subject: [PATCH] Added check of synchronization status with NTP servers This functionality provides users with an additional log @@ -12,17 +12,19 @@ then we consider that it was not possible to obtain the IP address of the NTP server. Similarly, 'timedatectl show-timesync --property ServerAddress --value'. + +Signed-off-by: Andrey V.Kosteltsev <AKosteltsev@IBS.RU> --- src/network_manager_main.cpp | 115 ++++++++++++++++++++++++++++++++++- src/types.hpp | 4 ++ 2 files changed, 116 insertions(+), 3 deletions(-) diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp -index 349c2ea..5d47c0c 100644 +index fa4efe5c..5d691613 100644 --- a/src/network_manager_main.cpp +++ b/src/network_manager_main.cpp -@@ -6,11 +6,13 @@ - #include "watch.hpp" +@@ -5,11 +5,13 @@ + #include "types.hpp" #include <linux/netlink.h> +#include <systemd/sd-journal.h> @@ -35,15 +37,15 @@ index 349c2ea..5d47c0c 100644 #ifdef SYNC_MAC_FROM_INVENTORY #include <nlohmann/json.hpp> #endif -@@ -49,6 +51,7 @@ namespace network +@@ -48,6 +50,7 @@ namespace network std::unique_ptr<phosphor::network::Manager> manager = nullptr; std::unique_ptr<Timer> refreshObjectTimer = nullptr; std::unique_ptr<Timer> reloadTimer = nullptr; +std::unique_ptr<Timer> checkNtpSyncStatusTimer = nullptr; #ifdef SYNC_MAC_FROM_INVENTORY - std::unique_ptr<sdbusplus::bus::match::match> EthInterfaceMatch = nullptr; -@@ -230,17 +233,66 @@ void watchEthernetInterface(sdbusplus::bus::bus& bus, + std::unique_ptr<sdbusplus::bus::match_t> EthInterfaceMatch = nullptr; +@@ -229,17 +232,66 @@ void watchEthernetInterface(sdbusplus::bus_t& bus, } } } @@ -113,7 +115,7 @@ index 349c2ea..5d47c0c 100644 } } -@@ -254,12 +306,67 @@ void reloadNetworkd() +@@ -253,12 +305,67 @@ void reloadNetworkd() } } @@ -151,7 +153,7 @@ index 349c2ea..5d47c0c 100644 + if(getProperty("ServerAddress", propServerAddress)) + { + auto serverAddress = std::get<ServerAddress>(propServerAddress); -+ ++ + // get first value from "ServerAddress property (iay)" + // using this parameter, you can understand whether + // it was possible to resolve the NTP address @@ -181,7 +183,7 @@ index 349c2ea..5d47c0c 100644 } } // namespace network -@@ -329,6 +436,8 @@ int main(int /*argc*/, char** /*argv*/) +@@ -309,6 +416,8 @@ int main(int /*argc*/, char** /*argv*/) phosphor::network::watchEthernetInterface(bus, configJson); #endif @@ -191,12 +193,12 @@ index 349c2ea..5d47c0c 100644 // This is intentionally deferred, to ensure that systemd-networkd is // fully configured. diff --git a/src/types.hpp b/src/types.hpp -index 69a314d..0de7a3f 100644 +index 2e27298d..b69997fd 100644 --- a/src/types.hpp +++ b/src/types.hpp -@@ -34,6 +34,10 @@ constexpr auto reloadTimeout = 3s; - // configuration takes 3-4 sec after systemd-networkd restart. - constexpr auto refreshTimeout = reloadTimeout + 7s; +@@ -28,6 +28,10 @@ constexpr auto reloadTimeout = 3s; + // configuration takes 3-4 sec to reconfigure at most. + constexpr auto refreshTimeout = 4s; +// check the synchronization status +// after updating the list of NTP servers after 60 seconds |