Project

General

Profile

Tâche #21904

Scénario #24285: Tests et qualification (26-28)

Présence de traceback dans les logs de gaspacho-agent

Added by Gérald Schwartzmann about 2 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
07/05/2018
Due date:
% Done:

100%

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

Description

Exécution du test ECLAIR-T04-001 - Activation de l'agent Gaspacho sur Eclair
http://squash-tm.eole.lan/squash/executions/6082

root@eclair:~# service gaspacho-agent status
● gaspacho-agent.service - Gaspacho Agent
   Loaded: loaded (/lib/systemd/system/gaspacho-agent.service; enabled; vendor preset: enabled)
   Active: active (exited) (Result: exit-code) since lun. 2017-11-06 11:18:35 CET; 35min ago
  Process: 8578 ExecStart=/usr/share/gaspacho-agent/computer.py (code=exited, status=1/FAILURE)
 Main PID: 8578 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/gaspacho-agent.service

nov. 06 11:18:35 eclair systemd[1]: Started Gaspacho Agent.
nov. 06 11:18:36 eclair computer.py[8578]: gaspacho-agent[8578] ERROR "get_gasp" error when trying to get variables:
nov. 06 11:18:36 eclair computer.py[8578]: gaspacho-agent[8578] ERROR "get_gasp" Traceback (most recent call last):
                                             File "/usr/lib/python2.7/dist-packages/gaspacho_agent/agent.py", line 128, in get_gasp
                                               raise Exception('response not OK: %s %s' % (status, reason))
                                           Exception: response not OK: 404 Not Found
nov. 06 11:18:36 eclair computer.py[8578]: gaspacho-agent[8578] ERROR "get_gasp" error: response not OK: 404 Not Found
nov. 06 11:18:36 eclair systemd[1]: gaspacho-agent.service: Main process exited, code=exited, status=1/FAILURE
root@eclair:~#

Related issues

Related to Eclair - Tâche #21174: Traceback gaspacho agent sur la console avant instance Fermé 08/28/2017

Associated revisions

Revision ad950f00 (diff)
Added by Joël Cuissinat over 1 year ago

Don't log traceback by default

Ref: #21904

Revision 0d8e4000 (diff)
Added by Joël Cuissinat over 1 year ago

Explicit error if no 'gasp_server' in config (or no config at all)

Ref: #21904 [>=2.6.2]

Revision 948e03f1 (diff)
Added by Joël Cuissinat over 1 year ago

Add URL in error message when HTTP response is not OK

Ref: #21904

History

#1 Updated by Gérald Schwartzmann about 2 years ago

  • Subject changed from Eclair : agent.py ne devrait pas lèver une exception to Correction ECLAIR-T04-001 : agent.py ne devrait pas lèver une exception

#2 Updated by Scrum Master about 2 years ago

  • Parent task deleted (#21800)

#3 Updated by Scrum Master about 2 years ago

  • Tracker changed from Tâche to Proposition Scénario
  • Project changed from Distribution EOLE to Eclair
  • Subject changed from Correction ECLAIR-T04-001 : agent.py ne devrait pas lèver une exception to Revue de code gaspacho-agent
  • Target version deleted (sprint 2017 43-45 Equipe MENSR)

#4 Updated by Joël Cuissinat about 2 years ago

  • Estimated time changed from 3.00 h to 0.00 h

#5 Updated by Joël Cuissinat about 2 years ago

  • Related to Tâche #21174: Traceback gaspacho agent sur la console avant instance added

#6 Updated by Gilles Grandgérard almost 2 years ago

  • Tracker changed from Proposition Scénario to Bac à idée

#7 Updated by Joël Cuissinat over 1 year ago

  • Subject changed from Revue de code gaspacho-agent to Présence de traceback dans les logs de gaspacho-agent
  • Estimated time changed from 0.00 h to 2.00 h
  • Parent task set to #24285

#8 Updated by Joël Cuissinat over 1 year ago

Comme on a mis plus de débogage dans les test Jenkins, ce problème refait surface : http://jenkins.eole.lan/jenkins/job/2.6.2/view/publi%C3%A9es/job/test-instance-etb1eclair-2.6.2-amd64/189/parsed_console/

#9 Updated by Joël Cuissinat over 1 year ago

Je vois au moins deux erreurs possibles :

  • pas de fichier de configuration (rm -f /etc/gaspacho-agent/gaspacho-agent.conf) => ça raise une KeyError incompréhensible
      File "/usr/share/gaspacho-agent/computer.py", line 19, in <module>
        from gaspacho_agent.util import trace, logger
      File "/usr/lib/python2.7/dist-packages/gaspacho_agent/util.py", line 25, in <module>
        from gaspacho_agent.config import log_level, display_log
      File "/usr/lib/python2.7/dist-packages/gaspacho_agent/config.py", line 31, in <module>
        raise Exception('error: %s'%e)
    Exception: error: 'gasp_server'
    

Pour ce cas là, il serait intéressant de tester explicitement la présence du fichier de configuration...

  • Serveur (1) ou ressource (2) indisponible

1)

gaspacho-agent[18464] ERROR "get_gasp" error when trying to get variables:
gaspacho-agent[18464] ERROR "get_gasp" Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gaspacho_agent/agent.py", line 123, in get_gasp
    (proto, gasp_server, gasp_port, gasp_http_path, e))
Exception: unable to connect to https://scrib.ac-test.fr:443//gaspacho: [Errno -2] Name or service not known
gaspacho-agent[18464] ERROR "get_gasp" error: unable to connect to https://scrib.ac-test.fr:443//gaspacho: [Errno -2] Name or service not known

2)

gaspacho-agent[18188] ERROR "get_gasp" error when trying to get variables:
gaspacho-agent[18188] ERROR "get_gasp" Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gaspacho_agent/agent.py", line 128, in get_gasp
    raise Exception('response not OK: %s %s' % (status, reason))
Exception: response not OK: 404 Not Found
gaspacho-agent[18188] ERROR "get_gasp" error: response not OK: 404 Not Found

Pour ces deux cas, c'est parce que le traceback est explicitement logué : https://dev-eole.ac-dijon.fr/projects/gaspacho-agent/repository/revisions/master/entry/src/gaspacho_agent/agent.py#L47

#10 Updated by Joël Cuissinat over 1 year ago

  • Project changed from Eclair to Distribution EOLE
  • Status changed from Nouveau to En cours
  • Start date set to 07/05/2018

#11 Updated by Joël Cuissinat over 1 year ago

  • Assigned To set to Joël Cuissinat
  • Remaining (hours) changed from 6.0 to 2.0

#12 Updated by Joël Cuissinat over 1 year ago

  • Status changed from En cours to Résolu
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.25

#13 Updated by Daniel Dehennin over 1 year ago

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

Les tests jenkins n’affiche plus le traceback.

Also available in: Atom PDF