Project

General

Profile

Tâche #19233

Scénario #19017: Traitement express MEN (7-9)

Erreur python lors de l'import du config.eol aca.eolebasedhcp-default-2.6.0

Added by Gilles Grandgérard about 3 years ago. Updated about 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
02/08/2017
Due date:
% Done:

100%

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

Description

Erreur python lors de l'import du config.eol aca.eolebasedhcp-default-2.6.0. Cette configuration est en DHCP pour l'interface 0

Voir : http://jenkins.eole.lan/jenkins/job/2.6.1/job/test-importation-zephir-2.6.1-amd64/51/consoleFull

cannot concatenate 'str' and 'NoneType' objects" dans la fonction "auto_eth" avec les arguments "[None]" et "{'parametre': u'dhcp', 'condition': u'dhcp'}" pour l'option "Adresse IP de la carte" 

Associated revisions

Revision f0e8b4ea (diff)
Added by Bruno Boiget about 3 years ago

Correction de la fonction auto_eth si nom_carte vaut None

ref #19233

Revision 9a8acc98 (diff)
Added by Bruno Boiget about 3 years ago

Correction précédente insuffisante (adresse_ip obligatoire et à None)

  • renvoie toujours la valeur en dur (169.254.0.1) si nom_carte est None

ref #19233

Revision eb8adbd9 (diff)
Added by Bruno Boiget about 3 years ago

Correction de la fonction auto_eth pour le mode dhcp sur Zéphir

ref #19233 @30m

History

#1 Updated by Bruno Boiget about 3 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Bruno Boiget about 3 years ago

  • Assigned To set to Bruno Boiget
  • Estimated time set to 6.00 h
  • Remaining (hours) set to 6.0

Traceback complet :

2017-02-21T09:51:08.991132+01:00 zephir.ac-test.fr zephir_backend: [-] #011Traceback (most recent call last):
2017-02-21T09:51:08.991425+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 364, in startReactor
2017-02-21T09:51:08.991650+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self.config, oldstdout, oldstderr, self.profiler, reactor)
2017-02-21T09:51:08.991866+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 285, in runReactorWithLogging
2017-02-21T09:51:08.992082+01:00 zephir.ac-test.fr zephir_backend: [-] #011    reactor.run()
2017-02-21T09:51:08.992295+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1194, in run
2017-02-21T09:51:08.992503+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self.mainLoop()
2017-02-21T09:51:08.992725+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1203, in mainLoop
2017-02-21T09:51:08.992930+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self.runUntilCurrent()
2017-02-21T09:51:08.993153+01:00 zephir.ac-test.fr zephir_backend: [-] #011--- <exception caught here> ---
2017-02-21T09:51:08.993359+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 825, in runUntilCurrent
2017-02-21T09:51:08.993607+01:00 zephir.ac-test.fr zephir_backend: [-] #011    call.func(*call.args, **call.kw)
2017-02-21T09:51:08.993824+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/backend/uucp_rpc.py", line 1175, in _maj_site2
2017-02-21T09:51:08.994040+01:00 zephir.ac-test.fr zephir_backend: [-] #011    serv.check_maj_status(self.parent.maj_checker)
2017-02-21T09:51:08.994256+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/backend/lib_backend.py", line 1051, in check_maj_status
2017-02-21T09:51:08.994460+01:00 zephir.ac-test.fr zephir_backend: [-] #011    dico = self.parsedico()
2017-02-21T09:51:08.994664+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/backend/lib_backend.py", line 552, in parsedico
2017-02-21T09:51:08.994865+01:00 zephir.ac-test.fr zephir_backend: [-] #011    dico = self.get_config(mode, encode)
2017-02-21T09:51:08.995065+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/backend/lib_backend.py", line 478, in get_config
2017-02-21T09:51:08.995280+01:00 zephir.ac-test.fr zephir_backend: [-] #011    return self.load_conf(mode, dico)
2017-02-21T09:51:08.995482+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/backend/lib_backend.py", line 563, in load_conf
2017-02-21T09:51:08.995683+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self.dico.load_values(mode)
2017-02-21T09:51:08.995900+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/utils/creolewrap.py", line 453, in load_values
2017-02-21T09:51:08.996103+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self._load_values_creole3(mode, dicos, config_file)
2017-02-21T09:51:08.996303+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/zephir/utils/creolewrap.py", line 442, in _load_values_creole3
2017-02-21T09:51:08.996511+01:00 zephir.ac-test.fr zephir_backend: [-] #011    self.loader.config_load_store(self.dico, 'creole', store_values, force_instanciate=self.force_instanciate)
2017-02-21T09:51:08.996731+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/creole/loader1.py", line 602, in config_load_store
2017-02-21T09:51:08.996932+01:00 zephir.ac-test.fr zephir_backend: [-] #011    config.setattr(path, value, force_permissive=True)
2017-02-21T09:51:08.997161+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 226, in setattr
2017-02-21T09:51:08.997366+01:00 zephir.ac-test.fr zephir_backend: [-] #011    not_raises)
2017-02-21T09:51:08.997597+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 241, in setattr
2017-02-21T09:51:08.997803+01:00 zephir.ac-test.fr zephir_backend: [-] #011    not_raises=not_raises)
2017-02-21T09:51:08.998004+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 409, in setitem
2017-02-21T09:51:08.998212+01:00 zephir.ac-test.fr zephir_backend: [-] #011    err = opt.impl_validate(value, fake_context, display_warnings=False)
2017-02-21T09:51:08.998414+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/option/baseoption.py", line 640, in impl_validate
2017-02-21T09:51:08.998670+01:00 zephir.ac-test.fr zephir_backend: [-] #011    return do_validation(value, None, None)
2017-02-21T09:51:08.998919+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/option/baseoption.py", line 619, in do_validation
2017-02-21T09:51:08.999124+01:00 zephir.ac-test.fr zephir_backend: [-] #011    display_error)
2017-02-21T09:51:08.999326+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/option/baseoption.py", line 823, in _valid_consistency
2017-02-21T09:51:08.999567+01:00 zephir.ac-test.fr zephir_backend: [-] #011    transitive)
2017-02-21T09:51:08.999781+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/option/baseoption.py", line 480, in _launch_consistency
2017-02-21T09:51:09.000001+01:00 zephir.ac-test.fr zephir_backend: [-] #011    returns_raise=True)
2017-02-21T09:51:09.000610+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 285, in getattr
2017-02-21T09:51:09.000855+01:00 zephir.ac-test.fr zephir_backend: [-] #011    index=index, returns_raise=returns_raise)
2017-02-21T09:51:09.001061+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 326, in getattr
2017-02-21T09:51:09.001292+01:00 zephir.ac-test.fr zephir_backend: [-] #011    index=index)
2017-02-21T09:51:09.001498+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 285, in _get_cached_value
2017-02-21T09:51:09.002382+01:00 zephir.ac-test.fr zephir_backend: [-] #011    display_warnings=display_warnings)
2017-02-21T09:51:09.002624+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 316, in _get_validated_value
2017-02-21T09:51:09.002945+01:00 zephir.ac-test.fr zephir_backend: [-] #011    with_meta, masterlen, session, validate)
2017-02-21T09:51:09.003248+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 132, in _getvalue
2017-02-21T09:51:09.003543+01:00 zephir.ac-test.fr zephir_backend: [-] #011    submulti_index, validate)
2017-02-21T09:51:09.003840+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 67, in _getdefaultvalue
2017-02-21T09:51:09.004151+01:00 zephir.ac-test.fr zephir_backend: [-] #011    index=index, validate=validate)
2017-02-21T09:51:09.004443+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/autolib.py", line 232, in carry_out_calculation
2017-02-21T09:51:09.004719+01:00 zephir.ac-test.fr zephir_backend: [-] #011    ret = calculate(callback, args, kwargs)
2017-02-21T09:51:09.004903+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/tiramisu/autolib.py", line 255, in calculate
2017-02-21T09:51:09.005160+01:00 zephir.ac-test.fr zephir_backend: [-] #011    return callback(*args, **kwargs)
2017-02-21T09:51:09.005361+01:00 zephir.ac-test.fr zephir_backend: [-] #011  File "/usr/lib/python2.7/dist-packages/creole/eosfunc.py", line 771, in auto_eth
2017-02-21T09:51:09.005542+01:00 zephir.ac-test.fr zephir_backend: [-] #011    if 'br'+nom_carte in eths.keys():
2017-02-21T09:51:09.005735+01:00 zephir.ac-test.fr zephir_backend: [-] #011exceptions.TypeError: cannot concatenate 'str' and 'NoneType' objects

nom_carte semble être None dans ce cas (nom_zone_eth0 passée dans le dictionnaire et elle même calculée par get_zone_name, etc...)

#3 Updated by Bruno Boiget about 3 years ago

  • % Done changed from 0 to 100
  • Remaining (hours) changed from 6.0 to 0.25

#4 Updated by Scrum Master about 3 years ago

  • Status changed from En cours to Résolu

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

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

OK + ajout du test squash : ZE-T04-005 - Support des modules en mode DHCP dans Zéphir

Also available in: Atom PDF