"label empty or too long" error #125
Labels
No Label
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#125
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: telmich
When running
[13:48] manager:~% cdist config -c ~/vcs/ungleich-dot-cdist/ -vvp10 -bj6 black{1..3}.place6.ungleich.ch server{1..4,6}.place6.ungleich.ch
I get
VERBOSE: [24289]: server6.place6.ungleich.ch: Running object __dcl_ceph/
INFO: [24289]: server6.place6.ungleich.ch: Finished successful run in 14.26 seconds
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/encodings/idna.py", line 165, in encode
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/nico/vcs/cdist/cdist/config.py", line 356, in onehost
target_host = ipaddr.resolve_target_addresses(host, family)
File "/home/nico/vcs/cdist/cdist/util/ipaddr.py", line 27, in resolve_target_addresses
host_name = resolve_target_host_name(host, family)
File "/home/nico/vcs/cdist/cdist/util/ipaddr.py", line 41, in resolve_target_host_name
host, None, family=family, type=socket.SOCK_STREAM)[0][4][0]
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 79, in
commandline()
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 56, in commandline
args.func(args)
File "/home/nico/vcs/cdist/cdist/config.py", line 273, in commandline
jobs=args.parallel)
File "/home/nico/vcs/cdist/cdist/mputil.py", line 61, in mp_pool_run
retval.append(f.result())
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
[13:48] manager:~% cdist -V
cdist 4.8.0-37-g54ca7b40
[13:48] manager:~%
Created by: telmich
+5 points for you! You are absolutely right and the proposed solution is right as well! Please merge!
Created by: darko-poljak
@telmich But you were running:
[13:48] manager:~% cdist config -c ~/vcs/ungleich-dot-cdist/ -vvp10 -bj6 black{1..3}.place6.ungleich.ch server{1..4,6}.place6.ungleich.ch
where you haveserver{1..4,6}.place6.ungleich.ch
.And
echo server{1..4,6}.place6.ungleich.ch
in bash gives:server1..4.place6.ungleich.ch server6.place6.ungleich.ch
Created by: telmich
@darko-poljak no - you are missing shell expansion here: server{1..4} is in curly brackets and is being expanded by shell
Created by: darko-poljak
@telmich Is this wanted behavior?
Created by: darko-poljak
@telmich
Notice
server1..4.place6.ungleich.ch
. IDNA splits host parts by dot, and..
results in empty label.It seems, in bash, you cannot mix
..
and,
inside{}
.So we should catch errors in
cdist/util/ipaddr.py
and output user friendly error.Created by: darko-poljak
@telmich And with multiple hosts but not jobs nor parallel mode? (without -p and without -j).
Created by: telmich
Not reproducible with one host only.
Created by: darko-poljak
@telmich And can you post whole output when running with -S (disable saving output stream)?
Does this happend if you specify only one host?
Created by: darko-poljak
@telmich And without -p ?
Created by: telmich
This also happens without -j:
[13:49] manager:~% cdist config -c ~/vcs/ungleich-dot-cdist/ -vvp10 black{1..3}.place6.ungleich.ch server{1..4,6}.place6.ungleich.ch
causes
VERBOSE: [27410]: server6.place6.ungleich.ch: Running object __ungleich_monit/ungleich
VERBOSE: [27410]: server6.place6.ungleich.ch: Running object __dcl_ceph/
INFO: [27410]: server6.place6.ungleich.ch: Finished successful run in 27.89 seconds
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/encodings/idna.py", line 165, in encode
raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/nico/vcs/cdist/cdist/config.py", line 356, in onehost
target_host = ipaddr.resolve_target_addresses(host, family)
File "/home/nico/vcs/cdist/cdist/util/ipaddr.py", line 27, in resolve_target_addresses
host_name = resolve_target_host_name(host, family)
File "/home/nico/vcs/cdist/cdist/util/ipaddr.py", line 41, in resolve_target_host_name
host, None, family=family, type=socket.SOCK_STREAM)[0][4][0]
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 79, in
commandline()
File "/home/nico/vcs/cdist/bin/../scripts/cdist", line 56, in commandline
args.func(args)
File "/home/nico/vcs/cdist/cdist/config.py", line 273, in commandline
jobs=args.parallel)
File "/home/nico/vcs/cdist/cdist/mputil.py", line 61, in mp_pool_run
retval.append(f.result())
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)