OvS ne fonctionne pas après un redémarrage

Tags: #<Tag:0x00007f63f28b5210> #<Tag:0x00007f63f28b5030>

Bonjour,

Après avoir poussé la configuration ifupdown dans le fichier d’interfaces et redémarré le service networking, le switch OvS se monte bien, je peux faire un ping à travers le trunk ens19 vers le tunnel gre. Mais lorsque je redémarre la VM, le service réseau démarre sans erreur, le commutateur OvS est construit mais rien n’est transmis. Je dois redémarrer le service networking après avoir démonté la VM pour que les flux soient à nouveau transmis. Il n’y a pas d’erreur dans les logs et je ne vois pas ce que je peux faire pour résoudre ce problème. Quelqu’un a-t-il une idée ?

Merci :slight_smile:

Debian 12 Bookworm - 6.1.0-10-amd64 avec systemd (252.6-1), ifupdown (0.8.41) et openvswitch (3.1.0-2)

# The primary network interface
auto ens18
iface ens18 inet static
        address 10.0.0.2/18
        gateway 10.0.0.1
        
auto vmbr0
allow-ovs vmbr0
iface vmbr0 inet manual
        address 10.0.64.10/18
        #netmask 255.255.192.0
        ovs_type OVSBridge
        ovs_ports ens19 gre0

allow-vmbr0 gre0
iface gre0 inet manual
        ovs_bridge vmbr0
        ovs_type OVSTunnel
        ovs_tunnel_type gre
        ovs_tunnel_options options:remote_ip=172.16.4.2 options:trunks=3

allow-vmbr0 ens19
iface ens19 inet manual
        ovs_bridge vmbr0
        ovs_type OVSPort

2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 2e:68:5a:42:3c:22 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 10.0.0.2/18 brd 10.0.63.255 scope global ens18
       valid_lft forever preferred_lft forever
    inet6 fe80::2c68:5aff:fe42:3c22/64 scope link
       valid_lft forever preferred_lft forever
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000
    link/ether ea:b8:e7:5f:56:9c brd ff:ff:ff:ff:ff:ff
    altname enp0s19
    inet6 fe80::e8b8:e7ff:fe5f:569c/64 scope link
       valid_lft forever preferred_lft forever
6: gre0@NONE: <NOARP,UP,LOWER_UP> mtu 1476 qdisc noqueue state UNKNOWN group default qlen 1000
    link/gre 0.0.0.0 brd 0.0.0.0
    inet6 fe80::a00:2/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::7f00:1/64 scope host
       valid_lft forever preferred_lft forever
7: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
8: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none
    inet 172.16.4.1/22 scope global wg0
       valid_lft forever preferred_lft forever
14: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 02:3d:f4:2d:e9:e9 brd ff:ff:ff:ff:ff:ff
15: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether aa:b2:49:24:0c:41 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a8b2:49ff:fe24:c41/64 scope link
       valid_lft forever preferred_lft forever
16: gre_sys@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65000 qdisc fq_codel master ovs-system state UNKNOWN group default qlen 1000
    link/ether 96:77:dc:26:46:84 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::9097:2bff:fe2a:2bb/64 scope link
       valid_lft forever preferred_lft forever

image

Voici le diagramme du réseau, j’essaie de faire un ping depuis VM1 sur l’interface vmbr0 du VPS qui a l’IP de test 10.0.64.11.
Après le redémarrage de VM2, le ping ne fonctionne pas, mais après un systemctl restart networking.service, le ping fonctionne à nouveau.
J’ai le même comportement sans passer par ifupdown et en configurant à la main avec ip-link et ovs-vsctl (après chaque redémarrage, je dois détruire le pont OvS3 et le reconstruire). De plus la directive address de l’interface vmbr0 n’est pas appliquée par ifupdown, cette interface ne prend pas l’ip 10.0.64.10 …

juil. 07 17:44:21 routix systemd[1]: Stopping ovs-record-hostname.service - Open vSwitch Record Hostname...
juil. 07 17:44:21 routix systemd[1]: ovs-record-hostname.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped ovs-record-hostname.service - Open vSwitch Record Hostname.
juil. 07 17:44:21 routix systemd[1]: Requested transaction contradicts existing jobs: Transaction for openvswitch-switch.service/start is destructive (ovs-vswitchd.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1740]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (ovs-vswitchd.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ovs-vsctl[1741]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port vmbr0 gre0
juil. 07 17:44:21 routix ovs-vsctl[1759]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port vmbr0 ens19
juil. 07 17:44:21 routix ovs-vsctl[1775]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-br vmbr0
juil. 07 17:44:21 routix kernel: device ovs-system left promiscuous mode
juil. 07 17:44:21 routix systemd[1]: Stopping ovs-vswitchd.service - Open vSwitch Forwarding Unit...
juil. 07 17:44:21 routix ovs-ctl[1806]: Exiting ovs-vswitchd (503).
juil. 07 17:44:21 routix systemd[1]: ovs-vswitchd.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped ovs-vswitchd.service - Open vSwitch Forwarding Unit.
juil. 07 17:44:21 routix systemd[1]: ovs-vswitchd.service: Consumed 1min 7.508s CPU time.
juil. 07 17:44:21 routix systemd[1]: Stopping ovsdb-server.service - Open vSwitch Database Unit...
juil. 07 17:44:21 routix ovs-ctl[1827]: Exiting ovsdb-server (446).
juil. 07 17:44:21 routix systemd[1]: ovsdb-server.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped ovsdb-server.service - Open vSwitch Database Unit.
juil. 07 17:44:21 routix systemd[1]: ovsdb-server.service: Consumed 8.394s CPU time.
juil. 07 17:50:42 routix systemd[1]: Starting ovsdb-server.service - Open vSwitch Database Unit...
juil. 07 17:50:43 routix ovs-ctl[391]: Starting ovsdb-server.
juil. 07 17:50:43 routix ovs-vsctl[455]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=8.3.1
juil. 07 17:50:43 routix ovs-vsctl[460]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=3.1.0 "external-ids:system-id=\"cff817de-ca28-47b9-be0e-2e06234da6de\"" "external-ids:rundir=\"/var/run/openvswitch\"" "system-type=\"debian\"" "system-version=\"12\""
juil. 07 17:50:43 routix ovs-ctl[391]: Configuring Open vSwitch system IDs.
juil. 07 17:50:43 routix ovs-ctl[391]: Enabling remote OVSDB managers.
juil. 07 17:50:43 routix systemd[1]: Started ovsdb-server.service - Open vSwitch Database Unit.
juil. 07 17:50:43 routix systemd[1]: Starting ovs-vswitchd.service - Open vSwitch Forwarding Unit...
juil. 07 17:50:43 routix ovs-ctl[493]: Inserting openvswitch module.
juil. 07 17:50:43 routix ovs-ctl[464]: Starting ovs-vswitchd.
juil. 07 17:50:43 routix ovs-ctl[464]: Enabling remote OVSDB managers.
juil. 07 17:50:43 routix systemd[1]: Started ovs-vswitchd.service - Open vSwitch Forwarding Unit.
juil. 07 17:50:44 routix ovs-vsctl[545]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-br vmbr0 --
juil. 07 17:50:44 routix kernel: device ovs-system entered promiscuous mode
juil. 07 17:50:44 routix kernel: Failed to associated timeout policy `ovs_test_tp'
juil. 07 17:50:44 routix ovs-vsctl[570]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-port vmbr0 ens19 --
juil. 07 17:50:44 routix ovs-vsctl[587]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --may-exist add-port vmbr0 gre0 -- set Interface gre0 type=gre options:remote_ip=172.16.4.2 options:trunks=3 --
juil. 07 17:50:44 routix systemd[1]: Starting ovs-record-hostname.service - Open vSwitch Record Hostname...
juil. 07 17:50:44 routix ovs-vsctl[655]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait add Open_vSwitch . external-ids hostname=routix.rt.local.fr
juil. 07 17:50:44 routix systemd[1]: Finished ovs-record-hostname.service - Open vSwitch Record Hostname.

juil. 07 17:44:21 routix systemd[1]: openvswitch-switch.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped openvswitch-switch.service - Open vSwitch.
juil. 07 17:44:21 routix systemd[1]: Requested transaction contradicts existing jobs: Transaction for openvswitch-switch.service/start is destructive (ovs-vswitchd.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1740]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (ovs-vswitchd.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1740]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:44:21 routix systemd[1]: Requested transaction contradicts existing jobs: Transaction for openvswitch-switch.service/start is destructive (lvm2-monitor.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1758]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (lvm2-monitor.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1758]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:44:21 routix systemd[1]: Requested transaction contradicts existing jobs: Transaction for openvswitch-switch.service/start is destructive (local-fs-pre.target has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1773]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (local-fs-pre.target has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1773]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:50:43 routix ovs-vsctl[460]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=3.1.0 "external-ids:system-id=\"cff817de-ca28-47b9-be0e-2e06234da6de\"" "external-ids:rundir=\"/var/run/openvswitch\"" "system-type=\"debian\"" "system-version=\"12\""
juil. 07 17:50:43 routix kernel: openvswitch: Open vSwitch switching datapath
juil. 07 17:50:43 routix ovs-ctl[493]: Inserting openvswitch module.
juil. 07 17:50:43 routix systemd[1]: Starting openvswitch-switch.service - Open vSwitch...
juil. 07 17:50:43 routix systemd[1]: Finished openvswitch-switch.service - Open vSwitch.

juil. 07 17:44:21 routix systemd[695]: Closed dirmngr.socket - GnuPG network certificate management daemon.
juil. 07 17:44:21 routix systemd[1]: Stopped target network-online.target - Network is Online.
juil. 07 17:44:21 routix systemd[1]: Stopped target network.target - Network.
juil. 07 17:44:21 routix systemd[1]: Stopping networking.service - Raise network interfaces...
juil. 07 17:44:21 routix systemd[1]: networking.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped networking.service - Raise network interfaces.
juil. 07 17:50:43 routix systemd[1]: Starting networking.service - Raise network interfaces...
juil. 07 17:50:44 routix systemd[1]: Finished networking.service - Raise network interfaces.
juil. 07 17:50:44 routix systemd[1]: Reached target network.target - Network.
juil. 07 17:50:44 routix systemd[1]: Reached target network-online.target - Network is Online.
juil. 07 19:11:11 routix systemd[708]: Listening on dirmngr.socket - GnuPG network certificate management daemon.

juil. 07 17:44:21 routix systemd[1]: Stopping wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0...
juil. 07 17:44:21 routix wg-quick[1699]: [#] wg showconf wg0
juil. 07 17:44:21 routix wg-quick[1676]: [#] ip link delete dev wg0
juil. 07 17:44:21 routix systemd[1]: wg-quick@wg0.service: Deactivated successfully.
juil. 07 17:44:21 routix systemd[1]: Stopped wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0.
juil. 07 17:44:21 routix systemd[1]: Removed slice system-wg\x2dquick.slice - Slice /system/wg-quick.
juil. 07 17:50:41 routix systemd[1]: Created slice system-wg\x2dquick.slice - Slice /system/wg-quick.
juil. 07 17:50:44 routix systemd[1]: Starting wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0...
juil. 07 17:50:44 routix wg-quick[636]: [#] ip link add wg0 type wireguard
juil. 07 17:50:44 routix wg-quick[636]: [#] wg setconf wg0 /dev/fd/63
juil. 07 17:50:44 routix wg-quick[636]: [#] ip -4 address add 172.16.4.1/22 dev wg0
juil. 07 17:50:44 routix wg-quick[636]: [#] ip link set mtu 1420 up dev wg0
juil. 07 17:50:44 routix systemd[1]: Finished wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0.

juil. 06 22:48:57 routix systemd[1]: Starting ifupdown-pre.service - Helper to synchronize boot up for ifupdown...
juil. 06 22:48:57 routix systemd[1]: Finished ifupdown-pre.service - Helper to synchronize boot up for ifupdown.
juil. 07 17:50:42 routix systemd[1]: Starting ifupdown-pre.service - Helper to synchronize boot up for ifupdown...
juil. 07 17:50:42 routix systemd[1]: Finished ifupdown-pre.service - Helper to synchronize boot up for ifupdown.

juil. 07 17:44:21 routix ifdown[1740]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (ovs-vswitchd.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1740]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:44:21 routix ifdown[1758]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (lvm2-monitor.service has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1758]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:44:21 routix ifdown[1773]: Failed to start openvswitch-switch.service: Transaction for openvswitch-switch.service/start is destructive (local-fs-pre.target has 'stop' job queued, but 'start' is included in transaction).
juil. 07 17:44:21 routix ifdown[1773]: See system logs and 'systemctl status openvswitch-switch.service' for details.
juil. 07 17:44:21 routix ifdown[1774]: ifdown: interface ens19 not configured
juil. 07 17:44:21 routix ifdown[1774]: ifdown: interface gre0 not configured

Après reboot et avant systemctl restart networking.service
image

VM qui tente de joindre le VPS avant/apres
image

Hello @GaMMachiPo

Bienvenu ici, ce serait étonnant que ton problème soit « similaire » au mien (voir mon dernier post), mais regarde du côté du service systemd-resolved … qui n’est peut-être pas terminé au début de ton ping.

Salut @PmGs ,
Pour le coup je n’ai pas de service de resolver via systemd et j’utilise pas encore de noms pour mes tests, seulement des IP.

image

Mais effectivement les 1er ping peuvent ne pas passer le temps de la résolution ARP mais ici le ping ne passe pas même passé le délai de résolution (qui peut légèrement varier) donc RAS niveau ARP, la résolution est op dès que le lien remonte après le redémarrage du service.

Bonjour.

Pas de capture d’écran !
Car elles sont généralement illisibles donc incompréhensibles.
Merci de faire juste un copier coller de la commande et son résultat et de les insérer en utilisant le bouton [ </> ] (Texte préformaté ].

Moi aussi je n’utilisais que des ping d’adresses IP … ceci dit ma table arp était vide.

Les flux a destionation d’IP n’utilise pas systemd-resolved je pense. Apres ça fait peu-etre planter le deamon du réseau si il se lance mal ou autre ?

A la fin c’est souvent un pb bête … mais encore faut-il le trouver.

J’avais 6 teminaux ouverts sous les yeux

  • 1 pour mes cdes
  • 1 avec les logs
  • 1 avec un watch sur ip a, tp r et ip n show
  • 1 sur tcpdump arp
  • 1 sur tcpdump spécifique