Project

General

Profile

Tâche #18798

Scénario #18752: Passage au nouveau loader

Dernières corrections sur le loader

Added by Emmanuel GARETTE over 5 years ago. Updated over 5 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/20/2017
Due date:
% Done:

100%

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

Associated revisions

Revision 5b9fd968 (diff)
Added by Emmanuel GARETTE over 5 years ago

number variable with valid enum should load variable as number (ref #18798)

Revision 2ed36d89 (diff)
Added by Emmanuel GARETTE over 5 years ago

import load_store for template bareos-restore.conf (ref #18798)

History

#1 Updated by Daniel Dehennin over 5 years ago

Le conteneur gaspacho n’a pas d’ID, ce qui donne sur Eclair:

root@eclair:~# creoled --debug
[…]
/usr/share/creole/funcs/partitioning_utils.py - déjà défini : is_lv_name
{'index': 1661, 'service_access': [<creole.objspace.Service_access object at 0x7f3de5f1ddd0>], 'name': 'dhcp', 'service': OrderedDict([('isc-dhcp-server', <creole.objspace.Service object at 0x7f3de5f1dd50>), ('tftpd-hpa', <creole.objspace.Service object at 0x7f3de5f1dd90>)]), 'package': [<creole.objspace.Package object at 0x7f3de5f1dd10>], 'container_group': 'dhcp', 'file': OrderedDict([('/etc/dhcp/dhcpd.conf', <creole.objspace.File object at 0x7f3de5f1df10>), ('/etc/default/tftpd-hpa', <creole.objspace.File object at 0x7f3de5ea5050>), ('/etc/update-motd.d/00-header', <creole.objspace.File object at 0x7f3de5e7bc90>), ('/etc/update-motd.d/10-help-text', <creole.objspace.File object at 0x7f3de5e7bd50>), ('/etc/apt/apt.conf.d/02eoleproxy', <creole.objspace.File object at 0x7f3de5e7be10>), ('/etc/ssmtp/ssmtp.conf', <creole.objspace.File object at 0x7f3de5e7bed0>), ('/etc/mailname', <creole.objspace.File object at 0x7f3de5e7bf90>)]), 'group': 'dhcp', 'real_container': 'root', 'id': '17', 'service_restriction': [<creole.objspace.Service_restriction object at 0x7f3de5f1de90>]}
{'group': 'root', 'name': 'root', 'container_group': 'root', 'container': 'root', 'real_container': 'root', 'id': '1'}
{'index': 1899, 'group': 'gaspacho', 'name': 'gaspacho', 'service': OrderedDict([('gaspacho-agent', <creole.objspace.Service object at 0x7f3de5ec8590>)]), 'package': [<creole.objspace.Package object at 0x7f3de5ec8550>], 'container_group': 'gaspacho', 'file': OrderedDict([('/etc/gaspacho-agent/gaspacho-agent.conf', <creole.objspace.File object at 0x7f3de5ec85d0>), ('/etc/pam.d/common-session', <creole.objspace.File object at 0x7f3de5ec8650>), ('/etc/update-motd.d/00-header', <creole.objspace.File object at 0x7f3de5e7bcd0>), ('/etc/update-motd.d/10-help-text', <creole.objspace.File object at 0x7f3de5e7bd90>), ('/etc/apt/apt.conf.d/02eoleproxy', <creole.objspace.File object at 0x7f3de5e7be50>), ('/etc/ssmtp/ssmtp.conf', <creole.objspace.File object at 0x7f3de5e7bf10>), ('/etc/mailname', <creole.objspace.File object at 0x7f3de5e7bfd0>)]), 'real_container': 'root'}
creoled - Impossible de charger la configuration Creole.'Container' object has no attribute 'id'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 203, in reload_config
    try_upgrade=False)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 708, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 430, in space_visitor
    ContainerAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 158, in __init__
    container.group_id = container.id
AttributeError: 'Container' object has no attribute 'id'
 ENGINE Listening for SIGHUP.
 ENGINE Listening for SIGTERM.
 ENGINE Listening for SIGUSR1.
 ENGINE Listening for SIGINT.
creoled - Pas de configuration trouvée : ne pas tester le mode conteneur.

#2 Updated by Daniel Dehennin over 5 years ago

Sur un Amon et un Scribe 2.6.1 déjà instancié avec l’ancien loader :

  • Maj-Auto -D
  • reconfigure --debug
    […]
    Instanciation du fichier '/etc/bareos/bareos-restore.conf' depuis '/var/lib/creole/bareos-restore.conf'
    Copie du template '/usr/share/eole/creole/distrib/bareos-restore.conf' vers '/var/lib/creole'
    Traitement Cheetah : '/var/lib/creole/bareos-restore.conf' vers '/etc/bareos/bareos-restore.conf'
    reconfigure - Erreur lors de l'instanciation du template de /etc/bareos/bareos-restore.conf : cannot import name load_store
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/creole/reconfigure.py", line 547, in templates
        tmpl.instance_files(container=options.container, containers_ctx=CACHE['group_infos'].values())
      File "/usr/lib/python2.7/dist-packages/creole/template.py", line 598, in instance_files
        self._instance_file(fdict, container=ctx)
      File "/usr/lib/python2.7/dist-packages/creole/template.py", line 524, in _instance_file
        self.process(filevar, container)
      File "/usr/lib/python2.7/dist-packages/creole/template.py", line 431, in process
        raise TemplateError, msg
    TemplateError: Erreur lors de l'instanciation du template de /etc/bareos/bareos-restore.conf : cannot import name load_store
    reconfigure - Erreur lors de l'instanciation du template de /etc/bareos/bareos-restore.conf : cannot import name load_store
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/creole/reconfigure.py", line 954, in main
        templates()
      File "/usr/lib/python2.7/dist-packages/creole/reconfigure.py", line 553, in templates
        raise err
    TemplateError: Erreur lors de l'instanciation du template de /etc/bareos/bareos-restore.conf : cannot import name load_store
    

#3 Updated by Scrum Master over 5 years ago

  • Status changed from Nouveau to En cours

#4 Updated by Scrum Master over 5 years ago

  • Assigned To set to Emmanuel GARETTE

#5 Updated by Scrum Master over 5 years ago

  • Status changed from En cours to Résolu

#6 Updated by Emmanuel GARETTE over 5 years ago

  • % Done changed from 0 to 100
  • Estimated time set to 1.00 h
  • Remaining (hours) set to 1.0

#7 Updated by Lionel Morin over 5 years ago

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

Also available in: Atom PDF