mirror of
				https://github.com/vyos/vyos-build.git
				synced 2025-10-01 20:28:40 +02:00 
			
		
		
		
	kea: T7281: Update Kea to 3.0
This commit is contained in:
		
							parent
							
								
									1a6747b038
								
							
						
					
					
						commit
						267fb08218
					
				| @ -49,8 +49,6 @@ jobs: | ||||
|               - 'scripts/package-build/hsflowd/**' | ||||
|             isc-dhcp: | ||||
|               - 'scripts/package-build/isc-dhcp/**' | ||||
|             kea: | ||||
|               - 'scripts/package-build/kea/**' | ||||
|             keepalived: | ||||
|               - 'scripts/package-build/keepalived/**' | ||||
|             libnss-mapuser: | ||||
| @ -167,10 +165,6 @@ jobs: | ||||
|             trigger_build "isc-dhcp" | ||||
|           fi | ||||
| 
 | ||||
|           if [ "${{ steps.changes.outputs.kea }}" == "true" ]; then | ||||
|             trigger_build "kea" | ||||
|           fi | ||||
| 
 | ||||
|           if [ "${{ steps.changes.outputs.keepalived }}" == "true" ]; then | ||||
|             trigger_build "keepalived" | ||||
|           fi | ||||
|  | ||||
| @ -19,3 +19,8 @@ packages = [ | ||||
| 
 | ||||
| [additional_repositories.zabbix] | ||||
|   url = "https://repo.zabbix.com/zabbix/6.0/debian" | ||||
| 
 | ||||
| [additional_repositories.kea] | ||||
|   architecture = "amd64" | ||||
|   url = "https://dl.cloudsmith.io/public/isc/kea-3-0/deb/debian" | ||||
|   distribution = "bookworm" | ||||
|  | ||||
							
								
								
									
										24
									
								
								data/live-build-config/archives/isc-kea.key.chroot
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								data/live-build-config/archives/isc-kea.key.chroot
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | ||||
| -----BEGIN PGP PUBLIC KEY BLOCK----- | ||||
| 
 | ||||
| mQGNBGhVJw8BDACXwlMdVKg40L87xcyG6fuo1KAOdk3cqx0jcojtYXYo16R5A1xD | ||||
| ILW/Nw/b9qWkoXAjCOL8xgspSYx8Cqg73o+Jy2tzBNSzXGYmh/8sDicJmTGBt9n7 |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r2sDiedibMl9SGAPtT83afCrSZ6BgobytsdtV3u2WOqxrVUXDpvhZKjxX6 | ||||
| pXrrSV9tPhZlq5pZvnDCS392FlMfHmjR4BUxzwD4Wnax8G7uQfEUWMkTaqQAZfuN | ||||
| EsbY2TeLjn3ZojI= | ||||
| =+igW | ||||
| -----END PGP PUBLIC KEY BLOCK----- | ||||
| @ -5,9 +5,9 @@ systemctl disable syslog.service | ||||
| systemctl disable rsyslog.service | ||||
| systemctl disable arpwatch.service | ||||
| systemctl disable smartd.service | ||||
| systemctl disable kea-ctrl-agent.service | ||||
| systemctl disable kea-dhcp4-server.service | ||||
| systemctl disable kea-dhcp6-server.service | ||||
| systemctl disable kea-dhcp4.service | ||||
| systemctl disable kea-dhcp6.service | ||||
| systemctl disable kea-dhcp-ddns.service | ||||
| systemctl disable isc-dhcp-relay.service | ||||
| systemctl disable nfacctd.service | ||||
| systemctl disable pmacctd.service | ||||
|  | ||||
							
								
								
									
										1
									
								
								scripts/package-build/kea/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								scripts/package-build/kea/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +0,0 @@ | ||||
| /isc-kea/ | ||||
| @ -1 +0,0 @@ | ||||
| ../build.py | ||||
| @ -1,4 +0,0 @@ | ||||
| [[packages]] | ||||
| name = "isc-kea" | ||||
| commit_id = "debian/2.6.1-2" | ||||
| scm_url = "https://salsa.debian.org/debian/isc-kea" | ||||
| @ -1,135 +0,0 @@ | ||||
| From cb2b064162e2d5bf09331c619abf76a40130ade1 Mon Sep 17 00:00:00 2001 | ||||
| From: sarthurdev <s.arthur@vyos.io> | ||||
| Date: Wed, 2 Apr 2025 08:48:48 +0000 | ||||
| Subject: [PATCH 1/2] Add multithreading test mode | ||||
| 
 | ||||
| ---
 | ||||
|  src/bin/dhcp4/json_config_parser.cc |  4 ++++ | ||||
|  src/bin/dhcp6/json_config_parser.cc |  6 +++++- | ||||
|  src/lib/config/cmd_http_listener.cc |  3 +++ | ||||
|  src/lib/tcp/mt_tcp_listener_mgr.cc  |  3 +++ | ||||
|  src/lib/util/multi_threading_mgr.cc |  3 ++- | ||||
|  src/lib/util/multi_threading_mgr.h  | 19 +++++++++++++++++++ | ||||
|  6 files changed, 36 insertions(+), 2 deletions(-) | ||||
| 
 | ||||
| diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc
 | ||||
| index c2e34c5..1350816 100644
 | ||||
| --- a/src/bin/dhcp4/json_config_parser.cc
 | ||||
| +++ b/src/bin/dhcp4/json_config_parser.cc
 | ||||
| @@ -718,6 +718,10 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
 | ||||
|      LOG_DEBUG(dhcp4_logger, DBG_DHCP4_COMMAND, DHCP4_CONFIG_START) | ||||
|          .arg(server.redactConfig(config_set)->str()); | ||||
|   | ||||
| +    if (check_only) {
 | ||||
| +        MultiThreadingMgr::instance().setTestMode(true);
 | ||||
| +    }
 | ||||
| +
 | ||||
|      auto answer = processDhcp4Config(config_set); | ||||
|   | ||||
|      int status_code = CONTROL_RESULT_SUCCESS; | ||||
| diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc
 | ||||
| index 671d69a..a74a568 100644
 | ||||
| --- a/src/bin/dhcp6/json_config_parser.cc
 | ||||
| +++ b/src/bin/dhcp6/json_config_parser.cc
 | ||||
| @@ -850,6 +850,10 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
 | ||||
|      LOG_DEBUG(dhcp6_logger, DBG_DHCP6_COMMAND, DHCP6_CONFIG_START) | ||||
|          .arg(server.redactConfig(config_set)->str()); | ||||
|   | ||||
| +    if (check_only) {
 | ||||
| +        MultiThreadingMgr::instance().setTestMode(true);
 | ||||
| +    }
 | ||||
| +
 | ||||
|      auto answer = processDhcp6Config(config_set); | ||||
|   | ||||
|      int status_code = CONTROL_RESULT_SUCCESS; | ||||
| @@ -953,7 +957,7 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
 | ||||
|      // configuration. This will add created subnets and option values into | ||||
|      // the server's configuration. | ||||
|      // This operation should be exception safe but let's make sure. | ||||
| -    if (status_code == CONTROL_RESULT_SUCCESS && (!check_only || extra_checks)) {
 | ||||
| +    if (status_code == CONTROL_RESULT_SUCCESS && !check_only) {
 | ||||
|          try { | ||||
|   | ||||
|              // Setup the command channel. | ||||
| diff --git a/src/lib/config/cmd_http_listener.cc b/src/lib/config/cmd_http_listener.cc
 | ||||
| index 9dfea59..394806e 100644
 | ||||
| --- a/src/lib/config/cmd_http_listener.cc
 | ||||
| +++ b/src/lib/config/cmd_http_listener.cc
 | ||||
| @@ -40,6 +40,9 @@ CmdHttpListener::~CmdHttpListener() {
 | ||||
|   | ||||
|  void | ||||
|  CmdHttpListener::start() { | ||||
| +    if (MultiThreadingMgr::instance().isTestMode()) {
 | ||||
| +        return;
 | ||||
| +    }
 | ||||
|      // We must be in multi-threading mode. | ||||
|      if (!MultiThreadingMgr::instance().getMode()) { | ||||
|          isc_throw(InvalidOperation, "CmdHttpListener cannot be started" | ||||
| diff --git a/src/lib/tcp/mt_tcp_listener_mgr.cc b/src/lib/tcp/mt_tcp_listener_mgr.cc
 | ||||
| index e880284..4680717 100644
 | ||||
| --- a/src/lib/tcp/mt_tcp_listener_mgr.cc
 | ||||
| +++ b/src/lib/tcp/mt_tcp_listener_mgr.cc
 | ||||
| @@ -40,6 +40,9 @@ MtTcpListenerMgr::~MtTcpListenerMgr() {
 | ||||
|   | ||||
|  void | ||||
|  MtTcpListenerMgr::start() { | ||||
| +    if (MultiThreadingMgr::instance().isTestMode()) {
 | ||||
| +        return;
 | ||||
| +    }
 | ||||
|      // We must be in multi-threading mode. | ||||
|      if (!MultiThreadingMgr::instance().getMode()) { | ||||
|          isc_throw(InvalidOperation, "MtTcpListenerMgr cannot be started" | ||||
| diff --git a/src/lib/util/multi_threading_mgr.cc b/src/lib/util/multi_threading_mgr.cc
 | ||||
| index d1526b9..cab284d 100644
 | ||||
| --- a/src/lib/util/multi_threading_mgr.cc
 | ||||
| +++ b/src/lib/util/multi_threading_mgr.cc
 | ||||
| @@ -14,7 +14,8 @@ namespace isc {
 | ||||
|  namespace util { | ||||
|   | ||||
|  MultiThreadingMgr::MultiThreadingMgr() | ||||
| -    : enabled_(false), critical_section_count_(0), thread_pool_size_(0) {
 | ||||
| +    : enabled_(false), test_mode_(false), critical_section_count_(0),
 | ||||
| +      thread_pool_size_(0) {
 | ||||
|  } | ||||
|   | ||||
|  MultiThreadingMgr::~MultiThreadingMgr() { | ||||
| diff --git a/src/lib/util/multi_threading_mgr.h b/src/lib/util/multi_threading_mgr.h
 | ||||
| index e86c488..f3da67b 100644
 | ||||
| --- a/src/lib/util/multi_threading_mgr.h
 | ||||
| +++ b/src/lib/util/multi_threading_mgr.h
 | ||||
| @@ -154,6 +154,22 @@ public:
 | ||||
|      /// @param enabled The new mode. | ||||
|      void setMode(bool enabled); | ||||
|   | ||||
| +    /// @brief Sets or clears the test mode for @c MultiThreadingMgr.
 | ||||
| +    ///
 | ||||
| +    /// @param test_mode A flag which indicates that the @c MultiThreadingMgr is
 | ||||
| +    /// in the test mode (if true), or not (if false).
 | ||||
| +    void setTestMode(const bool test_mode) {
 | ||||
| +        test_mode_ = test_mode;
 | ||||
| +    }
 | ||||
| +
 | ||||
| +    /// @brief Checks if the @c MultiThreadingMgr is in the test mode.
 | ||||
| +    ///
 | ||||
| +    /// @return true if the @c MultiThreadingMgr is in the test mode, false
 | ||||
| +    /// otherwise.
 | ||||
| +    bool isTestMode() const {
 | ||||
| +        return (test_mode_);
 | ||||
| +    }
 | ||||
| +
 | ||||
|      /// @brief Enter critical section. | ||||
|      /// | ||||
|      /// When entering @ref MultiThreadingCriticalSection, increment internal | ||||
| @@ -308,6 +324,9 @@ private:
 | ||||
|      /// otherwise. | ||||
|      bool enabled_; | ||||
|   | ||||
| +    /// @brief Indicates if the @c MultiThreadingMgr is in the test mode.
 | ||||
| +    bool test_mode_;
 | ||||
| +
 | ||||
|      /// @brief The critical section count. | ||||
|      /// | ||||
|      /// In case the configuration is applied within a | ||||
| -- 
 | ||||
| 2.39.5 | ||||
| 
 | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user