Project

General

Profile

Tâche #26222

Scénario #26198: Traitement express MEN (50-51)

ead affiche un message d'erreur concernant le dhcp

Added by Thierry Bertrand over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
01/29/2018
Due date:
% Done:

100%

Remaining (hours):
0.0

Associated revisions

Revision c6b6b891 (diff)
Added by Daniel Dehennin over 2 years ago

auto_dns explode under python3

  • creole/eosfunc.py (auto_dns): decode the read lines as UTF-8.

Ref: #26222

History

#1 Updated by Thierry Bertrand over 2 years ago

lorsque l'on essaye de faire des actions de configuration bareos, une popup rouge s'affiche avec le message suivant :

An error occured: erreur inattendue "a bytes-like object is required, not 'str'" dans la fonction "auto_dns" avec les arguments "[]" et "{'nom_zone_eth0': 'ens4'}" pour l'option "Adresse IP du serveur DNS fourni par un serveur DHCP"

Aucune conf autour de dhcp n'est présente sur le dataset.

Dans /var/log/rsyslog/local/salt-minion, on retrouve une erreur semblable :

2018-12-10T16:14:01.418774+01:00 member-ad salt-minion21283: Traceback (most recent call last):
2018-12-10T16:14:01.419519+01:00 member-ad salt-minion21283: File "/var/cache/salt/minion/extmods/modules/ead/bareosremoteclient/__init__.py", line 29, in submit
2018-12-10T16:14:01.419598+01:00 member-ad salt-minion21283: return custom.submit(*args, **kwargs)
2018-12-10T16:14:01.419668+01:00 member-ad salt-minion21283: File "/var/cache/salt/minion/extmods/modules/ead/bareosremoteclient/custom.py", line 43, in submit
2018-12-10T16:14:01.419740+01:00 member-ad salt-minion21283: return action.submit(*args, **kwargs)
2018-12-10T16:14:01.419878+01:00 member-ad salt-minion21283: File "/var/cache/salt/minion/extmods/modules/ead/bareosremoteclient/action.py", line 64, in submit
2018-12-10T16:14:01.419947+01:00 member-ad salt-minion21283: config_save_values(config, modname)
2018-12-10T16:14:01.420015+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/creole/loader1.py", line 801, in config_save_values
2018-12-10T16:14:01.420133+01:00 member-ad salt-minion21283: store = config_get_values(config, namespace, check_mandatory)
2018-12-10T16:14:01.420212+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/creole/loader1.py", line 740, in config_get_values
2018-12-10T16:14:01.420302+01:00 member-ad salt-minion21283: ).mandatory_warnings(force_permissive=True))
2018-12-10T16:14:01.420417+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 690, in mandatory_warnings
2018-12-10T16:14:01.420502+01:00 member-ad salt-minion21283: for path in _mandatory_warnings(descr):
2018-12-10T16:14:01.420625+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 661, in _mandatory_warnings
2018-12-10T16:14:01.420800+01:00 member-ad salt-minion21283: for path in _mandatory_warnings(opt, currpath + [name]):
2018-12-10T16:14:01.420922+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 661, in _mandatory_warnings
2018-12-10T16:14:01.421035+01:00 member-ad salt-minion21283: for path in _mandatory_warnings(opt, currpath + [name]):
2018-12-10T16:14:01.426005+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 677, in _mandatory_warnings
2018-12-10T16:14:01.426296+01:00 member-ad salt-minion21283: display_warnings=False)
2018-12-10T16:14:01.426486+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 299, in _get_cached_value
2018-12-10T16:14:01.426687+01:00 member-ad salt-minion21283: display_warnings=display_warnings)
2018-12-10T16:14:01.426974+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 330, in _get_validated_value
2018-12-10T16:14:01.427154+01:00 member-ad salt-minion21283: with_meta, masterlen, session, validate)
2018-12-10T16:14:01.427328+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 145, in _getvalue
2018-12-10T16:14:01.427505+01:00 member-ad salt-minion21283: submulti_index, validate)
2018-12-10T16:14:01.427704+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/value.py", line 67, in _getdefaultvalue
2018-12-10T16:14:01.427877+01:00 member-ad salt-minion21283: index=index, validate=validate)
2018-12-10T16:14:01.428059+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/autolib.py", line 239, in carry_out_calculation
2018-12-10T16:14:01.428231+01:00 member-ad salt-minion21283: ret = calculate(option, callback, is_validator, args, kwargs)
2018-12-10T16:14:01.428423+01:00 member-ad salt-minion21283: File "/usr/lib/python3/dist-packages/tiramisu/autolib.py", line 286, in calculate
2018-12-10T16:14:01.428740+01:00 member-ad salt-minion21283: raise ConfigError(msg)
2018-12-10T16:14:01.428941+01:00 member-ad salt-minion21283: tiramisu.error.ConfigError: erreur inattendue "a bytes-like object is required, not 'str'" dans la fonction "auto_dns" avec les arguments "[]" et "{'nom_zone_eth0': 'ens4'}" pour l'option "Adresse IP du serveur DNS fourni par un serveur DHCP"

#2 Updated by Benjamin Bohard over 2 years ago

La fonction en cause est auto_dns dans eosfuncs.py

#3 Updated by Benjamin Bohard over 2 years ago

  • Status changed from Nouveau to En cours

#4 Updated by Benjamin Bohard over 2 years ago

  • Assigned To set to Benjamin Bohard

#5 Updated by Thierry Bertrand over 2 years ago

différents tests ont été faits pour le module sauvegarde où l'action configurer était nécessaire; tous sont ok

#6 Updated by Thierry Bertrand over 2 years ago

  • Status changed from En cours to Fermé
  • % Done changed from 0 to 100
  • Remaining (hours) set to 0.0

Also available in: Atom PDF