Project

General

Profile

Scénario #16291

Corriger la relance de z_stats dans enregistrement_zephir

Added by Lionel Morin over 3 years ago. Updated over 3 years ago.

Status:
Terminé (Sprint)
Priority:
Normal
Assigned To:
Category:
-
Start date:
06/20/2016
Due date:
07/08/2016
% Done:

100%

Estimated time:
(Total: 8.00 h)
Spent time:
2.25 h (Total: 8.08 h)
Story points:
4.0
Remaining (hours):
0.00 hour
Velocity based estimate:
Release:
Release relationship:
Auto

Description

Sur un Zéphir 2.6, après envoi de clé SSH par l'interface web de zéphir et synchro_zephir lancé sur le serveur, le fichier /root/.ssh/authorized_keys n'est pas mis à jour.


Subtasks

zephir-client - Tâche #16596: Corriger la relance de z_stats dans enregistrement_zephirFerméBruno Boiget

Tâche #16540: Étudier d'où vient le problèmeFerméLionel Morin

Tâche #16543: Test Squash pour tester l'envoi de clé SSH depuis ZéphirFerméLionel Morin


Related issues

Related to eole-common - Tâche #16096: Étudier pourquoi les conteneurs ne démarrent pas après gen_conteneurs Fermé 05/09/2016

Associated revisions

Revision 2cf2f660 (diff)
Added by Daniel Dehennin over 3 years ago

Détection LXC pour tous les utilisateurs

Le test actuel sur « /proc/1/environ » n’est utilisable que pour
l’utilisateur « root ».

  • creole/client.py (CreoleClient.is_in_lxc): Détecter les « chroot »
    avec « /proc/self ».
    Tester si « /dev/lxc/console » est accessible.

Ref: #16291

History

#1 Updated by Lionel Morin over 3 years ago

  • Tracker changed from Scénario to Proposition Scénario
  • Description updated (diff)

#2 Updated by Bruno Boiget over 3 years ago

  • Tracker changed from Proposition Scénario to Tâche
  • Assigned To set to Bruno Boiget
  • Target version set to sprint 2016 22-24 - Equipe MENESR
  • Start date set to 06/06/2016
  • Estimated time set to 2.00 h
  • Parent task set to #16215
  • Remaining (hours) set to 2.0

J'ai fait quelques tests et voila ce que je trouve :

si je lance la fonction de mise en place de la configuration en tant qu'uucp :

/usr/share/zephir/scripts/zephir_client.py configure

** Ce serveur n'est pas enregistré sur Zephir **

Utilisez la procédure enregistrement_zephir

Le message vient de zephir_client.py. Au final le problème vient de l'initialisation du client Creole par uucp :

>>> from creole.client import CreoleClient
>>> c = CreoleClient()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/client.py", line 214, in __init__
    if self.is_in_lxc():
  File "/usr/lib/python2.7/dist-packages/creole/client.py", line 246, in is_in_lxc
    check_environ = file('/proc/1/environ', 'r').readline()
IOError: [Errno 13] Permission denied: '/proc/1/environ'

#3 Updated by Daniel Dehennin over 3 years ago

  • Project changed from Zéphir to creole
  • Assigned To changed from Bruno Boiget to Daniel Dehennin
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.25

Nouveau paquet creole 2.6.0-54.

#4 Updated by Bruno Boiget over 3 years ago

  • Status changed from Nouveau to En cours
  • Remaining (hours) changed from 0.25 to 0.0

testé sur eolebase 2.6.0 :

uucp@eolebase:~$ python
Python 2.7.11+ (default, Apr 17 2016, 14:00:29) 
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from creole.client import CreoleClient
>>> c=CreoleClient()

L'enregistrement_zephir / envoi de conf se passe bien (avec hack sur la validation des certificats).

#5 Updated by Scrum Master over 3 years ago

  • Status changed from En cours to Résolu

#6 Updated by Lionel Morin over 3 years ago

  • Status changed from Résolu to En cours
  • Start date changed from 06/06/2016 to 06/17/2016
  • % Done changed from 100 to 50
  • Parent task changed from #16215 to #16516
  • Remaining (hours) changed from 0.0 to 2.0

Test effectué :
- eolebase 2.6 instance default enregistré sur zephir 2.6 avec conf
- reboot (pour éviter des problèmes liés à #16331)
- envoi de la clé ssh par l'interface web de zephir sur l'eolebase
- synchro_zephir depuis l'eolebase et apprarition d'un traceback :

root@scribe:~# synchro_zephir 

Demande de synchronisation auprès du service z_stats : Traceback (most recent call last):
  File "/usr/bin/synchro_zephir", line 65, in <module>
    sys.stdout.write(z_stats_proxy.archive_for_upload())
  File "/usr/lib/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1313, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1490, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 799, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 8002: 'error'>

Dans /var/log/rsyslog/local/zephiragents/zephiragents.alert.log on trouve :

2016-06-17T10:02:26.366338+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] Unhandled Error
2016-06-17T10:02:26.366535+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011Traceback (most recent call last):
2016-06-17T10:02:26.366664+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 183, in process
2016-06-17T10:02:26.366794+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    self.render(resrc)
2016-06-17T10:02:26.366927+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 234, in render
2016-06-17T10:02:26.367044+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    body = resrc.render(self)
2016-06-17T10:02:26.367168+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
2016-06-17T10:02:26.367345+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    return m(request)
2016-06-17T10:02:26.367478+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/twisted/web/xmlrpc.py", line 169, in render_POST
2016-06-17T10:02:26.367608+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    d = defer.maybeDeferred(function, *args)
2016-06-17T10:02:26.367732+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011--- <exception caught here> ---
2016-06-17T10:02:26.367853+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 150, in maybeDeferred
2016-06-17T10:02:26.367964+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    result = f(*args, **kw)
2016-06-17T10:02:26.368091+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/zephirservice.py", line 454, in xmlrpc_archive_for_upload
2016-06-17T10:02:26.368223+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    self.wakeup_for_upload(False)
2016-06-17T10:02:26.368377+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/zephirservice.py", line 279, in wakeup_for_upload
2016-06-17T10:02:26.368506+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    agent.archive()
2016-06-17T10:02:26.368629+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 415, in archive
2016-06-17T10:02:26.368753+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    self.ensure_data_uptodate()
2016-06-17T10:02:26.368882+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 426, in ensure_data_uptodate
2016-06-17T10:02:26.369017+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    self.write_data()
2016-06-17T10:02:26.369129+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agents/services.py", line 188, in write_data
2016-06-17T10:02:26.369246+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    Agent.write_data(self)
2016-06-17T10:02:26.369568+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/agent.py", line 440, in write_data
2016-06-17T10:02:26.369705+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    self.status_rrd.graph_all()
2016-06-17T10:02:26.369814+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/rrd.py", line 128, in graph_all
2016-06-17T10:02:26.370078+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    g.graph(additional_args)
2016-06-17T10:02:26.370326+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011  File "/usr/lib/python2.7/dist-packages/zephir/monitor/agentmanager/rrd.py", line 200, in graph
2016-06-17T10:02:26.370532+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011    return rrdtool.graph(*args)
2016-06-17T10:02:26.370734+02:00 scribe.ac-test.lan zephiragents: [HTTPChannel,3,127.0.0.1] #011rrdtool.error: opening 'stats/0/zarchived/status.rrd': No such file or directory

Si on relance le service z_stats, le traceback n'apparait pas lors de l'appel à synchro_zephir :

root@eolebase:~# synchro_zephir 

Demande de synchronisation auprès du service z_stats : ok

La synchronisation avec Zéphir est en cours, vous pouvez suivre les transferts UUCP  :

 # tail -f /var/log/uucp/Log

Le résultat des éventuelles actions lancées sera disponible dans les fichiers suivants :

 /var/log/zephir/last_action.log (dernière action exécutée)
 /var/log/zephir/actions.log (actions précédentes)

La clé SSH est finalement copiée dans /root/.ssh/authorized_keys.

#7 Updated by Lionel Morin over 3 years ago

  • Status changed from En cours to Nouveau
  • Assigned To deleted (Daniel Dehennin)
  • Remaining (hours) changed from 2.0 to 4.0

#8 Updated by Lionel Morin over 3 years ago

  • Subject changed from L'envoi de clé SSH ne fonctionne pas to L'envoi de clé SSH par Zephir ne fonctionne pas en 2.6
  • % Done changed from 50 to 0
  • Parent task deleted (#16516)
  • Story points set to 4.0

#9 Updated by Lionel Morin over 3 years ago

  • Tracker changed from Tâche to Scénario
  • Due date set to 07/08/2016
  • Start date changed from 06/17/2016 to 06/20/2016

#10 Updated by Lionel Morin over 3 years ago

  • Assigned To set to force orange

#11 Updated by Lionel Morin over 3 years ago

  • Subject changed from L'envoi de clé SSH par Zephir ne fonctionne pas en 2.6 to Corriger l'envoi de clé SSH par Zephir en 2.6

#12 Updated by Bruno Boiget over 3 years ago

J'ai essayé de reproduire le problème rencontré par Lionel, mais sans 'succès'

  • enregistrement eolebase 2.6.0 sur Zéphir 2.6.0
  • reboot eolebase
  • envoi de la configuration (clés) + synchro_zephir sur eolebase

la récupération se passe bien, et je n'ai rien dans zephiragents.alert.log

Le traceback en question semble indiquer que z_stats essaye d'archiver les données d'un agent 'zarchived', mais je ne trouve aucune référence à ce nom dans le code ou les fichiers de configuration des agents ...

#13 Updated by Lionel Morin over 3 years ago

  • Subject changed from Corriger l'envoi de clé SSH par Zephir en 2.6 to Corriger la relance de z_stats dans enregistrement_zephir

#14 Updated by Joël Cuissinat over 3 years ago

  • Status changed from Nouveau to Terminé (Sprint)

Also available in: Atom PDF