traceback due to unencodable char in /etc/sysctl.d/10-ipv6-privacy.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
I'm doing regression testing on s390 and I just noticed the following traceback in the sysctl_attachment job when run on a s390 zKVM instance:
Exception in thread queue_worker:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
delegate.
File "/usr/lib/
self.
File "/usr/lib/
end='', file=stream)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 21: ordinal not in range(128)
plainbox-
installed from the dev PPA.
I can't find a char
Since plainbox has no logs, there is not much more I can do to help with this :(
Changed in plainbox-provider-checkbox: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
milestone: | none → future |
Changed in plainbox-provider-checkbox: | |
status: | Confirmed → Won't Fix |
Looking at the output of the command for that job, I think the culprit is the characters in this section of the output:
####### ####### ####### ####### ####### ####### ####### ####### ####### #### conf.all. accept_ redirects = 0 conf.all. accept_ redirects = 0 conf.all. secure_ redirects = 1 conf.all. send_redirects = 0 conf.all. accept_ source_ route = 0 conf.all. accept_ source_ route = 0 conf.all. log_martians = 1 conf.all. use_tempaddr = 2 conf.default. use_tempaddr = 2
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.
#net.ipv6.
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.
#net.ipv6.
#
# Log Martian Packets
#net.ipv4.
#
# IPv6 Privacy Extensions (RFC 4941)
# ---
# IPv6 typically uses a device's MAC address when choosing an IPv6 address
# to use in autoconfiguration. Privacy extensions allow using a randomly
# generated IPv6 address, which increases privacy.
#
# Acceptable values:
# 0 - don<E2><80><99>t use privacy extensions.
# 1 - generate privacy addresses
# 2 - prefer privacy addresses and use them over the normal addresses.
net.ipv6.
net.ipv6.
traceback occurs immediately after "Acceptable values" and as you can see, the definition for 0 has a weird char combo for the ' char. This is causing the traceback.
This appears in the file /etc/sysctl. d/10-ipv6- privacy. conf. RELEASE= 16.04 CODENAME= xenial DESCRIPTION= "Ubuntu 16.04.3 LTS" d/10-ipv6- privacy. conf conf.all. use_tempaddr = 2 conf.default. use_tempaddr = 2
ubuntu@s1lp9g003:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
ubuntu@s1lp9g003:~$ cat /etc/sysctl.
# IPv6 Privacy Extensions (RFC 4941)
# ---
# IPv6 typically uses a device's MAC address when choosing an IPv6 address
# to use in autoconfiguration. Privacy extensions allow using a randomly
# generated IPv6 address, which increases privacy.
#
# Acceptable values:
# 0 - don’t use privacy extensions.
# 1 - generate privacy addresses
# 2 - prefer privacy addresses and use them over the normal addresses.
net.ipv6.
net.ipv6.
Interestingly, I tried the same command that checkbox is using:
find /etc/sysctl.* -name \*.conf | xargs cat in both bash and sh, and in both cases, the output is properly displayed... this only happens in the subshell that python3 is spawning to run the command:
>>> cmd = 'cat /etc/sysctl. d/10-ipv6- privacy. conf' check_output( shlex.split( cmd),shell= False)
>>> subprocess.
b"# IPv6 Privacy Extensions (RFC 4941)\n# ---\n# IPv6 typically uses a device's MAC address when choosing an IPv6 address\n# to use in autoconfiguration. Privacy extensions allow using a randomly\n# generated IPv6 address, which increases privacy.\n#\n# Acceptable values:\n# 0 - don\xe2\x80\x99t...