Project

General

Profile

Tâche #25714

Scénario #25308: Vérifier DHCP-05-001 - Affichage des baux dynamiques dans l'application DHCP de l'EAD3 (2.7.0-b1)

L'action EAD3 "dhcp" n'est pas fonctionnelle sur Scribe 2.7.0

Added by Joël Cuissinat almost 2 years ago. Updated almost 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
11/05/2018
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

Maintenant que l'action "dhcpactivation" est corrigée (#25711), j'obtiens l'erreur suivante :

The minion function caused an exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/salt/minion.py", line 1493, 
in _thread_return return_data = executor.execute() File "/usr/lib/python3/dist-packages/salt/executors/direct_call.py", 
line 28, in execute return self.func(*self.args, **self.kwargs) File "/var/cache/salt/minion/extmods/modules/ead/__init__.py", 
line 55, in func return getattr(module, function)(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/ead/dhcp/__init__.py", 
line 39, in wrapper return func(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/ead/dhcp/__init__.py", 
line 202, in get_leases blocs = file(_get_config("LEASES_FILE")).read().split('}') NameError: name 'file' is not defined

Associated revisions

Revision bf6e9f4e (diff)
Added by Joël Cuissinat almost 2 years ago

Update for python3/EOLE 2.7

Ref: #25714

History

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

https://stackoverflow.com/questions/16736833/python-nameerror-name-file-is-not-defined#27177607

Après remplacement de "file" par "open" dans /srv/salt/_modules/ead/dhcp/__init__.py, on obtient une nouvelle erreur :

 The minion function caused an exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/salt/minion.py", 
line 1493, in _thread_return return_data = executor.execute() File "/usr/lib/python3/dist-packages/salt/executors/direct_call.py", 
line 28, in execute return self.func(*self.args, **self.kwargs) File "/var/cache/salt/minion/extmods/modules/ead/__init__.py", 
line 55, in func return getattr(module, function)(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/ead/dhcp/__init__.py", 
line 39, in wrapper return func(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/ead/dhcp/__init__.py", 
line 202, in get_leases blocs = open(_get_config("LEASES_FILE")).read().split('}') File "/var/cache/salt/minion/extmods/modules/ead/dhcp/__init__.py", 
line 161, in _get_config from ConfigParser import ConfigParser ModuleNotFoundError: No module named 'ConfigParser'

from ConfigParser import ConfigParser => from configparser import ConfigParser

res.return[0].local is undefined

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

  • Status changed from Nouveau to En cours

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

  • Description updated (diff)
  • Assigned To set to Joël Cuissinat

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

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

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

test OK dans campagne 2.7.0-rc1 : http://squash-tm.eole.lan/squash/executions/8512

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

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

Also available in: Atom PDF