Projet

Général

Profil

Tâche #13958

Scénario #11706: Faire fonctionner la haute disponibilité sur EOLE 2.5 (Sphynx inclus)

Les scripts d'init ipsecSphynx et arv doivent être compatibles LSB

Ajouté par Fabrice Barconnière il y a plus de 8 ans. Mis à jour il y a plus de 8 ans.

Statut:
Fermé
Priorité:
Normal
Début:
18/05/2015
Echéance:
% réalisé:

100%

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

Description

Actuellement, service ipsecSphynx stop retourne 3 si ipsec est déjà arrêté, service arv status retourne 7 si il est arrêté, au lieu de 3, ..... Cela provoque un dysfonctionnement du cluster pour le monitoring de la ressource.

 Assuming some_service is configured correctly and currently not active, the following sequence will help you determine if it is LSB compatible:

    Start (stopped):
    /etc/init.d/some_service start ; echo "result: $?" 
        Did the service start?
        Did the command print result: 0 (in addition to the regular output)? 
    Status (running):
    /etc/init.d/some_service status ; echo "result: $?" 
        Did the script accept the command?
        Did the script indicate the service was running?
        Did the command print result: 0 (in addition to the regular output)? 
    Start (running):
    /etc/init.d/some_service start ; echo "result: $?" 
        Is the service still running?
        Did the command print result: 0 (in addition to the regular output)? 
    Stop (running):
    /etc/init.d/some_service stop ; echo "result: $?" 
        Was the service stopped?
        Did the command print result: 0 (in addition to the regular output)? 
    Status (stopped):
    /etc/init.d/some_service status ; echo "result: $?" 
        Did the script accept the command?
        Did the script indicate the service was not running?
        Did the command print result: 3 (in addition to the regular output)? 
    Stop (stopped):
    /etc/init.d/some_service stop ; echo "result: $?" 
        Is the service still stopped?
        Did the command print result: 0 (in addition to the regular output)? 
    Status (failed):
    This step is not readily testable and relies on manual inspection of the script.
    The script can use one of the error codes (other than 3) listed in the LSB spec to indicate that it is active but failed.
    This tells the cluster that before moving the resource to another node, it needs to stop it on the existing one first. 

The script can use one of the error codes (other than 3) listed in the LSB spec to indicate that it is active but failed. This tells the cluster that before moving the resource to another node, it needs to stop it on the existing one first.
If the answer to any of the above questions is no, then the script is not LSB compliant. Your options are then to either fix the script or write an OCF agent based on the existing scrip

Révisions associées

Révision 903c4aff (diff)
Ajouté par Fabrice Barconnière il y a plus de 8 ans

Normalisation LSB de init.d/arv pour pacemaker

ref #13958 @30m

Révision 2d84262e (diff)
Ajouté par Fabrice Barconnière il y a plus de 8 ans

Normalisation LSB de init.d/ipsecSphynx pour pacemaker

ref #13958 @30m

Historique

#1 Mis à jour par Fabrice Barconnière il y a plus de 8 ans

  • Statut changé de Nouveau à En cours

#2 Mis à jour par Fabrice Barconnière il y a plus de 8 ans

  • Sujet changé de Le script d'init ipsecSphynx doit retourner $OCF_SUCCESS (0) au stop, même si le démon est arrêté. à Les scripts d'init ipsecSphynx et arv doivent être compatibles LSB
  • Description mis à jour (diff)

#3 Mis à jour par Fabrice Barconnière il y a plus de 8 ans

  • Restant à faire (heures) changé de 1.0 à 0.25

#4 Mis à jour par Fabrice Barconnière il y a plus de 8 ans

  • Statut changé de En cours à Résolu

#5 Mis à jour par Joël Cuissinat il y a plus de 8 ans

  • Statut changé de Résolu à Fermé
  • % réalisé changé de 0 à 100
  • Restant à faire (heures) changé de 0.25 à 0.0
root@sphynx:~# service ipsecSphynx stop
strongswan stop/waiting
INFO: EOLE => STOP: arret reussi d'ipsec
   ...done.
root@sphynx:~# echo $?
0
root@sphynx:~# service ipsecSphynx stop
stop: Unknown instance: 
INFO: EOLE => STOP: arret reussi d'ipsec
   ...fail!
root@sphynx:~# echo $?
0
root@sphynx:~# service arv status
 * Serveur ARV is running...
root@sphynx:~# echo $?
0
root@sphynx:~# service arv stop
 * Stopping Serveur ARV: arv
 * waiting for process to die          [ OK ] 
root@sphynx:~# service arv status
 * Serveur ARV is stopped
root@sphynx:~# echo $?
3

Formats disponibles : Atom PDF