Page MenuHomeVyOS Platform

Static-mapping commit fails for dhcpv6-server with "Duplicate IPv6 address 0" on Circinus
Closed, ResolvedPublicBUG

Description

After the T8953 backport was merged, the DHCPv6 server smoketests started to fail on Circinus.

ipv6-address/ipv6-prefix are single-value on Circinus (no <multi/>), so get_config_dict() returns strings, but the backported verify() iterates
over them as if they were lists โ€” walking the string character by character and tripping the duplicate check.
Need to revert the T8953 backport PR on Circinus.
Failing smoketests:

DEBUG - Running Testcase (47/92): /usr/libexec/vyos/tests/smoke/cli/test_service_dhcpv6-server.py
DEBUG - test_global_nameserver (__main__.TestServiceDHCPv6Server.test_global_nameserver) ... ok
DEBUG - test_prefix_delegation (__main__.TestServiceDHCPv6Server.test_prefix_delegation) ... ok
DEBUG - test_single_pool (__main__.TestServiceDHCPv6Server.test_single_pool) ... ERROR
DEBUG - test_static_mapping_duplicate_address_prefix (__main__.TestServiceDHCPv6Server.test_static_mapping_duplicate_address_prefix) ... ERROR
DEBUG - 
DEBUG - ======================================================================
DEBUG - ERROR: test_single_pool (__main__.TestServiceDHCPv6Server.test_single_pool)
DEBUG - ----------------------------------------------------------------------
DEBUG - Traceback (most recent call last):
DEBUG -   File "/usr/libexec/vyos/tests/smoke/cli/test_service_dhcpv6-server.py", line 146, in test_single_pool
DEBUG -     self.cli_commit()
DEBUG -   File "/usr/libexec/vyos/tests/smoke/cli/base_vyostest_shim.py", line 114, in cli_commit
DEBUG -     return self._session.commit()
DEBUG -            ^^^^^^^^^^^^^^^^^^^^^^
DEBUG -   File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 273, in commit
DEBUG -     out = self.__run_command([COMMIT])
DEBUG -           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEBUG -   File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 210, in __run_command
DEBUG -     raise ConfigSessionError(output)
DEBUG - vyos.configsession.ConfigSessionError: [ service dhcpv6-server ]
DEBUG - Duplicate IPv6 address "0" in static-mapping "client1" within shared-
DEBUG - network "SMOKE-1", subnet "2001:db8:f00::/64"!
DEBUG - [[service dhcpv6-server]] failed
DEBUG - Commit failed
DEBUG - 
DEBUG - 
DEBUG - ======================================================================
DEBUG - ERROR: test_static_mapping_duplicate_address_prefix (__main__.TestServiceDHCPv6Server.test_static_mapping_duplicate_address_prefix)
DEBUG - ----------------------------------------------------------------------
DEBUG - Traceback (most recent call last):
DEBUG -   File "/usr/libexec/vyos/tests/smoke/cli/test_service_dhcpv6-server.py", line 313, in test_static_mapping_duplicate_address_prefix
DEBUG -     self.cli_commit()
DEBUG -   File "/usr/libexec/vyos/tests/smoke/cli/base_vyostest_shim.py", line 114, in cli_commit
DEBUG -     return self._session.commit()
DEBUG -            ^^^^^^^^^^^^^^^^^^^^^^
DEBUG -   File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 273, in commit
DEBUG -     out = self.__run_command([COMMIT])
DEBUG -           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEBUG -   File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 210, in __run_command
DEBUG -     raise ConfigSessionError(output)
DEBUG - vyos.configsession.ConfigSessionError: [ service dhcpv6-server ]
DEBUG - Duplicate IPv6 address "0" in static-mapping "client1" within shared-
DEBUG - network "SMOKE-DUP", subnet "2001:db8:f00::/64"!
DEBUG - [[service dhcpv6-server]] failed
DEBUG - Commit failed
DEBUG - 
DEBUG - 
DEBUG - ----------------------------------------------------------------------
DEBUG - Ran 4 tests in 22.039s
DEBUG - 
DEBUG - FAILED (errors=2)

Details

Version
circinus
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

natali-rs1985 changed the task status from Open to In progress.
natali-rs1985 triaged this task as Normal priority.

Decision: rather than revert the validation, we'll do the backport properly โ€” add <multi/> to ipv6-address and ipv6-prefix in dhcpv6-server-common-config.xml.i so Circinus matches rolling. With the nodes multi-value, the existing loop-based verify() works as intended and the smoketests pass.
https://vyos.dev/T8862

natali-rs1985 moved this task from Need Triage to Completed on the VyOS Rolling board.