Tâche #35238
Distribution EOLE - Scénario #35224: Seth 2.9.0 : messages bizarre dans les logs
EOLE 2.9 : Mettre à niveau les configurations netplan
100%
Description
Le warning est visible sur tous les modules :
root@eolebase:~# netplan apply ** (generate:6509): WARNING **: 09:27:14.564: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details.
Pensez à vérifier les configurations des conteneurs ;)
Révisions associées
refactor(network): render network block if any route is enabled
Test for route variables content instead of using a boolean switch.
fix(network): configure default route in extra-routes
- dicos/02_advanced_network.xml: the `01-extras-routes.yaml` must
always be instanciated.
- tmpl/00-eole.yaml: remove the `gateway4` configuration.
- tmpl/01-extras-routes.yaml: add default route management for
`ethernet` and `bonding` interfaces.
Avoid error when accessing `%%route_adresse` if extra route is not
enabled.
fix(network): add default route for VLAN interfaces
This was missing in previous templates and can cause troubles for
admins that configured both `adresse_ip_gw` and some `vlan_gw_ethX`
variables.
style(network): remove blank lines in rendered 01-extras-routes.yaml
And improve readability by moving `dict` on dedicated line.
chore(creolelint) : add an exception for 01-extras-routes.yaml
Ref: #35238
ci(creolelint) : test 01-extras-routes.yaml template on Amon
Ref: #35238
Historique
#1 Mis à jour par Joël Cuissinat il y a environ un an
Il faut remplacer :
gateway4: 192.168.0.1
par :
routes: - to: default via: 192.168.0.1
#2 Mis à jour par Joël Cuissinat il y a environ un an
Attention : vérifier compatibilité avec les routes spécifiques déclarées dans 01-extras-routes.yaml !
Cf. https://dev-eole.ac-dijon.fr/squash/test-cases/4491/info
Réponse : C'est pas BON, la route spécifique n'est pas prise en compte :(
root@eolebase:/etc/netplan# cat 00-eole.yaml network: version: 2 renderer: networkd ethernets: enp2s0: link-local: [ ] addresses: - 192.168.0.24/24 routes: - to: default via: 192.168.0.1 root@eolebase:/etc/netplan# cat 01-extras-routes.yaml network: version: 2 renderer: networkd ethernets: enp2s0: routes: - to: 1.1.1.1/32 via: 192.168.0.254 metric: 100 root@eolebase:/etc/netplan# ip route | grep via default via 192.168.0.1 dev enp2s0 proto static
#3 Mis à jour par Joël Cuissinat il y a environ un an
- Tâche parente
#35224supprimé
#4 Mis à jour par Joël Cuissinat il y a environ un an
- Tracker changé de Tâche à Scénario
- Début
21/02/2023supprimé - Release mis à EOLE 2.9.0
- Points de scénarios mis à 2.0
#5 Mis à jour par Joël Cuissinat il y a environ un an
- Lié à Scénario #35224: Seth 2.9.0 : messages bizarre dans les logs ajouté
#6 Mis à jour par Daniel Dehennin il y a environ un an
- Statut changé de Nouveau à En cours
- Assigné à mis à Daniel Dehennin
#7 Mis à jour par Joël Cuissinat il y a environ un an
- Lié à Scénario #35224: Seth 2.9.0 : messages bizarre dans les logs supprimé
#8 Mis à jour par Joël Cuissinat il y a environ un an
- Tâche parente mis à #35237
#9 Mis à jour par Daniel Dehennin il y a environ un an
- Début mis à 22/02/2023
Les conteneurs n’utilisent pas netplan :
root@amonecole:~# ls /var/lib/lxc/*/rootfs/etc/netplan/ /var/lib/lxc/addc/rootfs/etc/netplan/: /var/lib/lxc/bdd/rootfs/etc/netplan/: /var/lib/lxc/internet/rootfs/etc/netplan/: /var/lib/lxc/partage/rootfs/etc/netplan/: /var/lib/lxc/reseau/rootfs/etc/netplan/:
#10 Mis à jour par Joël Cuissinat il y a environ un an
- Tâche parente changé de #35237 à #35224
#11 Mis à jour par Daniel Dehennin il y a environ un an
- Projet changé de Distribution EOLE à eole-common
#12 Mis à jour par Daniel Dehennin il y a environ un an
- Statut changé de En cours à Résolu
- % réalisé changé de 0 à 100
#13 Mis à jour par Joël Cuissinat il y a environ un an
Petit soucis, on tombe sur un bug CreoleLint !
\-- /usr/share/eole/creole/distrib/01-extras-routes.yaml ('/usr/share/eole/creole/distrib/01-extras-routes.yaml', ':', Exception('Il manque une option, la variable existe et a la valeur "[\'0\']" cette erreur arrive parfois quand on redéfinit une variable d\'un dictionnaire dans un template, avec le dictionnaire {\'nombre_interfaces\': \'1\', \'adresse_ip_gw\': \'192.168.0.1\', \'eth0_method\': \'non géré\', \'nom_zone_eth0\': \'enp2s0\', \'route_adresse\': {\'value\': [\'255.255.255.0\'], \'slave\': {\'route_netmask\': [\'255.255.255.0\'], \'route_gw\': [\'192.168.5.1\'], \'route_int\': [\'0\'], \'route_vlan_id\': [None]}}, \'activer_route\': \'oui\'}'))
À défaut de pouvoir corriger facilement, il faut mettre un contournement pour les tests Jenkins ;)
#14 Mis à jour par Klaas TJEBBES il y a environ un an
- Statut changé de Résolu à Fermé
- Restant à faire (heures) mis à 0.0
J'ai bien les routes fantaisistes que j'ai ajouté dans gen_config :
root@scribe:~# route -n Table de routage IP du noyau Destination Passerelle Genmask Indic Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 enp2s0 10.88.0.0 0.0.0.0 255.255.0.0 U 0 0 0 cni-podman0 172.16.24.1 192.168.0.36 255.255.255.255 UGH 100 0 0 enp2s0 172.16.45.0 192.168.0.12 255.255.255.0 UG 100 0 0 enp2s0 192.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0 root@scribe:~# ip route default via 192.168.0.1 dev enp2s0 proto static 10.88.0.0/16 dev cni-podman0 proto kernel scope link src 10.88.0.1 172.16.24.1 via 192.168.0.36 dev enp2s0 proto static metric 100 172.16.45.0/24 via 192.168.0.12 dev enp2s0 proto static metric 100 192.0.2.0/24 dev br0 proto kernel scope link src 192.0.2.1 192.168.0.0/24 dev enp2s0 proto kernel scope link src 192.168.0.26