Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgp filters not making it to bootstore. #6067

Closed
rcgoodfellow opened this issue Jul 12, 2024 · 1 comment · Fixed by #6072
Closed

bgp filters not making it to bootstore. #6067

rcgoodfellow opened this issue Jul 12, 2024 · 1 comment · Fixed by #6072
Labels
bug Something that isn't working. networking Related to the networking.
Milestone

Comments

@rcgoodfellow
Copy link
Contributor

It's been observed that bgp allow import/export filters are not making it to the bookstore. This was observed during a rack update. Previously all of these peers had values in these lists.

# curl http://[fd00:1122:3344:11f::1]:12345/network-bootstore-config | jq ".body.rack_network_config.ports[0].bgp_peers"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3801  100  3801    0     0  3653k      0 --:--:-- --:--:-- --:--:-- 3711k
[
  {
    "asn": 65003,
    "port": "qsfp0",
    "addr": "45.154.216.3",
    "hold_time": 6,
    "idle_hold_time": 0,
    "delay_open": 3,
    "connect_retry": 3,
    "keepalive": 2,
    "remote_asn": null,
    "min_ttl": null,
    "md5_auth_key": null,
    "multi_exit_discriminator": null,
    "communities": [],
    "local_pref": null,
    "enforce_first_as": false,
    "allowed_import": {
      "type": "no_filtering"
    },
    "allowed_export": {
      "type": "allow",
      "value": []
    },
    "vlan_id": null
  }
]
@rcgoodfellow rcgoodfellow added bug Something that isn't working. networking Related to the networking. labels Jul 12, 2024
@rcgoodfellow rcgoodfellow added this to the 9 milestone Jul 12, 2024
@rcgoodfellow
Copy link
Contributor Author

I believe the problem may be with this code.

let allow_export = match self.datastore.allow_export_for_peer(
opctx,
port.port_settings_id.unwrap(),
&peer.port,
IpNetwork::from(IpAddr::from(peer.addr)),
).await {

The 3rd parameter should be peer.interface_name and not peer.port.

Considering the function signature being called

pub async fn allow_export_for_peer(
&self,
opctx: &OpContext,
port_settings_id: Uuid,
interface_name: &String,
addr: IpNetwork,
) -> LookupResult<Option<Vec<SwitchPortBgpPeerConfigAllowExport>>> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working. networking Related to the networking.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant