Projet

Général

Profil

Tâche #10017

Scénario #10184: Stabiliser le script d'agrégation sur amon 2.4

problème agregation amon 2.4

Ajouté par arnaud bougeard il y a plus de 9 ans. Mis à jour il y a environ 9 ans.

Statut:
Fermé
Priorité:
Haut
Assigné à:
Début:
05/01/2015
Echéance:
22/01/2015
% réalisé:

100%

Temps estimé:
24.00 h
Temps passé:
Restant à faire (heures):
0.0

Description

Nous avons un soucis avec l’agrégation
Quelque soit le nombre de cartes activées, il n'y a du SNAT en sortie que sur la dernière interface réseau.
Nous remarquons que, contrairement à la version 2.2, nous n'avons qu'une ligne de prerouting, qui correspond à la dernière carte.

Donc si nous avons deux cartes, c'est ok pour l'admin, si nous avons trois cartes ça n'est ok que pour le péda, si nous avons quatre cartes, ça n'est ok que pour la DMZ.

Voila la ligne obtenue avec 4 cartes (commande iptables-save |grep RESTOREMARK):
-A PREROUTING -s 192.168.3.0/24 -i eth3 -m state --state INVALID,RELATED,ESTABLISHED,UNTRACKED -j RESTOREMARK
Il doit y avoir un soucis dans la boucle qui génère cette ligne.

Sur une amon2.2 avec 3 cartes voila ce que nous obtenons avec la commande iptables-save |grep RESTOREMARK
-A PREROUTING -s 10.91.19.0/24 -i eth1 -m state --state INVALID,RELATED,ESTABLISHED,UNTRACKED -j RESTOREMARK
-A PREROUTING -s 172.26.0.0/16 -i eth2 -m state --state INVALID,RELATED,ESTABLISHED,UNTRACKED -j RESTOREMARK

Une solution été proposée sur la liste de diffusion
le fonction iptablesmangleclear attend comme variable $1 le nom de l'interface
($interface) mais celle ci n'est pas valorisé lors l'appel de la fonction.
En remplaçant $interface par $ointerface dans les 2 fonctions
active_balancing_to() et active_link_to() cela fonctionne mieux.

Voici les fonctions une fois modifiées.

active_balancing_to() {

ointerface=$(CreoleGet nom_carte_eth${1})
network=$(CreoleGet adresse_network_eth${1})/$(CreoleGet
adresse_netmask_eth${1})
iptablesmangleclear $ointerface
_active_balancing_to $ointerface $network
if [ "$(CreoleGet vlan_eth${1})" = "oui" ]; then
VLAN_ID=($(CreoleGet vlan_id_eth${1}))
VLAN_Network=($(CreoleGet vlan_network_eth${1}))
VLAN_Netmask=($(CreoleGet vlan_netmask_eth${1}))
NB_VLAN=${#VLAN_ID[*]}
for ((id=0; id < $NB_VLAN; id+=1))
do
interface_vlan="$ointerface.${VLAN_ID[id]}"
iptablesmangleclear $interface_vlan
network_vlan="${VLAN_Network[id]}/${VLAN_Netmask[id]}"
_active_balancing_to $interface_vlan $network_vlan
done
fi
if [ "$(CreoleGet alias_eth${1})" = "oui" ]; then
ALIAS_IP=($(CreoleGet alias_ip_eth${1}))
ALIAS_Network=($(CreoleGet alias_network_eth${1}))
ALIAS_Netmask=($(CreoleGet alias_netmask_eth${1}))
NB_ALIAS=${#ALIAS_IP[*]}
for ((id=0; id < $NB_ALIAS; id+=1))
do
interface_alias="$ointerface"
network_alias="${ALIAS_Network[id]}/${ALIAS_Netmask[id]}"
_active_balancing_to $interface_alias $network_alias
done
fi
}

active_link_to() {
ointerface=$(CreoleGet nom_carte_eth${1})
network=$(CreoleGet adresse_network_eth${1})/$(CreoleGet
adresse_netmask_eth${1})
link=$2
iptablesmangleclear $ointerface

_active_link_to $ointerface $network $link
if [ "$(CreoleGet vlan_eth${1})" = "oui" ]; then
VLAN_ID=($(CreoleGet vlan_id_eth${1}))
VLAN_Network=($(CreoleGet vlan_network_eth${1}))
VLAN_Netmask=($(CreoleGet vlan_netmask_eth${1}))
NB_VLAN=${#VLAN_ID[*]}
for ((id=0; id < $NB_VLAN; id+=1))
do
interface_vlan="$ointerface.${VLAN_ID[id]}"
iptablesmangleclear $interface_vlan
network_vlan="${VLAN_Network[id]}/${VLAN_Netmask[id]}"
_active_link_to $interface_vlan $network_vlan $link
done
fi
if [ "$(CreoleGet alias_eth${1})" = "oui" ]; then
ALIAS_IP=($(CreoleGet alias_ip_eth${1}))
ALIAS_Network=($(CreoleGet alias_network_eth${1}))
ALIAS_Netmask=($(CreoleGet alias_netmask_eth${1}))
NB_ALIAS=${#ALIAS_IP[*]}
for ((id=0; id < $NB_ALIAS; id+=1))
do
interface_alias="$ointerface"
network_alias="${ALIAS_Network[id]}/${ALIAS_Netmask[id]}"
_active_link_to $interface_alias $network_alias
done
fi

}

Révisions associées

Révision 0970b90a (diff)
Ajouté par Emmanuel GARETTE il y a environ 9 ans

tester les passerelles en cas d'agrégation (ref #10017 @1h)

Révision a1d955f7 (diff)
Ajouté par Emmanuel GARETTE il y a environ 9 ans

support des l'interfaces dans TestARP (ref #10017)

Révision 6465e93f (diff)
Ajouté par Emmanuel GARETTE il y a environ 9 ans

interface => ointerface (ref #10017 1h)

Révision 8580496c (diff)
Ajouté par Fabrice Barconnière il y a environ 9 ans

Suppression d'une ligne par mégarde (ref #10017)

Historique

#1 Mis à jour par Luc Bourdot il y a plus de 9 ans

  • Tracker changé de Anomalie à Scénario
  • Début 09/12/2014 supprimé

#2 Mis à jour par Luc Bourdot il y a plus de 9 ans

  • Echéance mis à 22/01/2015
  • Version cible mis à sprint 2015 2-4
  • Début mis à 05/01/2015

#3 Mis à jour par Klaas TJEBBES il y a environ 9 ans

  • Points de scénarios mis à 6.0

#4 Mis à jour par Fabrice Barconnière il y a environ 9 ans

  • Tracker changé de Scénario à Tâche
  • Temps estimé mis à 24.00 h
  • Restant à faire (heures) mis à 24.0

#5 Mis à jour par Fabrice Barconnière il y a environ 9 ans

  • Version cible sprint 2015 2-4 supprimé
  • Tâche parente mis à #10184

#6 Mis à jour par Emmanuel GARETTE il y a environ 9 ans

  • Statut changé de Nouveau à En cours

#7 Mis à jour par Emmanuel GARETTE il y a environ 9 ans

  • Assigné à mis à Emmanuel GARETTE

#8 Mis à jour par Emmanuel GARETTE il y a environ 9 ans

  • % réalisé changé de 0 à 50

Est-ce que cette correction suffit ou y a t'il d'autre dysfonctionnement constaté ?

#9 Mis à jour par Emmanuel GARETTE il y a environ 9 ans

  • Statut changé de En cours à Résolu
  • % réalisé changé de 50 à 100

Pour moi c'est fonctionnelle sur les IP (pas tester les alias ni les IPs sur toutes les zones de l'Amon.

#10 Mis à jour par Emmanuel GARETTE il y a environ 9 ans

  • Restant à faire (heures) changé de 24.0 à 0.0

#11 Mis à jour par Joël Cuissinat il y a environ 9 ans

  • Statut changé de Résolu à Fermé

Validé par l'utilisateur.

Formats disponibles : Atom PDF