When defining BGP peer-groups, I've noticed that the current config CLI is failing to set the import route map when address-family is ipv4-unicast. The export route map is defined correctly, and both import and export route-maps are defined correctly when working on an ipv6-unicast peer group.
I am able to consistently reproduce this error using the below config:
set protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast nexthop-self set protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast route-map export 'RR-INTERNAL-EXPORT-V4' set protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast route-map import 'RR-INTERNAL-IMPORT-V4' set protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast soft-reconfiguration inbound set protocols bgp ASN peer-group INTERNAL_V4 disable-connected-check set protocols bgp ASN peer-group INTERNAL_V4 remote-as 'ASN' set protocols bgp ASN peer-group INTERNAL_V4 update-source 'x.x.x.x' set protocols bgp ASN peer-group INTERNAL_V6 address-family ipv6-unicast nexthop-self set protocols bgp ASN peer-group INTERNAL_V6 address-family ipv6-unicast route-map export 'RR-INTERNAL-EXPORT-V6' set protocols bgp ASN peer-group INTERNAL_V6 address-family ipv6-unicast route-map import 'RR-INTERNAL-IMPORT-V6' set protocols bgp ASN peer-group INTERNAL_V6 address-family ipv6-unicast soft-reconfiguration inbound set protocols bgp ASN peer-group INTERNAL_V6 disable-connected-check set protocols bgp ASN peer-group INTERNAL_V6 remote-as 'ASN' set protocols bgp ASN peer-group INTERNAL_V6 update-source 'x:x::x' set protocols bgp ASN neighbor y.y.y.y peer-group 'INTERNAL_V4' set protocols bgp ASN neighbor y:y::y peer-group 'INTERNAL_V6'
The CLI shows the following after commiting the above:
peer-group INTERNAL_V4 { address-family { ipv4-unicast { nexthop-self route-map { export RR-INTERNAL-EXPORT-V4 } soft-reconfiguration { inbound } } } capability { dynamic } disable-connected-check remote-as ASN update-source x.x.x.x } peer-group INTERNAL_V6 { address-family { ipv6-unicast { nexthop-self route-map { export RR-INTERNAL-EXPORT-V6 import RR-INTERNAL-IMPORT-V6 } soft-reconfiguration { inbound } } } disable-connected-check remote-as ASN update-source x:x::x }
If I then attempt to add the missing import route-map, I see the following error:
Configuration path: [protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast route-map import RR-INTERNAL-IMPORT-V4] already exists
To fix, I then have to:
delete protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast route-map import RR-INTERNAL-IMPORT-V4 commit set protocols bgp ASN peer-group INTERNAL_V4 address-family ipv4-unicast route-map import RR-INTERNAL-IMPORT-V4 commit