Project

General

Profile

Tâche #12456

Distribution EOLE - Scénario #13756: Assistance aux utilisateurs (45-47)

La migration des variables plante si on renomme une variable avec un nom qui n'existe pas (sur le module)

Added by Joël Cuissinat over 5 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

Je m'en suis aperçu en testant l'import du fichier fourni par cdeze dans #12266 sur un module Amon 2.5.1 ayant les modifications liées à bareos #12425 ...

root@amon:~# tail -fn31 /var/log/eoleflask/eolegenconfig.log 
2015-07-22 16:19:46,349: eolegenconfig - aucune option trouvée dans la config avec ces critères
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/webapi.py", line 253, in modes
    return make_json_response(lib.get_modes(id_))
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 381, in get_modes
    config = get_config(id_)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 175, in get_config
    force_instanciate=force_instanciate)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 378, in creole_loader
    force_instanciate=force_instanciate)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 250, in load_config_eol
    current_eol_version=current_eol_version)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 297, in load_values
    upgrade2('2.5', eol_version, current_eol_version, config)
  File "/usr/lib/python2.7/dist-packages/creole/upgrade24.py", line 350, in upgrade2
    upgrade.run()
  File "/usr/lib/python2.7/dist-packages/creole/upgrade24.py", line 302, in run
    self.move(var.replace('bareos', 'bacula'), var)
  File "/usr/lib/python2.7/dist-packages/creole/upgrade24.py", line 108, in move
    self.set_value(new_variable, value)
  File "/usr/lib/python2.7/dist-packages/creole/upgrade24.py", line 65, in set_value
    path = self.get_path(variable)
  File "/usr/lib/python2.7/dist-packages/creole/upgrade24.py", line 51, in get_path
    return self.config.find_first(byname=variable, type_='path')
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 302, in find_first
    force_permissive=force_permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 375, in _find
    return self._find_return_results(find_results, display_error)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 380, in _find_return_results
    raise AttributeError(_("no option found in config" 
AttributeError: aucune option trouvée dans la config avec ces critères

Associated revisions

Revision 7c84a86f (diff)
Added by Joël Cuissinat over 5 years ago

Gestion des variables cibles inexistantes à l'upgrade

  • creole/upgrade24.py : protection de tous les appels à la méthode get_path()
  • creole/loader.py : correction liée à la remontée des erreurs dans l'interface

Ref: #12456 @3h
Ref: #13992

History

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

  • Project changed from Distribution EOLE to creole

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

  • Tracker changed from Anomalie to Tâche
  • Assigned To set to Joël Cuissinat
  • Estimated time set to 4.00 h
  • Parent task set to #13756
  • Remaining (hours) set to 4.0

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

  • Status changed from Nouveau to En cours
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 4.0 to 0.5

Modifications (hors traductions) réalisées dans la branche 2.5.1/12456-fix-upgrade-unknown-vars fusionnée dans master (2.5.2).

En attente de décision pour le retro-portage EOLE 2.5.1.

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

  • Status changed from En cours to Résolu

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

Joël Cuissinat a écrit :

En attente de décision pour le retro-portage EOLE 2.5.1.

=> paquet candidat creole 2.5.1-15

#6 Updated by Lionel Morin over 5 years ago

Importation du fichier de cdeze et du fichier default/2.3 sans erreur dans /var/log/eoleflask/eolegenconfig.log.

#7 Updated by Lionel Morin 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