Crushing BGP commit with import vrf

Commit crash when I’m trying to import VRF to the other

Report time:      2022-12-13 19:16:20
Image version:    VyOS 1.4-rolling-202212130326
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Tue 13 Dec 2022 03:26 UTC
Build UUID:       f64b6613-642b-48f1-8e7c-1cbb7c8f8f87
Build commit ID:  f56f9f9d7bc169

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    7e548995-8213-4c7d-a0e9-14f8b970600f

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 388, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/protocols_bgp.py", line 379, in apply
    frr_cfg.commit_configuration(bgp_daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 480, in commit_configuration
    raise ConfigurationNotValid(f'Config commit retry counter ({count_max}) exceeded for {daemon} dameon!')
vyos.frr.ConfigurationNotValid: Config commit retry counter (5) exceeded for bgpd dameon!

A crash occurs when this commands are used:

set interfaces ethernet eth1 address '10.0.255.69/27'
set interfaces ethernet eth1 vrf 'ROUTER'
set interfaces ethernet eth4 address '10.0.40.3/28'
set interfaces ethernet eth4 vrf 'CUSTOMER'
set protocols bgp parameters router-id '10.0.255.33'
set protocols bgp system-as '65011'
set vrf name CUSTOMER protocols bgp address-family ipv4-unicast rd vpn export '65011:1050'
set vrf name CUSTOMER protocols bgp address-family ipv4-unicast redistribute connected
set vrf name CUSTOMER protocols bgp address-family ipv4-unicast route-target vpn both '65011:1050'
set vrf name CUSTOMER protocols bgp system-as '65011'
set vrf name CUSTOMER table '300'
set vrf name ROUTER protocols bgp address-family ipv4-unicast rd vpn export '65011:1011'
set vrf name ROUTER protocols bgp address-family ipv4-unicast redistribute connected
set vrf name ROUTER protocols bgp address-family ipv4-unicast import vrf CUSTOMER
set vrf name ROUTER protocols bgp address-family ipv4-unicast route-target vpn both '65011:1011'
set vrf name ROUTER protocols bgp address-family ipv4-unicast route-target vpn import '65011:1050'
set vrf name ROUTER protocols bgp system-as '65011'
set vrf name ROUTER table '301'

Hello @kocifi
FRR does not allow to use import vrf and (rd vpn or route-target vpn) together.

I created bug report ⚓ T4877 Need verification in using import vrf and import vpn, export vpn commands to avoid such situation. Thanks for helping us with bug finding.