Project

General

Profile

Anomalie #4799

Une multi master ne peut pas être calculée

Added by Daniel Dehennin almost 7 years ago. Updated almost 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
01/30/2013
Due date:
02/01/2013
% Done:

100%

Spent time:
Distribution:
EOLE 2.4

Description

Avec l’ajout du dictionnaire eclair, la master adresse_network_dhcp devient calculée et provoque une erreur au gen_config

root@eoleng-24:~# gen_config 
-> entering parse_cmdline((), {})
-> entering get_dirs_list(('/usr/share/eole/creole/dicos,/usr/share/eole/creole/dicos/variante,/usr/share/eole/creole/dicos/local',), {})
-> entering init_default_dict((<__main__.ConfigGui object at 0xa14c50c>,), {})
Traceback (most recent call last):
  File "/usr/share/creole/gen_config.py", line 2077, in main
    filename=config_file, title=options.title)
  File "/usr/share/creole/gen_config.py", line 644, in __init__
    super(ConfigGui, self).__init__(dir_config, mode)
  File "/usr/share/creole/gen_config.py", line 262, in __init__
    super(ConfigZephir, self).__init__(dir_config, mode)
  File "/usr/share/creole/gen_config.py", line 75, in __init__
    self.init_default_dict()
  File "/usr/share/creole/gen_config.py", line 45, in newfunc
    return func(*targs, **kwargs)
  File "/usr/share/creole/gen_config.py", line 94, in init_default_dict
    self.eole_dico.read_dir(self.dir_config)
  File "/usr/lib/python2.7/dist-packages/creole/cfgparser.py", line 229, in read_dir
    self.gen_families()
  File "/usr/lib/python2.7/dist-packages/creole/cfgparser.py", line 243, in gen_families
    for path in self.config.creole.getpaths(allpaths=True):
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 530, in getpaths
    value = getattr(self, path)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 183, in __getattr__
    return self._getattr(name)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 246, in _getattr
    return homeconfig._getattr(name, permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 302, in _getattr
    self._valid_len(name, value)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 204, in _valid_len
    " the option {0}={1}, {2}={3}".format(master_name,master_value,slave_name,slave_value))
ValueError: invalid len for the group of the option adresse_network_dhcp=[None], ip_basse_dhcp=[None, None]

Associated revisions

Revision 064bed9e (diff)
Added by Daniel Dehennin almost 7 years ago

Fix infinite recursion on calculated master of multi variable

There was a infinite recursion between option.Multi.append() and
config.Config._getattr() through config.Config.fill_multi() when
calculating the master:

- config.Config._getattr()
-> config.Config.fill_multi()
-> option.Multi.__init__()
-> option.Multi.append()
-> config.Config._getattr()

  • tiramisu/option.py (Multi.append): do not pass by
    config.Config._getattr().
  • tiramisu/option.py (Multi.__init__): do not catch exception when
    appending.

Ref: #4799 @8h

Revision 184c48db (diff)
Added by Daniel Dehennin almost 7 years ago

Do not append default value on already defined multi slaves

  • tiramisu/option.py (Multi.append): append the default value when the
    slaves have no item or lesser than the master.
    Divide looping over slaves by factor 2.

Fixes: #4799 @4h

History

#1 Updated by Daniel Dehennin almost 7 years ago

  • Status changed from Nouveau to Accepté

Commit en cours

#2 Updated by Daniel Dehennin almost 7 years ago

  • Status changed from Accepté to Résolu
  • % Done changed from 0 to 100

#3 Updated by Joël Cuissinat almost 7 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF