Projet

Général

Profil

rvp.py.patch

Proposition de patch - Fabrice Barconnière, 24/01/2014 09:19

Télécharger (2,03 ko)

Voir les différences:

zephir/monitor/agents/rvp.py
264 264
                    for ip in ip_list:
265 265
                        if IP(ip) in subnet:
266 266
                            ip_in_tunnel +=1
267
                            cmd = "fping -r 1 -t 200 "+str(ip)+"  >/dev/null 2>&1"
267
                            cmd = "fping -r 1 -t 2000 "+str(ip)+"  >/dev/null 2>&1"
268 268
                            errcode = system(cmd)
269 269
                            if errcode != 0:
270 270
                                tunnel['dst'] += " -- "+ip+" injoignable"
......
274 274
                except:
275 275
                    pass
276 276

  
277
                if ip_in_tunnel == ip_err and ip_in_tunnel > 0:
278
                    if tunnel['status'] == 'On':
279
                        tunnel['status'] = 'Off'
280
                        down +=1
281
                        up -=1
277
#                if ip_in_tunnel == ip_err and ip_in_tunnel > 0:
278
#                    if tunnel['status'] == 'On':
279
#                        tunnel['status'] = 'Off'
280
#                        down +=1
281
#                        up -=1
282 282

  
283 283
        if zephir_client_noaction == 'non':
284 284
            # Si pb tunnel sur Amon, on relance la connexion
......
311 311
                            current_peer_status = 'restarted'
312 312

  
313 313
                    else:
314
                        # On loggue les adresses IP injoignables
315
                        if " injoignable" in tunnel['dst']:
316
                            log.msg(str(tunnel['dst']))
314 317
                        # Si un tunnel est tombé, on redémarre la connexion
315 318
                        if tunnel['child_name'] != '' and current_peer_status == 'On' and tunnel['status'] == 'Off':
316 319
                            connection = '{0}'.format(str(tunnel['peer_name']))