+2265. [bug]* fdupont
+ The 'control-socket' ('control-socket.socket-name' and
+ 'control-socket.socket-type') was removed from the global maps
+ which can be managed by the config backend because in fact if
+ it is possible to change values they are not applied.
+ (Gitlab #3479)
+
2264. [bug]* tmark
Corrected an issue with overlapping enum values
for option definition data type. This was causing
test_finish 0
}
+# Verifies that control-socket global map parameters are removed.
+mysql_remove_control_socket_parameters_test() {
+ test_start "mysql.mysql_remove_control_socket_parameters_test"
+
+ # Let's wipe the whole database
+ mysql_wipe
+
+ # We need to create an older database.
+ # Initialize database to schema 1.0.
+ mysql -u"${db_user}" -p"${db_password}" "${db_name}" < "@abs_top_srcdir@/src/bin/admin/tests/dhcpdb_create_1.0.mysql"
+
+ # Now upgrade to schema 23.0.
+ mysql_upgrade_schema_to_version 23.0
+
+ # Now insert global parameter instances of control-socket.
+ sql=\
+"set @disable_audit = 1; \
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-name','/tmp/socket',current_time(),4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-type','unix',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-name','/tmp/socket',current_time(),4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-type','unix',current_time(),4);"
+
+ run_statement "insert control-socket map parameters" "$sql"
+
+ # Verify the inserted record counts.
+ qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
+ run_statement "#get 4_global parameter count before update" "$qry" 2
+
+ qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
+ run_statement "#get 6_global parameter count before update" "$qry" 2
+
+ # Upgrade to schema 24.0
+ mysql_upgrade_schema_to_version 24.0
+
+ # Verify the record have been removed.
+ qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
+ run_statement "#get 4_global parameter count after update" "$qry" 0
+
+ qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
+ run_statement "#get 6_global parameter count after update" "$qry" 0
+
+ # Let's wipe the whole database
+ mysql_wipe
+
+ test_finish 0
+}
+
# Run tests.
mysql_db_init_test
mysql_host_reservation_init_test
mysql_reservation_mode_global_parameters_test
mysql_reservation_mode_out_of_pool_parameters_test
mysql_migrate_opt_record_type
+mysql_remove_control_socket_parameters_test
test_finish 0
}
+# Verifies that control-socket global map parameters are removed.
+pgsql_remove_control_socket_parameters_test() {
+ test_start "pgsql.pgsql_remove_control_socket_parameters_test"
+
+ # Let's wipe the whole database
+ pgsql_wipe
+
+ # We need to create an older database with lease data so we can
+ # verify the upgrade mechanisms which prepopulate the lease stat
+ # tables.
+ #
+ # Initialize database to schema 1.0.
+ pgsql_execute_script "@abs_top_srcdir@/src/bin/admin/tests/dhcpdb_create_1.0.pgsql"
+ assert_eq 0 "${EXIT_CODE}" "cannot initialize 1.0 database, expected exit code: %d, actual: %d"
+
+ # Now upgrade to schema 23.0
+ pgsql_upgrade_schema_to_version 23.0
+
+ # Now insert global parameter instances of control-socket.
+ sql=\
+"select set_config('kea.disable_audit', 'true', false);\
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-name','/tmp/socket',current_timestamp,4);
+ insert into dhcp4_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-type','unix',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-name','/tmp/socket',current_timestamp,4);
+ insert into dhcp6_global_parameter (name,value,modification_ts,parameter_type)\
+ values ('control-socket.socket-type','unix',current_timestamp,4);"
+
+ run_statement "insert control-socket map parameters" "$sql"
+
+ # Verify the inserted record counts.
+ qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
+ run_statement "#get 4_global parameter count before update" "$qry" 2
+
+ qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
+ run_statement "#get 6_global parameter count before update" "$qry" 2
+
+ # Upgrade to schema 24.0
+ pgsql_upgrade_schema_to_version 24.0
+
+ # Verify the record have been removed.
+ qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
+ run_statement "#get 4_global parameter count after update" "$qry" 0
+
+ qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
+ run_statement "#get 6_global parameter count after update" "$qry" 0
+
+ # Let's wipe the whole database
+ pgsql_wipe
+
+ test_finish 0
+}
+
# Run tests.
pgsql_db_init_test
pgsql_db_version_test
pgsql_reservation_mode_global_parameters_test
pgsql_reservation_mode_out_of_pool_parameters_test
pgsql_migrate_opt_record_type
+pgsql_remove_control_socket_parameters_test
third argument contains the IPv4 address in the requested-ip-address
option (if present).
-% DHCP4_V6_ONLY_PREFERRED_MISSING_IN_ACK v6-only-preferred option missing in 0.0.0.0 offer to query: %1
+% DHCP4_V6_ONLY_PREFERRED_MISSING_IN_ACK v6-only-preferred option missing in 0.0.0.0 reply to query: %1
An DHCPACK for the 0.0.0.0 address was generated for a client requesting
the v6-only-preferred (108) option but the option is not in the response as
expected: the erroneous response is dropped, the request query is displayed.
-- This line starts the schema upgrade to version 24.0.
+SET @disable_audit = 1;
+
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-type';
+
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-type';
+
+SET @disable_audit = 0;
+
-- Create a function to conditionally migrate option_def data type
-- values. If they are updating from 2.6.1 this has been done already
-- and we don't want to do it twice.
-- This line starts the schema upgrade to version 24.0.
+SET @disable_audit = 1;
+
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-type';
+
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-type';
+
+SET @disable_audit = 0;
+
-- Create a function to conditionally migrate option_def data type
-- values. If they are updating from 2.6.1 this has been done already
-- and we don't want to do it twice.
-- This line starts the schema upgrade to version 24.0.
+SELECT set_config('kea.disable_audit', 'true', false);
+
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-type';
+
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-type';
+
+SELECT set_config('kea.disable_audit', 'false', false);
+
-- Create a function to conditionally migrate option_def data type
-- values. If they are updating from 2.6.1 this has been done already
-- and we don't want to do it twice.
-- This line starts the schema upgrade to version 24.0.
+SELECT set_config('kea.disable_audit', 'true', false);
+
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp4_global_parameter WHERE name='control-socket.socket-type';
+
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-name';
+DELETE FROM dhcp6_global_parameter WHERE name='control-socket.socket-type';
+
+SELECT set_config('kea.disable_audit', 'false', false);
+
-- Create a function to conditionally migrate option_def data type
-- values. If they are updating from 2.6.1 this has been done already
-- and we don't want to do it twice.