Skip to content
Commit 50f738bd authored by Beniamino Galvani's avatar Beniamino Galvani
Browse files

veth: fix detection of existing interfaces in create_and_realize()

The current implementation only checks that a device with name equal
to veth.peer exists and it has a parent device; it doesn't check that
its parent is actually the device we want to create. So for example,
if the profile specifies interface-name A and peer B, while in
platform we have a veth pair {B,C}, we'll skip the interface creation
and the device will remain without a ifindex, leading to a crash
later. Fix this by adding the missing check.

While at it, don't implement the check by inspecting NMDevices but
look directly at the platform cache; that seems more robust because
devices are often updated from platform events via idle handlers and
so the information there could be outdated.

Fixes: 07e0ab48 ('veth: drop iface peer check during create_and_realize()')

https://bugzilla.redhat.com/show_bug.cgi?id=2129829
parent bdd826a0
Pipeline #765755 failed with stages
in 36 minutes and 11 seconds
  • Beniamino Galvani @bgalvani

    mentioned in commit 9131829f

    ·

    mentioned in commit 9131829f

    Toggle commit list
  • NetworkManagerCI @NetworkManagerCI ·
    Maintainer

    https://jenkins-networkmanager.apps.ocp.ci.centos.org/job/NetworkManager-code-mr/2711/

    Result: UNSTABLE: Some tests failed

    M0 FAIL: Passed: 587, Failed: 1, Skipped: 69

    M1 PASS: Passed: 616, Failed: 0, Skipped: 43

    Passed: 1203, Failed 1, Skipped 112.

    Executed on: CentOS 9-stream

    Failed tests:

    nmstate_upstream

    Skipped tests:

    bond_default_rhel7_slaves_ordering bond_8023ad_with_vlan_srcmac bond_set_balance_slb_options bridge_add_forward_delay bridge_set_mac bridge_set_mac_var2 bridge_down_to_l2_only dracut_NM_NFS_root_dhcp dracut_NM_NFS_root_dhcp_ip_dhcp_neednet dracut_NM_NFS_root_dhcp_ip_dhcp_peerdns0 dracut_NM_NFS_root_dhcp_vendor_class dracut_NM_NFS_root_nfs_ip_dhcp_mtu dracut_NM_NFS_root_nfs_ip_dhcp_mtu_cloned_mac dracut_NM_NFS_root_nfs_ip_dhcp_hostname dracut_NM_NFS_root_nfs_ip_dhcp_rd_routes dracut_NM_NFS_root_nfs_ip_dhcp_dhcp6_slow_ip4 dracut_NM_NFS_root_nfs_ip_dhcp_dhcp6_slow_ip6 dracut_NM_NFS_root_nfs_ip_dhcp_dhcp6_with_ip46_and_ip6_nic dracut_NM_NFS_root_nfs_ip_dhcp_dhcp6_with_slow_ip46_and_ip6_nic dracut_NM_NFS_root_nfs_ip_dhcp_dhcp6_with_slow_ip64_and_ip6_nic dracut_NM_NFS_root_nfs_ip_manual_dhcp dracut_NM_NFS_root_nfs_ip_manual_gateway_hostname_mac dracut_NM_NFS_root_nfs_ip_manual_mtu dracut_NM_NFS_root_nfs_ip_manual_mtu_cloned_mac dracut_NM_NFS_root_nfs_ip_manual_dns1 dracut_NM_NFS_root_nfs_ip_manual_dns2 dracut_NM_NFS_root_nfs_ip_manual_dns3 dracut_NM_NFS_root_nfs_ip_manual_custom_ifname dracut_NM_NFS_root_nfs_ip_off dracut_NM_NFS_remote_rootfs_connection dracut_NM_NFS_remote_rootfs_connection_var2 dracut_NM_NFS_root_nfs_ip_auto6 dracut_NM_NFS_root_nfs_ip_dhcp6 dracut_NM_NFS_root_nfs_ip_manual6_gateway_hostname_mac dracut_NM_NFS_root_nfs_ipv6_disable dracut_NM_iSCSI_netroot_dhcp dracut_NM_iSCSI_netroot_dhcp_ip_dhcp dracut_NM_iSCSI_ibft_table dracut_NM_iSCSI_multiple_targets dracut_NM_bridge_custom_name_2_ifaces dracut_NM_vlan_mutliple_over_nic dracut_NM_vlan_over_bridge dracut_NM_vlan_over_bond dracut_NM_vlan_over_team_no_boot dracut_legacy_iSCSI_ibft_table ethernet_default_initramfs_connection ethernet_mac_address_rhel7_default 8021x_auto_auth_retry_with_backup_network ethtool_features_pause nmcli_general_profile_pickup_doesnt_break_network CAP_SYS_ADMIN_for_ibft run_once_new_connection nm_wait_online_requisite_NM nm_wait_online_requires_NM ctc_device_recognition no_assumed_wired_connections nmcli_device_attempt_hw_delete nmcli_novice_mode_readline device_dbus_signal NM_syslog_in_anaconda snapshot_rollback_sriov crashing_NM_binary libreswan_ikev1_aggressive libreswan_ikev1_main libreswan_add_profile_wrong_password libreswan_activate_asking_for_password libreswan_activate_asking_for_password_with_delay libreswan_activate_asking_for_password_and_secret libreswan_reimport ipv4_ignore_resolveconf_with_ignore_auto_dns_var2 ipv4_dns_resolvconf_rhel7_default ipv4_dns_resolvconf_file renewal_gw_after_dhcp_outage renewal_gw_after_long_dhcp_outage renewal_gw_after_dhcp_outage_for_assumed_var0 renewal_gw_after_dhcp_outage_for_assumed_var1 dhcp4_outages_in_various_situation ipv4_rp_filter_set_loose ipv4_rp_filter_set_loose_rhel ipv4_rp_filter_do_not_touch ipv4_rp_filter_reset ipv4_rp_filter_reset_rhel nm_dhcp_lease_renewal_link_down ipv4_dhcp_client_id_change_lease_restart dhcp_rebind_with_firewall dhcp_rebind_with_firewall_var2 ipv6_limited_router_solicitation solicitation_period_prolonging ipv6_shared_connection_error ipv6_NM_stable_with_internal_DHCPv6 persistent_default_ipv6_gw persistent_ipv6_routes ipv6_keep_route_upon_reapply_full nmtui_simwifi_connect_to_wep_hexkey_network nmtui_simwifi_connect_to_wep_asciikey_network nmtui_simwifi_wep_hexkey_connection nmtui_simwifi_wep_ascii_connection nmtui_simwifi_show_password openvswitch_ignore_ovs_network_setup openvswitch_ignore_ovs_vlan_network_setup openvswitch_ignore_ovs_bond_network_setup restart_NM_with_mixed_setup strongswan_connection_renewal config_lacp teamd_logging vlan_create_1000_bridges_over_1000_vlans vpnc_add_profile vpnc_terminate simwifi_wep_ttls_mschapv2_eap simwifi_wep_ask_passwd simwifi_wep_tls simwifi_wep_peap_gtc

  • NetworkManagerCI @NetworkManagerCI ·
    Maintainer
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment