To reproduce the bug use non exists pool for the translation rules
set nat cgnat pool external ext-01 external-port-range '1024-65535' set nat cgnat pool external ext-01 per-user-limit port '2000' set nat cgnat pool external ext-01 range 192.168.122.222/32 set nat cgnat pool internal int-01 range '100.64.0.0/28' set nat cgnat rule 10 source pool 'fake-pool' set nat cgnat rule 10 translation pool 'ext-01'
commit:
vyos@r4# commit [ nat cgnat ] VyOS had an issue completing a command. Report time: 2024-05-16 15:23:29 Image version: VyOS 1.5-rolling-202405140019 Release train: current Built by: autobuild@vyos.net Built on: Tue 14 May 2024 02:55 UTC Build UUID: c30a637d-f3c1-473e-8af6-03c9bfaf0729 Build commit ID: 3463386246a9ac Architecture: x86_64 Boot via: installed image System type: KVM guest Hardware vendor: QEMU Hardware model: Standard PC (Q35 + ICH9, 2009) Hardware S/N: Hardware UUID: 166cfd25-7d3a-4eca-9ef6-0b655c9acf0f Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/nat_cgnat.py", line 284, in <module> generate(c) File "/usr/libexec/vyos/conf_mode/nat_cgnat.py", line 240, in generate i_count = IPOperations(int_range).get_ips_count() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/libexec/vyos/conf_mode/nat_cgnat.py", line 39, in __init__ self.ip_network = ipaddress.ip_network(ip_prefix) if '/' in ip_prefix else None ^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable [[nat cgnat]] failed Commit failed [edit] vyos@r4#