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

Fix type mismatch between table and view #6039

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

internet-diglett
Copy link
Contributor

@internet-diglett internet-diglett commented Jul 10, 2024

vlan_id column in switchport settings child table is type Int4, but bgp_peer_view's diesel schema is Int8, causing an error when deserializing data from the view (allocated buffer is larger than the received bytes).

Test Results (a4x2 POP topo)

20:31:15.191Z INFO 173b096a-1fd5-41d6-819b-6d9c939e9eb4 (ServerContext): applying bgp config
    background_task = switch_port_config_manager
    config = ApplyRequest { asn: 65547, checker: None, originate: [Prefix4 { length: 24, value: 198.51.100.0 }, Prefix4 { length: 24, value: 203.0.113.0 }], peers: {"
qsfp0": [BgpPeerConfig { allow_export: NoFiltering, allow_import: NoFiltering, communities: [], connect_retry: 3, delay_open: 3, enforce_first_as: false, hold_time: 6
, host: "169.254.10.1:179", idle_hold_time: 3, keepalive: 2, local_pref: None, md5_auth_key: None, min_ttl: None, multi_exit_discriminator: None, name: "169.254.10.1"
, passive: false, remote_asn: None, resolution: 100, vlan_id: None }, BgpPeerConfig { allow_export: NoFiltering, allow_import: NoFiltering, communities: [], connect_r
etry: 0, delay_open: 0, enforce_first_as: false, hold_time: 6, host: "169.254.30.1:179", idle_hold_time: 0, keepalive: 2, local_pref: None, md5_auth_key: None, min_tt
l: None, multi_exit_discriminator: None, name: "169.254.30.1", passive: false, remote_asn: None, resolution: 100, vlan_id: Some(300) }]}, shaper: None }
    file = nexus/src/app/background/tasks/sync_switch_configuration.rs:820
    rack_id = e077dad7-287d-4ac7-a263-63ad6a9ad9d5
    switch_location = Switch0
20:31:15.191Z INFO 173b096a-1fd5-41d6-819b-6d9c939e9eb4 (ServerContext): applying bgp config
    background_task = switch_port_config_manager
    config = ApplyRequest { asn: 65547, checker: None, originate: [Prefix4 { length: 24, value: 198.51.100.0 }, Prefix4 { length: 24, value: 203.0.113.0 }], peers: {"
qsfp0": [BgpPeerConfig { allow_export: NoFiltering, allow_import: NoFiltering, communities: [], connect_retry: 3, delay_open: 3, enforce_first_as: false, hold_time: 6
, host: "169.254.20.1:179", idle_hold_time: 3, keepalive: 2, local_pref: None, md5_auth_key: None, min_ttl: None, multi_exit_discriminator: None, name: "169.254.20.1"
, passive: false, remote_asn: None, resolution: 100, vlan_id: None }, BgpPeerConfig { allow_export: NoFiltering, allow_import: NoFiltering, communities: [], connect_r
etry: 0, delay_open: 0, enforce_first_as: false, hold_time: 6, host: "169.254.40.1:179", idle_hold_time: 0, keepalive: 2, local_pref: None, md5_auth_key: None, min_tt
l: None, multi_exit_discriminator: None, name: "169.254.40.1", passive: false, remote_asn: None, resolution: 100, vlan_id: Some(400) }]}, shaper: None }
    file = nexus/src/app/background/tasks/sync_switch_configuration.rs:820
    rack_id = e077dad7-287d-4ac7-a263-63ad6a9ad9d5
    switch_location = Switch1

Related

Resolves #6023

vlan_id column in switchport settings child table is type Int4,
but bgp_peer_view's diesel schema is Int8, causing an error when
deserializing data from the view (allocated buffer is larger than
the received bytes).
@internet-diglett internet-diglett marked this pull request as ready for review July 10, 2024 20:27
Copy link
Contributor

@rcgoodfellow rcgoodfellow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@internet-diglett internet-diglett enabled auto-merge (squash) July 10, 2024 20:47
@internet-diglett internet-diglett merged commit 09d7fc7 into main Jul 10, 2024
19 checks passed
@internet-diglett internet-diglett deleted the bugfix-issue-6023 branch July 10, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database error reading BGP peer configs
2 participants