2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 20:47:48 +00:00

28742 Commits

Author SHA1 Message Date
Francis Dupont
c871f5e97e
[#3831] C++17 clang fixes 2025-05-16 12:20:43 +03:00
Francis Dupont
f22c691a1f
[#3831] Spelling 2025-05-16 12:20:43 +03:00
Thomas Markwalder
c8183c4ad7
[#3831] Remove paths from output in conf files
modified:   src/bin/keactrl/kea-ctrl-agent.conf.pre
modified:   src/bin/keactrl/kea-dhcp-ddns.conf.pre
modified:   src/bin/keactrl/kea-dhcp4.conf.pre
modified:   src/bin/keactrl/kea-dhcp6.conf.pre
modified:   src/bin/keactrl/kea-netconf.conf.pre
2025-05-16 12:20:43 +03:00
Thomas Markwalder
0f3d314a79
[#3831] Fix netconf UT test
/src/bin/netconf/tests/shtests/netconf_tests.sh.in
- export KEA_LOG_FILE_DIR
2025-05-16 12:20:43 +03:00
Thomas Markwalder
1984ece9c6
[#3831] Fix log path in UTs
/doc/sphinx/arm/logging.rst
    Updated logging section

/src/bin/admin/tests/memfile_tests.sh.in
/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in
/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in
    export KEA_LOG_FILE_DIR

/src/lib/dhcpsrv/memfile_lease_mgr.cc
    Memfile_LeaseMgr::factory() - fix throw to preserve error txt

/src/lib/process/Makefile.am
    Define LOGFILE_DIR
2025-05-16 12:20:43 +03:00
Thomas Markwalder
a2f4cc4520
{3831] Logger output path restricted
Initial implementaion, still need docs and
autotools changes

meson.build
    Appended "kea" to LOGDIR

/src/bin/agent/tests/ca_process_tests.sh.in
/src/bin/d2/tests/d2_process_tests.sh.in
/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in
/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in
    export KEA_LOG_FILE_DIR

/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
/src/bin/dhcp4/tests/http_control_socket_unittest.cc
/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
/src/bin/dhcp6/tests/http_control_socket_unittest.cc
    Updated tests

/src/bin/dhcp6/tests/dhcp6_test_utils.*
    Added log path stuff to BaseServerTest

/src/bin/keactrl/tests/keactrl_tests.sh.in
/src/bin/shell/tests/ca_basic_auth_tests.sh.in
/src/bin/shell/tests/d2_basic_auth_tests.sh.in
/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in
/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in
/src/bin/shell/tests/shell_ca_process_tests.sh.in
/src/bin/shell/tests/shell_d2_process_tests.sh.in
/src/bin/shell/tests/tls_ca_process_tests.sh.in
/src/bin/shell/tests/tls_d2_process_tests.sh.in
/src/bin/shell/tests/tls_dhcp4_process_tests.sh.in
/src/bin/shell/tests/tls_dhcp6_process_tests.sh.in

/src/lib/process/log_parser.*
    Added  PathChecker singleton,
    LogConfigParser::getLogPath()
    LogConfigParser::validatePath()
    LogConfigParser::parseOutputOptions() - throws if
    output uses an invalid path

/src/lib/process/meson.build
    Defines LOGFILE_DIR

/src/lib/process/tests/log_parser_unittests.cc
    Updated tests
2025-05-16 12:20:43 +03:00
Francis Dupont
66865e832f
[#3831] Added data-directory in sample keywords 2025-05-16 12:20:43 +03:00
Thomas Markwalder
3245560140
[#3831] Nits 2025-05-16 12:20:43 +03:00
Thomas Markwalder
f9fdca89ad
[#3831] Minor nits 2025-05-16 12:20:43 +03:00
Thomas Markwalder
c745954d52
[#3831] Addressed further comments
/doc/examples/kea6/all-keys-netconf.json
/doc/examples/kea6/all-keys.json
    removed data-directory

/doc/sphinx/arm/dhcp6-srv.rst
    Updated ARM

/src/bin/dhcp6/dhcp6_messages.*
    Changed DHCP6_DATA_DIRECTORY_DEPRECATED

/src/bin/dhcp6/json_config_parser.cc
    Removed dirExists() function
    parsing logic errors on invalid data-directory

/src/bin/dhcp6/tests/config_parser_unittest.cc
    Updated data-directory tests

Other minor cleanups
2025-05-16 12:20:43 +03:00
Francis Dupont
3bf21ae2f3
[#3831] Removed extra end of line 2025-05-16 12:20:43 +03:00
Francis Dupont
65d975e240
[#3831] Removed extra blank line 2025-05-16 12:20:43 +03:00
Francis Dupont
1cae2f03e6
[#3831] Added missing spaces 2025-05-16 12:20:43 +03:00
Francis Dupont
1cc999a1d2
[#3831] spelling 2025-05-16 12:20:43 +03:00
Thomas Markwalder
6cd4ec9b56
[#3831] Addressed preliminary comments
Changes to be committed:
	modified:   src/lib/dhcpsrv/cfgmgr.h
	modified:   src/lib/hooks/tests/hooks_manager_unittest.cc
	modified:   src/lib/testutils/meson.build
	modified:   src/lib/util/tests/filesystem_unittests.cc
2025-05-16 12:20:43 +03:00
Thomas Markwalder
cc5270c69d
[#3831] Adde env_var_wrapper.cc to meson.build
modified:   src/lib/testutils/meson.build
2025-05-16 12:20:43 +03:00
Thomas Markwalder
36b8bfd263
[#3831] Error on bad lease file path
/doc/examples/kea4/all-keys-netconf.json
/doc/examples/kea4/all-keys.json
/doc/examples/kea4/dhcpv4-over-dhcpv6.json
/doc/examples/kea6/all-keys-netconf.json
/doc/examples/kea6/all-keys.json
/doc/examples/kea6/dhcpv4-over-dhcpv6.json
    Remove "/tmp" from lease file names

/src/bin/admin/tests/memfile_tests.sh.in
/src/bin/dhcp4/tests/dhcp4_process_tests.sh.in
/src/bin/dhcp6/tests/dhcp6_process_tests.sh.in
    export KEA_DHCP_DATA_DIR

/src/bin/shell/tests/dhcp4_basic_auth_tests.sh.in
/src/bin/shell/tests/dhcp6_basic_auth_tests.sh.in

/src/bin/shell/tests/shell_dhcp4_process_tests.sh.in
/src/bin/shell/tests/shell_dhcp6_process_tests.sh.in

/src/bin/shell/tests/tls_dhcp4_process_tests.sh.in
/src/bin/shell/tests/tls_dhcp6_process_tests.sh.in

/src/lib/dhcpsrv/dhcpsrv_messages.*
    Replace WARN message with DHCPSRV_MEMFILE_FAILED_TO_OPEN error

/src/lib/dhcpsrv/memfile_lease_mgr.cc
    Memfile_LeaseMgr::getDefaultLeaseFilePath()
    - uses CfgMgr::getDataDir()
    Memfile_LeaseMgr::initLeaseFilePath()
     - call CfgMgr::validatePath() without try-catch
    Memfile_LeaseMgr::factory()
    - log error and rethrow

/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
    Added use of EnvVarWrapper

/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
    Updated tests
    TEST_F(MemfileLeaseMgrTest, defaultDataDir)
    TEST_F(MemfileLeaseMgrTest, dataDirEnvVarOverride)
    TEST_F(MemfileLeaseMgrTest, dataDirExplicitOveride)
    - new tests

/src/lib/testutils/Makefile.am
   Added env_var_wrapper.*
2025-05-16 12:20:43 +03:00
Thomas Markwalder
98ba652fbc
[#3831] Fix UT Makefile.am files 2025-05-16 12:20:43 +03:00
Thomas Markwalder
26c63d4a14
[#3831] Replaced CfgMgr::data_dir_ with PathChecker
/src/bin/dhcp4/tests/dhcp4_test_utils.cc
    UpdatedModified BaseServerTest

/src/bin/dhcp4/tests/meson.build
    Added DHCP_DATA_DIR

/src/bin/dhcp6/dhcp6_messages.*
    DHCP6_DATA_DIRECTORY_DEPRECATED - new message

/src/bin/dhcp6/dhcp6_parser.yy
    Add warning to data_dir parsing

/src/bin/dhcp6/json_config_parser.cc
    Emit a warning if config contains data-directory

/src/bin/dhcp6/tests/Makefile.am
    Added DHCP_DATA_DIR

/src/bin/dhcp6/tests/config_parser_unittest.cc
    TEST_F(Dhcp6ParserTest, testDataDir) - updated test

/src/bin/dhcp6/tests/dhcp6_test_utils.cc
    UpdatedModified BaseServerTest

/src/bin/dhcp6/tests/hooks_unittest.cc
    LoadUnloadDhcpv6SrvTest now derives from BaseServerTest

/src/bin/dhcp6/tests/meson.build
    Added DHCP_DATA_DIR

/src/lib/dhcpsrv/cfgmgr.*
    Replace Optional<string> datadir_ with PathChecker
    data_dir_checker_

    CfgMgr::getDataDir() - updated
    CfgMgr::validatePath() - added

/src/lib/dhcpsrv/srv_config.cc
    SrvConfig::toElement() - remove output of  data-directory

/src/lib/dhcpsrv/tests/Makefile.am
    Added DHCP_DATA_DIR

/src/lib/dhcpsrv/tests/cfg_duid_unittest.cc
    Updated absolutePath()

/src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
    Updated tests

/src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
/src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
/src/lib/dhcpsrv/tests/lease_file_loader_unittest.cc
/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
    Updated absolutePath()

/src/lib/dhcpsrv/tests/meson.build
    Added DHCP_DATA_DIR
2025-05-16 12:20:43 +03:00
Thomas Markwalder
2f304f6ca7
[#3831] Refactored FileManager into PathChecker
Refactored to internally support env variable and explicit paths
modified:
    src/lib/hooks/hooks_parser.cc
    src/lib/hooks/hooks_parser.h
    src/lib/util/filesystem.cc
    src/lib/util/filesystem.h
    src/lib/util/tests/filesystem_unittests.cc
2025-05-16 12:20:43 +03:00
Thomas Markwalder
f42a77238d
[#3830] Fixed netconf UT tests
/src/bin/netconf/tests/Makefile.am
/src/bin/netconf/tests/meson.build
    Added NETCONF_HOOKS_TEST_PATH

/src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc
    NetconfParserTest - added set and reset of hooks path
    TEST_F(NetconfParserTest, configParseHooks) - call setHooksTestPath()
2025-05-16 12:20:43 +03:00
Francis Dupont
03aac8f424
[#3832] Reindented 2025-05-16 12:20:43 +03:00
Francis Dupont
919d3cbbb6
[#3832] Extra fix 2025-05-16 12:20:43 +03:00
Francis Dupont
e214d62395
[#3832] Added umask to admin and keactrl 2025-05-16 12:20:43 +03:00
Francis Dupont
d91aa4203c
[#3832] Added umask 0027 setting 2025-05-16 12:20:43 +03:00
Francis Dupont
923990b389
[#3832] Checkpoint: removed #3050 and fixes 2025-05-16 12:20:43 +03:00
Thomas Markwalder
3403f15dc7
[#3830] Removed obsolete UT
modified:   dhcp_parsers_unittest.cc
2025-05-16 12:20:43 +03:00
Thomas Markwalder
5caceadf72
[#3830] Addressed further review comments
Minor cleanup and fixed hooks partesr UTs
	modified:   src/lib/hooks/hooks_parser.h
	modified:   src/lib/hooks/tests/hooks_manager_unittest.cc
2025-05-16 12:20:42 +03:00
Francis Dupont
8196e0cadf
[#3830] Small fixes 2025-05-16 12:20:42 +03:00
Thomas Markwalder
e4fad9f2bf
[#3830] Addressed review comments
src/lib/util/filesystem.cc
    Replaced use of std::filesystem with isc:util::Path

src/lib/hooks/hooks_parser.cc
src/lib/hooks/hooks_parser.h
    HooksLibrariesParser::getHooksPath() - provides the
    ability to set it to an explicit value

Updated A LOT of UTs:

src/bin/agent/tests/ca_cfg_mgr_unittests.cc
src/bin/agent/tests/ca_process_tests.sh.in
src/bin/agent/tests/get_config_unittest.cc
src/bin/agent/tests/test_callout_libraries.h.in
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/d2_process_tests.sh.in
src/bin/d2/tests/d2_process_unittests.cc
src/bin/d2/tests/get_config_unittest.cc
src/bin/d2/tests/test_callout_libraries.h.in
src/bin/d2/tests/test_configured_libraries.h.in
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
src/bin/dhcp4/tests/dhcp4_process_tests.sh.in
src/bin/dhcp4/tests/hooks_unittest.cc
src/bin/dhcp4/tests/http_control_socket_unittest.cc
src/bin/dhcp4/tests/test_libraries.h.in
src/bin/dhcp6/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
src/bin/dhcp6/tests/dhcp6_process_tests.sh.in
src/bin/dhcp6/tests/hooks_unittest.cc
src/bin/dhcp6/tests/http_control_socket_unittest.cc
src/bin/dhcp6/tests/test_libraries.h.in
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
src/lib/dhcpsrv/tests/test_libraries.h.in
src/lib/hooks/tests/Makefile.am
src/lib/hooks/tests/hooks_manager_unittest.cc
src/lib/hooks/tests/test_libraries.h.in
src/lib/process/cfgrpt/tests/config_report_unittests.cc
src/lib/util/tests/filesystem_unittests.cc
2025-05-16 12:20:42 +03:00
Thomas Markwalder
433593f231
[#3830] Updated ARM
modified:   doc/sphinx/arm/hooks.rst
modified:   src/lib/hooks/tests/hooks_manager_unittest.cc
modified:   src/lib/util/tests/filesystem_unittests.cc
2025-05-16 12:20:42 +03:00
Thomas Markwalder
4afdeb7719
[#3830] Hook libraries must load from default hook dir
/src/lib/util/filesystem.*
    FileManager::validatePath() - new class and function

/src/lib/hooks/hooks_parser.*
    HooksLibrariesParser::validatePath() - new wrapper around FileManager::validatePath()
    HooksLibrariesParser::parse() - now uses validatePath()

/src/lib/hooks/tests/hooks_manager_unittest.cc
    TEST(HooksParser, validatePathEnforcePath)
    TEST(HooksParser, validatePathEnforcePathFalse) - new tests

/src/lib/util/tests/filesystem_unittests.cc
    TEST(FileManager, validatePathEnforcePath)
    TEST(FileManager, validatePathEnforcePathFalse) - new tests
2025-05-16 12:20:42 +03:00
Andrei Pavel
121b71ae2f
[#3789] Extend the change to upgrade scripts down to Kea 2.6 2025-05-16 11:20:13 +03:00
Andrei Pavel
5683641bf3
[#3789] Extend the change to upgrade scripts down to Kea 2.6 2025-05-14 09:46:40 +03:00
Andrei Pavel
f5bcf91497
[#3789] Check only major version in upgrade scripts to allow for intermediary backported schema changes 2025-05-14 09:32:39 +03:00
Andrei Pavel
0ffbaa27a9
[#3866] Meson: disable b_lundef to fix sanitizers 2025-05-05 08:14:43 +03:00
Andrei Pavel
bef3018afb
[#3866] Meson: reinstall.sh now looks into the srcdir for YANG modules 2025-05-05 08:14:43 +03:00
Wlodek Wencel
8f1a25b640 [#3864] release changes 2025-04-29 01:30:27 -05:00
Wlodek Wencel
215a653d47 [#3863] lib version bump up 2025-04-29 07:12:56 +02:00
Andrei Pavel
60f8b468d6 [#3763] Add precautionary continue handlers to lease AUPD triggers 2025-04-28 14:53:19 +00:00
Andrei Pavel
4a9fcdb2f5
[#3732] Migrate tools/print-generated-files.sh away from autotools 2025-04-25 09:33:06 +03:00
Andrei Pavel
3133dc2b58
[#3732] Meson: Remove GTEST_DEP from src/lib/process 2025-04-24 22:44:57 +03:00
Andrei Pavel
87a51bfd01
[#3732] Meson: further increase test timeouts 2025-04-23 23:35:06 +03:00
Andrei Pavel
c87c5c99ed
[#3732] Meson: Report shell tests as xml in builddir by default 2025-04-23 23:35:06 +03:00
Andrei Pavel
b617fe75d3
[#3732] Meson: Make kea-dhcp-tests sequential
IfaceMgr tests can be conflicting.
2025-04-23 23:35:05 +03:00
Andrei Pavel
ae43917069
[#3732] Meson: Fix small inconsistency in yang scripts towards autotools 2025-04-23 23:35:04 +03:00
Andrei Pavel
d774b18e9a
[#3732] Meson: Fix hardcoded tarball in version in some places 2025-04-23 23:35:04 +03:00
Andrei Pavel
60222843a6
[#3732] Address review 2025-04-23 23:15:59 +03:00
Andrei Pavel
435d56b645
[#3732] Switch docs from Autotools to Meson 2025-04-23 22:29:34 +03:00
Razvan Becheriu
25ea568e12 [#3732] addressed review comments 2025-04-17 13:36:43 +03:00