Project

General

Profile

Tâche #11403

Distribution EOLE - Scénario #12022: Résoudre les problèmes CreoleLint constatés sur amon et amonEcole 2.5

Plantage CreoleLint sur Amon et AmonEcole 2.5

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

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
07/22/2015
Due date:
% Done:

100%

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

Description

Erreur originale :

root@amonecole:~# CreoleLint -t /usr/share/eole/creole/distrib/rsyslog-ca.tmpl 

Template Non valide (valid_parse_tmpl:ERROR:error)
 \-- /usr/share/eole/creole/distrib/rsyslog-ca.tmpl
('/usr/share/eole/creole/distrib/rsyslog-ca.tmpl', ':', AttributeError("'NoneType' object has no attribute 'append'",))

Avec les modifications suivantes (à valider) :

--- /usr/lib/python2.7/dist-packages/creole/lint/parsetemplate.py    2015-04-21 11:49:33.000000000 +0200
+++ parsetemplate.py    2015-04-24 16:15:34.853093660 +0200
@@ -318,7 +318,7 @@
         config.read_only()

     def template(self):
-        def get_value(opt_, path_, second_pass):
+        def get_value(opt_, path_, second_pass2):
             try:
                 return getattr(config.creole, path_)
             except PropertiesOptionError, err:
@@ -338,8 +338,10 @@
                 config.read_only()
                 try:
                     return getattr(config.creole, path_)
-                except ConfigError:
-                    second_pass.append((opt_, path_))
+                except ConfigError, err:
+                    if second_pass2 is None:
+                        raise err
+                    second_pass2.append((opt_, path_))
         try:
             is_gen_file = getattr(config, self.file_path)
         except PropertiesOptionError, err:

On obtient :

root@amonecole:~# CreoleLint -t /usr/share/eole/creole/distrib/rsyslog-ca.tmpl 

Template Non valide (valid_parse_tmpl:ERROR:error)
 \-- /usr/share/eole/creole/distrib/rsyslog-ca.tmpl
('/usr/share/eole/creole/distrib/rsyslog-ca.tmpl', ':', ValueError(('erreur de templating', ConfigError("impossible d'effectuer le calcul, l'option wpad_proxyport_eth0 a les propri\xc3\xa9t\xc3\xa9s : ['disabled'] pour : wpad_proxyport_alias_eth0",)),))

Associated revisions

Revision 09d3526a
Added by Joël Cuissinat over 5 years ago

Merge remote-tracking branch 'lab/1.0'

Ref: #11403

Revision 8bd9db00 (diff)
Added by Joël Cuissinat over 5 years ago

Correction du traitement d'une exception particulière par CreoleLint

  • creole/lint/parsetemplate.py : application du patch proposé

Ref: #11403 @20m

History

#1 Updated by Joël Cuissinat almost 6 years ago

  • Subject changed from Plantage CreoleLint sur AmonEcole 2.5 to Plantage CreoleLint sur Amon et AmonEcole 2.5

#2 Updated by Joël Cuissinat almost 6 years ago

  • Tracker changed from Anomalie to Tâche
  • Estimated time set to 4.00 h
  • Parent task set to #12022
  • Remaining (hours) set to 4.0

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

  • Assigned To set to Emmanuel GARETTE
  • % Done changed from 0 to 30

Il y a bien un problème de lancement d'un calcul d'une esclave désactivée utilisant des variables désactivées...

Proposition de correction :

Dans /usr/lib/python2.7/dist-packages/tiramisu/value.py, ligne 546 dans la fonction _valid_slave, gérer l'exception ConfigError sur la ligne suivante :

                    value.append(values._getcallback_value(self.opt,
                                                           index=index))

Ce qui donnerait :

                    try:
                        value.append(values._getcallback_value(self.opt,
                                                               index=index))
                    except ConfigError:
                        pass

#4 Updated by Joël Cuissinat over 5 years ago

  • Status changed from Nouveau to En cours
  • Start date set to 07/22/2015

#5 Updated by Joël Cuissinat over 5 years ago

  • Assigned To changed from Emmanuel GARETTE to Gwenael Remond
  • Remaining (hours) changed from 4.0 to 1.0

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

  • Assigned To changed from Gwenael Remond to Joël Cuissinat

#7 Updated by Joël Cuissinat over 5 years ago

  • % Done changed from 30 to 100
  • Remaining (hours) changed from 1.0 to 0.5

#8 Updated by Scrum Master over 5 years ago

  • Status changed from En cours to Résolu

#9 Updated by Scrum Master over 5 years ago

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

Also available in: Atom PDF