Project

General

Profile

Tâche #10355

Scénario #11448: Faire fonctionner l'agent Zéphir Dansguardian dans tous les cas

Rendre le script "dans2.actions" fonctionnel en mode conteneur

Added by Joël Cuissinat over 6 years ago. Updated over 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/23/2015
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):
0.0

Description

Actuellement, toutes les commandes sont lancées sur le maître !


Related issues

Copied to zephir-client - Tâche #10356: Rendre le script "dns.actions" fonctionnel en mode conteneur Fermé 01/23/2015

Associated revisions

Revision 04dc3df6 (diff)
Added by Emmanuel GARETTE over 6 years ago

support de e2guardian + mode conteneur (ref #10355 @1h)

Revision a7abbbea (diff)
Added by Emmanuel GARETTE over 6 years ago

erreur dans l'appel à creole_client (ref #10355)

Revision ff6aea44 (diff)
Added by Daniel Dehennin over 6 years ago

Support de e2guardian + mode conteneur

Ref: #10355

(cherry picked from 04dc3df6534697ed33a9ce1b83acfe643d104118)

Revision 549d5018 (diff)
Added by Daniel Dehennin over 6 years ago

Erreur dans l'appel à creole_client

Ref: #10355

(cherry picked from a7abbbeadd92b91724007da76ffb1a7faf505917)

Revision 4a8c4f82 (diff)
Added by Daniel Dehennin over 6 years ago

Déplacer les appels CreoleClient dans l’action

Tout le code en dehors des fonctions d’action n’est pas pris en compte.

Il faut donc que les importations et l’initialisation soit effectué dans
la fonction.

  • data/monitor/actions/eole/dans1.actions: Définition de « prct_name » à
    l’intérieur de « action_error() »
  • data/monitor/actions/eole/dans2.actions: Idem.

Ref: #10355

History

#1 Updated by Emmanuel GARETTE over 6 years ago

  • Estimated time changed from 1.50 h to 6.00 h
  • Remaining (hours) changed from 1.5 to 6.0

Etude de la demande ... :

- on considére que dans_1 écoute obligatoirement sur eth1 en mode pas une carte, pourquoi ce pré supposé ? (voir /usr/share/zephir/monitor/configs/services/23_dans1.srv)
- on considère que dans_2 écoute obligatoirement sur eth2, pourquoi ce pré supposé ? (voir /usr/share/zephir/monitor/configs/services/23_dans2.srv)
- dans_2 n'est pas vérifié en mode conteneur
- dans_1 en mode conteneur, on ne fait que regarder si un processus à le bon nom (ne test pas le service) voir #1736
- on ne redémarre dansguardian que si la 2ème instance plante (voir /usr/share/zephir/monitor/actions/eole/dans2.actions) :

  • si on n'a qu'une instance il n'y a pas de redémarrage
  • si la 1er instance plante, il n'y a pas de redémarrage

#2 Updated by Scrum Master over 6 years ago

  • Status changed from Nouveau to En cours

#3 Updated by Emmanuel GARETTE over 6 years ago

  • Status changed from En cours to Ne sera pas résolu
  • Assigned To set to Emmanuel GARETTE
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 6.0 to 0.0

Cette demande ne l'état n'a pas de sens. Dansguardian 2 ne fonctionne pas sur l'AmonEcole.

Voir le scénario #11448.

#4 Updated by Emmanuel GARETTE over 6 years ago

  • Status changed from Ne sera pas résolu to En cours
  • % Done changed from 100 to 0
  • Estimated time changed from 6.00 h to 2.00 h
  • Parent task changed from #10354 to #11448

#5 Updated by Emmanuel GARETTE over 6 years ago

dans2.actions ne fonctionne que pour dansguardian, pas e2guardian.

#6 Updated by Emmanuel GARETTE over 6 years ago

  • Assigned To deleted (Emmanuel GARETTE)
  • Remaining (hours) changed from 0.0 to 0.5

Fait dans master, voir sur quelle version il faut compiler.

#7 Updated by Emmanuel GARETTE over 6 years ago

  • % Done changed from 0 to 80

#8 Updated by Daniel Dehennin over 6 years ago

  • Assigned To set to Daniel Dehennin

#9 Updated by Daniel Dehennin over 6 years ago

  • Status changed from En cours to Résolu
  • % Done changed from 80 to 100

Cherry pick du commit en 2.4.1 et packaging pour eole-2.4.1-proposed-updates.

#10 Updated by Daniel Dehennin over 6 years ago

  • Remaining (hours) changed from 0.5 to 0.15

#11 Updated by Joël Cuissinat over 6 years ago

  • Status changed from Résolu to En cours

#12 Updated by Joël Cuissinat over 6 years ago

  • Remaining (hours) changed from 0.15 to 1.0

#13 Updated by Joël Cuissinat over 6 years ago

L'appel au client Creole en dehors de la fonction n'est pas pris en compte :

root@amonecole:~# tail -n24 /var/log/rsyslog/local/zephiragents/zephiragents.alert.log 
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011--- <exception caught here> ---
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 131, in process
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    resrc = self.site.getResourceFor(self)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 562, in getResourceFor
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    return resource.getChildForRequest(self.resource, request)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 65, in getChildForRequest
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    resource = resource.getChildWithDefault(pathElement, request)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 169, in getChildWithDefault
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    return self.getChild(path, request)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/web_resources.py", line 133, in getChild
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    agent = self.agent_manager[self.agent_name]
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agentdatamanager.py", line 270, in __getitem__
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    agent.ensure_data_uptodate()
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 425, in ensure_data_uptodate
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    self.update_status()
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 299, in update_status
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    self.set_status(new_status)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 313, in set_status
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    self.take_action(self.last_status, s)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 384, in take_action
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    msg = action_func(self, old_status, new_status)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011  File "actions/eole/dans1.actions", line 34, in action_error
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011    return "agent %s : le service %s a été arrêté" % (agent.name, prct_name)
May  5 13:55:29 amonecole zephiragents: [HTTPChannel,8,192.168.230.191] #011exceptions.NameError: global name 'prct_name' is not defined

#14 Updated by Daniel Dehennin over 6 years ago

  • Status changed from En cours to Résolu

Le commit 4a8c4f82 est présent dans le paquet zephir-client version 2.4.1-24 en eole-2.4.1-proposed-updates.

La branche a été fusionnée dans master.

#15 Updated by Daniel Dehennin over 6 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 1.0 to 0.0

Also available in: Atom PDF